weather helm
This commit is contained in:
parent
4a2a168081
commit
87ad20d355
4 changed files with 41 additions and 0 deletions
4
active/weather/Chart.yaml
Normal file
4
active/weather/Chart.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: weather-cronjob-chart
|
||||||
|
description: A Helm chart for deploying a cron job to fetch weather information
|
||||||
|
version: 0.1.0
|
||||||
0
active/weather/charts/.gitkeep
Normal file
0
active/weather/charts/.gitkeep
Normal file
27
active/weather/templates/cronjob.yaml
Normal file
27
active/weather/templates/cronjob.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-weather-cronjob
|
||||||
|
spec:
|
||||||
|
schedule: "{{ .Values.schedule }}"
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: weather-job
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: weather-container
|
||||||
|
image: {{ .Values.container.image }}
|
||||||
|
command: ["sh", "-c", "{{ .Values.container.command }}"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: logs-volume
|
||||||
|
mountPath: /logs
|
||||||
|
subPath: logs
|
||||||
|
restartPolicy: {{ .Values.restartPolicy }}
|
||||||
|
volumes:
|
||||||
|
- name: logs-volume
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.volume.claimName }}
|
||||||
|
subPath: logs
|
||||||
10
active/weather/values.yaml
Normal file
10
active/weather/values.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
schedule: "*/1 * * * *"
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: busybox
|
||||||
|
command: "curl 'wttr.in/peoria,il?format=3' >> /logs/weather.log"
|
||||||
|
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
|
||||||
|
volume:
|
||||||
|
claimName: data
|
||||||
Loading…
Add table
Add a link
Reference in a new issue