You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/09/20 17:44:25 UTC
[GitHub] [airflow] dimberman opened a new pull request #11034: Single/Multi-Namespace mode for helm chart
dimberman opened a new pull request #11034:
URL: https://github.com/apache/airflow/pull/11034
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
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on a change in pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#discussion_r491740994
##########
File path: chart/templates/rbac/pod-launcher-role.yaml
##########
@@ -19,7 +19,11 @@
## Airflow Pod Launcher Role
#################################
{{- if and .Values.rbacEnabled .Values.allowPodLaunching }}
+{{- if .Values.multiNamespaceMode }}
kind: ClusterRole
+{{- else }}
+kind: Role
Review comment:
> when you create a Role, you have to specify the namespace it belongs in.
> ClusterRole, by contrast, is a non-namespaced resource.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/
Can you add namespace?
##########
File path: chart/values.yaml
##########
@@ -545,8 +545,11 @@ config:
worker_container_repository: '{{ .Values.images.airflow.repository | default .Values.defaultAirflowRepository }}'
worker_container_tag: '{{ .Values.images.airflow.tag | default .Values.defaultAirflowTag }}'
delete_worker_pods: 'True'
+ multi_namespace_mode: '{{ .Values.multiNamespaceMode }}'
# yamllint enable rule:line-length
+multiNamespaceMode: 'False'
Review comment:
Should we also update README.md? The minimum is updating the reference documentation, but I'd be happy if you would describe more about what "Multi namespace mode" means.
https://github.com/apache/airflow/pull/10664
##########
File path: chart/values.yaml
##########
@@ -545,8 +545,11 @@ config:
worker_container_repository: '{{ .Values.images.airflow.repository | default .Values.defaultAirflowRepository }}'
worker_container_tag: '{{ .Values.images.airflow.tag | default .Values.defaultAirflowTag }}'
delete_worker_pods: 'True'
+ multi_namespace_mode: '{{ .Values.multiNamespaceMode }}'
# yamllint enable rule:line-length
+multiNamespaceMode: 'False'
Review comment:
Should we also update README.md? The minimum is updating the reference documentation, but I'd be happy if you would describe more about what "Multi namespace mode" means.
Reference documentation will be easier to maintain if validation for values.yml has been added.
https://github.com/apache/airflow/pull/10664
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman merged pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman merged pull request #11034:
URL: https://github.com/apache/airflow/pull/11034
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on a change in pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#discussion_r492153324
##########
File path: chart/values.yaml
##########
@@ -545,8 +545,11 @@ config:
worker_container_repository: '{{ .Values.images.airflow.repository | default .Values.defaultAirflowRepository }}'
worker_container_tag: '{{ .Values.images.airflow.tag | default .Values.defaultAirflowTag }}'
delete_worker_pods: 'True'
+ multi_namespace_mode: '{{ .Values.multiNamespaceMode }}'
# yamllint enable rule:line-length
+multiNamespaceMode: 'False'
Review comment:
Should we also update README.md? The minimum is updating the reference documentation, but I'd be happy if you would describe more about what "Multi namespace mode" means.
https://github.com/apache/airflow/pull/10664
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on a change in pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#discussion_r491740994
##########
File path: chart/templates/rbac/pod-launcher-role.yaml
##########
@@ -19,7 +19,11 @@
## Airflow Pod Launcher Role
#################################
{{- if and .Values.rbacEnabled .Values.allowPodLaunching }}
+{{- if .Values.multiNamespaceMode }}
kind: ClusterRole
+{{- else }}
+kind: Role
Review comment:
> when you create a Role, you have to specify the namespace it belongs in.
> ClusterRole, by contrast, is a non-namespaced resource.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/
Can you add namespace?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-695843573
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman commented on a change in pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman commented on a change in pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#discussion_r492125766
##########
File path: chart/templates/rbac/pod-launcher-role.yaml
##########
@@ -19,7 +19,11 @@
## Airflow Pod Launcher Role
#################################
{{- if and .Values.rbacEnabled .Values.allowPodLaunching }}
+{{- if .Values.multiNamespaceMode }}
kind: ClusterRole
+{{- else }}
+kind: Role
Review comment:
@mik-laj fixed 👍
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-696861521
@mik-laj rebased
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-696437521
Can you do rebase and update values.json?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman commented on a change in pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman commented on a change in pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#discussion_r492125766
##########
File path: chart/templates/rbac/pod-launcher-role.yaml
##########
@@ -19,7 +19,11 @@
## Airflow Pod Launcher Role
#################################
{{- if and .Values.rbacEnabled .Values.allowPodLaunching }}
+{{- if .Values.multiNamespaceMode }}
kind: ClusterRole
+{{- else }}
+kind: Role
Review comment:
@mik-laj fixed 👍
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-695815097
cc: @sjmiller609
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-696437521
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-696864879
Can you add new item to values.schema.json?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-695843573
Thanks for addressing this issue. I've also encountered this problem recently when I was creating an environment for multiple teams on one cluster.
For now, I've added this option, but I think it's worth solving this problem.
```
set {
name = "allowPodLaunching"
value = "false"
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on a change in pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#discussion_r492153324
##########
File path: chart/values.yaml
##########
@@ -545,8 +545,11 @@ config:
worker_container_repository: '{{ .Values.images.airflow.repository | default .Values.defaultAirflowRepository }}'
worker_container_tag: '{{ .Values.images.airflow.tag | default .Values.defaultAirflowTag }}'
delete_worker_pods: 'True'
+ multi_namespace_mode: '{{ .Values.multiNamespaceMode }}'
# yamllint enable rule:line-length
+multiNamespaceMode: 'False'
Review comment:
Should we also update README.md? The minimum is updating the reference documentation, but I'd be happy if you would describe more about what "Multi namespace mode" means.
Reference documentation will be easier to maintain if validation for values.yml has been added.
https://github.com/apache/airflow/pull/10664
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-696868511
@mik-laj added
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-695815097
cc: @sjmiller609
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] dimberman commented on pull request #11034: Single/Multi-Namespace mode for helm chart
Posted by GitBox <gi...@apache.org>.
dimberman commented on pull request #11034:
URL: https://github.com/apache/airflow/pull/11034#issuecomment-696861521
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org