Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for annotation of DB Migration job #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions chart/templates/iq-server-jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Release.Name }}-migrate-db
{{- with .Values.iq_server.migrationJobAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
completions: 1
parallelism: 1
Expand Down
20 changes: 11 additions & 9 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,18 +96,20 @@ iq_server:
applicationServiceAnnotations:
# Annotations for the admin service
adminServiceAnnotations:
# Annotations to apply to the DB migration job
migrationJobAnnotations:
Comment on lines +99 to +100
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a small test for this in iq-server-jobs_test.yaml to check setting this value applies the annotations correctly

# Annotations for the iq server pods
podAnnotations:

# Number of pods to run
replicas: 2

# One of these can be set to hold the initial admin password
initialAdminPassword: "admin123" # Plaintext password
# The name of an existing Kubernetes secret containing a password key with a value of the base64 encoding of your
# password
initialAdminPasswordSecret:

# Configures the readiness probe for each pod
readinessProbe:
initialDelaySeconds: 45
Expand Down Expand Up @@ -208,20 +210,20 @@ global:
image: busybox
tag: 1.28

# Horizontal pod auto-scaler
# Horizontal pod auto-scaler
hpa:
enabled: false
enabled: false
minReplicas: 2
maxReplicas: 4
resources:
cpu:
cpu:
enabled: true
average:
average:
threshold: 50
memory:
memory:
enabled: false
average:
threshold: 60
average:
threshold: 60

# Load balancer
ingress:
Expand Down