Skip to content

Commit

Permalink
feat: allow service annotations in keto
Browse files Browse the repository at this point in the history
  • Loading branch information
dlahn committed Jan 9, 2025
1 parent 9a85f74 commit 0a932b2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hacks/values/keto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ job:
ory.sh/pod_annotation: keto_migrate

service:
read:
annotations:
ory.sh/test-annotations: "true"
metrics:
enabled: true

Expand Down
4 changes: 4 additions & 0 deletions helm/charts/keto/templates/service-extraServices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down
4 changes: 4 additions & 0 deletions helm/charts/keto/templates/service-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down
4 changes: 4 additions & 0 deletions helm/charts/keto/templates/service-read.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down
4 changes: 4 additions & 0 deletions helm/charts/keto/templates/service-write.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }}
Expand Down
5 changes: 5 additions & 0 deletions helm/charts/keto/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0a932b2

Please sign in to comment.