Skip to content

Commit 7190766

Browse files
authored
operator postgresql (5.7.0)
1 parent e4fb3bf commit 7190766

8 files changed

+20414
-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: 291 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,291 @@
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.0
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+
- storage
157+
type: object
158+
status:
159+
description: CrunchyBridgeClusterStatus defines the observed state of CrunchyBridgeCluster
160+
properties:
161+
conditions:
162+
description: conditions represent the observations of postgres cluster's current state.
163+
items:
164+
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\
165+
\ \"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}"
166+
properties:
167+
lastTransitionTime:
168+
description: |-
169+
lastTransitionTime is the last time the condition transitioned from one status to another.
170+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
171+
format: date-time
172+
type: string
173+
message:
174+
description: |-
175+
message is a human readable message indicating details about the transition.
176+
This may be an empty string.
177+
maxLength: 32768
178+
type: string
179+
observedGeneration:
180+
description: |-
181+
observedGeneration represents the .metadata.generation that the condition was set based upon.
182+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
183+
with respect to the current state of the instance.
184+
format: int64
185+
minimum: 0
186+
type: integer
187+
reason:
188+
description: |-
189+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
190+
Producers of specific condition types may define expected values and meanings for this field,
191+
and whether the values are considered a guaranteed API.
192+
The value should be a CamelCase string.
193+
This field may not be empty.
194+
maxLength: 1024
195+
minLength: 1
196+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
197+
type: string
198+
status:
199+
description: status of the condition, one of True, False, Unknown.
200+
enum:
201+
- "True"
202+
- "False"
203+
- Unknown
204+
type: string
205+
type:
206+
description: |-
207+
type of condition in CamelCase or in foo.example.com/CamelCase.
208+
---
209+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
210+
useful (see .node.status.conditions), the ability to deconflict is important.
211+
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
212+
maxLength: 316
213+
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])$
214+
type: string
215+
required:
216+
- lastTransitionTime
217+
- message
218+
- reason
219+
- status
220+
- type
221+
type: object
222+
type: array
223+
x-kubernetes-list-map-keys:
224+
- type
225+
x-kubernetes-list-type: map
226+
host:
227+
description: The Hostname of the postgres cluster in Bridge, provided by Bridge API and null until then.
228+
type: string
229+
id:
230+
description: The ID of the postgres cluster in Bridge, provided by Bridge API and null until then.
231+
type: string
232+
isHa:
233+
description: |-
234+
Whether the cluster is high availability, meaning that it has a secondary it can fail
235+
over to quickly in case the primary becomes unavailable.
236+
type: boolean
237+
isProtected:
238+
description: |-
239+
Whether the cluster is protected. Protected clusters can't be destroyed until
240+
their protected flag is removed
241+
type: boolean
242+
majorVersion:
243+
description: The cluster's major Postgres version.
244+
type: integer
245+
name:
246+
description: The name of the cluster in Bridge.
247+
type: string
248+
observedGeneration:
249+
description: observedGeneration represents the .metadata.generation on which the status was based.
250+
format: int64
251+
minimum: 0
252+
type: integer
253+
ongoingUpgrade:
254+
description: The cluster upgrade as represented by Bridge
255+
items:
256+
properties:
257+
flavor:
258+
type: string
259+
starting_from:
260+
type: string
261+
state:
262+
type: string
263+
required:
264+
- flavor
265+
- starting_from
266+
- state
267+
type: object
268+
type: array
269+
plan:
270+
description: The ID of the cluster's plan. Determines instance, CPU, and memory.
271+
type: string
272+
responses:
273+
description: Most recent, raw responses from Bridge API
274+
type: object
275+
x-kubernetes-preserve-unknown-fields: true
276+
state:
277+
description: State of cluster in Bridge.
278+
type: string
279+
storage:
280+
anyOf:
281+
- type: integer
282+
- type: string
283+
description: The amount of storage available to the cluster.
284+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
285+
x-kubernetes-int-or-string: true
286+
type: object
287+
type: object
288+
served: true
289+
storage: true
290+
subresources:
291+
status: {}

0 commit comments

Comments
 (0)