Skip to content

Commit 8f3a99b

Browse files
authored
Merge pull request #1 from EasyMile/prepare-3.3.0-pg-operator
feat: Update for postgresql-operator 3.3.0
2 parents 7c92452 + ef37a05 commit 8f3a99b

File tree

7 files changed

+237
-4
lines changed

7 files changed

+237
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v1
2-
appVersion: "3.2.0"
2+
appVersion: "3.3.0"
33
description: A Helm chart for Kubernetes
44
name: postgresql-operator
5-
version: 1.6.0
5+
version: 1.7.0
Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
controller-gen.kubebuilder.io/version: v0.14.0
7+
name: postgresqlpublications.postgresql.easymile.com
8+
spec:
9+
group: postgresql.easymile.com
10+
names:
11+
kind: PostgresqlPublication
12+
listKind: PostgresqlPublicationList
13+
plural: postgresqlpublications
14+
shortNames:
15+
- pgpublication
16+
- pgpub
17+
singular: postgresqlpublication
18+
scope: Namespaced
19+
versions:
20+
- additionalPrinterColumns:
21+
- description: Publication
22+
jsonPath: .status.name
23+
name: Publication
24+
type: string
25+
- description: Status phase
26+
jsonPath: .status.replicationSlotName
27+
name: Replication slot name
28+
type: string
29+
- description: Status phase
30+
jsonPath: .status.replicationSlotPlugin
31+
name: Replication slot plugin
32+
type: string
33+
- description: Status phase
34+
jsonPath: .status.phase
35+
name: Phase
36+
type: string
37+
name: v1alpha1
38+
schema:
39+
openAPIV3Schema:
40+
description: PostgresqlPublication is the Schema for the postgresqlpublications
41+
API.
42+
properties:
43+
apiVersion:
44+
description: |-
45+
APIVersion defines the versioned schema of this representation of an object.
46+
Servers should convert recognized schemas to the latest internal value, and
47+
may reject unrecognized values.
48+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
49+
type: string
50+
kind:
51+
description: |-
52+
Kind is a string value representing the REST resource this object represents.
53+
Servers may infer this from the endpoint the client submits requests to.
54+
Cannot be updated.
55+
In CamelCase.
56+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
57+
type: string
58+
metadata:
59+
type: object
60+
spec:
61+
description: PostgresqlPublicationSpec defines the desired state of PostgresqlPublication.
62+
properties:
63+
allTables:
64+
description: |-
65+
Publication for all tables
66+
Note: This is mutually exclusive with "tablesInSchema" & "tables"
67+
type: boolean
68+
database:
69+
description: Postgresql Database
70+
properties:
71+
name:
72+
description: Custom resource name
73+
type: string
74+
namespace:
75+
description: Custom resource namespace
76+
type: string
77+
required:
78+
- name
79+
type: object
80+
dropOnDelete:
81+
description: Should drop database on Custom Resource deletion ?
82+
type: boolean
83+
name:
84+
description: Postgresql Publication name
85+
type: string
86+
replicationSlotName:
87+
description: |-
88+
Postgresql replication slot name
89+
Default value will the publication name
90+
type: string
91+
replicationSlotPlugin:
92+
description: |-
93+
Postgresql replication slot plugin
94+
Default value will be "pgoutput"
95+
type: string
96+
tables:
97+
description: Publication for selected tables
98+
items:
99+
properties:
100+
additionalWhere:
101+
description: Additional WHERE for table
102+
type: string
103+
columns:
104+
description: Columns to export
105+
items:
106+
type: string
107+
type: array
108+
tableName:
109+
description: Table name to use for publication
110+
type: string
111+
required:
112+
- tableName
113+
type: object
114+
type: array
115+
tablesInSchema:
116+
description: |-
117+
Publication for tables in schema
118+
Note: This is a list of schema
119+
items:
120+
type: string
121+
type: array
122+
withParameters:
123+
description: Publication with parameters
124+
properties:
125+
publish:
126+
description: |-
127+
Publish param
128+
See here: https://www.postgresql.org/docs/current/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-WITH-PUBLISH
129+
type: string
130+
publishViaPartitionRoot:
131+
description: |-
132+
Publish via partition root param
133+
See here: https://www.postgresql.org/docs/current/sql-createpublication.html#SQL-CREATEPUBLICATION-PARAMS-WITH-PUBLISH
134+
type: boolean
135+
required:
136+
- publish
137+
type: object
138+
required:
139+
- database
140+
- name
141+
type: object
142+
status:
143+
description: PostgresqlPublicationStatus defines the observed state of
144+
PostgresqlPublication.
145+
properties:
146+
allTables:
147+
description: Marker for save
148+
type: boolean
149+
hash:
150+
description: Resource Spec hash
151+
type: string
152+
message:
153+
description: Human-readable message indicating details about current
154+
operator phase or error.
155+
type: string
156+
name:
157+
description: Created publication name
158+
type: string
159+
phase:
160+
description: Current phase of the operator
161+
type: string
162+
ready:
163+
description: True if all resources are in a ready state and all work
164+
is done.
165+
type: boolean
166+
replicationSlotName:
167+
description: Created replication slot name
168+
type: string
169+
replicationSlotPlugin:
170+
description: Created replication slot plugin
171+
type: string
172+
required:
173+
- phase
174+
type: object
175+
type: object
176+
served: true
177+
storage: true
178+
subresources:
179+
status: {}

charts/postgresql-operator/crds/postgresql.easymile.com_postgresqluserroles.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,28 @@ spec:
110110
- privilege
111111
type: object
112112
type: array
113+
roleAttributes:
114+
description: |-
115+
Role attributes
116+
Note: Only attributes that aren't conflicting with operator are supported.
117+
properties:
118+
bypassRLS:
119+
description: |-
120+
BYPASSRLS attribute
121+
Note: This can be either true, false or null (to ignore this parameter)
122+
type: boolean
123+
connectionLimit:
124+
description: |-
125+
CONNECTION LIMIT connlimit attribute
126+
Note: This can be either -1, a number or null (to ignore this parameter)
127+
Note: Increase your number by one because operator is using the created user to perform some operations.
128+
type: integer
129+
replication:
130+
description: |-
131+
REPLICATION attribute
132+
Note: This can be either true, false or null (to ignore this parameter)
133+
type: boolean
134+
type: object
113135
rolePrefix:
114136
description: User role prefix
115137
type: string

charts/postgresql-operator/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ spec:
1515
labels:
1616
app.kubernetes.io/name: {{ include "postgresql-operator.name" . }}
1717
app.kubernetes.io/instance: {{ .Release.Name }}
18+
annotations:
19+
{{- toYaml .Values.podAnnotations | nindent 8 }}
1820
spec:
1921
serviceAccountName: {{ include "postgresql-operator.serviceAccountName" . }}
2022
{{- with .Values.imagePullSecrets }}

charts/postgresql-operator/templates/role.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,32 @@ rules:
7777
- get
7878
- patch
7979
- update
80+
- apiGroups:
81+
- postgresql.easymile.com
82+
resources:
83+
- postgresqlpublications
84+
verbs:
85+
- create
86+
- delete
87+
- get
88+
- list
89+
- patch
90+
- update
91+
- watch
92+
- apiGroups:
93+
- postgresql.easymile.com
94+
resources:
95+
- postgresqlpublications/finalizers
96+
verbs:
97+
- update
98+
- apiGroups:
99+
- postgresql.easymile.com
100+
resources:
101+
- postgresqlpublications/status
102+
verbs:
103+
- get
104+
- patch
105+
- update
80106
- apiGroups:
81107
- postgresql.easymile.com
82108
resources:

charts/postgresql-operator/templates/service_account.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ metadata:
55
name: {{ template "postgresql-operator.serviceAccountName" . }}
66
labels:
77
{{ include "postgresql-operator.labels" . | indent 4 }}
8-
8+
annotations:
9+
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
910
{{- end }}

charts/postgresql-operator/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ rbac:
99
## Service account name and whether to create it
1010
serviceAccount:
1111
create: true
12+
annotations: {}
1213
name:
1314

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

1920
image:
2021
repository: easymile/postgresql-operator
21-
tag: 3.2.0
22+
tag: 3.3.0
2223
pullPolicy: IfNotPresent
2324

2425
args:
@@ -77,6 +78,8 @@ tolerations: []
7778

7879
affinity: {}
7980

81+
podAnnotations: {}
82+
8083
grafanaDashboards:
8184
enabled: false
8285
labels:

0 commit comments

Comments
 (0)