Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2d4b57d
added v5 pgadmin4 to related images for helm and kustomize installers…
ValClarkson Nov 2, 2021
d86ec89
Add namespace to operator through DownwardAPI
benjaminjb Nov 22, 2021
e6d1bb1
Add updated RBAC for PodDisruptionBudgets
jmckulk Dec 1, 2021
b611742
CRD Sync
jmckulk Dec 9, 2021
13f5c83
CRD Label Update
andrewlecuyer Dec 9, 2021
2c2cec2
Updates to Helm installer chart
Dec 10, 2021
850e369
Add pgupgrade to related images
cbandy Dec 9, 2021
3d98d5d
Make postgresVersion Helm variable required
Dec 10, 2021
df5e43a
Remove TODOs From CRDs
andrewlecuyer Dec 16, 2021
1906e30
Make the number of controller workers configurable
cbandy Feb 9, 2022
2fc7306
update examples from 5.0.4 to 5.0.5, updated kustomize examples
ValClarkson Feb 15, 2022
19b4b6b
Make the number of controller workers configurable
cbandy Feb 9, 2022
175c635
bump helm charge version for operator 5.0.5 release
ValClarkson Mar 3, 2022
f095052
Merge pull request #86 from ValClarkson/workerbackpatch
ValClarkson Mar 3, 2022
42487eb
Merge pull request #87 from ValClarkson/versionbump
ValClarkson Mar 3, 2022
d3f2449
Update CRD's to the Latest Revision
andrewlecuyer Feb 18, 2022
2765f06
updated images to correct pgversions and updated release items
ValClarkson Mar 28, 2022
de6ed6b
Merge pull request #102 from ValClarkson/vbump510
ValClarkson Mar 29, 2022
713a0f1
Update kustomize/install to bring in line with postgres-operator repo…
benjaminjb Mar 30, 2022
9c832b0
update crd to latest release and remove pgupgrade from
ValClarkson Mar 30, 2022
127368f
Merge pull request #103 from ValClarkson/crdupdate
ValClarkson Mar 30, 2022
df5d075
Change position of controller image value
cbandy Apr 4, 2022
629b3b2
Remove the status field from CRD YAML
cbandy Apr 4, 2022
74df255
Add upgrade controller to Helm install chart
cbandy Apr 7, 2022
f4a8d50
Add upgrade controller to Kustomize install
cbandy Apr 11, 2022
6e91c1d
Merge branch 'devel' into main
cbandy Apr 13, 2022
f8a0eb4
Enable seccomp on containers (#122)
benjaminjb May 10, 2022
1dbc51b
update to v5.1.1
ValClarkson May 16, 2022
538c499
Align Related Images in manager.yaml With OLM
andrewlecuyer May 18, 2022
12085b7
Revert "Enable seccomp on containers (#122)" (#126)
benjaminjb May 18, 2022
78c2d64
Helm Chart fix wrong dataSource key in postgres template
jfhenriques Mar 10, 2022
a53092a
updated for v5.1.2
ValClarkson Jul 12, 2022
c35b44b
Merge pull request #139 from ValClarkson/versionupdate
ValClarkson Jul 15, 2022
08365a9
Bump 5.1.2 to 5.1.3
jmckulk Aug 1, 2022
4b0501c
Merge pull request #147 from jmckulk/version_bump_5.1.3
jmckulk Aug 24, 2022
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
3 changes: 3 additions & 0 deletions helm/install/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://github.com/github/linguist/issues/4905
# https://github.com/github/linguist/issues/5092#issuecomment-730262298
/templates/*.tpl linguist-language=handlebars
1 change: 1 addition & 0 deletions helm/install/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git*
5 changes: 3 additions & 2 deletions helm/install/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apiVersion: v2
name: pgo
description: Installer for PGO, the open source Postgres Operator from Crunchy Data

type: application
version: 0.2.5
appVersion: 5.0.5
version: 0.3.0
appVersion: 5.1.0
850 changes: 850 additions & 0 deletions helm/install/crds/postgres-operator.crunchydata.com_pgupgrades.yaml

Large diffs are not rendered by default.

2,056 changes: 1,819 additions & 237 deletions helm/install/crds/postgres-operator.crunchydata.com_postgresclusters.yaml

Large diffs are not rendered by default.

37 changes: 26 additions & 11 deletions helm/install/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,26 @@ Create chart name and version as used by the chart label.
{{/*
Crunchy labels
*/}}
{{- define "install.crunchyLabels" -}}
{{- define "install.clusterLabels" -}}
postgres-operator.crunchydata.com/control-plane: {{ .Chart.Name }}
{{- end }}
{{- define "install.upgradeLabels" -}}
postgres-operator.crunchydata.com/control-plane: {{ .Chart.Name }}-upgrade
{{- end }}

{{/*
Common labels
*/}}
{{- define "install.labels" -}}
helm.sh/chart: {{ include "install.chart" . }}
{{ include "install.selectorLabels" . }}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "install.selectorLabels" -}}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{ include "install.crunchyLabels" .}}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down Expand Up @@ -77,3 +72,23 @@ Role
ClusterRole
{{- end }}
{{- end }}

{{- define "install.imagePullSecrets" -}}
{{/* Earlier versions required the full structure of PodSpec.ImagePullSecrets */}}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets }}
{{- else if .Values.imagePullSecretNames }}
imagePullSecrets:
{{- range .Values.imagePullSecretNames }}
- name: {{ . | quote }}
{{- end }}{{/* range */}}
{{- end }}{{/* if */}}
{{- end }}{{/* define */}}

{{- define "install.relatedImages" -}}
{{- range $id, $object := .Values.relatedImages }}
- name: RELATED_IMAGE_{{ $id | upper }}
value: {{ $object.image | quote }}
{{- end }}
{{- end }}
40 changes: 40 additions & 0 deletions helm/install/templates/manager-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}-upgrade
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.upgradeLabels" . | nindent 4 }}
spec:
replicas: 1
strategy: { type: Recreate }
selector:
matchLabels:
{{- include "install.upgradeLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "install.upgradeLabels" . | nindent 8 }}
spec:
{{- include "install.imagePullSecrets" . | indent 6 }}
serviceAccountName: {{ include "install.serviceAccountName" . }}-upgrade
containers:
- name: operator
image: {{ required ".Values.controllerImages.upgrade is required" .Values.controllerImages.upgrade | quote }}
env:
- name: CRUNCHY_DEBUG
value: {{ .Values.debug | ne false | quote }}
{{- if .Values.singleNamespace }}
- name: PGO_TARGET_NAMESPACE
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
{{- end }}
{{- if .Values.workers }}
- name: PGO_WORKERS
value: {{ .Values.workers | quote }}
{{- end }}
{{- include "install.relatedImages" . | indent 8 }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
26 changes: 12 additions & 14 deletions helm/install/templates/manager.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.clusterLabels" . | nindent 4 }}
spec:
replicas: 1
strategy: { type: Recreate }
selector:
matchLabels:
{{- include "install.crunchyLabels" . | nindent 6 }}
{{- include "install.clusterLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "install.crunchyLabels" . | nindent 8 }}
{{- include "install.clusterLabels" . | nindent 8 }}
spec:
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- include "install.imagePullSecrets" . | indent 6 }}
serviceAccountName: {{ include "install.serviceAccountName" . }}
containers:
- name: operator
image: "{{ .Values.image.image }}"
image: {{ required ".Values.controllerImages.cluster is required" .Values.controllerImages.cluster | quote }}
env:
- name: CRUNCHY_DEBUG
value: {{ if eq .Values.debug false }}"false"{{- else }}"true"{{- end }}
{{- range $image_name, $image_val := .Values.relatedImages }}
- name: RELATED_IMAGE_{{ $image_name | upper }}
value: "{{ $image_val.image }}"
{{- end }}
value: {{ .Values.debug | ne false | quote }}
- name: PGO_NAMESPACE
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
{{- if .Values.singleNamespace }}
- name: PGO_TARGET_NAMESPACE
valueFrom: { fieldRef: { apiVersion: v1, fieldPath: metadata.namespace } }
Expand All @@ -37,12 +35,12 @@ spec:
- name: PGO_WORKERS
value: {{ .Values.workers | quote }}
{{- end }}
{{- if (default false .Values.disable_check_for_upgrades) }}
{{- include "install.relatedImages" . | indent 8 }}
{{- if .Values.disable_check_for_upgrades }}
- name: CHECK_FOR_UPGRADES
value: "false"
{{- end }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
serviceAccount: {{ include "install.serviceAccountName" . }}
71 changes: 71 additions & 0 deletions helm/install/templates/role-upgrade.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ include "install.roleKind" . }}
metadata:
name: {{ include "install.roleName" . }}-upgrade
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.upgradeLabels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- endpoints
verbs:
- delete
- get
- list
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- list
- watch
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- delete
- list
- patch
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- pgupgrades
verbs:
- get
- list
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- pgupgrades/finalizers
verbs:
- patch
- update
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- pgupgrades/status
verbs:
- get
- patch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- postgresclusters
verbs:
- get
- list
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
- postgresclusters/status
verbs:
- patch
13 changes: 13 additions & 0 deletions helm/install/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ include "install.roleKind" . }}
metadata:
name: {{ include "install.roleName" . }}
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.clusterLabels" . | nindent 4 }}
rules:
- apiGroups:
- ''
Expand Down Expand Up @@ -89,6 +91,17 @@ rules:
- list
- patch
- watch
- apiGroups:
- policy
resources:
- poddisruptionbudgets
verbs:
- create
- delete
- get
- list
- patch
- watch
- apiGroups:
- postgres-operator.crunchydata.com
resources:
Expand Down
18 changes: 18 additions & 0 deletions helm/install/templates/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ include "install.roleBindingKind" . }}
metadata:
name: {{ include "install.roleBindingName" . }}
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.clusterLabels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: {{ include "install.roleKind" . }}
Expand All @@ -12,3 +14,19 @@ subjects:
- kind: ServiceAccount
name: {{ include "install.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: {{ include "install.roleBindingKind" . }}
metadata:
name: {{ include "install.roleBindingName" . }}-upgrade
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.upgradeLabels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: {{ include "install.roleKind" . }}
name: {{ include "install.roleName" . }}-upgrade
subjects:
- kind: ServiceAccount
name: {{ include "install.serviceAccountName" . }}-upgrade
namespace: {{ .Release.Namespace }}
10 changes: 10 additions & 0 deletions helm/install/templates/service_account.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "install.serviceAccountName" . }}
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.clusterLabels" . | nindent 4 }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "install.serviceAccountName" . }}-upgrade
labels:
{{- include "install.labels" . | nindent 4 }}
{{- include "install.upgradeLabels" . | nindent 4 }}
41 changes: 22 additions & 19 deletions helm/install/values.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
---
## Provide image repository and tag
image:
image: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi8-5.0.5-0
# controllerImages are used to run the PostgresCluster and PGUpgrade controllers.
controllerImages:
cluster: registry.developers.crunchydata.com/crunchydata/postgres-operator:ubi8-5.1.0-0
upgrade: registry.developers.crunchydata.com/crunchydata/postgres-operator-upgrade:ubi8-5.1.0-0

# relatedImages are used when an image is omitted from PostgresCluster or PGUpgrade specs.
relatedImages:
postgres_14:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-14.2-0
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.2-1
postgres_14_gis_3.1:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:centos8-14.2-3.1-0
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-14.2-3.1-1
postgres_13:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.6-0
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-13.6-1
postgres_13_gis_3.1:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:centos8-13.6-3.1-0
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-13.6-3.1-1
pgadmin:
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgadmin4:ubi8-4.30-0
pgbackrest:
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.36-1
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.38-0
pgbouncer:
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.16-1
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.16-2
pgexporter:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.0.5-0
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.1.0-0
pgupgrade:
image: registry.developers.crunchydata.com/crunchydata/crunchy-upgrade:ubi8-5.1.0-0

# singleNamespace determines how to install PGO to watch namesapces. If set to
# false, PGO will watch for Postgres clusters in all namesapces Setting to
# "true" will instruct PGO to only watch for Postgres clusters in the namespace
# that it is installed in. Defaults to the value below.
# singleNamespace controls where PGO watches for PostgresClusters. When false,
# PGO watches for and responds to PostgresClusters in all namespaces. When true,
# PGO watches only the namespace in which it is installed.
singleNamespace: false

# debug allows you to enable or disable the "debug" level of logging.
# Defaults to the value below.
debug: true

# imagePullSecrets defines any image pull secrets to use
# **only for installation**. This is an array that uses the image pull secret
# format, i.e. "name: value"
imagePullSecrets: []
# imagePullSecretNames is a list of secret names to use for pulling controller images.
# More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
imagePullSecretNames: []
4 changes: 2 additions & 2 deletions helm/postgres/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: postgrescluster
description: A Helm chart for Kubernetes
type: application
version: 0.2.2
appVersion: 5.0.5
version: 0.2.3
appVersion: 5.1.0
Loading