Skip to content

Commit

Permalink
operator postgresql (5.6.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjmoore4 authored Jun 10, 2024
1 parent 8af7b2e commit 27d3f84
Show file tree
Hide file tree
Showing 9 changed files with 19,660 additions and 0 deletions.
30 changes: 30 additions & 0 deletions operators/postgresql/5.6.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Used to build the bundle image. This file is ignored by the community operator
# registries which work with bundle directories instead.
# https://operator-framework.github.io/community-operators/packaging-operator/

FROM scratch AS builder

COPY manifests/ /build/manifests/
COPY metadata/ /build/metadata/
COPY tests/ /build/tests


FROM scratch

# ANNOTATIONS is replaced with bundle.annotations.yaml
LABEL \
operators.operatorframework.io.bundle.mediatype.v1="registry+v1" \
operators.operatorframework.io.bundle.manifests.v1="manifests/" \
operators.operatorframework.io.bundle.metadata.v1="metadata/" \
operators.operatorframework.io.test.mediatype.v1="scorecard+v1" \
operators.operatorframework.io.test.config.v1="tests/scorecard/" \
operators.operatorframework.io.bundle.package.v1="postgresql" \
operators.operatorframework.io.bundle.channels.v1="v5" \
operators.operatorframework.io.bundle.channel.default.v1="v5" \
com.redhat.delivery.operator.bundle=true \
com.redhat.openshift.versions="v4.12" \
org.opencontainers.image.authors="info@crunchydata.com" \
org.opencontainers.image.url="https://crunchydata.com" \
org.opencontainers.image.vendor="Crunchy Data"

COPY --from=builder /build/ /
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,300 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.0
creationTimestamp: null
labels:
app.kubernetes.io/name: pgo
app.kubernetes.io/version: 5.6.0
postgres-operator.crunchydata.com/control-plane: postgres-operator
name: crunchybridgeclusters.postgres-operator.crunchydata.com
spec:
group: postgres-operator.crunchydata.com
names:
kind: CrunchyBridgeCluster
listKind: CrunchyBridgeClusterList
plural: crunchybridgeclusters
singular: crunchybridgecluster
scope: Namespaced
versions:
- name: v1beta1
schema:
openAPIV3Schema:
description: CrunchyBridgeCluster is the Schema for the crunchybridgeclusters
API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource
this object represents. Servers may infer this from the endpoint the
client submits requests to. Cannot be updated. In CamelCase. More
info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: CrunchyBridgeClusterSpec defines the desired state of CrunchyBridgeCluster
to be managed by Crunchy Data Bridge
properties:
clusterName:
description: The name of the cluster --- According to Bridge API/GUI
errors, "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.
maxLength: 50
minLength: 5
pattern: ^[A-Za-z][A-Za-z0-9\-_ ]*[A-Za-z0-9]$
type: string
isHa:
description: Whether the cluster is high availability, meaning that
it has a secondary it can fail over to quickly in case the primary
becomes unavailable.
type: boolean
isProtected:
description: Whether the cluster is protected. Protected clusters
can't be destroyed until their protected flag is removed
type: boolean
majorVersion:
description: The ID of the cluster's major Postgres version. Currently
Bridge offers 13-16
maximum: 16
minimum: 13
type: integer
metadata:
description: Metadata contains metadata for custom resources
properties:
annotations:
additionalProperties:
type: string
type: object
labels:
additionalProperties:
type: string
type: object
type: object
plan:
description: The ID of the cluster's plan. Determines instance,
CPU, and memory.
type: string
provider:
description: The cloud provider where the cluster is located. Currently
Bridge offers aws, azure, and gcp only
enum:
- aws
- azure
- gcp
type: string
x-kubernetes-validations:
- message: immutable
rule: self == oldSelf
region:
description: The provider region where the cluster is located.
type: string
x-kubernetes-validations:
- message: immutable
rule: self == oldSelf
roles:
description: Roles for which to create Secrets that contain their
credentials which are retrieved from the Bridge API. An empty
list creates no role secrets. Removing a role from this list does
NOT drop the role nor revoke their access, but it will delete
that role's secret from the kube cluster.
items:
properties:
name:
description: 'Name of the role within Crunchy Bridge. More
info: https://docs.crunchybridge.com/concepts/users'
type: string
secretName:
description: The name of the Secret that will hold the role
credentials.
maxLength: 253
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
required:
- name
- secretName
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
secret:
description: The name of the secret containing the API key and team
id
type: string
storage:
anyOf:
- type: integer
- type: string
description: The amount of storage available to the cluster in gigabytes.
The amount must be an integer, followed by Gi (gibibytes) or G
(gigabytes) to match Kubernetes conventions. If the amount is
given in Gi, we round to the nearest G value. The minimum value
allowed by Bridge is 10 GB. The maximum value allowed by Bridge
is 65535 GB.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- clusterName
- isHa
- majorVersion
- plan
- provider
- region
- storage
type: object
status:
description: CrunchyBridgeClusterStatus defines the observed state of
CrunchyBridgeCluster
properties:
conditions:
description: conditions represent the observations of postgres cluster's
current state.
items:
description: "Condition contains details for one aspect of the\
\ current state of this API Resource. --- This struct is intended\
\ for direct use as an array at the field path .status.conditions.\
\ For example, type FooStatus struct{ // Represents the observations\
\ of a foo's current state. // Known .status.conditions.type\
\ are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type\
\ // +patchStrategy=merge // +listType=map // +listMapKey=type\
\ Conditions []metav1.Condition `json:\"conditions,omitempty\"\
\ patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"\
bytes,1,rep,name=conditions\"` \n // other fields }"
properties:
lastTransitionTime:
description: lastTransitionTime is the last time the condition
transitioned from one status to another. This should be
when the underlying condition changed. If that is not known,
then using the time when the API field changed is acceptable.
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon. For instance, if
.metadata.generation is currently 12, but the .status.conditions[x].observedGeneration
is 9, the condition is out of date with respect to the current
state of the instance.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier indicating
the reason for the condition's last transition. Producers
of specific condition types may define expected values and
meanings for this field, and whether the values are considered
a guaranteed API. The value should be a CamelCase string.
This field may not be empty.
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False,
Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
description: type of condition in CamelCase or in foo.example.com/CamelCase.
--- Many .condition.type values are consistent across resources
like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict
is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
maxLength: 316
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])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
x-kubernetes-list-map-keys:
- type
x-kubernetes-list-type: map
host:
description: The Hostname of the postgres cluster in Bridge, provided
by Bridge API and null until then.
type: string
id:
description: The ID of the postgres cluster in Bridge, provided
by Bridge API and null until then.
type: string
isHa:
description: Whether the cluster is high availability, meaning that
it has a secondary it can fail over to quickly in case the primary
becomes unavailable.
type: boolean
isProtected:
description: Whether the cluster is protected. Protected clusters
can't be destroyed until their protected flag is removed
type: boolean
majorVersion:
description: The cluster's major Postgres version.
type: integer
name:
description: The name of the cluster in Bridge.
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
on which the status was based.
format: int64
minimum: 0
type: integer
ongoingUpgrade:
description: The cluster upgrade as represented by Bridge
items:
properties:
flavor:
type: string
starting_from:
type: string
state:
type: string
required:
- flavor
- starting_from
- state
type: object
type: array
plan:
description: The ID of the cluster's plan. Determines instance,
CPU, and memory.
type: string
responses:
description: Most recent, raw responses from Bridge API
type: object
x-kubernetes-preserve-unknown-fields: true
state:
description: State of cluster in Bridge.
type: string
storage:
anyOf:
- type: integer
- type: string
description: The amount of storage available to the cluster.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
type: object
served: true
storage: true
subresources:
status: {}
Loading

0 comments on commit 27d3f84

Please sign in to comment.