# Astronomer's Helm Chart for Apache Airflow
This chart will bootstrap an [Airflow](https://github.com/astronomer/ap-airflow) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.
## Quickstart
To install this helm chart remotely (using helm 3)
```bash
kubectl create namespace airflow
helm repo add astronomer https://helm.astronomer.io
helm install airflow --namespace airflow astronomer/airflow
```
To install airflow with the KEDA autoscaler
```bash
helm repo add kedacore https://kedacore.github.io/charts
helm repo add astronomer https://helm.astronomer.io
helm repo update
kubectl create namespace keda
helm install keda \
--namespace keda kedacore/keda \
--version "v1.5.0"
kubectl create namespace airflow
helm install airflow \
--set executor=CeleryExecutor \
--set workers.keda.enabled=true \
--set workers.persistence.enabled=false \
--namespace airflow \
astronomer/airflow
```
To install this repository from source
```bash
kubectl create namespace airflow
helm install --namespace airflow .
```
## Prerequisites
- Kubernetes 1.12+
- Helm 3.6+
- PV provisioner support in the underlying infrastructure
## Installing the Chart
To install the chart with the release name `my-release`:
```bash
helm install --name my-release .
```
The command deploys Airflow on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
> **Tip**: List all releases using `helm list`
## Upgrading the Chart
First, look at the [updating documentation](UPDATING.md) to identify any backwards-incompatible changes.
To upgrade the chart with the release name `my-release`:
```bash
helm upgrade --name my-release .
```
## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
helm delete my-release
```
The command removes all the Kubernetes components associated with the chart and deletes the release.
## Updating DAGs
### Bake DAGs in Docker image
The recommended way to update your DAGs with this chart is to build a new docker image with the
latest code (`docker build -t my-company/airflow:8a0da78 .`), push it to an accessible
registry (`docker push my-company/airflow:8a0da78`), then update the Airflow pods with that image:
```bash
helm upgrade my-release . \
--set images.airflow.repository=my-company/airflow \
--set images.airflow.tag=8a0da78
```
### Deploying DAGs using `git-sync`
`extraContainers`, `extraInitContainers`, `extraVolumes`, and `extraVolumeMounts` can be combined to deploy git-sync. The following example relies on `emptyDir` volumes and works with `KubernetesExecutor`.
```yaml
env:
- name: AIRFLOW__CORE__DAGS_FOLDER
value: /usr/local/airflow/dags/latest/airflow/example_dags
scheduler:
extraInitContainers:
- name: init-gitsync
image: k8s.gcr.io/git-sync/git-sync:v3.2.2
imagePullPolicy: IfNotPresent
env:
- name: GIT_SYNC_REPO
value: https://github.com/apache/airflow.git
- name: GIT_SYNC_ROOT
value: /usr/local/airflow/dags
- name: GIT_SYNC_DEST
value: latest
- name: GIT_SYNC_ONE_TIME
value: "true"
volumeMounts:
- mountPath: /usr/local/airflow/dags
name: dags
readOnly: false
extraContainers:
- name: gitsync
image: k8s.gcr.io/git-sync/git-sync:v3.2.2
imagePullPolicy: IfNotPresent
env:
- name: GIT_SYNC_REPO
value: https://github.com/apache/airflow.git
- name: GIT_SYNC_ROOT
value: /usr/local/airflow/dags
- name: GIT_SYNC_DEST
value: latest
- name: GIT_SYNC_WAIT
value: "10"
volumeMounts:
- mountPath: /usr/local/airflow/dags
name: dags
readOnly: false
extraVolumeMounts:
- name: dags
mountPath: /usr/local/airflow/dags
extraVolumes:
- name: dags
emptyDir: {}
workers:
extraInitContainers:
- name: gitsync
image: k8s.gcr.io/git-sync/git-sync:v3.2.2
imagePullPolicy: IfNotPresent
env:
- name: GIT_SYNC_REPO
value: https://github.com/apache/airflow.git
- name: GIT_SYNC_ROOT
value: /usr/local/airflow/dags
- name: GIT_SYNC_DEST
value: latest
- name: GIT_SYNC_ONE_TIME
value: "true"
volumeMounts:
- mountPath: /usr/local/airflow/dags
name: dags
readOnly: false
extraVolumeMounts:
- name: dags
mountPath: /usr/local/airflow/dags
extraVolumes:
- name: dags
emptyDir: {}
```
## Docker Images
- The Airflow image that are referenced as the default values in this chart are generated from this repository: https://github.com/astronomer/ap-airflow.
- Other non-airflow images used in this chart are generated from this repository: https://github.com/astronomer/ap-vendor.
## Parameters
The complete list of parameters supported by the community chart can be found on the [Parameteres Reference](https://airflow.apache.org/docs/helm-chart/stable/parameters-ref.html) page, and can be set under the `airflow` key in this chart.
The following tables lists the configurable parameters of the Astronomer chart and their default values.
| Parameter | Description | Default | |
| :-------------------------------------------- | :-------------------------------------------------------------------------------------------------------- | :---------------------------- | :-- |
| `ingress.enabled` | Enable Kubernetes Ingress support | `false` | |
| `ingress.acme` | Add acme annotations to Ingress object | `false` | |
| `ingress.tlsSecretName` | Name of secret that contains a TLS secret | `~` | |
| `ingress.webserverAnnotations` | Annotations added to Webserver Ingress object | `{}` | |
| `ingress.flowerAnnotations` | Annotations added to Flower Ingress object | `{}` | |
| `ingress.baseDomain` | Base domain for VHOSTs | `~` | |
| `ingress.auth.enabled` | Enable auth with Astronomer Platform | `true` | |
| `workers.autoscaling.enabled` | Traditional HorizontalPodAutoscaler | `false` | |
| `workers.autoscaling.minReplicas` | Minimum amount of workers | `1` | |
| `workers.autoscaling.maxReplicas` | Maximum amount of workers | `10` | |
| `workers.autoscaling.targetCPUUtilization` | Target CPU Utilization of workers | `80` | |
| `workers.autoscaling.targetMemoryUtilization` | Target Memory Utilization of workers
没有合适的资源?快使用搜索试试~ 我知道了~
在 Kubernetes 上安装 Apache Airflow 的 Helm 图表_Python_代码_下载
共52个文件
py:14个
yaml:13个
md:6个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 105 浏览量
2022-07-02
16:54:04
上传
评论
收藏 63KB ZIP 举报
温馨提示
此图表将使用Helm包管理器在Kubernetes集群上引导Airflow部署。 快速开始 远程安装这个 helm chart(使用 helm 3) 使用 KEDA 自动缩放器安装气流 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
airflow-chart-master.zip (52个子文件)
airflow-chart-master
bin
install-ci-tools 1KB
clean-slate 375B
reset-local-dev 329B
example_project
dags
example_dag.py 365B
package-and-release-internal 2KB
run-ci 4KB
release-internal-to-prod 1KB
lint 368B
start-kind-cluster 544B
templates
_helpers.yaml 9KB
workers
worker-horizontalpodautoscaler.yaml 1KB
extra-objects.yaml 70B
ingress.yaml 5KB
webserver
webserver-auth-sidecar-configmap.yaml 2KB
generate-ssl.yaml 2KB
airflow-scc-anyuid.yaml 2KB
flower
flower-auth-sidecar-configmap.yaml 2KB
logging-sidecar-configmap.yaml 2KB
Chart.yaml 360B
.github
pull_request_template.md 422B
.helmignore 483B
values.yaml 14KB
tests
functional-tests
requirements.in 59B
requirements.txt 12KB
test_chart.py 10KB
chart_tests
test_scc.py 536B
requirements.in 187B
conftest.py 3KB
test_pgbouncer_certgenerator.py 1KB
test_worker_hpa.py 1KB
__init__.py 0B
test_logging_sidecar.py 3KB
requirements.txt 18KB
test_extra_objects.py 2KB
test_docker_images.py 1KB
test_default_chart.py 491B
test_ingress.py 1KB
helm_template_generator.py 5KB
__init__.py 487B
README.md 904B
UPDATING.md 4KB
LICENSE 1KB
CONTRIBUTING.md 820B
dev
custom_upstream_airflow_chart_release.md 2KB
configs
airflow-ingress.yaml 350B
.gitignore 187B
Chart.lock 214B
.circleci
config.yml 5KB
Makefile 1KB
README.md 13KB
.pre-commit-config.yaml 2KB
CODEOWNERS 40B
共 52 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功