diff --git a/ansible/group_vars/all.yaml b/ansible/group_vars/all.yaml index 091e188..9e88908 100644 --- a/ansible/group_vars/all.yaml +++ b/ansible/group_vars/all.yaml @@ -6,7 +6,6 @@ tenants: - tenant: name: demo source: {} -sshsecretname: "{{ zuul_cluster_name }}-ssh-secret" connections: [] merger: min: 0 @@ -22,6 +21,7 @@ state: "present" zuul_app_name: "zuul" zuul_cluster_name: "{{ meta.name }}" +sshsecretname: "{{ zuul_cluster_name }}-ssh-secret" zuul_version: "latest" #"3.7.1" # Use local image for https://review.openstack.org/650246 diff --git a/ansible/roles/get_status/tasks/main.yaml b/ansible/roles/get_status/tasks/main.yaml index dfa3dcc..bfaa574 100644 --- a/ansible/roles/get_status/tasks/main.yaml +++ b/ansible/roles/get_status/tasks/main.yaml @@ -12,7 +12,7 @@ - name: lookup cluster secret set_fact: zuul_pg_user: "{{ secrets_lookup | json_query(pg_user_query) }}" - zuul_ssh_key: "{{ secrets_lookup | json_query(ssh_key_query) }}" + zuul_ssh_key: "{{ lookup('k8s', api_version='v1', kind='Secret', namespace=namespace, resource_name=sshsecretname) }}" - name: lookup k8s postgres cr set_fact: diff --git a/deploy/crds/zuul-ci_v1alpha1_zuul_cr.yaml b/deploy/crds/zuul-ci_v1alpha1_zuul_cr.yaml index 9b6a885..24b73e2 100644 --- a/deploy/crds/zuul-ci_v1alpha1_zuul_cr.yaml +++ b/deploy/crds/zuul-ci_v1alpha1_zuul_cr.yaml @@ -12,4 +12,7 @@ spec: web: min: 1 connections: [] - tenants: [] + tenants: + - tenant: + name: demo + source: {}