diff --git a/ci/playbooks/install-openstack-lightspeed.yml b/ci/playbooks/install-openstack-lightspeed.yml index 0274811..d96d141 100644 --- a/ci/playbooks/install-openstack-lightspeed.yml +++ b/ci/playbooks/install-openstack-lightspeed.yml @@ -489,7 +489,42 @@ kind: ClusterRole name: lightspeed-access subjects: - # The current test-operator uses the namespace's default account. + - kind: ServiceAccount + name: "{{ openstack_lightspeed_ansibletest_service_account }}" + namespace: "{{ cifmw_test_operator_namespace | default('openstack') }}" + + - name: Authorize the test Pod to exec into the openstack-assistant Pod + when: openstack_assistant_enabled | default(false) | bool + kubernetes.core.k8s: + state: present + definition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: ClusterRole + metadata: + name: lightspeed-tests-assistant-exec + rules: + - apiGroups: [""] + resources: ["pods"] + verbs: ["get", "list"] + - apiGroups: [""] + resources: ["pods/exec"] + verbs: ["create", "get"] + + - name: Bind the exec permissions to the test-operator ServiceAccount + when: openstack_assistant_enabled | default(false) | bool + kubernetes.core.k8s: + state: present + definition: + apiVersion: rbac.authorization.k8s.io/v1 + kind: RoleBinding + metadata: + name: lightspeed-tests-assistant-exec + namespace: "{{ cifmw_test_operator_namespace | default('openstack') }}" + roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: lightspeed-tests-assistant-exec + subjects: - kind: ServiceAccount name: "{{ openstack_lightspeed_ansibletest_service_account }}" namespace: "{{ cifmw_test_operator_namespace | default('openstack') }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 83b7e72..22c479d 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -106,6 +106,11 @@ - serviceAccountToken: path: token expirationSeconds: 3600 + - configMap: + name: kube-root-ca.crt + items: + - key: ca.crt + path: ca.crt - name: prometheus-ca secret: secretName: combined-ca-bundle