Skip to content
Open
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: 8 additions & 6 deletions charts/crowdsec/templates/agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
{{ toYaml .Values.image.pullSecrets | indent 8 }}
{{- end }}
initContainers:
{{- if or (not .Values.tls.enabled) (not .Values.tls.agent.tlsClientAuth) }}
{{- if not .Values.tls.agent.tlsClientAuth }}
- name: wait-for-lapi-and-register
image: "{{ .Values.image.repository | default "crowdsecurity/crowdsec" }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
Expand All @@ -68,11 +68,13 @@ spec:
securityContext:
allowPrivilegeEscalation: false
privileged: false
{{- if or (not .Values.tls.enabled) (not .Values.tls.agent.tlsClientAuth) }}
{{- if not .Values.tls.agent.tlsClientAuth }}
volumeMounts:
- name: crowdsec-config
mountPath: /tmp_config
{{- end }}
env:
{{- if not .Values.tls.agent.tlsClientAuth }}
- name: REGISTRATION_TOKEN
valueFrom:
secretKeyRef:
Expand All @@ -84,19 +86,19 @@ spec:
fieldPath: metadata.name
- name: LAPI_URL
value: "{{ .Values.agent.lapiURL | default (printf "http://%s-service.%s:8080" .Release.Name .Release.Namespace) }}"
{{- end }}
- name: LAPI_HOST
value: "{{ .Values.agent.lapiHost | default (printf "%s-service.%s" .Release.Name .Release.Namespace) }}"
- name: LAPI_PORT
value: "{{ .Values.agent.lapiPort | default "8080" }}"
{{- end }}
{{- if .Values.agent.extraInitContainers }}
{{- toYaml .Values.agent.extraInitContainers | nindent 6 }}
{{- end }}
containers:
- name: crowdsec-agent
image: "{{ .Values.image.repository | default "crowdsecurity/crowdsec" }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if or (not .Values.tls.enabled) (not .Values.tls.agent.tlsClientAuth) }}
{{- if not .Values.tls.agent.tlsClientAuth }}
{{- if .Values.agent.persistentVolume.config.enabled }}
command: ['sh', '-c', 'cp /tmp_config/local_api_credentials.yaml /staging/etc/crowdsec/local_api_credentials.yaml && mv -n /staging/etc/crowdsec/* /etc/crowdsec_data/ && rm -rf /staging/etc/crowdsec && ln -s /etc/crowdsec_data /etc/crowdsec && ./docker_start.sh']
{{- else }}
Expand Down Expand Up @@ -175,7 +177,7 @@ spec:
privileged: false

volumeMounts:
{{- if or (not .Values.tls.enabled) (not .Values.tls.agent.tlsClientAuth) }}
{{- if not .Values.tls.agent.tlsClientAuth }}
- name: crowdsec-config
mountPath: /tmp_config
{{- end }}
Expand Down Expand Up @@ -241,7 +243,7 @@ spec:
{{- end }}
terminationGracePeriodSeconds: 30
volumes:
{{- if or (not .Values.tls.enabled) (not .Values.tls.agent.tlsClientAuth) }}
{{- if not .Values.tls.agent.tlsClientAuth }}
- name: crowdsec-config
emptyDir: {}
{{- end }}
Expand Down
2 changes: 2 additions & 0 deletions charts/crowdsec/templates/lapi-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ spec:
{{- if .Values.tls.enabled }}
- name: LOCAL_API_URL
value: https://localhost:8080
- name: AGENTS_ALLOWED_OU
value: agent-ou,appsec-ou
{{- else }}
- name: LOCAL_API_URL
value: http://localhost:8080
Expand Down
2 changes: 1 addition & 1 deletion charts/crowdsec/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ tls:
namespaces: []
appsec:
tlsClientAuth: true
secret: "{{ .Release.Name }}-agent-tls"
secret: "{{ .Release.Name }}-appsec-tls"
reflector:
namespaces: []
lapi:
Expand Down