From b9877473545490b0e6c087cd56f8a70a0849417b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20B=C5=82aszczyk?= Date: Thu, 23 May 2024 13:43:10 +0200 Subject: [PATCH] fix: keto and kratos job resources (#688) --- helm/charts/keto/README.md | 1 + helm/charts/keto/templates/job-migration.yaml | 2 +- helm/charts/keto/values.yaml | 3 +++ helm/charts/kratos/templates/job-migration.yaml | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/helm/charts/keto/README.md b/helm/charts/keto/README.md index 36c2137d32..818d8eeaa7 100644 --- a/helm/charts/keto/README.md +++ b/helm/charts/keto/README.md @@ -95,6 +95,7 @@ Access Control Policies as a Server | job.podMetadata | object | `{"annotations":{},"labels":{}}` | Specify pod metadata, this metadata is added directly to the pod, and not higher objects | | job.podMetadata.annotations | object | `{}` | Extra pod level annotations | | job.podMetadata.labels | object | `{}` | Extra pod level labels | +| job.resources | object | `{}` | Job resources | | job.serviceAccount | object | `{"annotations":{"helm.sh/hook":"pre-install, pre-upgrade","helm.sh/hook-delete-policy":"before-hook-creation","helm.sh/hook-weight":"0"},"create":true,"name":""}` | Specify the serviceAccountName value. In some situations it is needed to provides specific permissions to Hydra deployments Like for example installing Hydra on a cluster with a PosSecurityPolicy and Istio. Uncoment if it is needed to provide a ServiceAccount for the Hydra deployment. | | job.serviceAccount.annotations | object | `{"helm.sh/hook":"pre-install, pre-upgrade","helm.sh/hook-delete-policy":"before-hook-creation","helm.sh/hook-weight":"0"}` | Annotations to add to the service account | | job.serviceAccount.create | bool | `true` | Specifies whether a service account should be created | diff --git a/helm/charts/keto/templates/job-migration.yaml b/helm/charts/keto/templates/job-migration.yaml index d25d5265d1..01ae561594 100644 --- a/helm/charts/keto/templates/job-migration.yaml +++ b/helm/charts/keto/templates/job-migration.yaml @@ -85,7 +85,7 @@ spec: {{- with $migrationExtraEnv }} {{- toYaml . | nindent 10 }} {{- end }} - {{- with .Values.keto.automigration.resources }} + {{- with .Values.job.resources }} resources: {{- toYaml . | nindent 10 }} {{- end }} diff --git a/helm/charts/keto/values.yaml b/helm/charts/keto/values.yaml index 8ebfaff42a..2f0a1a808a 100644 --- a/helm/charts/keto/values.yaml +++ b/helm/charts/keto/values.yaml @@ -95,6 +95,9 @@ job: # -- Configure node tolerations. tolerations: [] + # -- Job resources + resources: {} + # -- If you want to add lifecycle hooks. lifecycle: "" # lifecycle: | diff --git a/helm/charts/kratos/templates/job-migration.yaml b/helm/charts/kratos/templates/job-migration.yaml index 13dbfdef82..f6d4f8ae4e 100644 --- a/helm/charts/kratos/templates/job-migration.yaml +++ b/helm/charts/kratos/templates/job-migration.yaml @@ -75,7 +75,7 @@ spec: - secretRef: name: {{ .Values.deployment.environmentSecretsName }} {{- end}} - {{- with .Values.kratos.automigration.resources }} + {{- with .Values.job.resources }} resources: {{- toYaml . | nindent 10 }} {{- end }}