From 0a932b2579846676b9fcf68f66d0e0125c08ea09 Mon Sep 17 00:00:00 2001 From: Dave Lahn Date: Thu, 9 Jan 2025 09:52:32 -0500 Subject: [PATCH] feat: allow service annotations in keto --- hacks/values/keto.yaml | 3 +++ helm/charts/keto/templates/service-extraServices.yaml | 4 ++++ helm/charts/keto/templates/service-metrics.yaml | 4 ++++ helm/charts/keto/templates/service-read.yaml | 4 ++++ helm/charts/keto/templates/service-write.yaml | 4 ++++ helm/charts/keto/values.yaml | 5 +++++ 6 files changed, 24 insertions(+) diff --git a/hacks/values/keto.yaml b/hacks/values/keto.yaml index 2239da3351..fd4127a272 100644 --- a/hacks/values/keto.yaml +++ b/hacks/values/keto.yaml @@ -89,6 +89,9 @@ job: ory.sh/pod_annotation: keto_migrate service: + read: + annotations: + ory.sh/test-annotations: "true" metrics: enabled: true diff --git a/helm/charts/keto/templates/service-extraServices.yaml b/helm/charts/keto/templates/service-extraServices.yaml index ba04b1ab4e..5fd5d26952 100644 --- a/helm/charts/keto/templates/service-extraServices.yaml +++ b/helm/charts/keto/templates/service-extraServices.yaml @@ -12,6 +12,10 @@ metadata: labels: app.kubernetes.io/component: {{ $ServiceName }} {{- include "keto.labels" $ | nindent 4 }} + {{- with $ServiceData.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ $ServiceData.type }} {{- if eq $ServiceData.type "LoadBalancer" }} diff --git a/helm/charts/keto/templates/service-metrics.yaml b/helm/charts/keto/templates/service-metrics.yaml index ce15ab6242..7fa27bf676 100644 --- a/helm/charts/keto/templates/service-metrics.yaml +++ b/helm/charts/keto/templates/service-metrics.yaml @@ -9,6 +9,10 @@ metadata: labels: app.kubernetes.io/component: metrics {{- include "keto.labels" . | nindent 4 }} + {{- with .Values.service.metrics.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.metrics.type }} {{- if eq .Values.service.metrics.type "LoadBalancer" }} diff --git a/helm/charts/keto/templates/service-read.yaml b/helm/charts/keto/templates/service-read.yaml index b86a615fa0..daec4b04a7 100644 --- a/helm/charts/keto/templates/service-read.yaml +++ b/helm/charts/keto/templates/service-read.yaml @@ -10,6 +10,10 @@ metadata: labels: app.kubernetes.io/component: read {{- include "keto.labels" . | nindent 4 }} + {{- with .Values.service.read.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.read.type }} {{- if eq .Values.service.read.type "LoadBalancer" }} diff --git a/helm/charts/keto/templates/service-write.yaml b/helm/charts/keto/templates/service-write.yaml index d4dab787ad..5ea5f1961a 100644 --- a/helm/charts/keto/templates/service-write.yaml +++ b/helm/charts/keto/templates/service-write.yaml @@ -9,6 +9,10 @@ metadata: labels: app.kubernetes.io/component: write {{- include "keto.labels" . | nindent 4 }} + {{- with .Values.service.write.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.write.type }} {{- if eq .Values.service.write.type "LoadBalancer" }} diff --git a/helm/charts/keto/values.yaml b/helm/charts/keto/values.yaml index 0d24fea653..37b96e9984 100644 --- a/helm/charts/keto/values.yaml +++ b/helm/charts/keto/values.yaml @@ -181,6 +181,8 @@ service: ## -- The load balancer IP loadBalancerIP: "" name: grpc-read + # -- If you do want to specify annotations, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'annotations:'. + annotations: {} port: 80 appProtocol: grpc ## -- Enable extra headless service @@ -194,6 +196,8 @@ service: ## -- The load balancer IP loadBalancerIP: "" name: grpc-write + # -- If you do want to specify annotations, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'annotations:'. + annotations: {} port: 80 appProtocol: grpc ## -- Enable extra headless service @@ -207,6 +211,7 @@ service: loadBalancerIP: "" name: http-metrics port: 80 + # -- If you do want to specify annotations, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'annotations:'. annotations: {} ## -- Extra services to be deployed