Skip to content

Commit 52ab9cb

Browse files
author
Ish Shah
committed
stand up sa for upgrade test
Signed-off-by: Ish Shah <[email protected]>
1 parent 98f4692 commit 52ab9cb

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

hack/pre-upgrade-setup.sh

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,42 @@ spec:
3333
insecureSkipTLSVerify: true
3434
EOF
3535

36+
kubectl apply -f - <<EOF
37+
apiVersion: v1
38+
kind: ServiceAccount
39+
metadata:
40+
name: upgrade-e2e
41+
namespace: default
42+
EOF
43+
44+
kubectl apply -f - <<EOF
45+
apiVersion: rbac.authorization.k8s.io/v1
46+
kind: ClusterRole
47+
metadata:
48+
name: upgrade-e2e
49+
rules:
50+
- apiGroups:
51+
- "*"
52+
resources:
53+
- "*"
54+
verbs:
55+
- "*"
56+
EOF
57+
58+
kubectl apply -f - <<EOF
59+
apiVersion: rbac.authorization.k8s.io/v1
60+
kind: ClusterRoleBinding
61+
metadata:
62+
name: upgrade-e2e
63+
subjects:
64+
- kind: ServiceAccount
65+
name: upgrade-e2e
66+
namespace: default
67+
roleRef:
68+
apiGroup: rbac.authorization.k8s.io
69+
kind: ClusterRole
70+
name: upgrade-e2e
71+
EOF
3672

3773
kubectl apply -f - << EOF
3874
apiVersion: olm.operatorframework.io/v1alpha1
@@ -44,7 +80,7 @@ spec:
4480
packageName: prometheus
4581
version: 1.0.0
4682
serviceAccount:
47-
name: default
83+
name: upgrade-e2e
4884
EOF
4985

5086
kubectl wait --for=condition=Unpacked --timeout=60s ClusterCatalog $TEST_CLUSTER_CATALOG_NAME

0 commit comments

Comments
 (0)