-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Argo hooks Implementation (#2320)
* Add argocd hooks implementation and annotation in celery chart * Add pullpolicy set to IfNotPresent * fix Elastic search host issue on configmap Add github workflow_dispatch * Disable argoHooks by default - Ignore values-local.yaml --------- Co-authored-by: thenav56 <[email protected]>
- Loading branch information
Showing
7 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
values-local.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
values-local.yaml |
44 changes: 44 additions & 0 deletions
44
deploy/helm/ifrcgo-helm/templates/argo-hooks/hook-job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{{- if .Values.argoHooksEnabled }} # FIXME: Remove this after go-api is moved to argoCD pipeline | ||
|
||
{{- range $hookName, $hook := .Values.argoHooks }} | ||
|
||
{{- if $hook.enabled }} | ||
|
||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
{{- if $hook.preserveHistory }} | ||
generateName: {{ template "ifrcgo-helm.fullname" $ }}-{{ $hookName }}- | ||
{{- else }} | ||
name: {{ template "ifrcgo-helm.fullname" $ }}-{{ $hookName }} | ||
{{- end }} | ||
annotations: | ||
argocd.argoproj.io/hook: {{ $hook.hook }} | ||
|
||
spec: | ||
template: | ||
spec: | ||
restartPolicy: "Never" | ||
containers: | ||
- name: {{ $hookName }} | ||
image: "{{ $.Values.api.image.name }}:{{ $.Values.api.image.tag }}" | ||
imagePullPolicy: {{ $.Values.api.image.pullPolicy }} | ||
command: {{ toYaml $hook.command | trim | nindent 12 }} | ||
resources: | ||
requests: | ||
cpu: {{ default $.Values.api.resources.requests.cpu $hook.requestsCpu }} | ||
memory: {{ default $.Values.api.resources.requests.memory $hook.requestsMemory }} | ||
limits: | ||
cpu: {{ default $.Values.api.resources.limits.cpu $hook.limitsCpu }} | ||
memory: {{ default $.Values.api.resources.limits.memory $hook.limitsMemory }} | ||
envFrom: | ||
- secretRef: | ||
name: {{ template "ifrcgo-helm.fullname" $ }}-api-secret | ||
- configMapRef: | ||
name: {{ template "ifrcgo-helm.fullname" $ }}-api-configmap | ||
|
||
{{- end }} | ||
|
||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters