77
88jobs :
99 deploy_operator :
10+ name : Deploy the operator in cluster-wide mode
1011 runs-on : ubuntu-24.04
1112 steps :
1213 - name : Checkout
13- uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
14+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1415 with :
1516 fetch-depth : 0
1617
@@ -21,21 +22,52 @@ jobs:
2122 uses : ./.github/actions/deploy-operator
2223
2324 - name : Deploy a cluster
24- run : |
25- cat <<EOF | kubectl apply -f -
26- # Example of PostgreSQL cluster
27- apiVersion: postgresql.cnpg.io/v1
28- kind: Cluster
29- metadata:
30- name: cluster-example
31- spec:
32- instances: 3
33- storage:
34- size: 1Gi
35- EOF
25+ uses : ./.github/actions/deploy-cluster
3626
3727 - name : Verify that the cluster is ready
3828 uses : ./.github/actions/verify-cluster-ready
3929 with :
4030 cluster-name : cluster-example
41- ready-instances : 3
31+ ready-instances : ' 3'
32+
33+ deploy_operator_single_namespace :
34+ name : Deploy the operator in single-namespace mode
35+ runs-on : ubuntu-24.04
36+ steps :
37+ - name : Checkout
38+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39+ with :
40+ fetch-depth : 0
41+
42+ - name : Setup kind
43+ uses : ./.github/actions/setup-kind
44+
45+ - name : Deploy the operator
46+ uses : ./.github/actions/deploy-operator
47+ with :
48+ namespace : ' single-install'
49+ cluster-wide : ' false'
50+
51+ - name : Deploy a cluster
52+ uses : ./.github/actions/deploy-cluster
53+ with :
54+ namespace : ' single-install'
55+
56+ - name : Verify that the cluster is ready
57+ uses : ./.github/actions/verify-cluster-ready
58+ with :
59+ namespace : ' single-install'
60+ cluster-name : ' cluster-example'
61+ ready-instances : ' 3'
62+
63+ - name : Create a separate namespace
64+ run : kubectl create ns test-ignore
65+
66+ - name : Deploy a cluster in 'test-ignore'
67+ uses : ./.github/actions/deploy-cluster
68+ with :
69+ namespace : ' test-ignore'
70+
71+ - name : Verify the cluster in 'test-ignore' is being ignored
72+ run : |
73+ kubectl -n test-ignore get pods 2>&1 >/dev/null | grep 'No resources found'
0 commit comments