Skip to content

Commit

Permalink
Merge pull request #116 from codecademy-engineering/lindsay-job-images
Browse files Browse the repository at this point in the history
add ability to add custom image to job
  • Loading branch information
lindsaylandry authored Feb 7, 2024
2 parents 60dc52a + 77bb6a3 commit 3db1f74
Show file tree
Hide file tree
Showing 3 changed files with 20 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.12
version: 1.8.13
maintainers:
- email: [email protected]
name: devops
18 changes: 18 additions & 0 deletions charts/service/ci/custom-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,24 @@ jobs:
- name: test-job
emptyDir: {}
ttlSecondsAfterFinished: 30
- name: bar
image: alpine
tag: '3.16'
command: ['echo', 'FOOBAR']
useParentEnv: false
resources:
requests:
cpu: 10m
memory: 50Mi
limits:
cpu: 10m
memory: 50Mi
volumeMounts:
- name: test-job
mountPath: /tmp/
volumes:
- name: test-job
emptyDir: {}

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

0 comments on commit 3db1f74

Please sign in to comment.