diff --git a/applications/openfga.yaml b/applications/openfga.yaml index bd062347..ad364133 100644 --- a/applications/openfga.yaml +++ b/applications/openfga.yaml @@ -27,16 +27,16 @@ spec: namespace: idp server: '{{ .cluster }}' source: - repoURL: https://gitlab.com/oceanbox/manifests.git - targetRevision: main - path: kustomizations/openfga - plugin: - name: kustomize-helm-with-rewrite - parameters: - - name: env - string: '{{ .env }}' - - name: hostname - string: '{{ .hostname }}' + - repoURL: https://openfga.github.io/helm-charts + targetRevision: 0.2.12 + chart: openfga + helm: + valueFiles: + - $values/kustomizations/openfga/values.yaml + - $values/kustomizations/openfga/values-{{ env }}.yaml + - repoURL: https://gitlab.com/oceanbox/manifests.git + targetRevision: main + ref: values templatePatch: | {{- if .autoSync }} spec: diff --git a/kustomizations/openfga/base/cluster.yaml b/kustomizations/openfga/base/cluster.yaml deleted file mode 100644 index 05c28a4c..00000000 --- a/kustomizations/openfga/base/cluster.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: postgresql.cnpg.io/v1 -kind: Cluster -metadata: - name: openfga-db -spec: - enableSuperuserAccess: true - instances: 2 - logLevel: info - storage: - pvcTemplate: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - storageClassName: managed-nfs-storage - volumeMode: Filesystem - resizeInUseVolumes: true - size: 1Gi diff --git a/kustomizations/openfga/base/kustomization.yaml b/kustomizations/openfga/base/kustomization.yaml deleted file mode 100644 index 699bc6a6..00000000 --- a/kustomizations/openfga/base/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -generatorOptions: - disableNameSuffixHash: true -resources: - - cluster.yaml - - _manifest.yaml diff --git a/kustomizations/openfga/chart b/kustomizations/openfga/chart deleted file mode 100644 index 708e04b9..00000000 --- a/kustomizations/openfga/chart +++ /dev/null @@ -1 +0,0 @@ -openfga/openfga diff --git a/kustomizations/openfga/prod/kustomization.yaml b/kustomizations/openfga/prod/kustomization.yaml deleted file mode 100644 index de96953d..00000000 --- a/kustomizations/openfga/prod/kustomization.yaml +++ /dev/null @@ -1,3 +0,0 @@ -namePrefix: prod- -resources: - - ../base diff --git a/kustomizations/openfga/staging/cluster_patch.yaml b/kustomizations/openfga/staging/cluster_patch.yaml deleted file mode 100644 index 965bd964..00000000 --- a/kustomizations/openfga/staging/cluster_patch.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: /spec/instances - value: 1 diff --git a/kustomizations/openfga/staging/kustomization.yaml b/kustomizations/openfga/staging/kustomization.yaml deleted file mode 100644 index 423514ef..00000000 --- a/kustomizations/openfga/staging/kustomization.yaml +++ /dev/null @@ -1,9 +0,0 @@ -namePrefix: staging- -patches: - - target: - group: postgresql.cnpg.io - version: v1 - kind: Cluster - path: cluster_patch.yaml -resources: - - ../base diff --git a/kustomizations/openfga/values-prod.yaml b/kustomizations/openfga/values-prod.yaml index f6a980f1..7e963d1c 100644 --- a/kustomizations/openfga/values-prod.yaml +++ b/kustomizations/openfga/values-prod.yaml @@ -2,15 +2,15 @@ replicaCount: 2 datastore: engine: postgres - uri: postgres://prod-openfga-db.idp.svc.cluster.local:5432/app?sslmode=disable + uri: postgres://prod-openfga-postgresql.idp.svc.cluster.local:5432/openfga?sslmode=disable postgresql: enabled: true auth: - username: app - existingSecret: prod-openfga-db-app + existingSecret: prod-openfga-postgresql secretKeys: - userPasswordKey: password + adminPasswordKey: admin-password + userPasswordKey: postgres-password playground: enabled: false diff --git a/kustomizations/openfga/values-staging.yaml b/kustomizations/openfga/values-staging.yaml index 782b0899..32d57026 100644 --- a/kustomizations/openfga/values-staging.yaml +++ b/kustomizations/openfga/values-staging.yaml @@ -2,15 +2,15 @@ replicaCount: 1 datastore: engine: postgres - uri: postgres://staging-openfga-db.idp.svc.cluster.local:5432/app?sslmode=disable + uri: postgres://staging-openfga-postgresql.idp.svc.cluster.local:5432/openfga?sslmode=disable postgresql: enabled: true auth: - username: app - existingSecret: staging-openfga-db-app + existingSecret: staging-openfga-postgresql secretKeys: - userPasswordKey: password + adminPasswordKey: admin-password + userPasswordKey: postgres-password playground: enabled: true diff --git a/kustomizations/openfga/values.yaml b/kustomizations/openfga/values.yaml new file mode 100644 index 00000000..cfa774c9 --- /dev/null +++ b/kustomizations/openfga/values.yaml @@ -0,0 +1,3 @@ +fullnameOverride: openfga + +