feat(k8s): advanced deployment from Git repo EE-447 (#5166)
* feat(stack): UI updates in git repo deployment method for k8s EE-640. (#5097) * feat(stack): UI updates in git repo deployment method for k8s EE-640. * feat(stack): supports the combination of GIT + COMPOSE. * feat(stack): rename variable * feat(stack): add git repo deployment method for k8s EE-638 * cleanup * update payload validation rules * make repo ref optional in frond end Co-authored-by: fhanportainer <79428273+fhanportainer@users.noreply.github.com>
This commit is contained in:
@@ -369,21 +369,16 @@ angular.module('portainer.app').factory('StackService', [
|
||||
return action(name, stackFileContent, env, endpointId);
|
||||
};
|
||||
|
||||
async function kubernetesDeployAsync(endpointId, namespace, content, compose) {
|
||||
async function kubernetesDeployAsync(endpointId, method, payload) {
|
||||
try {
|
||||
const payload = {
|
||||
StackFileContent: content,
|
||||
ComposeFormat: compose,
|
||||
Namespace: namespace,
|
||||
};
|
||||
await Stack.create({ method: 'undefined', type: 3, endpointId: endpointId }, payload).$promise;
|
||||
await Stack.create({ endpointId: endpointId, method: method, type: 3 }, payload).$promise;
|
||||
} catch (err) {
|
||||
throw { err: err };
|
||||
}
|
||||
}
|
||||
|
||||
service.kubernetesDeploy = function (endpointId, namespace, content, compose) {
|
||||
return $async(kubernetesDeployAsync, endpointId, namespace, content, compose);
|
||||
service.kubernetesDeploy = function (endpointId, method, payload) {
|
||||
return $async(kubernetesDeployAsync, endpointId, method, payload);
|
||||
};
|
||||
|
||||
service.start = start;
|
||||
|
||||
Reference in New Issue
Block a user