Skip to content

Commit

Permalink
feat: Updated to CNP 1.11.0 (#42)
Browse files Browse the repository at this point in the history
Co-authored-by: Francesco Canovai <[email protected]>
  • Loading branch information
github-actions[bot] and fcanovai authored Dec 17, 2021
1 parent cff05b3 commit 9c3450b
Show file tree
Hide file tree
Showing 8 changed files with 478 additions and 12 deletions.
4 changes: 2 additions & 2 deletions charts/cloud-native-postgresql/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ description: Cloud Native Postgresql Helm Chart
icon: https://www.enterprisedb.com/themes/custom/edb_bootstrap_sass/edb-logo-disc-dark-2.svg

type: application
version: "0.8.0"
version: "0.9.0"

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning, they should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.10.0"
appVersion: "1.11.0"

sources:
- https://github.com/EnterpriseDB/cloud-native-postgresql-helm
Expand Down
6 changes: 3 additions & 3 deletions charts/cloud-native-postgresql/README.md

Large diffs are not rendered by default.

69 changes: 65 additions & 4 deletions charts/cloud-native-postgresql/templates/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1168,6 +1168,16 @@ spec:
- AES256
- aws:kms
type: string
maxParallel:
description: Number of WAL files to be either archived
in parallel (when the PostgreSQL instance is archiving
to a backup object store) or restored in parallel (when
a PostgreSQL standby is fetching WAL files from a recovery
object store). If not specified, WAL files will be processed
one at a time. It accepts a positive integer as a value
- with 1 being the minimum accepted value.
minimum: 1
type: integer
type: object
required:
- destinationPath
Expand Down Expand Up @@ -1220,6 +1230,13 @@ spec:
to be used by applications. Defaults to the value of the
`database` key.
type: string
postInitApplicationSQL:
description: List of SQL queries to be executed as a superuser
in the application database right after is created - to
be used with extreme care (by default empty)
items:
type: string
type: array
postInitSQL:
description: List of SQL queries to be executed as a superuser
immediately after the cluster has been created - to be used
Expand Down Expand Up @@ -1589,6 +1606,17 @@ spec:
- AES256
- aws:kms
type: string
maxParallel:
description: Number of WAL files to be either archived
in parallel (when the PostgreSQL instance is archiving
to a backup object store) or restored in parallel
(when a PostgreSQL standby is fetching WAL files from
a recovery object store). If not specified, WAL files
will be processed one at a time. It accepts a positive
integer as a value - with 1 being the minimum accepted
value.
minimum: 1
type: integer
type: object
required:
- destinationPath
Expand Down Expand Up @@ -1741,9 +1769,10 @@ spec:
logLevel:
default: info
description: 'The instances'' log level, one of the following values:
error, info (default), debug, trace'
error, warning, info (default), debug, trace'
enum:
- error
- warning
- info
- debug
- trace
Expand Down Expand Up @@ -1803,8 +1832,14 @@ spec:
type: object
type: array
disableDefaultQueries:
default: false
description: 'Whether the default queries should be injected.
Default: false.'
Set it to `true` if you don''t want to inject default queries
into the cluster. Default: false.'
type: boolean
enablePodMonitor:
default: false
description: Enable or disable the `PodMonitor`
type: boolean
type: object
nodeMaintenanceWindow:
Expand Down Expand Up @@ -1857,7 +1892,9 @@ spec:
type: array
promotionTimeout:
description: Specifies the maximum number of seconds to wait when
promoting an instance to primary
promoting an instance to primary. Default value is 40000000,
greater than one year in seconds, big enough to simulate an
infinite timeout
format: int32
type: integer
shared_preload_libraries:
Expand Down Expand Up @@ -1930,7 +1967,7 @@ spec:
stopDelay:
default: 30
description: The time in seconds that is allowed for a PostgreSQL
instance node to gracefully shutdown (default 30)
instance to gracefully shutdown (default 30)
format: int32
type: integer
storage:
Expand Down Expand Up @@ -2125,6 +2162,14 @@ spec:
required:
- name
type: object
switchoverDelay:
default: 40000000
description: The time in seconds that is allowed for a primary PostgreSQL
instance to gracefully shutdown during a switchover. Default value
is 40000000, greater than one year in seconds, big enough to simulate
an infinite delay
format: int32
type: integer
required:
- instances
type: object
Expand All @@ -2133,6 +2178,10 @@ spec:
may not be up to date. Populated by the system. Read-only. More info:
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status'
properties:
azurePVCUpdateEnabled:
description: AzurePVCUpdateEnabled shows if the PVC online upgrade
is enabled for this cluster
type: boolean
certificates:
description: The configuration for the CA and related certificates,
initialized with defaults.
Expand Down Expand Up @@ -2319,6 +2368,11 @@ spec:
description: Total number of ready instances in the cluster
format: int32
type: integer
resizingPVC:
description: List of all the PVCs that have ResizingPVC condition.
items:
type: string
type: array
secretsResourceVersion:
description: The list of resource versions of the secrets managed
by the operator. Every change here is done in the interest of the
Expand Down Expand Up @@ -2482,13 +2536,15 @@ spec:
can configure
type: object
paused:
default: false
description: When set to `true`, PgBouncer will disconnect from
the PostgreSQL server, first waiting for all queries to complete,
and pause all new client connections until this value is set
to `false` (default). Internally, the operator calls PgBouncer's
`PAUSE` and `RESUME` commands.
type: boolean
poolMode:
default: session
description: The pool mode
enum:
- session
Expand Down Expand Up @@ -9312,6 +9368,7 @@ spec:
type: object
type: object
type:
default: rw
description: Which instances we must forward traffic to?
enum:
- rw
Expand All @@ -9326,6 +9383,10 @@ spec:
status:
description: PoolerStatus defines the observed state of Pooler
properties:
instances:
description: The number of pods trying to be scheduled
format: int32
type: integer
secrets:
description: The resource version of the config object
properties:
Expand Down
2 changes: 2 additions & 0 deletions charts/cloud-native-postgresql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MONITORING_QUERIES_CONFIGMAP
value: "{{ .Values.monitoringQueriesConfigMap.name }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
Expand Down
28 changes: 28 additions & 0 deletions charts/cloud-native-postgresql/templates/monitoring-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2021 EnterpriseDB Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.monitoringQueriesConfigMap.name }}
labels:
{{- include "cloud-native-postgresql.labels" . | nindent 4 }}
k8s.enterprisedb.io/reload: ""
{{- with .Values.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
queries: {{- toYaml .Values.monitoringQueriesConfigMap.queries | nindent 4 }}
11 changes: 11 additions & 0 deletions charts/cloud-native-postgresql/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,17 @@ rules:
- create
- get
- update
- apiGroups:
- monitoring.coreos.com
resources:
- podmonitors
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- policy
resources:
Expand Down
11 changes: 11 additions & 0 deletions charts/cloud-native-postgresql/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@
"imagePullSecrets": {
"type": "array"
},
"monitoringQueriesConfigMap": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"queries": {
"type": "string"
}
}
},
"nameOverride": {
"type": "string"
},
Expand Down
Loading

0 comments on commit 9c3450b

Please sign in to comment.