Skip to content

Commit a853822

Browse files
committed
Expose missing operator settings in helm chart
1 parent 7c7bfc0 commit a853822

File tree

4 files changed

+87
-2
lines changed

4 files changed

+87
-2
lines changed

manifests/helm/templates/operator/deployment.yaml.tpl

Lines changed: 44 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,34 +90,76 @@ spec:
9090
value: $(CONTRAST_WEBHOOK_SERVICENAME),$(CONTRAST_WEBHOOK_SERVICENAME).$(POD_NAMESPACE).svc,$(CONTRAST_WEBHOOK_SERVICENAME).$(POD_NAMESPACE).svc.cluster.local
9191
- name: CONTRAST_DEFAULT_REGISTRY
9292
value: '{{ required "operator.defaultRegistry is required." .Values.operator.defaultRegistry }}'
93+
- name: CONTRAST_INSTALL_SOURCE
94+
value: helm
95+
{{- if hasKey .Values.operator "settleDuration" }}
9396
- name: CONTRAST_SETTLE_DURATION
9497
value: '{{ .Values.operator.settleDuration }}'
98+
{{- end }}
99+
{{- if hasKey .Values.operator "eventQueueSize" }}
95100
- name: CONTRAST_EVENT_QUEUE_SIZE
96101
value: '{{ .Values.operator.eventQueueSize }}'
102+
{{- end }}
103+
{{- if hasKey .Values.operator "eventQueueFullMode" }}
97104
- name: CONTRAST_EVENT_QUEUE_FULL_MODE
98105
value: '{{ .Values.operator.eventQueueFullMode }}'
106+
{{- end }}
107+
{{- if hasKey .Values.operator "eventQueueMergeWindowSeconds" }}
108+
- name: CONTRAST_EVENT_QUEUE_MERGE_WINDOW_SECONDS
109+
value: '{{ .Values.operator.eventQueueMergeWindowSeconds }}'
110+
{{- end }}
111+
{{- if hasKey .Values.operator "webhookSecretName" }}
99112
- name: CONTRAST_WEBHOOK_SECRET
100113
value: '{{ .Values.operator.webhookSecretName }}'
114+
{{- end }}
115+
{{- if hasKey .Values.operator "webhookConfiguration" }}
101116
- name: CONTRAST_WEBHOOK_CONFIGURATION
102117
value: '{{ .Values.operator.webhookConfiguration }}'
118+
{{- end }}
119+
{{- if hasKey .Values.operator "enableEarlyChaining" }}
103120
- name: CONTRAST_ENABLE_EARLY_CHAINING
104121
value: '{{ .Values.operator.enableEarlyChaining }}'
122+
{{- end }}
123+
{{- if hasKey .Values.operator "enableAgentStdout" }}
105124
- name: CONTRAST_ENABLE_AGENT_STDOUT
106125
value: '{{ .Values.operator.enableAgentStdout }}'
107-
- name: CONTRAST_INSTALL_SOURCE
108-
value: helm
126+
{{- end }}
127+
{{- if hasKey .Values.operator "telemetryOptOut" }}
128+
- name: CONTRAST_AGENT_TELEMETRY_OPTOUT
129+
value: '{{ .Values.operator.telemetryOptOut }}'
130+
{{- end }}
131+
{{- if hasKey .Values.operator "operatorLogLevel" }}
132+
- name: CONTRAST_LOG_LEVEL
133+
value: '{{ .Values.operator.operatorLogLevel }}'
134+
{{- end }}
135+
{{- if hasKey .Values.operator.initContainer "nonRoot" }}
136+
- name: CONTRAST_RUN_INIT_CONTAINER_AS_NON_ROOT
137+
value: '{{ .Values.operator.initContainer.nonRoot }}'
138+
{{- end }}
139+
{{- if hasKey .Values.operator.initContainer.resources.requests "cpu" }}
109140
- name: CONTRAST_INITCONTAINER_CPU_REQUEST
110141
value: '{{ .Values.operator.initContainer.resources.requests.cpu }}'
142+
{{- end }}
143+
{{- if hasKey .Values.operator.initContainer.resources.limits "cpu" }}
111144
- name: CONTRAST_INITCONTAINER_CPU_LIMIT
112145
value: '{{ .Values.operator.initContainer.resources.limits.cpu }}'
146+
{{- end }}
147+
{{- if hasKey .Values.operator.initContainer.resources.requests "memory" }}
113148
- name: CONTRAST_INITCONTAINER_MEMORY_REQUEST
114149
value: '{{ .Values.operator.initContainer.resources.requests.memory }}'
150+
{{- end }}
151+
{{- if hasKey .Values.operator.initContainer.resources.limits "memory" }}
115152
- name: CONTRAST_INITCONTAINER_MEMORY_LIMIT
116153
value: '{{ .Values.operator.initContainer.resources.limits.memory }}'
154+
{{- end }}
155+
{{- if hasKey .Values.operator.initContainer.resources.requests "ephemeralStorage" }}
117156
- name: CONTRAST_INITCONTAINER_EPHEMERALSTORAGE_REQUEST
118157
value: '{{ .Values.operator.initContainer.resources.requests.ephemeralStorage }}'
158+
{{- end }}
159+
{{- if hasKey .Values.operator.initContainer.resources.limits "ephemeralStorage" }}
119160
- name: CONTRAST_INITCONTAINER_EPHEMERALSTORAGE_LIMIT
120161
value: '{{ .Values.operator.initContainer.resources.limits.ephemeralStorage }}'
162+
{{- end }}
121163
livenessProbe:
122164
httpGet:
123165
path: /health

manifests/helm/values.schema.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,11 @@
354354
"DropOldest"
355355
]
356356
},
357+
"eventQueueMergeWindowSeconds": {
358+
"description": "Time window to merge events in the eventQueue",
359+
"default": 10,
360+
"type": "integer"
361+
},
357362
"eventQueueSize": {
358363
"description": "Max number of events to queue from the K8s event stream.",
359364
"default": 10000,
@@ -363,6 +368,11 @@
363368
"description": "Resource management for the agent initContainers",
364369
"type": "object",
365370
"properties": {
371+
"nonRoot": {
372+
"description": "Run init-containers as non-root",
373+
"default": true,
374+
"type": "boolean"
375+
},
366376
"resources": {
367377
"type": "object",
368378
"properties": {
@@ -428,6 +438,18 @@
428438
"description": "Deployment Labels for the operator deployment.",
429439
"type": "object"
430440
},
441+
"operatorLogLevel": {
442+
"description": "Operator Log Level",
443+
"default": "Info",
444+
"type": "string",
445+
"enum": [
446+
"Trace",
447+
"Debug",
448+
"Info",
449+
"Warn",
450+
"Error"
451+
]
452+
},
431453
"podAnnotations": {
432454
"description": "Pod Annotations for the operator pod(s).",
433455
"type": "object"
@@ -504,6 +526,11 @@
504526
"default": 10,
505527
"type": "integer"
506528
},
529+
"telemetryOptOut": {
530+
"description": "Opt-Out of telemetry collection",
531+
"default": false,
532+
"type": "boolean"
533+
},
507534
"webhookConfiguration": {
508535
"description": "The name of the webhook to patch after certificate generation occurs.",
509536
"default": "contrast-web-hook-configuration",

manifests/helm/values.schema.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ operator:
3939
# DropOldest:
4040
# Removes and ignores the oldest item in the channel in order to make room for the item being written.
4141
eventQueueFullMode: # @schema type:[string];enum:[Wait, DropOldest];default:DropOldest
42+
# -- Time window to merge events in the eventQueue
43+
eventQueueMergeWindowSeconds: # @schema type:[integer];default:10
4244
# -- The secret containing the TLS certificates used for the webhook. Used for to cache TLS certificate generation across restarts, and to share the same certificate across operator instances (when running in HA mode).
4345
webhookSecretName: # @schema type:[string];default:contrast-web-hook-secret
4446
# -- The name of the webhook to patch after certificate generation occurs.
@@ -47,6 +49,10 @@ operator:
4749
enableEarlyChaining: # @schema type:[boolean];default:false
4850
# -- Globally enable agents logging to stdout
4951
enableAgentStdout: # @schema type:[boolean];default:false
52+
# -- Opt-Out of telemetry collection
53+
telemetryOptOut: # @schema type:[boolean];default:false
54+
# -- Operator Log Level
55+
operatorLogLevel: # @schema type:[string];enum:[Trace, Debug, Info, Warn, Error];default:Info
5056
# -- Deployment Labels for the operator deployment.
5157
labels: {}
5258
# -- Deployment Annotations for the operator deployment.
@@ -69,6 +75,8 @@ operator:
6975
ephemeralStorage: # @schema type:[string, null]
7076
# -- Resource management for the agent initContainers
7177
initContainer:
78+
# -- Run init-containers as non-root
79+
nonRoot: # @schema type:[boolean];default:true
7280
resources:
7381
limits:
7482
cpu: # @schema type:[string, null];default:100m

manifests/helm/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ operator:
3636
# DropOldest:
3737
# Removes and ignores the oldest item in the channel in order to make room for the item being written.
3838
eventQueueFullMode: DropOldest
39+
# Time window to merge events in the eventQueue
40+
eventQueueMergeWindowSeconds: 10
3941
# The secret containing the TLS certificates used for the webhook.
4042
# Used for to cache TLS certificate generation across restarts,
4143
# and to share the same certificate across operator instances (when running in HA mode).
@@ -48,6 +50,10 @@ operator:
4850
enableEarlyChaining: false
4951
# Globally enable agents logging to stdout
5052
enableAgentStdout: false
53+
# Opt-Out of telemetry collection
54+
#telemetryOptOut: false
55+
# Operator Log Level
56+
operatorLogLevel: Info
5157
# Metadata for the operator deployment.
5258
labels: {}
5359
annotations: {}
@@ -75,6 +81,8 @@ operator:
7581
#ephemeralStorage:
7682
# Resource management for the agent initContainers
7783
initContainer:
84+
# Run init-containers as non-root
85+
nonRoot: true
7886
resources:
7987
limits:
8088
cpu: 100m

0 commit comments

Comments
 (0)