Skip to content

Commit

Permalink
Merge pull request #29 from vmolkov/feat/make_wait-for-lapi_image_cus…
Browse files Browse the repository at this point in the history
…tomizable

make wait-for-lapi image customizable
  • Loading branch information
he2ss authored Mar 3, 2022
2 parents 4747ebd + 1028b20 commit c6c205a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/crowdsec/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.3
version: 0.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
5 changes: 3 additions & 2 deletions charts/crowdsec/templates/agent-daemonSet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ spec:
effect: NoSchedule
initContainers:
- name: wait-for-lapi
image: busybox:1.28
image: "{{ .Values.agent.wait_for_lapi.image.repository }}:{{ .Values.agent.wait_for_lapi.image.tag }}"
imagePullPolicy: {{ .Values.agent.wait_for_lapi.image.pullPolicy }}
command: ['sh', '-c', "until nc {{ .Release.Name }}-service.{{ .Release.Namespace }} 8080; do echo waiting for lapi to start; sleep 5; done"]
containers:
- name: crowdsec-agent
Expand Down Expand Up @@ -99,4 +100,4 @@ spec:
{{- with .Values.agent.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/crowdsec/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,15 @@ agent:
serviceMonitor:
enabled: false

# -- wait-for-lapi init container
wait_for_lapi:
image:
# -- docker image repository name
repository: busybox
# -- pullPolicy
pullPolicy: IfNotPresent
# -- docker image tag
tag: "1.28"

#service: {}

0 comments on commit c6c205a

Please sign in to comment.