k8s: Added deploy cluster admin template

This combines the rbac-admin.yaml with operator.yaml into a single
deployment template which will match what we generate from the helm
chart.

Change-Id: I90842afb38405cdec8b8c9e1d093f2c62e22be2f
This commit is contained in:
Michael Kelly 2022-11-30 20:51:47 -08:00
parent daa0b1945f
commit 35adb6fe24
No known key found for this signature in database
GPG Key ID: 77F7FE93040ECF3E
3 changed files with 42 additions and 20 deletions

View File

@ -0,0 +1,41 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: zuul-operator
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zuul-operator
subjects:
- kind: ServiceAccount
name: zuul-operator
namespace: default
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: zuul-operator
spec:
replicas: 1
selector:
matchLabels:
name: zuul-operator
template:
metadata:
labels:
name: zuul-operator
spec:
serviceAccountName: zuul-operator
containers:
- name: operator
image: "docker.io/zuul/zuul-operator"
imagePullPolicy: "IfNotPresent"
env:
- name: ZUUL_IMAGE_VERSION
value: latest

View File

@ -1,18 +0,0 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: zuul-operator
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: zuul-operator
subjects:
- kind: ServiceAccount
name: zuul-operator
namespace: default
roleRef:
kind: ClusterRole
name: cluster-admin
apiGroup: rbac.authorization.k8s.io

View File

@ -38,8 +38,7 @@ From the root of the zuul-operator repo, run:
.. code-block:: bash
kubectl apply -f deploy/crds/zuul-ci_v1alpha1_zuul_crd.yaml
kubectl apply -f deploy/rbac-admin.yaml
kubectl apply -f deploy/operator.yaml
kubectl apply -f deploy/operator-cluster-admin.yaml
You probably want a namespace, so go ahead and create one with: