mirror of
https://github.com/portainer/portainer.git
synced 2025-07-30 10:49:40 +02:00
fix(network-creation): force overlay network creation on manager node (#2622)
* fix(network-creation): force overlay network creation on manager node * fix(app): fix function override * fix(app): use portainerAgentManagerOperation in interceptor
This commit is contained in:
parent
3a3577754e
commit
34667bd3b3
4 changed files with 22 additions and 3 deletions
|
@ -126,6 +126,7 @@ angular.module('portainer.docker')
|
|||
|
||||
function createNetwork(context) {
|
||||
HttpRequestHelper.setPortainerAgentTargetHeader(context.nodeName);
|
||||
HttpRequestHelper.setPortainerAgentManagerOperation(context.managerOperation);
|
||||
|
||||
$scope.state.actionInProgress = true;
|
||||
NetworkService.create(context.networkConfiguration)
|
||||
|
@ -162,12 +163,17 @@ angular.module('portainer.docker')
|
|||
|
||||
var creationContext = {
|
||||
nodeName: $scope.formValues.NodeName,
|
||||
managerOperation: false,
|
||||
networkConfiguration: networkConfiguration,
|
||||
userDetails: userDetails,
|
||||
accessControlData: accessControlData,
|
||||
reload: true
|
||||
};
|
||||
|
||||
if ($scope.applicationState.endpoint.mode.agentProxy && $scope.applicationState.endpoint.mode.provider === 'DOCKER_SWARM_MODE' && $scope.config.Driver === 'overlay') {
|
||||
creationContext.managerOperation = true;
|
||||
}
|
||||
|
||||
if ($scope.config.Driver === 'macvlan') {
|
||||
if ($scope.formValues.Macvlan.Scope === 'local') {
|
||||
modifyNetworkConfigurationForMacvlanConfigOnly(networkConfiguration);
|
||||
|
@ -205,4 +211,4 @@ angular.module('portainer.docker')
|
|||
|
||||
initView();
|
||||
}
|
||||
]);
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue