Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -175,7 +175,7 @@

END OF TERMS AND CONDITIONS

Copyright 2017 - 2023 Crunchy Data Solutions, Inc.
Copyright 2017 - 2024 Crunchy Data Solutions, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
28 changes: 19 additions & 9 deletions README.md
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
# [PGO](https://github.com/CrunchyData/postgres-operator), Crunchy [Postgres Operator](https://github.com/CrunchyData/postgres-operator) Examples
# Examples for Using [PGO](https://github.com/CrunchyData/postgres-operator), the Postgres Operator from Crunchy Data

This repository contains examples for deployingPGO, the Postgres Operator from Crunchy Data, using a variety of examples.
This repository contains a collection of installers and examples for deploying, operating and maintaining Postgres clusters using PGO, the Postgres Operator from Crunchy Data as part of [Crunchy Postgres for Kubernetes](https://www.crunchydata.com/products/crunchy-postgresql-for-kubernetes).

For general questions or community support, we welcome you to join our [community Discord](https://discord.gg/BnsMEeaPBV). If you believe you have discovered a bug, please open an issue in the [PGO project](https://github.com/CrunchyData/postgres-operator).
The use of these examples with PGO and other container images (aside from those provided by Crunchy Data) will require modifications of the examples.

The examples are grouped by various tools that can be used to deploy them.
### Using these Examples

The examples are grouped by various tools that can be used to deploy them.
Each of the examples has its own README that guides you through the process of deploying it.
The best way to get started is to fork this repository and experiment with the examples.
The examples as provided are designed for the use of PGO along with Crunchy Data's Postgres distribution, Crunchy Postgres, as Crunchy Postgres for Kubernetes. For more information on the use of container images downloaded from the Crunchy Data Developer Portal or other third party sources, please see 'License and Terms' below.

Each of the examples has its own README that guides you through the process of deploying it.
### Help with the Examples

* For general questions or community support, we welcome you to join our [community Discord](https://discord.gg/BnsMEeaPBV).
* If you believe you have discovered a bug, please open an issue in the [PGO project](https://github.com/CrunchyData/postgres-operator).
* You can find the full Crunchy Postgres for Kubernetes documentation [here](https://access.crunchydata.com/documentation/postgres-operator/v5/).
* You can find out more information about PGO, the Postgres Operator from [Crunchy Data](https://www.crunchydata.com), at the [project page](https://github.com/CrunchyData/postgres-operator).

### FAQs, License and Terms

You can find the full [PGO documentation](https://access.crunchydata.com/documentation/postgres-operator/v5/) for the project here:
For more information regarding PGO, the Postgres Operator project from Crunchy Data, and Crunchy Postgres for Kubernetes, please see the [frequently asked questions](https://access.crunchydata.com/documentation/postgres-operator/latest/faq).

[https://access.crunchydata.com/documentation/postgres-operator/v5/](https://access.crunchydata.com/documentation/postgres-operator/v5/)
For information regarding the software versions of the components included and Kubernetes version compatibility, please see the [components and compatibility section of the Crunchy Postgres for Kubernetes documentation](https://access.crunchydata.com/documentation/postgres-operator/latest/references/components).

You can find out more information about [PGO](https://github.com/CrunchyData/postgres-operator), the [Postgres Operator](https://github.com/CrunchyData/postgres-operator) from [Crunchy Data](https://www.crunchydata.com) at the project page:
The examples provided in this project repository are available subject to the [Apache 2.0](https://github.com/CrunchyData/postgres-operator-examples/blob/-/LICENSE.md) license with the PGO logo and branding assets covered by our [trademark guidelines](https://github.com/CrunchyData/postgres-operator/blob/-/docs/static/logos/TRADEMARKS.md).

[https://github.com/CrunchyData/postgres-operator](https://github.com/CrunchyData/postgres-operator)
The examples as provided in this repo are designed for the use of PGO along with Crunchy Data's Postgres distribution, Crunchy Postgres, as Crunchy Postgres for Kubernetes. The unmodified use of these examples will result in downloading container images from Crunchy Data repositories - specifically the Crunchy Data Developer Portal. The use of container images downloaded from the Crunchy Data Developer Portal are subject to the [Crunchy Data Developer Program terms](https://www.crunchydata.com/developers/terms-of-use).
4 changes: 2 additions & 2 deletions helm/install/Chart.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,5 +4,5 @@ description: Installer for PGO, the open source Postgres Operator from Crunchy D

type: application
# The version below should match the version on the PostgresCluster CRD
version: 5.5.0-2
appVersion: 5.5.0-2
version: 5.6.0
appVersion: 5.6.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,295 @@
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
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