Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Empty file modified deploy/uitestrig/copy_cm.sh
100644 → 100755
Empty file.
Empty file modified deploy/uitestrig/copy_secrets.sh
100644 → 100755
Empty file.
Empty file modified deploy/uitestrig/delete.sh
100644 → 100755
Empty file.
Empty file modified deploy/uitestrig/install.sh
100644 → 100755
Empty file.
113 changes: 72 additions & 41 deletions helm/uitestrig/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,84 +16,117 @@ metadata:
{{- end }}
spec:
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1 # remove jobs which are successfully executed
failedJobsHistoryLimit: 1 # except 1 recent failed job, remove jobs which are not successfully executed
#schedule: '*/3 * * * *' # cron spec of time
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
schedule: {{ $.Values.crontime }}
jobTemplate:
spec:
backoffLimit: 0 # this has very low chance of failing, as all this does
# is prompt kubernetes to schedule new replica set for
# the deployment
# activeDeadlineSeconds: 600 # timeout, makes most sense with
# "waiting for rollout" variant specified below
backoffLimit: 0
template:
spec:
# account configured above
serviceAccountName: {{ template "uitestrig.serviceAccountName" $ }}
restartPolicy: Never
containers:
- name: {{ $module.name }}
image: {{ $module.image.registry }}/{{ $module.image.repository }}:{{ $module.image.tag }}
imagePullPolicy: {{ $module.image.pullPolicy }}
imagePullPolicy: {{ default "Always" $module.image.pullPolicy }}
{{- if $.Values.lifecycleHooks }}
lifecycle: {{- include "common.tpvalues.render" (dict "value" $.Values.lifecycleHooks "context" $) | nindent 12 }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
{{- end }}
{{- if $.Values.containerSecurityContext.enabled }}
securityContext: {{- omit $.Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if $.Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" $.Values.command "context" $) | nindent 12 }}
command: {{- include "common.tplvalues.render" (dict "value" $.Values.command "context" $ ) | nindent 12 }}
{{- end }}
{{- if $.Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" $.Values.args "context" $) | nindent 12 }}
args: {{- include "common.tplvalues.render" (dict "value" $.Values.args "context" $ ) | nindent 12 }}
{{- end }}

env:
- name: container_user
value: "{{ $.Values.containerSecurityContext.runAsUser }}"
- name: JDK_JAVA_OPTIONS
value: "{{ $.Values.additionalResources.javaOpts }}"
- name: modules
value: "{{ $module.name }}"
- name: container_user
value: "{{ $.Values.containerSecurityContext.runAsUser }}"
- name: JDK_JAVA_OPTIONS
value: "{{ $.Values.additionalResources.javaOpts }}"
- name: modules
value: "{{ $module.name }}"

{{- if $.Values.extraEnvVars }}
{{- include "common.tpvalues.render" (dict "value" $.Values.extraEnvVars "context" $) | nindent 12 }}
{{- include "common.tpvalues.render" ( dict "value" $.Values.extraEnvVars "context" $ ) | nindent 14 }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
{{- end }}

{{- if $module.extraEnvVars }}
{{- include "common.tpvalues.render" ( dict "value" $module.extraEnvVars "context" $ ) | nindent 14 }}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
{{- end }}

# ============================================================
# ENV FROM: GLOBAL + MODULE-WISE CONFIGMAPS + SECRETS
# ============================================================
envFrom:
# -----------------------------
# Global ConfigMaps
# -----------------------------
{{- if $.Values.extraEnvVarsCM }}
{{- range $.Values.extraEnvVarsCM }}
- configMapRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- if $.Values.extraEnvVarsSecret }}
{{- range $.Values.extraEnvVarsSecret }}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}
{{- range $.Values.extraEnvVarsCM }}
- configMapRef:
name: {{ . }}
{{- end }}
{{- end }}

# -----------------------------
# Global Secrets
# -----------------------------
{{- if $.Values.extraEnvVarsSecret }}
{{- range $.Values.extraEnvVarsSecret }}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}

# -----------------------------
# Module-wise ConfigMaps
# -----------------------------
{{- if $module.extraEnvVarsCM }}
{{- range $module.extraEnvVarsCM }}
- configMapRef:
name: {{ . }}
{{- end }}
{{- end }}

# -----------------------------
# Module-wise Secrets
# -----------------------------
{{- if $module.extraEnvVarsSecret }}
{{- range $module.extraEnvVarsSecret }}
- secretRef:
name: {{ . }}
{{- end }}
{{- end }}

ports:
- name: spring-service
containerPort: {{ $.Values.springServicePort }}
- name: spring-service
containerPort: {{ $.Values.springServicePort }}

volumeMounts:
{{- if $.Values.enable_insecure }}
- mountPath: /usr/local/openjdk-11/lib/security/cacerts
name: cacerts
subPath: cacerts
- mountPath: /usr/local/openjdk-11/lib/security/cacerts
name: cacerts
subPath: cacerts
{{- end }}
{{- if $.Values.uitestrig.volumes }}
{{- range $volume_name, $volume_value := $.Values.uitestrig.volumes.configmaps }}
- name: {{ $volume_name }}
mountPath: {{ $volume_value.volumeMounts.mountPath }}
{{- range $volume_name, $volume_value := $.Values.uitestrig.volumes.configmaps }}
- name: {{ $volume_name }}
mountPath: {{ $volume_value.volumeMounts.mountPath }}
{{- end }}
{{- end }}

volumes:
{{- if $.Values.enable_insecure }}
- name: cacerts
emptyDir: {}
{{- end }}
{{- if $.Values.uitestrig.volumes }}
{{- range $volume_name, $volume_value := $.Values.uitestrig.volumes.configmaps }}
{{- range $volume_name, $volume_value := $.Values.uitestrig.volumes.configmaps }}
- name: {{ $volume_name }}
configMap:
defaultMode: {{ $volume_value.defaultMode }}
Expand All @@ -102,5 +135,3 @@ spec:
{{- end }}
{{- end }}
{{- end }}


Loading