Skip to content
Closed
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
6 changes: 6 additions & 0 deletions kedify-agent/templates/agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if and .Values.agent.waitForCr .Values.agent.createKedifyConfiguration }}
initContainers:
- name: wait-for-cr
image: {{ .Values.agent.kubectlImage.repository }}:{{ .Values.agent.kubectlImage.tag }}
command: ["sh", "-c", "until kubectl get -nkeda kedify kedify; do echo waiting for KedifyConfiguration CR; sleep 2; done"]
{{- end }}
containers:
- args:
- --leader-elect
Expand Down
2 changes: 2 additions & 0 deletions kedify-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ agent:
# should the KedifyConfiguration and ScalingPolicy CRDs be also part of the release
createCrds: true
createKedifyConfiguration: true
# should the agent wait for the KedifyConfiguration CR to be created before starting, this is relevant only if createKedifyConfiguration is true
waitForCr: true
# default kedify config that will be created if createKedifyConfiguration is enabled
kedifyConfiguration:
agentAutoUpdate: false
Expand Down
Loading