Skip to content

Commit

Permalink
[#504] allow dags to interact with k8s secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
allesh-clmb authored and aliaksandr-d committed Oct 18, 2018
1 parent b163ba2 commit cc3bb19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deploy/helms/airflow/templates/worker-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rules:
- apiGroups: [""] # core API group
resources: ["secrets"]
verbs: ["watch", "get"]
resourceNames: ['airflow-credentials-*']
resourceNames: ['airflow-credentials']
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
Expand Down
2 changes: 1 addition & 1 deletion legion_airflow/legion_airflow/hooks/k8s_base_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ def _get_conn_from_k8s(cls, conn_id):
k8s_namespace=os.environ['NAMESPACE']
)
connection_data = yaml.load(config_map.data['data'])
if conn_id not in connection_data.values():
if conn_id not in connection_data.keys():
raise Exception("Doesn't have {} value in k8s secret".format(conn_id))
return Connection(**connection_data.get(conn_id))

0 comments on commit cc3bb19

Please sign in to comment.