Skip to content

Commit

Permalink
load unified config in kubescape
Browse files Browse the repository at this point in the history
Signed-off-by: Amir Malka <[email protected]>
  • Loading branch information
amirmalka committed Oct 21, 2023
1 parent e52a237 commit f3baa2e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ data:
"maxImageSize": {{ .Values.kubevuln.config.maxImageSize }},
"keepLocal": {{ not $components.serviceDiscovery.enabled }},
"scanTimeout": "{{ .Values.kubevuln.config.scanTimeout }}",
"continuousPostureScan": {{ and (eq .Values.capabilities.continuousScan "enable") ($components.storage.enabled) }},
{{- if .Values.grypeOfflineDB.enabled }}
"listingURL": "http://{{ .Values.grypeOfflineDB.name }}:80/listing.json",
{{- end }}
Expand Down
19 changes: 6 additions & 13 deletions charts/kubescape-operator/templates/kubescape/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ spec:
env:
- name: GOMEMLIMIT
value: "{{ .Values.kubescape.resources.requests.memory }}B"
- name: CLUSTER_NAME
value: "{{ regexReplaceAll "\\W+" .Values.clusterName "-" }}"
- name: KS_LOGGER_LEVEL
value: "{{ .Values.logger.level }}"
- name: KS_LOGGER_NAME
Expand Down Expand Up @@ -147,8 +145,6 @@ spec:
readOnly: true
- name: kubescape-volume
mountPath: /home/nonroot/.kubescape
- name: kubescape-config-volume
mountPath: /home/nonroot/.kubescape/config.json
subPath: config.json
- name: host-scanner-definition
mountPath: /home/nonroot/.kubescape/host-scanner.yaml
Expand All @@ -157,11 +153,9 @@ spec:
mountPath: /home/nonroot/results
- name: failed
mountPath: /home/nonroot/failed
{{- if $components.serviceDiscovery.enabled }}
- name: {{ .Values.global.cloudConfig }}
mountPath: /etc/config
readOnly: true
{{- end }}
{{- if .Values.volumeMounts }}
{{ toYaml .Values.volumeMounts | indent 8 }}
{{- end }}
Expand All @@ -182,17 +176,16 @@ spec:
secret:
secretName: {{ .Values.global.proxySecretName }}
{{- end }}
- name: kubescape-config-volume
configMap:
name: {{ .Values.kubescape.name }}-config
{{- if $components.serviceDiscovery.enabled }}
- name: {{ .Values.global.cloudConfig }}
configMap:
name: {{ .Values.global.cloudConfig }}
items:
- key: "services"
path: "services.json"
{{- end }}
- key: "clusterData"
path: "clusterData.json"
{{- if $components.serviceDiscovery.enabled }}
- key: "services"
path: "services.json"
{{- end }}
- name: host-scanner-definition
configMap:
name: host-scanner-definition
Expand Down

0 comments on commit f3baa2e

Please sign in to comment.