Skip to content

Commit c32d790

Browse files
authored
KUBESAW-143: E2E tests for Adding support for Go Templates in member operator (#1175)
* KUBESAW-143: E2E tests for Adding support for Go Templates in member operator Signed-off-by: Feny Mehta <fbm3307@gmail.com> * spelling correction Signed-off-by: Feny Mehta <fbm3307@gmail.com> * review comments of removing extra checks Signed-off-by: Feny Mehta <fbm3307@gmail.com> * change in templaterefs Signed-off-by: Feny Mehta <fbm3307@gmail.com> * remove special handling Signed-off-by: Feny Mehta <fbm3307@gmail.com> * changes in hasrevision func Signed-off-by: Feny Mehta <fbm3307@gmail.com> * remove wait method extra Signed-off-by: Feny Mehta <fbm3307@gmail.com> * name convention Signed-off-by: Feny Mehta <fbm3307@gmail.com> * Adding special handling of go temmplates Signed-off-by: Feny Mehta <fbm3307@gmail.com> * add revsion wait Signed-off-by: Feny Mehta <fbm3307@gmail.com> * race condition Signed-off-by: Feny Mehta <fbm3307@gmail.com> * fixing the flaky error Signed-off-by: Feny Mehta <fbm3307@gmail.com> * change the check to compare spec values and revision keys Signed-off-by: Feny Mehta <fbm3307@gmail.com> * golint Signed-off-by: Feny Mehta <fbm3307@gmail.com> * fixing the revisions key func Signed-off-by: Feny Mehta <fbm3307@gmail.com> * error fix Signed-off-by: Feny Mehta <fbm3307@gmail.com> * comments Signed-off-by: Feny Mehta <fbm3307@gmail.com> * review comments by coderabbitai Signed-off-by: Feny Mehta <fbm3307@gmail.com> * commented by coderabbitai Signed-off-by: Feny Mehta <fbm3307@gmail.com> * one more try at using generic functions Signed-off-by: Feny Mehta <fbm3307@gmail.com> * silly removal Signed-off-by: Feny Mehta <fbm3307@gmail.com> * reflect.deepequal problem Signed-off-by: Feny Mehta <fbm3307@gmail.com> * removing special handling+adding annotation null Signed-off-by: Feny Mehta <fbm3307@gmail.com> * changing the gettemplaterefs of custome tier Signed-off-by: Feny Mehta <fbm3307@gmail.com> * some leftovers and yaml lint Signed-off-by: Feny Mehta <fbm3307@gmail.com> * removing the gotemplate from checks Signed-off-by: Feny Mehta <fbm3307@gmail.com> * correcting the label value Signed-off-by: Feny Mehta <fbm3307@gmail.com> * coddrabbit nitpic comments Signed-off-by: Feny Mehta <fbm3307@gmail.com> * removing the extra ttr(len check as there is already a cleanup controller Signed-off-by: Feny Mehta <fbm3307@gmail.com> * updating the label to prducer and remove duplication Signed-off-by: Feny Mehta <fbm3307@gmail.com> --------- Signed-off-by: Feny Mehta <fbm3307@gmail.com>
1 parent 1fb6002 commit c32d790

13 files changed

Lines changed: 698 additions & 56 deletions

File tree

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
apiVersion: toolchain.dev.openshift.com/v1alpha1
2+
kind: TierTemplate
3+
metadata:
4+
name: cluster-resources-go
5+
spec:
6+
revision: 8b0d542-8b0d542
7+
template:
8+
apiVersion: template.openshift.io/v1
9+
kind: Template
10+
metadata: {}
11+
objects:
12+
- apiVersion: quota.openshift.io/v1
13+
kind: ClusterResourceQuota
14+
metadata:
15+
name: 'for-{{SPACE_NAME}}-deployments'
16+
spec:
17+
quota:
18+
hard:
19+
count/deploymentconfigs.apps: "30"
20+
count/deployments.apps: "30"
21+
count/pods: "50"
22+
count/virtualmachines.kubevirt.io: "2"
23+
selector:
24+
annotations: null
25+
labels:
26+
matchLabels:
27+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
28+
parameters:
29+
- name: SPACE_NAME
30+
required: true
31+
templateObjects:
32+
- apiVersion: quota.openshift.io/v1
33+
kind: ClusterResourceQuota
34+
metadata:
35+
name: for-{{.SPACE_NAME}}-deployments
36+
spec:
37+
quota:
38+
hard:
39+
count/deploymentconfigs.apps: '{{.DEPLOYMENT_QUOTA}}'
40+
count/deployments.apps: '{{.DEPLOYMENT_QUOTA}}'
41+
count/pods: '{{.POD_COUNT}}'
42+
count/virtualmachines.kubevirt.io: '{{.VIRTUAL_MACHINES}}'
43+
selector:
44+
annotations: null
45+
labels:
46+
matchLabels:
47+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
48+
- apiVersion: quota.openshift.io/v1
49+
kind: ClusterResourceQuota
50+
metadata:
51+
name: for-{{.SPACE_NAME}}-replicas
52+
spec:
53+
quota:
54+
hard:
55+
count/replicasets.apps: '{{.DEPLOYMENT_QUOTA}}'
56+
count/replicationcontrollers: '{{.DEPLOYMENT_QUOTA}}'
57+
selector:
58+
annotations: null
59+
labels:
60+
matchLabels:
61+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
62+
- apiVersion: quota.openshift.io/v1
63+
kind: ClusterResourceQuota
64+
metadata:
65+
name: for-{{.SPACE_NAME}}-routes
66+
spec:
67+
quota:
68+
hard:
69+
count/ingresses.extensions: '{{.DEPLOYMENT_QUOTA}}'
70+
count/routes.route.openshift.io: '{{.DEPLOYMENT_QUOTA}}'
71+
selector:
72+
annotations: null
73+
labels:
74+
matchLabels:
75+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
76+
- apiVersion: quota.openshift.io/v1
77+
kind: ClusterResourceQuota
78+
metadata:
79+
name: for-{{.SPACE_NAME}}-jobs
80+
spec:
81+
quota:
82+
hard:
83+
count/jobs.batch: '{{.DEPLOYMENT_QUOTA}}'
84+
count/daemonsets.apps: '{{.DEPLOYMENT_QUOTA}}'
85+
count/cronjobs.batch: '{{.DEPLOYMENT_QUOTA}}'
86+
count/statefulsets.apps: '{{.DEPLOYMENT_QUOTA}}'
87+
selector:
88+
annotations: null
89+
labels:
90+
matchLabels:
91+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
92+
- apiVersion: quota.openshift.io/v1
93+
kind: ClusterResourceQuota
94+
metadata:
95+
name: for-{{.SPACE_NAME}}-services
96+
spec:
97+
quota:
98+
hard:
99+
count/services: '{{.DEPLOYMENT_QUOTA}}'
100+
services.loadbalancers: '{{.LOAD_BALANCER}}'
101+
selector:
102+
annotations: null
103+
labels:
104+
matchLabels:
105+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
106+
- apiVersion: quota.openshift.io/v1
107+
kind: ClusterResourceQuota
108+
metadata:
109+
name: for-{{.SPACE_NAME}}-bc
110+
spec:
111+
quota:
112+
hard:
113+
count/buildconfigs.build.openshift.io: '{{.DEPLOYMENT_QUOTA}}'
114+
selector:
115+
annotations: null
116+
labels:
117+
matchLabels:
118+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
119+
- apiVersion: quota.openshift.io/v1
120+
kind: ClusterResourceQuota
121+
metadata:
122+
name: for-{{.SPACE_NAME}}-secrets
123+
spec:
124+
quota:
125+
hard:
126+
count/secrets: '{{.SECRETS_COUNT}}'
127+
selector:
128+
annotations: null
129+
labels:
130+
matchLabels:
131+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
132+
- apiVersion: quota.openshift.io/v1
133+
kind: ClusterResourceQuota
134+
metadata:
135+
name: for-{{.SPACE_NAME}}-cm
136+
spec:
137+
quota:
138+
hard:
139+
count/configmaps: '{{.SECRETS_COUNT}}'
140+
selector:
141+
annotations: null
142+
labels:
143+
matchLabels:
144+
toolchain.dev.openshift.com/space: '{{.SPACE_NAME}}'
145+
- apiVersion: rbac.authorization.k8s.io/v1
146+
kind: ClusterRoleBinding
147+
metadata:
148+
annotations:
149+
toolchain.dev.openshift.com/feature: openshift-lightspeed
150+
name: 'osl-access-{{.SPACE_NAME}}'
151+
roleRef:
152+
apiGroup: rbac.authorization.k8s.io
153+
kind: ClusterRole
154+
name: lightspeed-operator-query-access
155+
subjects:
156+
- apiGroup: rbac.authorization.k8s.io
157+
kind: User
158+
name: '{{.SPACE_NAME}}'
159+
- apiVersion: toolchain.dev.openshift.com/v1alpha1
160+
kind: Idler
161+
metadata:
162+
name: '{{.SPACE_NAME}}-dev'
163+
spec:
164+
timeoutSeconds: 43200
165+
tierName: base1ns-gotemplate
166+
type: clusterresources

0 commit comments

Comments
 (0)