Skip to content

Commit 58e5257

Browse files
Rizwana777jgwest
andauthored
Add deprecation message for Keycloak (argoproj-labs#1759)
* Add deprecation message for Keycloak Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> * Rebase to latest from master branch Signed-off-by: Jonathan West <jonwest@redhat.com> --------- Signed-off-by: Rizwana777 <rizwananaaz177@gmail.com> Signed-off-by: Jonathan West <jonwest@redhat.com> Co-authored-by: Jonathan West <jonwest@redhat.com>
1 parent 6711c59 commit 58e5257

File tree

7 files changed

+16
-7
lines changed

7 files changed

+16
-7
lines changed

api/v1alpha1/argocd_types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,7 @@ type ArgoCDSSOSpec struct {
636636
Dex *ArgoCDDexSpec `json:"dex,omitempty"`
637637

638638
// Keycloak contains the configuration for Argo CD keycloak authentication
639+
// Deprecated: This field is planned for removal in a future release and will no longer be supported.
639640
Keycloak *ArgoCDKeycloakSpec `json:"keycloak,omitempty"`
640641

641642
// Deprecated field. Support dropped in v1beta1 version.

bundle/manifests/argoproj.io_argocds.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7111,8 +7111,9 @@ spec:
71117111
Image is the SSO container image.
71127112
type: string
71137113
keycloak:
7114-
description: Keycloak contains the configuration for Argo CD keycloak
7115-
authentication
7114+
description: |-
7115+
Keycloak contains the configuration for Argo CD keycloak authentication
7116+
Deprecated: This field is planned for removal in a future release and will no longer be supported.
71167117
properties:
71177118
host:
71187119
description: Host is the hostname to use for Ingress/Route

config/crd/bases/argoproj.io_argocds.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7100,8 +7100,9 @@ spec:
71007100
Image is the SSO container image.
71017101
type: string
71027102
keycloak:
7103-
description: Keycloak contains the configuration for Argo CD keycloak
7104-
authentication
7103+
description: |-
7104+
Keycloak contains the configuration for Argo CD keycloak authentication
7105+
Deprecated: This field is planned for removal in a future release and will no longer be supported.
71057106
properties:
71067107
host:
71077108
description: Host is the hostname to use for Ingress/Route

controllers/argocd/configmap.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ func (r *ReconcileArgoCD) reconcileArgoConfigMap(cr *argoproj.ArgoCD) error {
467467
}
468468
cm.Data[common.ArgoCDKeyDexConfig] = existingCM.Data[common.ArgoCDKeyDexConfig]
469469
} else if cr.Spec.SSO != nil && cr.Spec.SSO.Provider.ToLower() == argoproj.SSOProviderTypeKeycloak {
470+
log.Info("Keycloak SSO provider is deprecated and will be removed in a future release. Please migrate to Dex or another supported provider.")
470471
// retain oidc.config during reconcilliation when keycloak is configured
471472
cm.Data[common.ArgoCDKeyOIDCConfig] = existingCM.Data[common.ArgoCDKeyOIDCConfig]
472473
}

controllers/argocd/sso.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ func (r *ReconcileArgoCD) reconcileSSO(cr *argoproj.ArgoCD) error {
108108

109109
// case 3
110110
if cr.Spec.SSO.Provider.ToLower() == argoproj.SSOProviderTypeKeycloak {
111+
log.Info("Keycloak SSO provider is deprecated and will be removed in a future release. Please migrate to Dex or another supported provider.")
111112
// Relevant SSO settings at play are `.spec.sso.keycloak` fields, `.spec.sso.dex`
112-
113113
if cr.Spec.SSO.Dex != nil {
114114
// new dex spec fields are expressed when `.spec.sso.provider` is set to keycloak ==> conflict
115115
errMsg = "cannot supply dex configuration when requested SSO provider is keycloak"
@@ -173,6 +173,8 @@ func (r *ReconcileArgoCD) reconcileSSO(cr *argoproj.ArgoCD) error {
173173
// keycloak
174174
if cr.Spec.SSO != nil && cr.Spec.SSO.Provider.ToLower() == argoproj.SSOProviderTypeKeycloak {
175175

176+
log.Info("Keycloak SSO provider is deprecated and will be removed in a future release. Please migrate to Dex or another supported provider.")
177+
176178
// Trigger reconciliation of any Dex resources so they get deleted
177179
if err := r.reconcileDexResources(cr); err != nil && !apiErrors.IsNotFound(err) {
178180
log.Error(err, "Unable to delete existing dex resources before configuring keycloak")
@@ -205,6 +207,7 @@ func (r *ReconcileArgoCD) deleteSSOConfiguration(newCr *argoproj.ArgoCD, oldCr *
205207
log.Info("uninstalling existing SSO configuration")
206208

207209
if oldCr.Spec.SSO.Provider.ToLower() == argoproj.SSOProviderTypeKeycloak {
210+
log.Info("Keycloak SSO provider is deprecated and will be removed in a future release. Please migrate to Dex or another supported provider.")
208211
if err := deleteKeycloakConfiguration(newCr); err != nil {
209212
log.Error(err, "Unable to delete existing keycloak configuration")
210213
return fmt.Errorf("unable to delete existing keycloak configuration. error: %w", err)

controllers/argocd/status.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ func (r *ReconcileArgoCD) reconcileStatusSSO(cr *argoproj.ArgoCD) error {
226226
if cr.Spec.SSO != nil && cr.Spec.SSO.Provider.ToLower() == argoproj.SSOProviderTypeDex {
227227
return r.reconcileStatusDex(cr)
228228
} else if cr.Spec.SSO != nil && cr.Spec.SSO.Provider.ToLower() == argoproj.SSOProviderTypeKeycloak {
229+
log.Info("Keycloak SSO provider is deprecated and will be removed in a future release. Please migrate to Dex or another supported provider.")
229230
return r.reconcileStatusKeycloak(cr)
230231
}
231232
} else {

deploy/olm-catalog/argocd-operator/0.14.0/argoproj.io_argocds.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7111,8 +7111,9 @@ spec:
71117111
Image is the SSO container image.
71127112
type: string
71137113
keycloak:
7114-
description: Keycloak contains the configuration for Argo CD keycloak
7115-
authentication
7114+
description: |-
7115+
Keycloak contains the configuration for Argo CD keycloak authentication
7116+
Deprecated: This field is planned for removal in a future release and will no longer be supported.
71167117
properties:
71177118
host:
71187119
description: Host is the hostname to use for Ingress/Route

0 commit comments

Comments
 (0)