Skip to content

Commit 07b80e6

Browse files
tony-landrethtony-landreth
andauthored
operator crunchy-postgres-operator (5.7.1) (redhat-openshift-ecosystem#5559)
Signed-Off-By: tony-landreth <[email protected]> Co-authored-by: tony-landreth <[email protected]>
1 parent bdc8859 commit 07b80e6

8 files changed

+20417
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Used to build the bundle image. This file is ignored by the community operator
2+
# registries which work with bundle directories instead.
3+
# https://operator-framework.github.io/community-operators/packaging-operator/
4+
5+
FROM scratch AS builder
6+
7+
COPY manifests/ /build/manifests/
8+
COPY metadata/ /build/metadata/
9+
COPY tests/ /build/tests
10+
11+
12+
FROM scratch
13+
14+
# ANNOTATIONS is replaced with bundle.annotations.yaml
15+
LABEL \
16+
operators.operatorframework.io.bundle.mediatype.v1="registry+v1" \
17+
operators.operatorframework.io.bundle.manifests.v1="manifests/" \
18+
operators.operatorframework.io.bundle.metadata.v1="metadata/" \
19+
operators.operatorframework.io.test.mediatype.v1="scorecard+v1" \
20+
operators.operatorframework.io.test.config.v1="tests/scorecard/" \
21+
operators.operatorframework.io.bundle.package.v1="postgresql" \
22+
operators.operatorframework.io.bundle.channels.v1="v5" \
23+
operators.operatorframework.io.bundle.channel.default.v1="v5" \
24+
com.redhat.delivery.operator.bundle=true \
25+
com.redhat.openshift.versions="v4.12" \
26+
org.opencontainers.image.authors="[email protected]" \
27+
org.opencontainers.image.url="https://crunchydata.com" \
28+
org.opencontainers.image.vendor="Crunchy Data"
29+
30+
COPY --from=builder /build/ /
Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,292 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: v0.15.0
6+
labels:
7+
app.kubernetes.io/name: pgo
8+
app.kubernetes.io/version: 5.7.1
9+
postgres-operator.crunchydata.com/control-plane: postgres-operator
10+
name: crunchybridgeclusters.postgres-operator.crunchydata.com
11+
spec:
12+
group: postgres-operator.crunchydata.com
13+
names:
14+
kind: CrunchyBridgeCluster
15+
listKind: CrunchyBridgeClusterList
16+
plural: crunchybridgeclusters
17+
singular: crunchybridgecluster
18+
scope: Namespaced
19+
versions:
20+
- name: v1beta1
21+
schema:
22+
openAPIV3Schema:
23+
description: CrunchyBridgeCluster is the Schema for the crunchybridgeclusters API
24+
properties:
25+
apiVersion:
26+
description: |-
27+
APIVersion defines the versioned schema of this representation of an object.
28+
Servers should convert recognized schemas to the latest internal value, and
29+
may reject unrecognized values.
30+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
31+
type: string
32+
kind:
33+
description: |-
34+
Kind is a string value representing the REST resource this object represents.
35+
Servers may infer this from the endpoint the client submits requests to.
36+
Cannot be updated.
37+
In CamelCase.
38+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
39+
type: string
40+
metadata:
41+
type: object
42+
spec:
43+
description: |-
44+
CrunchyBridgeClusterSpec defines the desired state of CrunchyBridgeCluster
45+
to be managed by Crunchy Data Bridge
46+
properties:
47+
clusterName:
48+
description: |-
49+
The name of the cluster
50+
---
51+
According to Bridge API/GUI errors,
52+
"Field name should be between 5 and 50 characters in length, containing only unicode characters, unicode numbers, hyphens, spaces, or underscores, and starting with a character", and ending with a character or number.
53+
maxLength: 50
54+
minLength: 5
55+
pattern: ^[A-Za-z][A-Za-z0-9\-_ ]*[A-Za-z0-9]$
56+
type: string
57+
isHa:
58+
description: |-
59+
Whether the cluster is high availability,
60+
meaning that it has a secondary it can fail over to quickly
61+
in case the primary becomes unavailable.
62+
type: boolean
63+
isProtected:
64+
description: |-
65+
Whether the cluster is protected. Protected clusters can't be destroyed until
66+
their protected flag is removed
67+
type: boolean
68+
majorVersion:
69+
description: |-
70+
The ID of the cluster's major Postgres version.
71+
Currently Bridge offers 13-17
72+
maximum: 17
73+
minimum: 13
74+
type: integer
75+
metadata:
76+
description: Metadata contains metadata for custom resources
77+
properties:
78+
annotations:
79+
additionalProperties:
80+
type: string
81+
type: object
82+
labels:
83+
additionalProperties:
84+
type: string
85+
type: object
86+
type: object
87+
plan:
88+
description: The ID of the cluster's plan. Determines instance, CPU, and memory.
89+
type: string
90+
provider:
91+
description: |-
92+
The cloud provider where the cluster is located.
93+
Currently Bridge offers aws, azure, and gcp only
94+
enum:
95+
- aws
96+
- azure
97+
- gcp
98+
type: string
99+
x-kubernetes-validations:
100+
- message: immutable
101+
rule: self == oldSelf
102+
region:
103+
description: The provider region where the cluster is located.
104+
type: string
105+
x-kubernetes-validations:
106+
- message: immutable
107+
rule: self == oldSelf
108+
roles:
109+
description: |-
110+
Roles for which to create Secrets that contain their credentials which
111+
are retrieved from the Bridge API. An empty list creates no role secrets.
112+
Removing a role from this list does NOT drop the role nor revoke their
113+
access, but it will delete that role's secret from the kube cluster.
114+
items:
115+
properties:
116+
name:
117+
description: |-
118+
Name of the role within Crunchy Bridge.
119+
More info: https://docs.crunchybridge.com/concepts/users
120+
type: string
121+
secretName:
122+
description: The name of the Secret that will hold the role credentials.
123+
maxLength: 253
124+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
125+
type: string
126+
required:
127+
- name
128+
- secretName
129+
type: object
130+
type: array
131+
x-kubernetes-list-map-keys:
132+
- name
133+
x-kubernetes-list-type: map
134+
secret:
135+
description: The name of the secret containing the API key and team id
136+
type: string
137+
storage:
138+
anyOf:
139+
- type: integer
140+
- type: string
141+
description: |-
142+
The amount of storage available to the cluster in gigabytes.
143+
The amount must be an integer, followed by Gi (gibibytes) or G (gigabytes) to match Kubernetes conventions.
144+
If the amount is given in Gi, we round to the nearest G value.
145+
The minimum value allowed by Bridge is 10 GB.
146+
The maximum value allowed by Bridge is 65535 GB.
147+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
148+
x-kubernetes-int-or-string: true
149+
required:
150+
- clusterName
151+
- isHa
152+
- majorVersion
153+
- plan
154+
- provider
155+
- region
156+
- secret
157+
- storage
158+
type: object
159+
status:
160+
description: CrunchyBridgeClusterStatus defines the observed state of CrunchyBridgeCluster
161+
properties:
162+
conditions:
163+
description: conditions represent the observations of postgres cluster's current state.
164+
items:
165+
description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and\
166+
\ \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
167+
properties:
168+
lastTransitionTime:
169+
description: |-
170+
lastTransitionTime is the last time the condition transitioned from one status to another.
171+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
172+
format: date-time
173+
type: string
174+
message:
175+
description: |-
176+
message is a human readable message indicating details about the transition.
177+
This may be an empty string.
178+
maxLength: 32768
179+
type: string
180+
observedGeneration:
181+
description: |-
182+
observedGeneration represents the .metadata.generation that the condition was set based upon.
183+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
184+
with respect to the current state of the instance.
185+
format: int64
186+
minimum: 0
187+
type: integer
188+
reason:
189+
description: |-
190+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
191+
Producers of specific condition types may define expected values and meanings for this field,
192+
and whether the values are considered a guaranteed API.
193+
The value should be a CamelCase string.
194+
This field may not be empty.
195+
maxLength: 1024
196+
minLength: 1
197+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
198+
type: string
199+
status:
200+
description: status of the condition, one of True, False, Unknown.
201+
enum:
202+
- "True"
203+
- "False"
204+
- Unknown
205+
type: string
206+
type:
207+
description: |-
208+
type of condition in CamelCase or in foo.example.com/CamelCase.
209+
---
210+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
211+
useful (see .node.status.conditions), the ability to deconflict is important.
212+
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
213+
maxLength: 316
214+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
215+
type: string
216+
required:
217+
- lastTransitionTime
218+
- message
219+
- reason
220+
- status
221+
- type
222+
type: object
223+
type: array
224+
x-kubernetes-list-map-keys:
225+
- type
226+
x-kubernetes-list-type: map
227+
host:
228+
description: The Hostname of the postgres cluster in Bridge, provided by Bridge API and null until then.
229+
type: string
230+
id:
231+
description: The ID of the postgres cluster in Bridge, provided by Bridge API and null until then.
232+
type: string
233+
isHa:
234+
description: |-
235+
Whether the cluster is high availability, meaning that it has a secondary it can fail
236+
over to quickly in case the primary becomes unavailable.
237+
type: boolean
238+
isProtected:
239+
description: |-
240+
Whether the cluster is protected. Protected clusters can't be destroyed until
241+
their protected flag is removed
242+
type: boolean
243+
majorVersion:
244+
description: The cluster's major Postgres version.
245+
type: integer
246+
name:
247+
description: The name of the cluster in Bridge.
248+
type: string
249+
observedGeneration:
250+
description: observedGeneration represents the .metadata.generation on which the status was based.
251+
format: int64
252+
minimum: 0
253+
type: integer
254+
ongoingUpgrade:
255+
description: The cluster upgrade as represented by Bridge
256+
items:
257+
properties:
258+
flavor:
259+
type: string
260+
starting_from:
261+
type: string
262+
state:
263+
type: string
264+
required:
265+
- flavor
266+
- starting_from
267+
- state
268+
type: object
269+
type: array
270+
plan:
271+
description: The ID of the cluster's plan. Determines instance, CPU, and memory.
272+
type: string
273+
responses:
274+
description: Most recent, raw responses from Bridge API
275+
type: object
276+
x-kubernetes-preserve-unknown-fields: true
277+
state:
278+
description: State of cluster in Bridge.
279+
type: string
280+
storage:
281+
anyOf:
282+
- type: integer
283+
- type: string
284+
description: The amount of storage available to the cluster.
285+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
286+
x-kubernetes-int-or-string: true
287+
type: object
288+
type: object
289+
served: true
290+
storage: true
291+
subresources:
292+
status: {}

0 commit comments

Comments
 (0)