Skip to content
Snippets Groups Projects

Automation of putting Drupal clones behind SSO

Merged Vasvi Sharma requested to merge ssoproxy-clones into master
All threads resolved!
2 files
+ 1193
1173
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -51,6 +51,7 @@ const (
oidcSecretName = "oidc-client-secret"
ssoProxyLabel = "drupal.okd.cern.ch/full-sso"
sitePrimaryLabel = "drupal.webservices.cern.ch/isPrimary"
)
var (
@@ -245,7 +246,7 @@ func (r *DrupalSiteReconciler) Reconcile(ctx context.Context, req ctrl.Request)
if drupalSite.Labels == nil {
drupalSite.Labels = map[string]string{}
}
if namespace.Labels[ssoProxyLabel] == "true" && drupalSite.Labels[ssoProxyLabel] != "true" {
if (namespace.Labels[ssoProxyLabel] == "true" || drupalSite.Labels[sitePrimaryLabel] != "true" ) && drupalSite.Labels[ssoProxyLabel] != "true" {
drupalSite.Labels[ssoProxyLabel] = "true"
return r.updateCRorFailReconcile(ctx, log, drupalSite)
}
Loading