Skip to content

Commit

Permalink
add options to support running kac using hostNetwork and fix watcherPort
Browse files Browse the repository at this point in the history
  • Loading branch information
TomRyan-321 committed Oct 21, 2024
1 parent 957e18c commit dbc1e37
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 4 deletions.
14 changes: 11 additions & 3 deletions helm-charts/falcon-kac/templates/deployment_webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ spec:
containers:
- args:
- client
- "-port={{ .Values.webhookPort }}"
env:
- name: __CS_POD_NAMESPACE
valueFrom:
Expand Down Expand Up @@ -171,6 +172,7 @@ spec:
- args:
- "client"
- "-app=watcher"
- "-http-port={{ .Values.watcherPort }}"
env:
- name: __CS_POD_NAMESPACE
valueFrom:
Expand All @@ -197,14 +199,14 @@ spec:
failureThreshold: 3
httpGet:
path: /livez
port: 4080
port: {{ .Values.watcherPort }}
scheme: HTTP
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
name: falcon-watcher
ports:
- containerPort: 4080
- containerPort: {{ .Values.watcherPort }}
name: healthcheck
resources:
{{- toYaml .Values.falconWatcherResources | nindent 10 }}
Expand All @@ -219,7 +221,7 @@ spec:
failureThreshold: 30
httpGet:
path: /startz
port: 4080
port: {{ .Values.watcherPort }}
scheme: HTTP
periodSeconds: 2
successThreshold: 1
Expand Down Expand Up @@ -287,6 +289,12 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.hostNetwork }}
hostNetwork: true
dnsPolicy: {{ default "ClusterFirstWithHostNet" .Values.dnsPolicy }}
{{- else if .Values.dnsPolicy}}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- end }}
volumes:
- name: {{ include "falcon-kac.name" . }}-tls-certs
secret:
Expand Down
26 changes: 25 additions & 1 deletion helm-charts/falcon-kac/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,17 @@
"default": 1,
"minimum": 1
},
"watcherPort": {
"type": "integer",
"default": "4080",
"minimum": 1024,
"maximum": 65535
},
"webhookPort": {
"type": "integer",
"default": "4433",
"minimum": 1024,
"maximum": 32767
"maximum": 65535
},
"autoCertificateUpdate": {
"type": "boolean",
Expand Down Expand Up @@ -320,6 +326,24 @@
"string"
]
},
"hostNetwork": {
"type": "boolean",
"default": "false"
},
"dnsPolicy": {
"type": [
"null",
"string"
],
"default": null,
"enum": [
null,
"ClusterFirst",
"ClusterFirstWithHostNet",
"Default",
"None"
]
},
"webhook": {
"type": "object",
"properties": {
Expand Down
10 changes: 10 additions & 0 deletions helm-charts/falcon-kac/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ replicas: 1
# Configure the webhook Port
webhookPort: 4443

# Configure the watcher Port
watcherPort: 4080

# Auto update the certificates every time there is an update
autoCertificateUpdate: true

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

# Specifies if Falcon KAC should use hostNetwork mode. This is required in some scenarios such as when a
# custom CNI is in use where control plane nodes cannot establish network communication with pods.
hostNetwork: false

# Define Falcon KAC POD DNS Policy, defaults to "ClusterFirstWithHostNet" when hostNetwork = true
dnsPolicy:

# Number of pods for resourceQuota object
resourceQuota:
pods: 2

0 comments on commit dbc1e37

Please sign in to comment.