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

[incubator/airflow] Airflow Helm Chart #3959

Merged
merged 72 commits into from
Dec 4, 2018
Merged

Conversation

gsemet
Copy link
Contributor

@gsemet gsemet commented Mar 2, 2018

Hello,

Here is the port of the Helm chart I am maintaining on https://github.com/gsemet/kube-airflow. It allows starting Airflow on a Kubernetes cluster using the Celery Backend.

Fix: #2591
Reference: gsemet/kube-airflow#15

This Pull Request is still a Work in Progress, even if it runs in our production server, there have been some recent changes that needs to be stabilized.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 2, 2018
@k8s-ci-robot
Copy link
Contributor

Hi @gsemet. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 2, 2018
@gsemet gsemet mentioned this pull request Mar 2, 2018
@unguiculus
Copy link
Member

/assign

@jpds
Copy link
Collaborator

jpds commented Mar 8, 2018

By the way, I'm doing work at https://github.com/bloomberg/airflow/pull/46 which may impact options in this chart (for instance, flower isn't required with the Kubernetes executor).

@gsemet
Copy link
Contributor Author

gsemet commented Mar 8, 2018

Hello. Yes I follow actively your fork and activity. I guess there will be 2 charts at the end, one on the celery executor and one on the Kube execute since they cannot work at the same time (that's a pitty). By the way, I already talk with daniel (I guess) about the KubeOperator, I would be so pleased to be able to use it from the Celery Executor (for example to offload some work to Kubernetes Jobs easily for instance).
But if merge of both charts are easy to do, I'll be happy to let user choose between the celery executor or the kubeexecutor.

@gsemet gsemet changed the title [WIP] [incubator/airflow] Airflow Helm Chart [incubator/airflow] Airflow Helm Chart Mar 10, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 10, 2018
@gsemet
Copy link
Contributor Author

gsemet commented Mar 10, 2018

/assign @unguiculus
Patch is now ready to be reviewed

@gsemet gsemet force-pushed the airflow branch 3 times, most recently from 4755727 to 327a452 Compare March 13, 2018 16:05
@gsemet
Copy link
Contributor Author

gsemet commented Mar 13, 2018

@unguiculus @jpds can you review or test this chart?

@gsemet
Copy link
Contributor Author

gsemet commented Mar 13, 2018

/joke

@k8s-ci-robot
Copy link
Contributor

@gsemet: What do you call a troublesome Canadian high schooler? A poutine.

In response to this:

/joke

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@unguiculus
Copy link
Member

Please make sure you follow our best practices. Please read the guidelines:
https://github.com/kubernetes/charts/blob/master/REVIEW_GUIDELINES.md

Copy link

@barney-s barney-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the helm chart for airflow. We could get on a quick call to take this forward. Iam interested in using a mysql operator as an option( vs postgres) and redis operator. that could be a subsequent revision.

incubator/airflow/Chart.yaml Outdated Show resolved Hide resolved
incubator/airflow/Chart.yaml Outdated Show resolved Hide resolved
incubator/airflow/Chart.yaml Outdated Show resolved Hide resolved
incubator/airflow/Chart.yaml Outdated Show resolved Hide resolved
incubator/airflow/README.md Outdated Show resolved Hide resolved
incubator/airflow/templates/deployments-flower.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/deployments-scheduler.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/deployments-scheduler.yaml Outdated Show resolved Hide resolved
incubator/airflow/values.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/pvc.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/configmaps.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/configmaps.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/deployments-flower.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/deployments-scheduler.yaml Outdated Show resolved Hide resolved
incubator/airflow/templates/deployments-scheduler.yaml Outdated Show resolved Hide resolved
@maver1ck
Copy link
Collaborator

@gsemet
Did you test it with Nginx ingress ?

@gsemet
Copy link
Contributor Author

gsemet commented Mar 29, 2018

What problem do you have ? I use traefik ingress and it only requires a bunch of annotations

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 5, 2018
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 30, 2018
@gsemet
Copy link
Contributor Author

gsemet commented Nov 30, 2018

Hi. I have rebased and followed your recommendation, @unguiculus ! Thanks for the review !

@gsemet
Copy link
Contributor Author

gsemet commented Nov 30, 2018

@kppullin if you are motivated to get this feature working with this airflow chart that would be great to work! I was thinking it was easier to maintain 2 charts but if differences are not that huge, yes, supporting the two executors would be great (celery is pretty damned stable, so it seems like a must have for the moment)!

@kppullin
Copy link
Contributor

kppullin commented Nov 30, 2018

@gsemet - The chart and associated airflow config require just a few config changes to get it working with the current state of this chart (basically disabling redis, postgres, and the workers and setting the executor to Kubernetes and setting some airflow properties).

So the differences are quite minor IMHO and I'd prefer having a single chart for the community to maintain and keep up to date.

Also thanks for all you've done on this!!

@kppullin
Copy link
Contributor

kppullin commented Nov 30, 2018

In case it helps others, I had to recreate my airflow deployment due to the changes made to the label names. Maybe there's another way to fix this up but a purge and reinstall way simplest on my end.

I should probably also mention that this may delete other resources that you want to keep around (PVCs, potentially the postgres DB, etc) so be careful!

stable/airflow/templates/configmap-airflow.yaml Outdated Show resolved Hide resolved
stable/airflow/templates/configmap-git-clone.yaml Outdated Show resolved Hide resolved
stable/airflow/templates/configmap-scripts.yaml Outdated Show resolved Hide resolved
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 3, 2018
@gsemet
Copy link
Contributor Author

gsemet commented Dec 4, 2018

@unguiculus all done :) thanks for the review

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 4, 2018
@unguiculus
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gsemet, unguiculus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2018
@k8s-ci-robot k8s-ci-robot merged commit b0e88db into helm:master Dec 4, 2018
@gsemet
Copy link
Contributor Author

gsemet commented Dec 4, 2018

Thanks a lot ! I really hope this will be useful for many people ! And also thanks a lot to all contributors that increased a lot the stability and features of this chart :)

yuchaoran2011 pushed a commit to yuchaoran2011/charts that referenced this pull request Dec 11, 2018
* Naive import from gh:gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* update chart with recent fixes

from https://github.com/gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update the templates from kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update after review

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Sync with gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Move to secrets

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fixed some (find/replace?) errors.


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* fix env vars
add missing var name REDIS_USER

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* apply base64 encoding to secrets
delete obsolete var/secret REDIS_USER

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Remove trailing whitespace
Fix comment (postgres -> Redis)

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Add configurable serviceAccountName to workers

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix templates API versions

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update instructions for embedded DAGs

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Rename worker/celery vars

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix NOTES.txt

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Remove 'v' from chart version

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix field serviceAccountName

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix a templating typo

There's a small typo in the template which I noticed when I added a custom Secrets volume for the scheduler. The YAML config accidentally works if the typo is on the last line. :)
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* fix celery replica config

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Add quotes around the numbers for celery workers

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Parametrize cpu and mem req/limits for worker statefulset

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix 'trailing spaces' lint issue

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* added the ability to toggle the scheduler -p option

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* missed the airflow namespace

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* moved command arguments to separate lines

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Headless service name should match statefulset serviceName

I had issues where Airflow could not find the log files, so I started looking into it and concluded that everything was working (hostname correct in task instance, could retrieve logs from worker internally) except for the DNS resolution.

This commit changes the StatefulSet serviceName suffix to *-worker* instead of *-workers*, so that it matches the Service name.

Now all is fine, the logs are shown.
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* compatibility with kube 2.7

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Configure persistance

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Configure persistance

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Support initcontainer git synchro

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update configuration description in README

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Adding documentation for persistence.existingClaim

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow.scheduler_do_pickle => dags.donot_pickle

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Injecting ~/.local/bin in PATH

so that the commands pip installed can be accessed by
a BashOperator

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Force disable xcom pickling

will be disabled in airflow 2.0

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* mkdir ~/.local/bin

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Use real use as base URL

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* more docs examples

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Typo fixes

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* export local PATH before pip install

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Hardcode local path

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* revert BASE_URL

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Reference proper enabled parameter for values.dags.init_container


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* bad order or install in scheduler

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* increase initial delay for webui to 6 min

maybe we might want it in the values.yaml?

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fixed some more spots for Values.dags.init_container.enabled


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Doc for donot_pickle

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* notes about num_runs

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* remove load_examples from example

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* remove load_examples from example

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow: Add support for ingress TLS termination

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow: Allow customisation of worker Pod annotations

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: add secrets as volume mount

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: change variable to camel case; add worker secrets; add image pull secret

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: change variables to camel case

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update array spacing

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update README

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: add newline to ingresses

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update values

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update airflow chart with:
- RBAC setup
- Ability to disable the redis+celery systems and allow for setting an alternative `executor`, such as the kubernetes executor
- Wire up the `serviceAccountName` to additional resources
- Update to latest airflow release

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Bump versions

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* 'existingClaim' must not be declared for the pvc template to work

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Support setting a custom postgresHost

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix apps/v1beta1

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Change minikube values

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix indendation

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* OWNERS file

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* chore/cleanup: fix spelling

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Move to stable

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* add std labels and component label

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* use template for chart label

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix reference to incubator

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Signed-off-by: Chaoran Yu <yuchaoran2011@gmail.com>
@luthes
Copy link

luthes commented Dec 12, 2018

I'm having an issue with this where I'm getting not getting the output from the NOTES.txt, looks like the templated values aren't populating.

Congratulations. You have just deployed Apache Airflow
   export POD_NAME=$(kubectl get pods --namespace airflow1 -l "component=" -o jsonpath="{.items[0].metadata.name}")
   echo http://127.0.0.1:
   kubectl port-forward --namespace airflow1 $POD_NAME :

2. Open Airflow in your web browser

When running the kubectl command by itself I get this:

Error executing template: array index out of bounds: index 0, length 0. Printing more information for debugging the template:
        template was:
                {.items[0].metadata.name}
        object given to jsonpath engine was:
                map[string]interface {}{"kind":"List", "apiVersion":"v1", "metadata":map[string]interface {}{"selfLink":"", "resourceVersion":""}, "items":[]interface {}{}}

error: error executing jsonpath "{.items[0].metadata.name}": array index out of bounds: index 0, length 0

I can get the first one to populate this command: kubectl get pods --namespace airflow1 -L "component" -o jsonpath="{.items[0].metadata.name}"

Unless I'm mistaken, .Values.airflow.name doesn't exist in the values.yaml, if that's where it should come from. Is there some updating that needs done to the NOTES.txt file?

I'm running this on AWS EKS, so k8s 1.10.3.

Thanks.

@gsemet
Copy link
Contributor Author

gsemet commented Dec 22, 2018

Hi. There have been a recent change around here just before fix, if there is a mismatch do not hesitate to fix it. We might probably want to use the template airflow.fullname.

coreypobrien pushed a commit to FairwindsOps/helm-charts that referenced this pull request Dec 31, 2018
* Naive import from gh:gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* update chart with recent fixes

from https://github.com/gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update the templates from kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update after review

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Sync with gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Move to secrets

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fixed some (find/replace?) errors.


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* fix env vars
add missing var name REDIS_USER

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* apply base64 encoding to secrets
delete obsolete var/secret REDIS_USER

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Remove trailing whitespace
Fix comment (postgres -> Redis)

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Add configurable serviceAccountName to workers

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix templates API versions

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update instructions for embedded DAGs

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Rename worker/celery vars

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix NOTES.txt

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Remove 'v' from chart version

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix field serviceAccountName

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix a templating typo

There's a small typo in the template which I noticed when I added a custom Secrets volume for the scheduler. The YAML config accidentally works if the typo is on the last line. :)
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* fix celery replica config

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Add quotes around the numbers for celery workers

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Parametrize cpu and mem req/limits for worker statefulset

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix 'trailing spaces' lint issue

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* added the ability to toggle the scheduler -p option

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* missed the airflow namespace

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* moved command arguments to separate lines

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Headless service name should match statefulset serviceName

I had issues where Airflow could not find the log files, so I started looking into it and concluded that everything was working (hostname correct in task instance, could retrieve logs from worker internally) except for the DNS resolution.

This commit changes the StatefulSet serviceName suffix to *-worker* instead of *-workers*, so that it matches the Service name.

Now all is fine, the logs are shown.
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* compatibility with kube 2.7

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Configure persistance

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Configure persistance

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Support initcontainer git synchro

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update configuration description in README

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Adding documentation for persistence.existingClaim

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow.scheduler_do_pickle => dags.donot_pickle

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Injecting ~/.local/bin in PATH

so that the commands pip installed can be accessed by
a BashOperator

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Force disable xcom pickling

will be disabled in airflow 2.0

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* mkdir ~/.local/bin

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Use real use as base URL

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* more docs examples

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Typo fixes

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* export local PATH before pip install

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Hardcode local path

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* revert BASE_URL

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Reference proper enabled parameter for values.dags.init_container


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* bad order or install in scheduler

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* increase initial delay for webui to 6 min

maybe we might want it in the values.yaml?

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fixed some more spots for Values.dags.init_container.enabled


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Doc for donot_pickle

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* notes about num_runs

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* remove load_examples from example

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* remove load_examples from example

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow: Add support for ingress TLS termination

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow: Allow customisation of worker Pod annotations

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: add secrets as volume mount

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: change variable to camel case; add worker secrets; add image pull secret

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: change variables to camel case

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update array spacing

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update README

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: add newline to ingresses

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update values

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update airflow chart with:
- RBAC setup
- Ability to disable the redis+celery systems and allow for setting an alternative `executor`, such as the kubernetes executor
- Wire up the `serviceAccountName` to additional resources
- Update to latest airflow release

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Bump versions

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* 'existingClaim' must not be declared for the pvc template to work

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Support setting a custom postgresHost

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix apps/v1beta1

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Change minikube values

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix indendation

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* OWNERS file

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* chore/cleanup: fix spelling

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Move to stable

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* add std labels and component label

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* use template for chart label

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix reference to incubator

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
wgiddens pushed a commit to wgiddens/charts that referenced this pull request Jan 18, 2019
* Naive import from gh:gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* update chart with recent fixes

from https://github.com/gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update the templates from kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update after review

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Sync with gsemet/kube-airflow

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Move to secrets

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fixed some (find/replace?) errors.


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* fix env vars
add missing var name REDIS_USER

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* apply base64 encoding to secrets
delete obsolete var/secret REDIS_USER

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Remove trailing whitespace
Fix comment (postgres -> Redis)

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Add configurable serviceAccountName to workers

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix templates API versions

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update instructions for embedded DAGs

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Rename worker/celery vars

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix NOTES.txt

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Remove 'v' from chart version

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix field serviceAccountName

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix a templating typo

There's a small typo in the template which I noticed when I added a custom Secrets volume for the scheduler. The YAML config accidentally works if the typo is on the last line. :)
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* fix celery replica config

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Add quotes around the numbers for celery workers

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Parametrize cpu and mem req/limits for worker statefulset

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix 'trailing spaces' lint issue

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* added the ability to toggle the scheduler -p option

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* missed the airflow namespace

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* moved command arguments to separate lines

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Headless service name should match statefulset serviceName

I had issues where Airflow could not find the log files, so I started looking into it and concluded that everything was working (hostname correct in task instance, could retrieve logs from worker internally) except for the DNS resolution.

This commit changes the StatefulSet serviceName suffix to *-worker* instead of *-workers*, so that it matches the Service name.

Now all is fine, the logs are shown.
Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* compatibility with kube 2.7

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Configure persistance

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Configure persistance

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Support initcontainer git synchro

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update configuration description in README

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Adding documentation for persistence.existingClaim

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow.scheduler_do_pickle => dags.donot_pickle

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Injecting ~/.local/bin in PATH

so that the commands pip installed can be accessed by
a BashOperator

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Force disable xcom pickling

will be disabled in airflow 2.0

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* mkdir ~/.local/bin

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Use real use as base URL

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* more docs examples

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Typo fixes

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* export local PATH before pip install

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Hardcode local path

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* revert BASE_URL

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Reference proper enabled parameter for values.dags.init_container


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* bad order or install in scheduler

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* increase initial delay for webui to 6 min

maybe we might want it in the values.yaml?

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fixed some more spots for Values.dags.init_container.enabled


Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Doc for donot_pickle

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* notes about num_runs

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* remove load_examples from example

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* remove load_examples from example

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow: Add support for ingress TLS termination

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* airflow: Allow customisation of worker Pod annotations

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: add secrets as volume mount

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: change variable to camel case; add worker secrets; add image pull secret

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: change variables to camel case

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update array spacing

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update README

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: add newline to ingresses

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* feature/secrets: update values

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Update airflow chart with:
- RBAC setup
- Ability to disable the redis+celery systems and allow for setting an alternative `executor`, such as the kubernetes executor
- Wire up the `serviceAccountName` to additional resources
- Update to latest airflow release

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Bump versions

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* 'existingClaim' must not be declared for the pvc template to work

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Support setting a custom postgresHost

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix apps/v1beta1

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Change minikube values

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix indendation

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* OWNERS file

Signed-off-by: Maciej Bryński <maciej.brynski@xcaliber.com>

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* chore/cleanup: fix spelling

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Move to stable

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* add std labels and component label

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* use template for chart label

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>

* Fix reference to incubator

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged. ok-to-test size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet