Skip to content

Commit

Permalink
Merge pull request #75 from SoftwareAG/dev-msr-thr
Browse files Browse the repository at this point in the history
Correct Job template in APIGW
  • Loading branch information
thomas-2020 authored Apr 26, 2024
2 parents 2a48750 + 9a6607b commit b9edac1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ jobs:
tag: latest
imagePullPolicy: IfNotPresent
restartPolicy: Never
envFrom:
- secretRef:
## -- set secret name '<release>-apigateway-admin-password'
name: apigw-apigateway-admin-password
# -- Schedule job every day ...
schedule: "0 1 * * *"
command: ["/bin/sh"]
args:
- -c
- >-
echo "Purge Transaction Events in [${DEPLOYMENT}]" ... &&
curl -X DELETE -s -u "Administrator:${ADMINISTRATOR_PASSWORD}" "${DEPLOYMENT}:5555/rest/apigateway/apitransactions?eventType=ALL&objectType=Analytics&from=&until=&olderThan=7d" &&
curl -X GET -s -u "Administrator:${ADMINISTRATOR_PASSWORD}" "${DEPLOYMENT}:5555/rest/apigateway/apitransactions/jobs"
curl -X DELETE -s -u "Administrator:${password}" "${DEPLOYMENT}:5555/rest/apigateway/apitransactions?eventType=ALL&objectType=Analytics&from=&until=&olderThan=7d" &&
curl -X GET -s -u "Administrator:${password}" "${DEPLOYMENT}:5555/rest/apigateway/apitransactions/jobs"
14 changes: 0 additions & 14 deletions apigateway/helm/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

{{- $fullName := include "common.names.fullname" . -}}
{{- $labels := include "common.labels.standard" . -}}
{{- $adminsecretName := include "apigateway.adminsecretName" . -}}
{{- $adminsecretKey := include "apigateway.adminsecretKey" . -}}
{{- $imagePullSecrets := .Values.imagePullSecrets -}}
{{- $extraLabels := .Values.extraLabels -}}
{{- $context := . }}
Expand Down Expand Up @@ -83,12 +81,6 @@ spec:
env:
{{ tpl (toYaml . ) $context | indent 12 }}
{{- end }}
envFrom:
- name: ADMINISTRATOR_PASSWORD
valueFrom:
secretKeyRef:
name: {{ $adminsecretName }}
key: {{ $adminsecretKey }}
{{- with $job.envFrom }}
envFrom:
{{ toYaml . | indent 12 }}
Expand Down Expand Up @@ -173,12 +165,6 @@ spec:
env:
{{ tpl (toYaml . ) $context | indent 8 }}
{{- end }}
envFrom:
- name: ADMINISTRATOR_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "apigateway.adminsecretName" . }}
key: {{ include "apigateway.adminsecretKey" . }}
{{- with $job.envFrom }}
envFrom:
{{ toYaml . | indent 8 }}
Expand Down

0 comments on commit b9edac1

Please sign in to comment.