Skip to content

Commit

Permalink
Merge pull request #113 from codecademy-engineering/lindsay-cron-images
Browse files Browse the repository at this point in the history
add ability to set custom image/tag for crons
  • Loading branch information
lindsaylandry authored Jan 31, 2024
2 parents b0df85d + 6d4acf5 commit e08c36a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: service
description: A generic k8s service chart
type: application
version: 1.8.9
version: 1.8.10
maintainers:
- email: [email protected]
name: devops
13 changes: 13 additions & 0 deletions charts/service/ci/custom-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ cronJobs:
cpu: 10m
memory: 50Mi
schedule: "* * * * *"
- name: bar
image: alpine
tag: "3.16"
command: ["echo", "FOOBAR"]
useParentEnv: false
resources:
requests:
cpu: 10m
memory: 50Mi
limits:
cpu: 10m
memory: 50Mi
schedule: "* * * * *"

hostAliases:
- ip: 0.0.0.0
Expand Down
2 changes: 1 addition & 1 deletion charts/service/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
spec:
serviceAccountName: {{ $serviceAccountName }}
containers:
- image: "{{ $image }}:{{ $tag }}"
- image: "{{ .image | default $image }}:{{ .tag | default $tag }}"
imagePullPolicy: {{ $imagePullPolicy }}
name: {{ .name }}
env:
Expand Down

0 comments on commit e08c36a

Please sign in to comment.