Skip to content

Commit 5c1499e

Browse files
bumping the chart version to 1.0.2 (but not the appVersion)
updating using a single secret and using the same check as falcon-sensor / falcon-kac - between dockerAPIToken and registryConfigJSON
1 parent 403ebf7 commit 5c1499e

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

helm-charts/cs-k8s-protection-agent/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: "1.0.1"
18+
version: "1.0.2"
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

helm-charts/cs-k8s-protection-agent/templates/deployment.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ spec:
2222
spec:
2323
{{- if or (.Values.image.pullSecrets) (.Values.image.registryConfigJSON) (.Values.crowdstrikeConfig.dockerAPIToken) }}
2424
imagePullSecrets:
25-
{{ if .Values.crowdstrikeConfig.dockerAPIToken }}
25+
{{- if and (.Values.crowdstrikeConfig.dockerAPIToken) (.Values.image.registryConfigJSON) }}
26+
{{- fail "crowdstrikeConfig.dockerAPIToken and image.registryConfigJSON cannot be used together." }}
27+
{{- else -}}
28+
{{ if or (.Values.crowdstrikeConfig.dockerAPIToken) (.Values.image.registryConfigJSON) }}
2629
- name: {{ include "cs-k8s-protection-agent.fullname" . }}-regsecret
2730
{{- end }}
31+
{{- end }}
2832
{{ if .Values.image.pullSecrets }}
2933
- name: {{ .Values.image.pullSecrets }}
3034
{{- end }}
31-
{{ if .Values.image.registryConfigJSON }}
32-
- name: {{ include "cs-k8s-protection-agent.fullname" . }}-regsecret-registryconfigjson
33-
{{- end }}
3435
{{- end }}
3536
serviceAccountName: {{ .Values.serviceAccount.name | default ( include "cs-k8s-protection-agent.fullname" . ) }}
3637
securityContext:
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ if .Values.crowdstrikeConfig.dockerAPIToken }}
1+
{{ if or (.Values.crowdstrikeConfig.dockerAPIToken) (.Values.image.registryConfigJSON) }}
22
apiVersion: v1
33
kind: Secret
44
metadata:
@@ -8,18 +8,10 @@ metadata:
88
{{- include "cs-k8s-protection-agent.labels" . | nindent 4 }}
99
type: kubernetes.io/dockerconfigjson
1010
data:
11+
{{- if .Values.crowdstrikeConfig.dockerAPIToken }}
1112
.dockerconfigjson: {{ template "imagePullSecret" . }}
12-
{{- end}}
13+
{{- end }}
1314
{{- if .Values.image.registryConfigJSON }}
14-
{{- $registry := .Values.image.registryConfigJSON }}
15-
apiVersion: v1
16-
kind: Secret
17-
metadata:
18-
name: {{ include "cs-k8s-protection-agent.fullname" . }}-regsecret
19-
namespace: {{ .Release.Namespace }}
20-
labels:
21-
{{- include "cs-k8s-protection-agent.labels" . | nindent 4 }}
22-
data:
23-
.dockerconfigjson: {{ $registry }}
24-
type: kubernetes.io/dockerconfigjson
15+
.dockerconfigjson: {{ .Values.image.registryConfigJSON }}
2516
{{- end }}
17+
{{- end}}

0 commit comments

Comments
 (0)