Skip to content

Commit 9e02549

Browse files
committed
feat(airflow): add version 3
1 parent 20bef31 commit 9e02549

89 files changed

Lines changed: 11488 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright Drycc Community.
2+
# SPDX-License-Identifier: APACHE-2.0
3+
4+
annotations:
5+
category: WorkFlow
6+
licenses: Apache-2.0
7+
apiVersion: v2
8+
appVersion: "3.0.1"
9+
dependencies:
10+
- name: common
11+
repository: oci://registry.drycc.cc/charts
12+
version: ~1.1.4
13+
description: Apache Airflow is a tool to express and execute workflows as directed acyclic graphs (DAGs). It includes utilities to schedule tasks, monitor task progress and handle task dependencies.
14+
home: https://bitnami.com
15+
icon: https://bitnami.com/assets/stacks/airflow/img/airflow-stack-220x234.png
16+
keywords:
17+
- apache
18+
- airflow
19+
- workflow
20+
- dag
21+
maintainers:
22+
- name: Drycc Community.
23+
url: https://github.com/bitnami/charts
24+
name: airflow
25+
sources:
26+
- https://github.com/bitnami/charts/tree/main/bitnami/airflow
27+
version: 16.1.7

addons/airflow/3/chart/airflow-3/README.md

Lines changed: 1577 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
CHART NAME: {{ .Chart.Name }}
2+
CHART VERSION: {{ .Chart.Version }}
3+
APP VERSION: {{ .Chart.AppVersion }}
4+
5+
Did you know there are enterprise versions of the Bitnami catalog? For enhanced secure software supply chain features, unlimited pulls from Docker, LTS support, or application customization, see Bitnami Premium or Tanzu Application Catalog. See https://www.arrow.com/globalecs/na/vendors/bitnami for more information.
6+
7+
{{- $releaseNamespace := include "common.names.namespace" . }}
8+
{{- $clusterDomain := .Values.clusterDomain }}
9+
{{- $airflowWebServiceName := include "airflow.web.fullname" . }}
10+
{{- $airflowSecretName := include "airflow.secretName" . }}
11+
{{- $baseUrl := (include "airflow.baseUrl" .) }}
12+
13+
** Please be patient while the chart is being deployed **
14+
15+
{{- if .Values.diagnosticMode.enabled }}
16+
17+
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
18+
19+
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
20+
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
21+
22+
Get the list of pods by executing:
23+
24+
kubectl get pods --namespace {{ $releaseNamespace }} -l app.kubernetes.io/instance={{ .Release.Name }}
25+
26+
Access the pod you want to debug by executing
27+
28+
kubectl exec --namespace {{ $releaseNamespace }} -ti <NAME OF THE POD> -- bash
29+
30+
In order to replicate the container startup scripts execute this command:
31+
32+
/opt/drycc/scripts/airflow/entrypoint.sh /opt/drycc/scripts/airflow/run.sh
33+
34+
{{- else }}
35+
36+
{{- if and (contains "127.0.0.1" $baseUrl) (not (eq "ClusterIP" .Values.service.type)) }}
37+
###############################################################################
38+
### ERROR: You did not provide an external URL in your 'helm install' call ###
39+
###############################################################################
40+
41+
This deployment will be incomplete until you configure Airflow with a resolvable
42+
host. To configure Airflow with the URL of your service:
43+
44+
1. Get the Airflow URL by running:
45+
46+
{{- if eq "NodePort" .Values.service.type }}
47+
48+
export AIRFLOW_HOST=$(kubectl get nodes --namespace {{ $releaseNamespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
49+
export AIRFLOW_PORT=$(kubectl get --namespace {{ $releaseNamespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ $airflowWebServiceName }})
50+
51+
{{- else if eq "LoadBalancer" .Values.service.type }}
52+
53+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
54+
Watch the status with: 'kubectl get svc --namespace {{ $releaseNamespace }} -w {{ $airflowWebServiceName }}'
55+
56+
export AIRFLOW_HOST=$(kubectl get svc --namespace {{ $releaseNamespace }} {{ $airflowWebServiceName }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
57+
export AIRFLOW_PORT=80
58+
59+
{{- end }}
60+
61+
2. Complete your Airflow deployment by running:
62+
63+
{{ include "common.utils.secret.getvalue" (dict "secret" $airflowSecretName "field" "airflow-password" "context" $) }}
64+
{{ include "common.utils.secret.getvalue" (dict "secret" $airflowSecretName "field" "airflow-fernet-key" "context" $) }}
65+
{{ include "common.utils.secret.getvalue" (dict "secret" $airflowSecretName "field" "airflow-secret-key" "context" $) }}
66+
helm upgrade --namespace {{ $releaseNamespace }} {{ .Release.Name }} oci://registry-1.docker.io/bitnamicharts/{{ .Chart.Name }} \
67+
--set service.type={{ .Values.service.type }} \
68+
--set web.baseUrl=http://$AIRFLOW_HOST:$AIRFLOW_PORT \
69+
--set auth.password=$AIRFLOW_PASSWORD \
70+
--set auth.fernetKey=$AIRFLOW_FERNETKEY \
71+
--set auth.secretKey=$AIRFLOW_SECRETKEY
72+
73+
{{- else }}
74+
75+
Airflow can be accessed via port {{ .Values.service.ports.http }} on the following DNS name from within your cluster:
76+
77+
{{ printf "%s.%s.svc.%s" $airflowWebServiceName $releaseNamespace $clusterDomain }}
78+
79+
To connect to Airflow from outside the cluster, perform the following steps:
80+
81+
{{- if .Values.ingress.enabled }}
82+
83+
1. Get the Airflow URL and associate its hostname to your cluster external IP:
84+
85+
export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
86+
echo "Airflow URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}"
87+
echo "$CLUSTER_IP {{ .Values.ingress.hostname }}" | sudo tee -a /etc/hosts
88+
89+
{{- else if eq .Values.service.type "ClusterIP" }}
90+
91+
1. Create a port-forward to the service:
92+
93+
kubectl port-forward --namespace {{ $releaseNamespace }} svc/{{ $airflowWebServiceName }} {{ .Values.service.ports.http }}:{{ .Values.service.ports.http }} &
94+
echo "Airflow URL: http{{ if .Values.web.tls }}s{{ end }}://127.0.0.1:{{ .Values.service.ports.http }}"
95+
96+
{{- else if eq .Values.service.type "NodePort" }}
97+
98+
1. Obtain the NodePort IP and port:
99+
100+
export NODE_IP=$(kubectl get nodes --namespace {{ $releaseNamespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
101+
export NODE_PORT=$(kubectl get svc --namespace {{ $releaseNamespace }} {{ $airflowWebServiceName }} -o jsonpath="{.spec.ports[0].nodePort}")
102+
echo "Airflow URL: http{{ if .Values.web.tls }}s{{ end }}://${NODE_IP}:$NODE_PORT"
103+
104+
{{- else if eq .Values.service.type "LoadBalancer" }}
105+
106+
1. Obtain the LoadBalancer IP:
107+
108+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
109+
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ $airflowWebServiceName }}'
110+
111+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ $airflowWebServiceName }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
112+
echo "Airflow URL: http{{ if .Values.web.tls }}s{{ end }}://${SERVICE_IP}:{{ .Values.service.ports.http }}"
113+
114+
{{- end }}
115+
116+
2. Open a browser and access Airflow using the obtained URL.
117+
118+
3. Get your Airflow login credentials by running:
119+
120+
{{ include "common.utils.secret.getvalue" (dict "secret" $airflowSecretName "field" "airflow-password" "context" $) }}
121+
echo User: {{ .Values.auth.username }}
122+
echo Password: $AIRFLOW_PASSWORD
123+
124+
{{- end }}
125+
{{- end }}
126+
127+
{{ include "airflow.validateValues" . }}
128+
{{- include "common.warnings.rollingTag" .Values.image }}
129+
{{- include "common.warnings.rollingTag" .Values.metrics.image }}
130+
{{- include "common.warnings.resources" (dict "sections" (list "scheduler" "web" "worker" "defaultSidecars.syncDAGsPlugins" "defaultInitContainers.loadDAGsPlugins" "metrics") "context" $) }}
131+
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.metrics.image) "context" $) }}
132+
{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.metrics.image) "context" $) }}

0 commit comments

Comments
 (0)