Skip to content

Commit f2428c2

Browse files
committed
feat: allow to change the operator listening port, Service port and to set hostNetwork
1 parent d117fcf commit f2428c2

3 files changed

Lines changed: 28 additions & 28 deletions

File tree

stackgres-k8s/install/helm/stackgres-operator/templates/mutating-webhook-configuration.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ webhooks:
2525
namespace: {{ .Release.Namespace }}
2626
name: {{ .Release.Name }}
2727
path: '/stackgres/mutation/sgcluster'
28-
port: {{ .Values.operator.servicePort }}
28+
port: {{ .Values.operator.servicePort | default 443 }}
2929
admissionReviewVersions: ["v1"]
3030
{{- if .Values.allowedNamespaces }}
3131
namespaceSelector:
@@ -49,7 +49,7 @@ webhooks:
4949
namespace: {{ .Release.Namespace }}
5050
name: {{ .Release.Name }}
5151
path: '/stackgres/mutation/sgpgconfig'
52-
port: {{ .Values.operator.servicePort }}
52+
port: {{ .Values.operator.servicePort | default 443 }}
5353
admissionReviewVersions: ["v1"]
5454
{{- if .Values.allowedNamespaces }}
5555
namespaceSelector:
@@ -73,7 +73,7 @@ webhooks:
7373
namespace: {{ .Release.Namespace }}
7474
name: {{ .Release.Name }}
7575
path: '/stackgres/mutation/sgpoolconfig'
76-
port: {{ .Values.operator.servicePort }}
76+
port: {{ .Values.operator.servicePort | default 443 }}
7777
admissionReviewVersions: ["v1"]
7878
{{- if .Values.allowedNamespaces }}
7979
namespaceSelector:
@@ -97,7 +97,7 @@ webhooks:
9797
namespace: {{ .Release.Namespace }}
9898
name: {{ .Release.Name }}
9999
path: '/stackgres/mutation/sginstanceprofile'
100-
port: {{ .Values.operator.servicePort }}
100+
port: {{ .Values.operator.servicePort | default 443 }}
101101
admissionReviewVersions: ["v1"]
102102
{{- if .Values.allowedNamespaces }}
103103
namespaceSelector:
@@ -121,7 +121,7 @@ webhooks:
121121
namespace: {{ .Release.Namespace }}
122122
name: {{ .Release.Name }}
123123
path: '/stackgres/mutation/sgbackup'
124-
port: {{ .Values.operator.servicePort }}
124+
port: {{ .Values.operator.servicePort | default 443 }}
125125
admissionReviewVersions: ["v1"]
126126
{{- if .Values.allowedNamespaces }}
127127
namespaceSelector:
@@ -145,7 +145,7 @@ webhooks:
145145
namespace: {{ .Release.Namespace }}
146146
name: {{ .Release.Name }}
147147
path: '/stackgres/mutation/sgdistributedlogs'
148-
port: {{ .Values.operator.servicePort }}
148+
port: {{ .Values.operator.servicePort | default 443 }}
149149
admissionReviewVersions: ["v1"]
150150
{{- if .Values.allowedNamespaces }}
151151
namespaceSelector:
@@ -169,7 +169,7 @@ webhooks:
169169
namespace: {{ .Release.Namespace }}
170170
name: {{ .Release.Name }}
171171
path: '/stackgres/mutation/sgdbops'
172-
port: {{ .Values.operator.servicePort }}
172+
port: {{ .Values.operator.servicePort | default 443 }}
173173
admissionReviewVersions: ["v1"]
174174
{{- if .Values.allowedNamespaces }}
175175
namespaceSelector:
@@ -193,7 +193,7 @@ webhooks:
193193
namespace: {{ .Release.Namespace }}
194194
name: {{ .Release.Name }}
195195
path: '/stackgres/mutation/sgobjectstorage'
196-
port: {{ .Values.operator.servicePort }}
196+
port: {{ .Values.operator.servicePort | default 443 }}
197197
admissionReviewVersions: ["v1"]
198198
{{- if .Values.allowedNamespaces }}
199199
namespaceSelector:
@@ -217,7 +217,7 @@ webhooks:
217217
namespace: {{ .Release.Namespace }}
218218
name: {{ .Release.Name }}
219219
path: '/stackgres/mutation/sgscript'
220-
port: {{ .Values.operator.servicePort }}
220+
port: {{ .Values.operator.servicePort | default 443 }}
221221
admissionReviewVersions: ["v1"]
222222
{{- if .Values.allowedNamespaces }}
223223
namespaceSelector:
@@ -241,7 +241,7 @@ webhooks:
241241
namespace: {{ .Release.Namespace }}
242242
name: {{ .Release.Name }}
243243
path: '/stackgres/mutation/sgshardedcluster'
244-
port: {{ .Values.operator.servicePort }}
244+
port: {{ .Values.operator.servicePort | default 443 }}
245245
admissionReviewVersions: ["v1"]
246246
{{- if .Values.allowedNamespaces }}
247247
namespaceSelector:
@@ -265,7 +265,7 @@ webhooks:
265265
namespace: {{ .Release.Namespace }}
266266
name: {{ .Release.Name }}
267267
path: '/stackgres/mutation/sgshardedbackup'
268-
port: {{ .Values.operator.servicePort }}
268+
port: {{ .Values.operator.servicePort | default 443 }}
269269
admissionReviewVersions: ["v1"]
270270
{{- if .Values.allowedNamespaces }}
271271
namespaceSelector:
@@ -289,7 +289,7 @@ webhooks:
289289
namespace: {{ .Release.Namespace }}
290290
name: {{ .Release.Name }}
291291
path: '/stackgres/mutation/sgshardeddbops'
292-
port: {{ .Values.operator.servicePort }}
292+
port: {{ .Values.operator.servicePort | default 443 }}
293293
admissionReviewVersions: ["v1"]
294294
{{- if .Values.allowedNamespaces }}
295295
namespaceSelector:
@@ -313,7 +313,7 @@ webhooks:
313313
namespace: {{ .Release.Namespace }}
314314
name: {{ .Release.Name }}
315315
path: '/stackgres/mutation/sgstream'
316-
port: {{ .Values.operator.servicePort }}
316+
port: {{ .Values.operator.servicePort | default 443 }}
317317
admissionReviewVersions: ["v1"]
318318
{{- if .Values.allowedNamespaces }}
319319
namespaceSelector:

stackgres-k8s/install/helm/stackgres-operator/templates/operator-service.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ spec:
1515
ports:
1616
- name: https
1717
protocol: TCP
18-
port: {{ .Values.operator.servicePort }}
18+
port: {{ .Values.operator.servicePort | default 443 }}
1919
targetPort: https
2020
{{ else }}
2121
apiVersion: v1
@@ -25,7 +25,7 @@ metadata:
2525
name: {{ .Release.Name }}
2626
spec:
2727
ports:
28-
- port: {{ .Values.operator.servicePort }}
28+
- port: {{ .Values.operator.servicePort | default 443 }}
2929
targetPort: {{ .Values.developer.externalOperatorPort }}
3030
---
3131
kind: Endpoints

stackgres-k8s/install/helm/stackgres-operator/templates/validating-webhook-configuration.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ webhooks:
2525
namespace: {{ .Release.Namespace }}
2626
name: {{ .Release.Name }}
2727
path: '/stackgres/validation/sgcluster'
28-
port: {{ .Values.operator.servicePort }}
28+
port: {{ .Values.operator.servicePort | default 443 }}
2929
admissionReviewVersions: ["v1"]
3030
{{- if .Values.allowedNamespaces }}
3131
namespaceSelector:
@@ -49,7 +49,7 @@ webhooks:
4949
namespace: {{ .Release.Namespace }}
5050
name: {{ .Release.Name }}
5151
path: '/stackgres/validation/sgpgconfig'
52-
port: {{ .Values.operator.servicePort }}
52+
port: {{ .Values.operator.servicePort | default 443 }}
5353
admissionReviewVersions: ["v1"]
5454
{{- if .Values.allowedNamespaces }}
5555
namespaceSelector:
@@ -73,7 +73,7 @@ webhooks:
7373
namespace: {{ .Release.Namespace }}
7474
name: {{ .Release.Name }}
7575
path: '/stackgres/validation/sgpoolconfig'
76-
port: {{ .Values.operator.servicePort }}
76+
port: {{ .Values.operator.servicePort | default 443 }}
7777
admissionReviewVersions: ["v1"]
7878
{{- if .Values.allowedNamespaces }}
7979
namespaceSelector:
@@ -97,7 +97,7 @@ webhooks:
9797
namespace: {{ .Release.Namespace }}
9898
name: {{ .Release.Name }}
9999
path: '/stackgres/validation/sginstanceprofile'
100-
port: {{ .Values.operator.servicePort }}
100+
port: {{ .Values.operator.servicePort | default 443 }}
101101
admissionReviewVersions: ["v1"]
102102
{{- if .Values.allowedNamespaces }}
103103
namespaceSelector:
@@ -121,7 +121,7 @@ webhooks:
121121
namespace: {{ .Release.Namespace }}
122122
name: {{ .Release.Name }}
123123
path: '/stackgres/validation/sgbackup'
124-
port: {{ .Values.operator.servicePort }}
124+
port: {{ .Values.operator.servicePort | default 443 }}
125125
admissionReviewVersions: ["v1"]
126126
{{- if .Values.allowedNamespaces }}
127127
namespaceSelector:
@@ -145,7 +145,7 @@ webhooks:
145145
namespace: {{ .Release.Namespace }}
146146
name: {{ .Release.Name }}
147147
path: '/stackgres/validation/sgdistributedlogs'
148-
port: {{ .Values.operator.servicePort }}
148+
port: {{ .Values.operator.servicePort | default 443 }}
149149
admissionReviewVersions: ["v1"]
150150
{{- if .Values.allowedNamespaces }}
151151
namespaceSelector:
@@ -169,7 +169,7 @@ webhooks:
169169
namespace: {{ .Release.Namespace }}
170170
name: {{ .Release.Name }}
171171
path: '/stackgres/validation/sgdbops'
172-
port: {{ .Values.operator.servicePort }}
172+
port: {{ .Values.operator.servicePort | default 443 }}
173173
admissionReviewVersions: ["v1"]
174174
{{- if .Values.allowedNamespaces }}
175175
namespaceSelector:
@@ -193,7 +193,7 @@ webhooks:
193193
namespace: {{ .Release.Namespace }}
194194
name: {{ .Release.Name }}
195195
path: '/stackgres/validation/sgobjectstorage'
196-
port: {{ .Values.operator.servicePort }}
196+
port: {{ .Values.operator.servicePort | default 443 }}
197197
admissionReviewVersions: ["v1"]
198198
{{- if .Values.allowedNamespaces }}
199199
namespaceSelector:
@@ -217,7 +217,7 @@ webhooks:
217217
namespace: {{ .Release.Namespace }}
218218
name: {{ .Release.Name }}
219219
path: '/stackgres/validation/sgscript'
220-
port: {{ .Values.operator.servicePort }}
220+
port: {{ .Values.operator.servicePort | default 443 }}
221221
admissionReviewVersions: ["v1"]
222222
{{- if .Values.allowedNamespaces }}
223223
namespaceSelector:
@@ -241,7 +241,7 @@ webhooks:
241241
namespace: {{ .Release.Namespace }}
242242
name: {{ .Release.Name }}
243243
path: '/stackgres/validation/sgshardedcluster'
244-
port: {{ .Values.operator.servicePort }}
244+
port: {{ .Values.operator.servicePort | default 443 }}
245245
admissionReviewVersions: ["v1"]
246246
{{- if .Values.allowedNamespaces }}
247247
namespaceSelector:
@@ -265,7 +265,7 @@ webhooks:
265265
namespace: {{ .Release.Namespace }}
266266
name: {{ .Release.Name }}
267267
path: '/stackgres/validation/sgshardedbackup'
268-
port: {{ .Values.operator.servicePort }}
268+
port: {{ .Values.operator.servicePort | default 443 }}
269269
admissionReviewVersions: ["v1"]
270270
{{- if .Values.allowedNamespaces }}
271271
namespaceSelector:
@@ -289,7 +289,7 @@ webhooks:
289289
namespace: {{ .Release.Namespace }}
290290
name: {{ .Release.Name }}
291291
path: '/stackgres/validation/sgshardeddbops'
292-
port: {{ .Values.operator.servicePort }}
292+
port: {{ .Values.operator.servicePort | default 443 }}
293293
admissionReviewVersions: ["v1"]
294294
{{- if .Values.allowedNamespaces }}
295295
namespaceSelector:
@@ -313,7 +313,7 @@ webhooks:
313313
namespace: {{ .Release.Namespace }}
314314
name: {{ .Release.Name }}
315315
path: '/stackgres/validation/sgstream'
316-
port: {{ .Values.operator.servicePort }}
316+
port: {{ .Values.operator.servicePort | default 443 }}
317317
admissionReviewVersions: ["v1"]
318318
{{- if .Values.allowedNamespaces }}
319319
namespaceSelector:

0 commit comments

Comments
 (0)