Skip to content

Commit 5696cd3

Browse files
committed
Allow to set annotations for services
This is useful when we want to use pre-allocated IP. For example metallb allows to set it via annotation metallb.io/loadBalancerIPs
1 parent a0dde25 commit 5696cd3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

charts/netris-controller/templates/web-service-frontend.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ metadata:
8686
labels:
8787
{{- include "netris-controller.labels" . | nindent 4 }}
8888
{{- printf "%s-%s" (include "netris-controller.selectorLabels" .) $microservicename | nindent 4 }}
89+
{{- with (index .Values $microservicename).service.annotations }}
90+
annotations:
91+
{{- toYaml . | nindent 4 }}
92+
{{- end }}
8993
spec:
9094
type: {{ (index .Values $microservicename).service.type }}
9195
ports:

charts/netris-controller/values.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ web-service-backend:
9191
type: ClusterIP
9292
port: 80
9393
name: http
94-
94+
annotations: {}
9595

9696
autoscaling:
9797
enabled: false
@@ -118,6 +118,7 @@ web-service-frontend:
118118
type: ClusterIP
119119
port: 80
120120
name: http
121+
annotations: {}
121122

122123
autoscaling:
123124
enabled: false
@@ -142,6 +143,7 @@ grpc:
142143
type: ClusterIP
143144
port: 443
144145
name: grpc
146+
annotations: {}
145147

146148
autoscaling:
147149
enabled: false
@@ -168,6 +170,7 @@ telescope:
168170
name: ws
169171
securePort: 443
170172
securePortName: wss
173+
annotations: {}
171174

172175
autoscaling:
173176
enabled: false
@@ -211,6 +214,7 @@ web-session-generator:
211214
type: ClusterIP
212215
port: 80
213216
name: http
217+
annotations: {}
214218

215219
autoscaling:
216220
enabled: false
@@ -319,7 +323,7 @@ haproxy:
319323
service:
320324
type: LoadBalancer
321325
externalTrafficPolicy: Local
322-
326+
annotations: {}
323327

324328
## Using default values from https://github.com/kiwigrid/helm-charts/tree/master/charts/graphite/values.yaml
325329
graphite:

0 commit comments

Comments
 (0)