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

K8s - Airflow - Add annotations #2836

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
4 changes: 3 additions & 1 deletion k8s/airflow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ CHART_NAME := airflow
APP_ID ?= $(CHART_NAME)
WAIT_FOR_READY_TIMEOUT := 600

TRACK ?= 2.8
TRACK ?= 2.10
SERVICE_NAME := services/a04a14b8-4fd4-469b-93c0-f540ac6eca56.cloudpartnerservices.goog

# Track for components
POSTGRESQL_TRACK ?= latest
NFS_TRACK ?= 1.3
Expand Down
8 changes: 4 additions & 4 deletions k8s/airflow/apptest/tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM gcr.io/cloud-marketplace-tools/testrunner:0.1.5
FROM gcr.io/cloud-marketplace-tools/testrunner:0.1.8

RUN apt-get update && apt-get install -y --no-install-recommends \
curl wget dnsutils netcat jq \
ca-certificates curl dnsutils netcat-traditional jq \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /opt/kubectl/1.21 \
&& wget -q -O /opt/kubectl/1.21/kubectl \
&& curl -L -o kubectl \
https://storage.googleapis.com/kubernetes-release/release/v1.21.6/bin/linux/amd64/kubectl \
&& mv kubectl /opt/kubectl/1.21/ \
&& chmod 755 /opt/kubectl/1.21/kubectl \
&& ln -s /opt/kubectl/1.21/kubectl /usr/bin/kubectl

Expand All @@ -15,4 +16,3 @@ COPY tester.sh /tester.sh

WORKDIR /
ENTRYPOINT ["/tester.sh"]

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
port: 2049
protocol: TCP
- name: mountd
port: 20048
port: 55038
protocol: TCP
selector:
role: nfs-server
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
initContainers:
- name: {{ .Release.Name }}-nfs-changeowner
image: busybox
command: ["sh", "-c", "mkdir -p /exports/dags && mkdir -p /exports/logs && chmod -R 777 /exports"]
command: ["sh", "-c", "mkdir -p /exports/dags && mkdir -p /exports/logs && chmod -R 777 /exports"]
volumeMounts:
- mountPath: /exports
name: {{ .Release.Name }}-nfs-server-pvc
Expand All @@ -29,7 +29,7 @@ spec:
- name: nfs
containerPort: 2049
- name: mountd
containerPort: 20048
containerPort: 55038
securityContext:
privileged: true
volumeMounts:
Expand Down
20 changes: 4 additions & 16 deletions k8s/airflow/chart/airflow/templates/nfs/nfs_server_pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Release.Name }}-nfs-server-pvc
spec:
storageClassName: "{{ .Values.nfs.persistence.storageClass }}"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.nfs.persistence.size | quote }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ .Release.Name }}-nfs-dags-logs
labels:
Expand All @@ -21,10 +9,11 @@ metadata:
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
storageClassName: "{{ .Values.nfs.persistence.storageClass }}"
resources:
requests:
storage: {{ .Values.nfs.persistence.size | quote }}
volumeName: {{ .Release.Name }}-nfs-dags-logs
---
apiVersion: v1
kind: PersistentVolume
Expand All @@ -34,10 +23,9 @@ spec:
persistentVolumeReclaimPolicy: "Delete"
capacity:
storage: {{ .Values.nfs.persistence.size | quote }}
storageClassName: ""
storageClassName: "{{ .Values.nfs.persistence.storageClass }}"
accessModes:
- ReadWriteMany
nfs:
server: {{ .Release.Name }}-nfs-server.{{ .Release.Namespace }}.svc.cluster.local
server: "{{ .Release.Name }}-nfs-server.{{ .Release.Namespace }}.svc.cluster.local"
path: "/"

3 changes: 1 addition & 2 deletions k8s/airflow/chart/airflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ nfs:
repo: null
tag: null
persistence:
storageClass: standard
storageClass: null
size: 5Gi

metrics:
Expand All @@ -37,4 +37,3 @@ postgresql:
persistence:
storageClass: standard
size: 5Gi