Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
add std labels and component label
Browse files Browse the repository at this point in the history
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
  • Loading branch information
gsemet committed Nov 30, 2018
1 parent 9c44d79 commit 18965c7
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 26 deletions.
4 changes: 2 additions & 2 deletions stable/airflow/examples/minikube-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ airflow:
image:
repository: puckel/docker-airflow
tag: 1.10.0-4
pull_policy: IfNotPresent
pullPolicy: IfNotPresent
service:
type: NodePort
web_replicas: 1
webReplicas: 1
config:
AIRFLOW__CORE__LOGGING_LEVEL: DEBUG
AIRFLOW__CORE__LOAD_EXAMPLES: True
Expand Down
5 changes: 5 additions & 0 deletions stable/airflow/templates/configmap-airflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ template "airflow.fullname" . }}-env"
labels:
app: {{ template "airflow.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
## Force UTC timezone
TZ: Etc/UTC
Expand Down
5 changes: 5 additions & 0 deletions stable/airflow/templates/configmap-git-clone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "airflow.fullname" . }}-git-clone
labels:
app: {{ template "airflow.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
git-clone.sh: |
#!/bin/sh -e
Expand Down
5 changes: 5 additions & 0 deletions stable/airflow/templates/configmap-scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "airflow.fullname" . }}-scripts
labels:
app: {{ template "airflow.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
install-requirements.sh: |
#!/bin/sh -e
Expand Down
11 changes: 7 additions & 4 deletions stable/airflow/templates/deployments-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ kind: Deployment
metadata:
name: {{ template "airflow.fullname" . }}-flower
labels:
app: {{ template "airflow.name" . }}-flower
app: {{ template "airflow.name" . }}
component: flower
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
Expand All @@ -18,15 +19,17 @@ spec:
maxUnavailable: 0
selector:
matchLabels:
app: {{ template "airflow.name" . }}-flower
app: {{ template "airflow.name" . }}
component: flower
release: {{ .Release.Name }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap-airflow.yaml") . | sha256sum }}
configmap.fabric8.io/update-on-change: "{{ template "airflow.fullname" . }}-env"
labels:
app: {{ template "airflow.name" . }}-flower
app: {{ template "airflow.name" . }}
component: flower
release: {{ .Release.Name }}
spec:
{{- if .Values.airflow.image.pullSecret }}
Expand Down Expand Up @@ -71,4 +74,4 @@ spec:
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5
{{- end }}
{{- end }}
9 changes: 6 additions & 3 deletions stable/airflow/templates/deployments-scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ kind: Deployment
metadata:
name: {{ template "airflow.fullname" . }}-scheduler
labels:
app: {{ template "airflow.name" . }}-scheduler
app: {{ template "airflow.name" . }}
component: scheduler
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
Expand All @@ -18,15 +19,17 @@ spec:
maxUnavailable: 100%
selector:
matchLabels:
app: {{ template "airflow.name" . }}-scheduler
app: {{ template "airflow.name" . }}
component: scheduler
release: {{ .Release.Name }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap-airflow.yaml") . | sha256sum }}
configmap.fabric8.io/update-on-change: "{{ template "airflow.fullname" . }}-env"
labels:
app: {{ template "airflow.name" . }}-scheduler
app: {{ template "airflow.name" . }}
component: scheduler
release: {{ .Release.Name }}
spec:
{{- if .Values.airflow.image.pullSecret }}
Expand Down
9 changes: 6 additions & 3 deletions stable/airflow/templates/deployments-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ kind: Deployment
metadata:
name: {{ template "airflow.fullname" . }}-web
labels:
app: {{ template "airflow.name" . }}-web
app: {{ template "airflow.name" . }}
component: web
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
Expand All @@ -18,15 +19,17 @@ spec:
maxUnavailable: 0
selector:
matchLabels:
app: {{ template "airflow.name" . }}-web
app: {{ template "airflow.name" . }}
component: web
release: {{ .Release.Name }}
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap-airflow.yaml") . | sha256sum }}
configmap.fabric8.io/update-on-change: "{{ template "airflow.fullname" . }}-env"
labels:
app: {{ template "airflow.name" . }}-web
app: {{ template "airflow.name" . }}
component: web
release: {{ .Release.Name }}
spec:
{{- if .Values.airflow.image.pullSecret }}
Expand Down
3 changes: 2 additions & 1 deletion stable/airflow/templates/ingress-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ kind: Ingress
metadata:
name: {{ template "airflow.fullname" . }}-flower
labels:
app: {{ template "airflow.name" . }}-flower
app: {{ template "airflow.name" . }}
component: flower
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand Down
3 changes: 2 additions & 1 deletion stable/airflow/templates/ingress-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ kind: Ingress
metadata:
name: {{ template "airflow.fullname" . }}-web
labels:
app: {{ template "airflow.name" . }}-web
app: {{ template "airflow.name" . }}
component: web
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
Expand Down
6 changes: 4 additions & 2 deletions stable/airflow/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ kind: PodDisruptionBudget
metadata:
name: {{ template "airflow.fullname" . }}-pdb
labels:
app: {{ template "airflow.name" . }}-scheduler
app: {{ template "airflow.name" . }}
component: scheduler
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "airflow.name" . }}-scheduler
app: {{ template "airflow.name" . }}
component: scheduler
release: {{ .Release.Name }}
{{ toYaml .Values.airflow.podDisruptionBudget | indent 2 }}
8 changes: 5 additions & 3 deletions stable/airflow/templates/service-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ kind: Service
metadata:
name: {{ template "airflow.fullname" . }}-flower
labels:
app: {{ template "airflow.name" . }}-flower
app: {{ template "airflow.name" . }}
component: flower
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.airflow.service.type }}
selector:
app: {{ template "airflow.name" . }}-flower
app: {{ template "airflow.name" . }}
component: flower
release: {{ .Release.Name }}
ports:
- name: flower
protocol: TCP
port: 5555
{{- end }}
{{- end }}
6 changes: 4 additions & 2 deletions stable/airflow/templates/service-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ kind: Service
metadata:
name: {{ template "airflow.fullname" . }}-web
labels:
app: {{ template "airflow.name" . }}-web
app: {{ template "airflow.name" . }}
component: web
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.airflow.service.type }}
selector:
app: {{ template "airflow.name" . }}-web
app: {{ template "airflow.name" . }}
component: web
release: {{ .Release.Name }}
ports:
- name: web
Expand Down
6 changes: 4 additions & 2 deletions stable/airflow/templates/service-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ kind: Service
metadata:
name: {{ template "airflow.fullname" . }}-worker
labels:
app: {{ template "airflow.name" . }}-worker
app: {{ template "airflow.name" . }}
component: worker
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
Expand All @@ -16,5 +17,6 @@ spec:
port: 8793
clusterIP: None
selector:
app: {{ template "airflow.name" . }}-worker
app: {{ template "airflow.name" . }}
component: worker
{{- end }}
9 changes: 6 additions & 3 deletions stable/airflow/templates/statefulsets-workers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ kind: StatefulSet
metadata:
name: {{ template "airflow.fullname" . }}-worker
labels:
app: {{ template "airflow.name" . }}-worker
app: {{ template "airflow.name" . }}
component: worker
chart: {{ template "airflow.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
Expand All @@ -22,7 +23,8 @@ spec:
replicas: {{ .Values.workers.replicas }}
selector:
matchLabels:
app: {{ template "airflow.name" . }}-worker
app: {{ template "airflow.name" . }}
component: worker
release: {{ .Release.Name }}
template:
metadata:
Expand All @@ -33,7 +35,8 @@ spec:
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
app: {{ template "airflow.name" . }}-worker
app: {{ template "airflow.name" . }}
component: worker
release: {{ .Release.Name }}
spec:
{{- if .Values.airflow.image.pullSecret }}
Expand Down

0 comments on commit 18965c7

Please sign in to comment.