From 8e8b33a51e113be84f69be842ff44900e5607009 Mon Sep 17 00:00:00 2001 From: d3adb5 Date: Sun, 14 Jul 2024 09:46:01 -0700 Subject: [PATCH] fix(operators): move keycloak operator to own namespace Move the Keycloak operator back to its own namespace, but this time separated from the Keycloak deployments. This is being done because the Keycloak Operator does not support the MultiNamespace or AllNamespaces install types for its OperatorGroup. --- .../{subscriptions.yaml => global.yaml} | 4 ++-- app-of-apps/templates/operators/keycloak.yaml | 21 +++++++++++++++++++ app-of-apps/templates/operators/project.yaml | 4 +++- .../{ => global}/crunchy-postgresql.yaml | 0 operators/{ => global}/external-secrets.yaml | 0 operators/keycloak/operatorgroup.yaml | 7 +++++++ .../subscription.yaml} | 0 7 files changed, 33 insertions(+), 3 deletions(-) rename app-of-apps/templates/operators/{subscriptions.yaml => global.yaml} (89%) create mode 100644 app-of-apps/templates/operators/keycloak.yaml rename operators/{ => global}/crunchy-postgresql.yaml (100%) rename operators/{ => global}/external-secrets.yaml (100%) create mode 100644 operators/keycloak/operatorgroup.yaml rename operators/{keycloak-operator.yaml => keycloak/subscription.yaml} (100%) diff --git a/app-of-apps/templates/operators/subscriptions.yaml b/app-of-apps/templates/operators/global.yaml similarity index 89% rename from app-of-apps/templates/operators/subscriptions.yaml rename to app-of-apps/templates/operators/global.yaml index bdb3070..d3aaab5 100644 --- a/app-of-apps/templates/operators/subscriptions.yaml +++ b/app-of-apps/templates/operators/global.yaml @@ -1,7 +1,7 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: - name: operators + name: global-operators finalizers: - resources-finalizer.argocd.argoproj.io spec: @@ -9,7 +9,7 @@ spec: source: repoURL: {{ .Values.appOfApps.repoURL }} targetRevision: HEAD - path: operators + path: operators/global destination: server: https://kubernetes.default.svc namespace: operators diff --git a/app-of-apps/templates/operators/keycloak.yaml b/app-of-apps/templates/operators/keycloak.yaml new file mode 100644 index 0000000..a0329ac --- /dev/null +++ b/app-of-apps/templates/operators/keycloak.yaml @@ -0,0 +1,21 @@ +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: keycloak-operator + finalizers: + - resources-finalizer.argocd.argoproj.io +spec: + project: operators + source: + repoURL: {{ .Values.appOfApps.repoURL }} + targetRevision: HEAD + path: operators/keycloak + destination: + server: https://kubernetes.default.svc + namespace: keycloak-operator + syncPolicy: + automated: + prune: true + selfHeal: true + syncOptions: + - CreateNamespace=true diff --git a/app-of-apps/templates/operators/project.yaml b/app-of-apps/templates/operators/project.yaml index ec5231d..4724d74 100644 --- a/app-of-apps/templates/operators/project.yaml +++ b/app-of-apps/templates/operators/project.yaml @@ -10,9 +10,11 @@ spec: - {{ .Values.appOfApps.repoURL }} - "https://github.com/operator-framework/operator-lifecycle-manager" destinations: + - namespace: operator-lifecycle-manager + server: https://kubernetes.default.svc - namespace: operators server: https://kubernetes.default.svc - - namespace: operator-lifecycle-manager + - namespace: keycloak-operator server: https://kubernetes.default.svc clusterResourceWhitelist: - group: '' diff --git a/operators/crunchy-postgresql.yaml b/operators/global/crunchy-postgresql.yaml similarity index 100% rename from operators/crunchy-postgresql.yaml rename to operators/global/crunchy-postgresql.yaml diff --git a/operators/external-secrets.yaml b/operators/global/external-secrets.yaml similarity index 100% rename from operators/external-secrets.yaml rename to operators/global/external-secrets.yaml diff --git a/operators/keycloak/operatorgroup.yaml b/operators/keycloak/operatorgroup.yaml new file mode 100644 index 0000000..4f5e399 --- /dev/null +++ b/operators/keycloak/operatorgroup.yaml @@ -0,0 +1,7 @@ +apiVersion: operators.coreos.com/v1 +kind: OperatorGroup +metadata: + name: keycloak-operator +spec: + targetNamespaces: + - keycloak diff --git a/operators/keycloak-operator.yaml b/operators/keycloak/subscription.yaml similarity index 100% rename from operators/keycloak-operator.yaml rename to operators/keycloak/subscription.yaml