Skip to content

Commit 20cf1e6

Browse files
hasbro17estroz
andcommitted
update and add olm-catalog testdata manifests for helm csv tests
Co-authored-by: Eric Stroczynski <[email protected]>
1 parent ce85430 commit 20cf1e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1373
-317
lines changed

test/test-framework/pkg/apis/cache/v1alpha1/dummy_types.go renamed to internal/generate/testdata/go/pkg/apis/cache/v1alpha1/dummy_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2018 The Operator-SDK Authors
1+
// Copyright 2019 The Operator-SDK Authors
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

internal/generate/testdata/helm/build/Dockerfile

Whitespace-only changes.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: memcachedrs.cache.example.com
5+
spec:
6+
group: cache.example.com
7+
names:
8+
kind: MemcachedRS
9+
listKind: MemcachedRSList
10+
plural: memcachedrs
11+
singular: memcachedrs
12+
scope: Namespaced
13+
subresources:
14+
status: {}
15+
validation:
16+
openAPIV3Schema:
17+
type: object
18+
x-kubernetes-preserve-unknown-fields: true
19+
versions:
20+
- name: v1alpha1
21+
served: true
22+
storage: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: memcacheds.cache.example.com
5+
spec:
6+
group: cache.example.com
7+
names:
8+
kind: Memcached
9+
listKind: MemcachedList
10+
plural: memcacheds
11+
singular: memcached
12+
scope: Namespaced
13+
subresources:
14+
status: {}
15+
validation:
16+
openAPIV3Schema:
17+
type: object
18+
x-kubernetes-preserve-unknown-fields: true
19+
versions:
20+
- name: v1alpha1
21+
served: true
22+
storage: true
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: cache.example.com/v1alpha1
2+
kind: Memcached
3+
metadata:
4+
name: example-memcached
5+
spec:
6+
# Default values copied from <project_dir>/helm-charts/memcached/values.yaml
7+
8+
image:
9+
pullPolicy: IfNotPresent
10+
repository: nginx
11+
ingress:
12+
enabled: false
13+
hosts:
14+
- host: chart-example.local
15+
paths: []
16+
replicaCount: 1
17+
service:
18+
port: 80
19+
type: ClusterIP
20+
serviceAccount:
21+
create: true
22+
name: memcached-operator
23+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: cache.example.com/v1alpha1
2+
kind: MemcachedRS
3+
metadata:
4+
name: example-memcachedrs
5+
spec:
6+
# Add fields here
7+
size: 3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,229 @@
1+
apiVersion: operators.coreos.com/v1alpha1
2+
kind: ClusterServiceVersion
3+
metadata:
4+
annotations:
5+
alm-examples: |-
6+
[
7+
{
8+
"apiVersion": "cache.example.com/v1alpha1",
9+
"kind": "Memcached",
10+
"metadata": {
11+
"name": "example-memcached"
12+
},
13+
"spec": {
14+
"image": {
15+
"pullPolicy": "IfNotPresent",
16+
"repository": "nginx"
17+
},
18+
"ingress": {
19+
"enabled": false,
20+
"hosts": [
21+
{
22+
"host": "chart-example.local",
23+
"paths": []
24+
}
25+
]
26+
},
27+
"replicaCount": 1,
28+
"service": {
29+
"port": 80,
30+
"type": "ClusterIP"
31+
},
32+
"serviceAccount": {
33+
"create": true,
34+
"name": "memcached-operator"
35+
}
36+
}
37+
},
38+
{
39+
"apiVersion": "cache.example.com/v1alpha1",
40+
"kind": "MemcachedRS",
41+
"metadata": {
42+
"name": "example-memcachedrs"
43+
},
44+
"spec": {
45+
"size": 3
46+
}
47+
}
48+
]
49+
capabilities: Basic Install
50+
name: memcached-operator.v0.0.3
51+
namespace: placeholder
52+
spec:
53+
apiservicedefinitions: {}
54+
customresourcedefinitions:
55+
owned:
56+
- description: MemcachedRS is the Schema for the memcachedrs API
57+
displayName: MemcachedRS App
58+
kind: MemcachedRS
59+
name: memcachedrs.cache.example.com
60+
specDescriptors:
61+
- displayName: Num Nodes
62+
path: numNodes
63+
statusDescriptors:
64+
- displayName: Node List
65+
path: nodeList
66+
version: v1alpha1
67+
- description: Memcached is the Schema for the memcacheds API
68+
displayName: Memcached App
69+
kind: Memcached
70+
name: memcacheds.cache.example.com
71+
specDescriptors:
72+
- description: Size is the size of the memcached deployment
73+
displayName: Size
74+
path: size
75+
x-descriptors:
76+
- urn:alm:descriptor:com.tectonic.ui:podCount
77+
statusDescriptors:
78+
- description: Nodes are the names of the memcached pods
79+
displayName: Nodes
80+
path: nodes
81+
version: v1alpha1
82+
description: Main enterprise application providing business critical features with
83+
high availability and no manual intervention.
84+
displayName: Memcached Application
85+
install:
86+
spec:
87+
deployments:
88+
- name: helm1
89+
spec:
90+
replicas: 1
91+
selector:
92+
matchLabels:
93+
name: helm1
94+
strategy: {}
95+
template:
96+
metadata:
97+
labels:
98+
name: helm1
99+
spec:
100+
containers:
101+
- env:
102+
- name: WATCH_NAMESPACE
103+
valueFrom:
104+
fieldRef:
105+
fieldPath: metadata.annotations['olm.targetNamespaces']
106+
- name: POD_NAME
107+
valueFrom:
108+
fieldRef:
109+
fieldPath: metadata.name
110+
- name: OPERATOR_NAME
111+
value: helm1
112+
image: quay.io/example/memcached-operator:v0.0.3
113+
imagePullPolicy: Always
114+
name: helm1
115+
resources: {}
116+
serviceAccountName: helm1
117+
permissions:
118+
- rules:
119+
- apiGroups:
120+
- ""
121+
resources:
122+
- pods
123+
- services
124+
- services/finalizers
125+
- endpoints
126+
- persistentvolumeclaims
127+
- events
128+
- configmaps
129+
- secrets
130+
verbs:
131+
- create
132+
- delete
133+
- get
134+
- list
135+
- patch
136+
- update
137+
- watch
138+
- apiGroups:
139+
- apps
140+
resources:
141+
- deployments
142+
- daemonsets
143+
- replicasets
144+
- statefulsets
145+
verbs:
146+
- create
147+
- delete
148+
- get
149+
- list
150+
- patch
151+
- update
152+
- watch
153+
- apiGroups:
154+
- ""
155+
resources:
156+
- namespaces
157+
verbs:
158+
- get
159+
- apiGroups:
160+
- ""
161+
resources:
162+
- configmaps
163+
- secrets
164+
verbs:
165+
- '*'
166+
- apiGroups:
167+
- monitoring.coreos.com
168+
resources:
169+
- servicemonitors
170+
verbs:
171+
- get
172+
- create
173+
- apiGroups:
174+
- apps
175+
resourceNames:
176+
- helm1
177+
resources:
178+
- deployments/finalizers
179+
verbs:
180+
- update
181+
- apiGroups:
182+
- ""
183+
resources:
184+
- pods
185+
verbs:
186+
- get
187+
- apiGroups:
188+
- apps
189+
resources:
190+
- replicasets
191+
- deployments
192+
verbs:
193+
- get
194+
- apiGroups:
195+
- cache.example.com
196+
resources:
197+
- '*'
198+
- memcachedrs
199+
verbs:
200+
- create
201+
- delete
202+
- get
203+
- list
204+
- patch
205+
- update
206+
- watch
207+
serviceAccountName: helm1
208+
strategy: deployment
209+
installModes:
210+
- supported: true
211+
type: OwnNamespace
212+
- supported: true
213+
type: SingleNamespace
214+
- supported: false
215+
type: MultiNamespace
216+
- supported: true
217+
type: AllNamespaces
218+
keywords:
219+
- memcached
220+
- app
221+
maintainers:
222+
223+
name: Some Corp
224+
maturity: alpha
225+
provider:
226+
name: Example
227+
url: www.example.com
228+
replaces: memcached-operator.v0.0.2
229+
version: 0.0.3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
channels:
2+
- currentCSV: memcached-operator.v0.0.2
3+
name: alpha
4+
- currentCSV: memcached-operator.v0.0.3
5+
name: stable
6+
defaultChannel: stable
7+
packageName: memcached-operator

0 commit comments

Comments
 (0)