Skip to content

Commit

Permalink
Added flag for enabling the application sync using impersonation feature
Browse files Browse the repository at this point in the history
Signed-off-by: anandf <anjoseph@redhat.com>
  • Loading branch information
anandf committed Apr 10, 2024
1 parent 49b65a7 commit 5493033
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 78 deletions.
3 changes: 3 additions & 0 deletions assets/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -4526,6 +4526,9 @@
"help": {
"$ref": "#/definitions/clusterHelp"
},
"impersonationEnabled": {
"type": "boolean"
},
"kustomizeOptions": {
"$ref": "#/definitions/v1alpha1KustomizeOptions"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ So that, I can use a generic convention of naming service accounts and avoid ass

#### Component: ArgoCD Application Controller

- Provide a configuration in `argocd-cm` which can be modified to enable the Impersonation feature. Set `applicationcontroller.enable.impersonation: true` in the Argo CD ConfigMap. Default value of `applicationcontroller.enable.impersonation` would be `false` and user has to explicitly override it to use this feature.
- Provide a configuration in `argocd-cm` which can be modified to enable the Impersonation feature. Set `application.enable.impersonation: true` in the Argo CD ConfigMap. Default value of `application.enable.impersonation` would be `false` and user has to explicitly override it to use this feature.
- Provide an option to override the Impersonation feature using environment variables.
Set `ARGOCD_APPLICATION_CONTROLLER_ENABLE_IMPERSONATION=true` in the Application controller environment variables. Default value of the environment variable must be `false` and user has to explicitly set it to `true` to use this feature.
- Provide an option to enable this feature using a command line flag `--enable-impersonation`. This new argument option needs to be added to the Application controller args.
Expand Down Expand Up @@ -383,7 +383,6 @@ spec:
destinations:
- namespace: guestbook
server: https://kubernetes.default.svc
serviceAccountName: guestbook-deployer
destinationServiceAccounts:
- namespace: guestbook
server: https://kubernetes.default.svc
Expand Down
196 changes: 120 additions & 76 deletions pkg/apiclient/settings/settings.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/settings/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ func (s *Server) Get(ctx context.Context, q *settingspkg.SettingsQuery) (*settin
TrackingMethod: trackingMethod,
ExecEnabled: argoCDSettings.ExecEnabled,
AppsInAnyNamespaceEnabled: s.appsInAnyNamespaceEnabled,
ImpersonationEnabled: argoCDSettings.ImpersonationEnabled,
}

if sessionmgr.LoggedIn(ctx) || s.disableAuth {
Expand Down
1 change: 1 addition & 0 deletions server/settings/settings.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ message Settings {
bool execEnabled = 22;
string controllerNamespace = 23;
bool appsInAnyNamespaceEnabled = 24;
bool impersonationEnabled = 25;
}

message GoogleAnalyticsConfig {
Expand Down
Loading

0 comments on commit 5493033

Please sign in to comment.