Граф коммитов

59 Коммитов

Автор SHA1 Сообщение Дата
Kamil Breguła b946b44870
Remove unused value in Helm Chart - podMutation (#11703) 2020-10-21 08:40:02 -07:00
Kamil Breguła 53e6062105
Enforce strict rules for yamllint (#11709) 2020-10-21 12:24:32 +02:00
Kamil Breguła ffc9aebeb2
Better file extension for Helm template (#11702)
* Better file extension for Helm template

* fixup! Better file extension for Helm template
2020-10-21 12:17:19 +02:00
Kamil Breguła 883eadfc1d
Consistent use images in Helm Chart (#11701) 2020-10-21 12:12:14 +02:00
FloChehab 3391c90247
fix pod launcher rolebinding in helm chart (#11675)
* Followup to #11034
* Was not referencing the correct kind of resources if multiNamespaceMode = False
2020-10-20 14:31:37 -07:00
Prakshal Jain 3970bfad4c
Pod template file uses custom custom env variable (#11480) 2020-10-19 23:22:19 +02:00
Fernando Llaca 52b4733b82
Improvements for pod template file with git sync container (#11511)
* Helm chart fixes in pod template

- default pod_template image to `defaultAirflowRepository:defaultAirflowTag`
- fix never-ending git-sync init containers
- fix broken reference to volume

* Fix helm chart test
2020-10-19 23:16:29 +02:00
Daniel Imberman f7e01ab293
Create job for airflow migrations (#11533)
Creating airflow migrations should run seperately from the user creation
job, as many users might not want to create users on deployment.
2020-10-15 11:10:14 -07:00
Kaxil Naik cb4cd91837
Add missing values entries to Parameters in chart/README.md (#11477) 2020-10-13 15:21:47 +02:00
Daniel Imberman 7b3a00d4f9
Allow multiple schedulers in helm chart (#11330)
* Allow multiple schedulers in helm chart

* schema

* add docs

* add to readme

Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-10-12 13:48:59 -07:00
Daniel Imberman 045d68da7f
Mount volumes and volumemounts into scheduler and workers (#11426)
* Mount arbitrary volumes and volumeMounts to scheduler and worker

Allows users to mount volumes to scheduler and workers

* tested
2020-10-12 11:32:05 -07:00
Jarek Potiuk 9142eed715
Adds missing schema for kerberos sidecar configuration (#11413)
* Adds missing schema for kerberos sidecar configuration

The kerberos support added in #11130 did not have schema added
to the values.yml. This PR fixes it.

Co-authored-by: Jacob Ferriero <jferriero@google.com>

* Update chart/values.schema.json

Co-authored-by: Jacob Ferriero <jferriero@google.com>
2020-10-12 13:09:47 +02:00
Jarek Potiuk 9a01ce0407
Mutual SSL added in PGBouncer configuration in the Chart (#11384)
Adds SSL configuration for PGBouncer in the Helm Chart. PGBouncer
is crucial to handle the big number of connections that airflow
opens for the database, but often the database is outside of the
Kubernetes Cluster or generally the environment where Airflow is
installed and PGBouncer needs to connect securely to such database.

This PR adds capability of seting CA/Certificate and Private Key
in the PGBouncer configuration that allows for mTLS authentication
(both client and server are authenticated) and secure connection
even over public network.
2020-10-11 22:38:30 +02:00
Daniel Imberman 3164025a7a
Fix airflow_local_settings.py showing up as directory (#10999)
Fixes a bug where the airflow_local_settings.py mounts as a volume
if there is no value (this causes k8sExecutor pods to fail)
2020-10-10 00:49:45 +02:00
Jarek Potiuk 29a145cd69
Add capability of adding service account annotations to Helm Chart (#11387)
We can now add annotations to the service accounts in a generic
way. This allows for example to add Workflow Identitty in GKE
environment but it is not limited to it.

Co-authored-by: Kamil Breguła <kamil.bregula@polidea.com>

Co-authored-by: Jacob Ferriero <jferriero@google.com>
Co-authored-by: Kamil Breguła <kamil.bregula@polidea.com>
2020-10-09 22:54:21 +02:00
Daniel Imberman 48474600cc
Add CeleryKubernetesExecutor to helm chart (#11288)
Users of the CeleryKubernetesExecutor will require both
Celery and Kubernetes features to launch tasks.

This PR will also serve as the basis for integration tests for this
executor

Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-10-05 15:46:10 -07:00
Daniel Imberman 93475e9f4d
Single/Multi-Namespace mode for helm chart (#11034)
* Multi-Namespace mode for helm chart

Users should not REQUIRE a ClusterRole/ClusterRolebinding
to run airflow via helm. This change will allow "single" and "multi"
namespace modes so users can add airflow to managed kubernetes clusters

* add namespace to role

* add rolebinding too

* add docs

* add values.schema.json change
2020-10-05 10:38:52 -07:00
Daniel Imberman 3ca11eb9b0
Kubernetes executor can adopt tasks from other schedulers (#10996)
* KubernetesExecutor can adopt tasks from other schedulers

* simplify

* recreate tables properly

* fix pylint

Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-10-01 12:07:38 -07:00
Jarek Potiuk 4d2a787070
Enables Kerberos sidecar support (#11130)
Some of the users of Airflow are using Kerberos to authenticate
their worker workflows. Airflow has a basic support for Kerberos
for some of the operators and it has support to refresh the
temporary Kerberos tokens via `airflow kerberos` command.

This change adds support for the Kerberos side-car that connects
to the Kerberos Key Distribution Center and retrieves the
token using Keytab that should be deployed as Kubernetes Secret.

It uses shared volume to share the temporary token. The nice
thing about setting it up as a sidecar is that the Keytab
is never shared with the workers - the secret is only mounted
by the sidecar and the workers have only access to the temporary
token.

Depends on #11129
2020-09-28 00:13:36 +02:00
Jarek Potiuk 0ea3e611d3
Adds Kubernetes Service Account for the webserver (#11131)
Webserver did not have a Kubernetes Service Account defined and
while we do not strictly need to use the service account for
anything now, having the Service Account defined allows to
define various capabilities for the webserver.

For example when you are in the GCP environment, you can map
the Kubernetes service account into a GCP one, using
Workload Identity without the need to define any secrets
and performing additional authentication.
Then you can have that GCP service account get
the permissions to write logs to GCS bucket. Similar mechanisms
exist in AWS and it also opens up on-premises configuration.

See more at
https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity

Co-authored-by: Jacob Ferriero <jferriero@google.com>

Co-authored-by: Jacob Ferriero <jferriero@google.com>
2020-09-27 23:39:14 +02:00
Jarek Potiuk c65d46634c
Update to latest version of pbgouncer-exporter (#11150)
There was a problem with Mac version of pgbouncer exporter
created and released previously. This commit releases the
latest version making sure that Linux Go is used to build
the pgbouncer binary.
2020-09-25 18:55:26 +02:00
Ruben Laguna 33fe9a52cd
Make sure pgbouncer-exporter docker image is linux/amd64 (#11148)
Closes #11145
2020-09-25 17:26:44 +02:00
Jarek Potiuk ce6b257de7
Fix gitSync user in the helm Chart (#11127)
There was a problem with user in Git Sync mode of the Helm Chart
in connection with the git sync image and official Airflow
image. Since we are using the official image, most of the
containers are run with the "50000" user, but the git-sync image
used by the git sync user is 65533 so we have to set it as
default. We also exposed that value as parameter, so that
another image could be used here as well.
2020-09-25 11:31:45 +01:00
Jarek Potiuk b40df1bf12
Fixes celery deployments for Airflow 2.0 (#11129)
The celery flower and worker commands have changed in Airflow 2.0.
The Helm Chart supported only 1.10 version of those commands and
this PR fixes it by adding both variants of them.
2020-09-25 11:31:28 +01:00
Ruben Laguna 1f0a7857f2
Fix user in helm chart pgbouncer deployment (#11143) 2020-09-25 11:06:30 +01:00
flvndh a449b1fc4e
Add JSON schema validation for Helm values (#10664)
fixes #10634
2020-09-22 00:40:19 +01:00
Jacob Ferriero 23768f6946
Proposal: remove -serviceaccount suffix from KSA names in helm chart (#10892)
* [WIP] remove -serviceaccount suffix in helm chart

It's quite annoying to have `-serviceaccount` in each service account name as this is a useless 15 characters that provides no additional information.
"why is this so frustrating to you Jake?"
GCP service accounts have 30 char name limit https://cloud.google.com/iam/docs/creating-managing-service-accounts#creating
For manageability / clarity I'd like to keep KSA and GSA names exactly the same when using workload identity which maps KSA<>GSA 1:1 https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity.
2020-09-15 12:39:39 +02:00
Daniel Imberman 87e7ad9daf
fix bug where multiple volume mounts created (#10915) 2020-09-13 16:47:35 -07:00
Daniel Imberman 56bd9b7d6b
Modify helm chart to use pod_template_file (#10872)
* Modify helm chart to use pod_template_file

Since we are deprecating most k8sexecutor arguments
we should use the pod_template_file when launching airflow
using the KubernetesExecutor

* fix tests

* one more nit

* fix dag command

* fix pylint
2020-09-11 10:47:59 -07:00
Jarek Potiuk e3c83da984
Check all dockerfiles with hadolint (#10754)
The hadolint check only checked the "main dir" Dockerfile
but we have more of them now. All of them are now checked.

The following problems are fixed:

 * DL3000 Use absolute WORKDIR
 * DL4000 MAINTAINER is deprecated
 * DL4006 Set the SHELL option -o pipefail before RUN with a pipe in it.
 * SC2046 Quote this to prevent word splitting.

The followiing problems are ignored:

 * DL3018 Pin versions in apk add. Instead of `apk add <package>` use `apk add
   <package>=<version>`
2020-09-06 18:06:05 +02:00
Jarek Potiuk e3c750e618
Switch to downloaded pgbouncer_exporter (#10759)
Fixes #10753
2020-09-06 10:47:32 +02:00
Kaxil Naik e5785d4720
Chart: Flower deployment should use Flower image (#10701)
Co-authored-by: Steven Miller <sjmiller609@gmail.com>
2020-09-02 20:34:03 +01:00
Kamil Olszewski 48ce4bdac4
Fix missing dash in flag for statsd container (#10691)
Co-authored-by: Kamil Olszewski <kamil.olszewski@polidea.com>
2020-09-02 19:43:00 +01:00
Jarek Potiuk 5e36152235
Helm Chart is using 1.10.12 image by default (#10639) 2020-08-29 18:33:26 +02:00
gardnerdev e495be9fd9
Update scheduler deployment - dags volume mount (#10630) 2020-08-28 21:57:34 +02:00
flvndh 5f403a8759
Wrong key in DAGs Persistent Volume Claim (#10627)
Co-authored-by: Flavien Dereume-Hancart <flavien@LL-PC0BE1K9-1.goiba.net>
2020-08-28 16:52:05 +02:00
Jarek Potiuk c6e6d6dedd
Helm Docker image sources are now included in the Airlfow codebase (#9650)
We can now build all the images from Airlfow sources in
a reproducible fashion and our users can use the helm chart
based on the images build from official images + code in
Airflow Codebase.

We also have consistent versioning scheme based on
calver version of releasing the images coupled with
the version of the original package.

Part of #9401
2020-08-25 16:01:39 +01:00
Can Güney Aksakalli 4fc25367a2
Add ingress to the helm chart (#10064)
Co-authored-by: Alikhan <alikhan.tagybergen@tomtom.com>
Co-authored-by: alikhtag <43503284+alikhtag@users.noreply.github.com>
2020-08-15 18:41:21 +01:00
David Cavaletto f6734b3b85
Enable Sphinx spellcheck for doc generation (#10280) 2020-08-12 21:30:37 +01:00
gardnerdev 1266b29af7
Run create-user-job as user with specified id (#10291)
In secured cluster there is a need to run this job with specific user id
2020-08-12 00:03:51 +01:00
Muller Hsu 4146abaf0a
Fix chart: parameterize namespace (#10213)
Replace fixed namespace "airflow" with variable {{ .Release.Namespace }}
2020-08-07 11:14:53 +01:00
Vicken Simonian 473f506336
Add imagePullSecrets to the create user job (#9802)
So that it can pull the specified image from a private registry.
2020-07-16 15:50:22 +02:00
Ash Berlin-Taylor e4790d58b2
Helm chart can now place arbitrary config settings in to airflow.cfg (#9816)
Rather than only allowing specific pre-determined config settings, this
change allows the user to place _any_ config setting they like in the
generated airflow.cfg, including overwriting the "generated defaults".

This providers a nicer interface for the users of the chart (even if the
could already set these via the env vars).
2020-07-16 14:33:07 +01:00
Vicken Simonian c7858e81a5
Enable annotations to be added to the webserver service (#9776) 2020-07-14 08:45:21 +02:00
Daniel Imberman 0faa06ed9b
Add TargetQueryValue to KEDA Autoscaler (#9748)
Co-authored-by: Daniel Imberman <daniel@astronomer.io>
2020-07-10 07:48:17 -07:00
Daniel Debny 9db1fa3698
Error in description after deployment (#9723)
* Error in description after deployment
Co-authored-by: Daniel Debny <daniel.debny@polidea.com>
2020-07-08 22:24:12 +02:00
QP Hou 6c158853ae
generate go client from openapi spec (#9502)
* generate go client from openapi spec

* move openapi codegen to seperate workflow
2020-07-07 19:48:28 +02:00
Aneesh Joseph 502b6ea657
use the correct claim name in the webserver (#9688) 2020-07-07 19:08:35 +02:00
Aneesh Joseph d93555b863
Add git sync option and unit tests for the Helm chart (#9371)
* add git sync sidecars

* add a helm test

* add more tests

* allow users to provide git username and pass via  a k8s secrets

* set default values for airflow worker repository & tag

* change ci timeout

* fix link

* add credentials_secret to airflow.cfg configmap

* set GIT_SYNC_ADD_USER on kubernetes worker pods, set uid

* add fsGroup to webserver and kubernete workers

* move gitSync to dags.gitSync

* rename valueFields

* turn off git sync and dag persistence by default

* provide option to specify known_hosts

* add git-sync details into the chart documentation

* Update .gitignore

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>

* make git sync max failures configurable

* Apply suggestions from code review

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

* add back requirements.lock

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-07-05 12:57:15 -07:00
Jarek Potiuk be6ed86ccd
Fixed failing Kubernetes tests after deny_all for experimental API (#9647)
The tests were broken by #9611
2020-07-03 21:28:43 +01:00