Skip to content

Commit

Permalink
Merge pull request #1 from EasyMile/prepare-3.3.0-pg-operator
Browse files Browse the repository at this point in the history
feat: Update for postgresql-operator 3.3.0
  • Loading branch information
oxyno-zeta authored Dec 5, 2024
2 parents 7c92452 + ef37a05 commit 8f3a99b
Show file tree
Hide file tree
Showing 7 changed files with 237 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/postgresql-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: "3.2.0"
appVersion: "3.3.0"
description: A Helm chart for Kubernetes
name: postgresql-operator
version: 1.6.0
version: 1.7.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
name: postgresqlpublications.postgresql.easymile.com
spec:
group: postgresql.easymile.com
names:
kind: PostgresqlPublication
listKind: PostgresqlPublicationList
plural: postgresqlpublications
shortNames:
- pgpublication
- pgpub
singular: postgresqlpublication
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: Publication
jsonPath: .status.name
name: Publication
type: string
- description: Status phase
jsonPath: .status.replicationSlotName
name: Replication slot name
type: string
- description: Status phase
jsonPath: .status.replicationSlotPlugin
name: Replication slot plugin
type: string
- description: Status phase
jsonPath: .status.phase
name: Phase
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: PostgresqlPublication is the Schema for the postgresqlpublications
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: PostgresqlPublicationSpec defines the desired state of PostgresqlPublication.
properties:
allTables:
description: |-
Publication for all tables
Note: This is mutually exclusive with "tablesInSchema" & "tables"
type: boolean
database:
description: Postgresql Database
properties:
name:
description: Custom resource name
type: string
namespace:
description: Custom resource namespace
type: string
required:
- name
type: object
dropOnDelete:
description: Should drop database on Custom Resource deletion ?
type: boolean
name:
description: Postgresql Publication name
type: string
replicationSlotName:
description: |-
Postgresql replication slot name
Default value will the publication name
type: string
replicationSlotPlugin:
description: |-
Postgresql replication slot plugin
Default value will be "pgoutput"
type: string
tables:
description: Publication for selected tables
items:
properties:
additionalWhere:
description: Additional WHERE for table
type: string
columns:
description: Columns to export
items:
type: string
type: array
tableName:
description: Table name to use for publication
type: string
required:
- tableName
type: object
type: array
tablesInSchema:
description: |-
Publication for tables in schema
Note: This is a list of schema
items:
type: string
type: array
withParameters:
description: Publication with parameters
properties:
publish:
description: |-
Publish param
See here: https://www.postgresql.org/docs/current/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-WITH-PUBLISH
type: string
publishViaPartitionRoot:
description: |-
Publish via partition root param
See here: https://www.postgresql.org/docs/current/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-WITH-PUBLISH
type: boolean
required:
- publish
type: object
required:
- database
- name
type: object
status:
description: PostgresqlPublicationStatus defines the observed state of
PostgresqlPublication.
properties:
allTables:
description: Marker for save
type: boolean
hash:
description: Resource Spec hash
type: string
message:
description: Human-readable message indicating details about current
operator phase or error.
type: string
name:
description: Created publication name
type: string
phase:
description: Current phase of the operator
type: string
ready:
description: True if all resources are in a ready state and all work
is done.
type: boolean
replicationSlotName:
description: Created replication slot name
type: string
replicationSlotPlugin:
description: Created replication slot plugin
type: string
required:
- phase
type: object
type: object
served: true
storage: true
subresources:
status: {}
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,28 @@ spec:
- privilege
type: object
type: array
roleAttributes:
description: |-
Role attributes
Note: Only attributes that aren't conflicting with operator are supported.
properties:
bypassRLS:
description: |-
BYPASSRLS attribute
Note: This can be either true, false or null (to ignore this parameter)
type: boolean
connectionLimit:
description: |-
CONNECTION LIMIT connlimit attribute
Note: This can be either -1, a number or null (to ignore this parameter)
Note: Increase your number by one because operator is using the created user to perform some operations.
type: integer
replication:
description: |-
REPLICATION attribute
Note: This can be either true, false or null (to ignore this parameter)
type: boolean
type: object
rolePrefix:
description: User role prefix
type: string
Expand Down
2 changes: 2 additions & 0 deletions charts/postgresql-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
labels:
app.kubernetes.io/name: {{ include "postgresql-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
annotations:
{{- toYaml .Values.podAnnotations | nindent 8 }}
spec:
serviceAccountName: {{ include "postgresql-operator.serviceAccountName" . }}
{{- with .Values.imagePullSecrets }}
Expand Down
26 changes: 26 additions & 0 deletions charts/postgresql-operator/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,32 @@ rules:
- get
- patch
- update
- apiGroups:
- postgresql.easymile.com
resources:
- postgresqlpublications
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- postgresql.easymile.com
resources:
- postgresqlpublications/finalizers
verbs:
- update
- apiGroups:
- postgresql.easymile.com
resources:
- postgresqlpublications/status
verbs:
- get
- patch
- update
- apiGroups:
- postgresql.easymile.com
resources:
Expand Down
3 changes: 2 additions & 1 deletion charts/postgresql-operator/templates/service_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ metadata:
name: {{ template "postgresql-operator.serviceAccountName" . }}
labels:
{{ include "postgresql-operator.labels" . | indent 4 }}

annotations:
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
5 changes: 4 additions & 1 deletion charts/postgresql-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ rbac:
## Service account name and whether to create it
serviceAccount:
create: true
annotations: {}
name:

## Let it empty to watch all namespaces
Expand All @@ -18,7 +19,7 @@ replicaCount: 1

image:
repository: easymile/postgresql-operator
tag: 3.2.0
tag: 3.3.0
pullPolicy: IfNotPresent

args:
Expand Down Expand Up @@ -77,6 +78,8 @@ tolerations: []

affinity: {}

podAnnotations: {}

grafanaDashboards:
enabled: false
labels:
Expand Down

0 comments on commit 8f3a99b

Please sign in to comment.