Skip to content

Commit 8922193

Browse files
committed
add options to support running kac using hostNetwork and fix watcherPort
1 parent 1f83467 commit 8922193

File tree

3 files changed

+46
-4
lines changed

3 files changed

+46
-4
lines changed

helm-charts/falcon-kac/templates/deployment_webhook.yaml

+11-3
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ spec:
108108
containers:
109109
- args:
110110
- client
111+
- "-port={{ .Values.webhookPort }}"
111112
env:
112113
- name: __CS_POD_NAMESPACE
113114
valueFrom:
@@ -171,6 +172,7 @@ spec:
171172
- args:
172173
- "client"
173174
- "-app=watcher"
175+
- "-http-port={{ .Values.watcherPort }}"
174176
env:
175177
- name: __CS_POD_NAMESPACE
176178
valueFrom:
@@ -197,14 +199,14 @@ spec:
197199
failureThreshold: 3
198200
httpGet:
199201
path: /livez
200-
port: 4080
202+
port: {{ .Values.watcherPort }}
201203
scheme: HTTP
202204
periodSeconds: 10
203205
successThreshold: 1
204206
timeoutSeconds: 1
205207
name: falcon-watcher
206208
ports:
207-
- containerPort: 4080
209+
- containerPort: {{ .Values.watcherPort }}
208210
name: healthcheck
209211
resources:
210212
{{- toYaml .Values.falconWatcherResources | nindent 10 }}
@@ -219,7 +221,7 @@ spec:
219221
failureThreshold: 30
220222
httpGet:
221223
path: /startz
222-
port: 4080
224+
port: {{ .Values.watcherPort }}
223225
scheme: HTTP
224226
periodSeconds: 2
225227
successThreshold: 1
@@ -287,6 +289,12 @@ spec:
287289
tolerations:
288290
{{- toYaml . | nindent 8 }}
289291
{{- end }}
292+
{{- if .Values.hostNetwork }}
293+
hostNetwork: true
294+
dnsPolicy: {{ default "ClusterFirstWithHostNet" .Values.dnsPolicy }}
295+
{{- else if .Values.dnsPolicy}}
296+
dnsPolicy: {{ .Values.dnsPolicy }}
297+
{{- end }}
290298
volumes:
291299
- name: {{ include "falcon-kac.name" . }}-tls-certs
292300
secret:

helm-charts/falcon-kac/values.schema.json

+25-1
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,17 @@
4848
"default": 1,
4949
"minimum": 1
5050
},
51+
"watcherPort": {
52+
"type": "integer",
53+
"default": "4080",
54+
"minimum": 1024,
55+
"maximum": 65535
56+
},
5157
"webhookPort": {
5258
"type": "integer",
5359
"default": "4433",
5460
"minimum": 1024,
55-
"maximum": 32767
61+
"maximum": 65535
5662
},
5763
"autoCertificateUpdate": {
5864
"type": "boolean",
@@ -320,6 +326,24 @@
320326
"string"
321327
]
322328
},
329+
"hostNetwork": {
330+
"type": "boolean",
331+
"default": "false"
332+
},
333+
"dnsPolicy": {
334+
"type": [
335+
"null",
336+
"string"
337+
],
338+
"default": null,
339+
"enum": [
340+
null,
341+
"ClusterFirst",
342+
"ClusterFirstWithHostNet",
343+
"Default",
344+
"None"
345+
]
346+
},
323347
"webhook": {
324348
"type": "object",
325349
"properties": {

helm-charts/falcon-kac/values.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ replicas: 1
2929
# Configure the webhook Port
3030
webhookPort: 4443
3131

32+
# Configure the watcher Port
33+
watcherPort: 4080
34+
3235
# Auto update the certificates every time there is an update
3336
autoCertificateUpdate: true
3437

@@ -147,6 +150,13 @@ webhook:
147150
# Comma sparated list of namespaces in which we need to disable validation e.g test1,test2
148151
disableNamespaces:
149152

153+
# Specifies if Falcon KAC should use hostNetwork mode. This is required in some scenarios such as when a
154+
# custom CNI is in use where control plane nodes cannot establish network communication with pods.
155+
hostNetwork: false
156+
157+
# Define Falcon KAC POD DNS Policy, follows cluster default when not set and sets "ClusterFirstWithHostNet" when hostNetwork = true unless overriden
158+
dnsPolicy:
159+
150160
# Number of pods for resourceQuota object
151161
resourceQuota:
152162
pods: 2

0 commit comments

Comments
 (0)