Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running KAC on hostNetwork #327

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}
redhatrises marked this conversation as resolved.
Show resolved Hide resolved
{{- 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, follows cluster default when not set and sets "ClusterFirstWithHostNet" when hostNetwork = true unless overriden
dnsPolicy:
redhatrises marked this conversation as resolved.
Show resolved Hide resolved

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