-
Notifications
You must be signed in to change notification settings - Fork 2
/
ubi-noop-go.v0.0.1.clusterserviceversion.yaml
173 lines (167 loc) · 12.4 KB
/
ubi-noop-go.v0.0.1.clusterserviceversion.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
annotations:
alm-examples: |-
[
{
"apiVersion": "noop.example.com/v1alpha1",
"kind": "UBINoOp",
"metadata": {
"name": "example-ubinoop"
},
"spec": {
"size": 3
}
}
]
capabilities: Basic Install
categories: Developer Tools
certified: "false"
createdAt: 2019-11-30-2300EDT
containerImage: quay.io/jmanning/ubi-noop-go:v0.0.1
description: An example operator that creates a desired number of UBI pods which do nothing
repository: github.com/jsm84/om-env-example
support: Red Hat
name: ubi-noop-go.v0.0.1
namespace: placeholder
spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- kind: UBINoOp
name: ubinoops.noop.example.com
version: v1alpha1
description: A set of Red Hat Universal Base Image (UBI) pods that do nothing
displayName: UBINoOp
description: |-
### Example Use Only
This is a simple operator to be used as a development example only. It deploys the desired number of pods, which each sleep for 1 hour (hence no-op).
To test, create a Custom Resource of `kind: UBINoOp` with `spec.size` set to the desired number of pods.
The pods' image can be customized by setting the `RELATED_IMAGE_UBI_MINIMAL` environment variable, which should contain the full path to the desired image/tag.
This operator sets owner references on all pods for garbage collection, and also updates the CR status with a simple boolean value upon successful deployment (`status.deployed`).
To see the example code and associated OLM metadata bundle, go to https://github.com/jsm84/om-env-example.
### Known bugs and lacking feature examples
See above for the "academic use" disclaimer, but the operator currently only handles scale-out (increase number of pods) but not scale-in (terminating excess pods if `cr.spec.size` is set to a lesser number of pods).
Expect inverse scaling in v0.0.2.
displayName: UBI NoOp Operator - Go Example
icon:
- base64data: PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMjEuMiAxMDQuMDUiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDojYTMwMDAwO30uY2xzLTJ7ZmlsbDojZWM3YTA4O30uY2xzLTN7ZmlsbDojMDA4OGNlO30uY2xzLTR7ZmlsbDojM2Y5YzM1O30uY2xzLTV7ZmlsbDojYzAwO30uY2xzLTZ7ZmlsbDojZjBhYjAwO30uY2xzLTd7ZmlsbDojMDBiOWU0O30uY2xzLTh7ZmlsbDojOTJkNDAwO308L3N0eWxlPjwvZGVmcz48dGl0bGU+TmV3UkhETG9nbzwvdGl0bGU+PHBhdGggZD0iTTI2NC45MSwzOS40OGMwLDUuMzgsMy4yNCw4LDkuMTQsOGEyNC4xNCwyNC4xNCwwLDAsMCw1LjM4LS43NlY0MC40OEExMS4yNiwxMS4yNiwwLDAsMSwyNzYsNDFjLTIuNDIsMC0zLjMzLS43Ni0zLjMzLTNWMjguMzloNy4wNVYyMmgtNy4wNVYxMy44M2wtNy43MSwxLjY2VjIyaC01LjA5djYuNDJoNS4wOVptLTI0LC4xNGMwLTEuNjYsMS42Ny0yLjQ3LDQuMTktMi40N2ExOS41NiwxOS41NiwwLDAsMSw0LjU3LjU3VjQxYTkuNzUsOS43NSwwLDAsMS00LjgxLDEuMTljLTIuNDcsMC00LTEtNC0yLjUzbTIuMzUsOGExMS43NiwxMS43Niw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Ljg5LDcuODgsNy44OCwwLDAsMSwxLjI3LjA5LDUuMDYsNS4wNiwwLDAsMSwxLC4yOFY3NmE5LjEzLDkuMTMsMCwwLDAtMS4zMi0uMzYsNyw3LDAsMCwwLTEuMzctLjE0LDYuMjMsNi4yMywwLDAsMC0zLjU3LDEuMDcsNi45MSw2LjkxLDAsMCwwLTIuNDQsMy4xN1Y5NS4yNVoiLz48L3N2Zz4=
mediatype: image/svg+xml
install:
spec:
deployments:
- name: ubi-noop-go
spec:
replicas: 1
selector:
matchLabels:
name: ubi-noop-go
strategy: {}
template:
metadata:
labels:
name: ubi-noop-go
spec:
containers:
- command:
- ubi-noop-go
env:
- name: WATCH_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: ubi-noop-go
- name: RELATED_IMAGE_UBI_MINIMAL
value: registry.access.redhat.com/ubi8/ubi-minimal:latest
image: quay.io/jmanning/ubi-noop-go:v0.0.1
imagePullPolicy: Always
name: ubi-noop-go
resources: {}
serviceAccountName: ubi-noop-go
permissions:
- rules:
- apiGroups:
- ""
resources:
- pods
- services
- services/finalizers
- endpoints
- persistentvolumeclaims
- events
- configmaps
- secrets
verbs:
- '*'
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- '*'
- apiGroups:
- monitoring.coreos.com
resources:
- servicemonitors
verbs:
- get
- create
- apiGroups:
- apps
resourceNames:
- ubi-noop-go
resources:
- deployments/finalizers
verbs:
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- apiGroups:
- apps
resources:
- replicasets
- deployments
verbs:
- get
- apiGroups:
- noop.example.com
resources:
- '*'
verbs:
- '*'
serviceAccountName: ubi-noop-go
strategy: deployment
installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: true
type: AllNamespaces
links:
- name: Red Hat Partner Certification Guide for Red Hat OpenShift and Containers
url: https://redhat-connect.gitbook.io/partner-guide-for-red-hat-openshift-and-container/
- name: Red Hat Certified Operator Build Guide
url: https://redhat-connect.gitbook.io/certified-operator-guide/
maintainers:
- name: Josh Manning
email: connect@redhat.com
maturity: alpha
provider:
name: Red Hat
version: 0.0.1