diff --git a/helm/install/templates/manager.yaml b/helm/install/templates/manager.yaml index 1f8695d3..27d102f7 100644 --- a/helm/install/templates/manager.yaml +++ b/helm/install/templates/manager.yaml @@ -35,6 +35,14 @@ spec: {{- else -}} {{- include "install.defaultEnv" . | nindent 10 }} {{- end }} + {{- if .Values.workers }} + - name: PGO_WORKERS + value: {{ .Values.workers | quote }} + {{- end }} + {{- include "install.relatedImages" . | indent 8 }} + {{- if .Values.disable_check_for_upgrades }} + - name: CHECK_FOR_UPGRADES + value: "true" {{- if .Values.extraEnv }} {{- toYaml .Values.extraEnv | nindent 10 }} {{- end }} diff --git a/help.md b/help.md new file mode 100644 index 00000000..f0faf035 --- /dev/null +++ b/help.md @@ -0,0 +1,14 @@ +kubectl apply -k kustomize/install/namespace + + +kubectl apply --server-side -k kustomize/install/default + +kubectl apply -k kustomize/cn-accounts +kubectl apply -k kustomize/cn-lms +kubectl apply -k kustomize/cn-lms-prod +kubectl apply -k kustomize/cn-mattermost + +kubectl apply -k kustomize/mm-mattermost + +kubectl -n postgres-operator get svc --selector=postgres-operator.crunchydata.com/cluster=cn-lms + diff --git a/kustomize/cn-accounts/ingress.yaml b/kustomize/cn-accounts/ingress.yaml new file mode 100644 index 00000000..e5115497 --- /dev/null +++ b/kustomize/cn-accounts/ingress.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-ingress-tcp-microk8s-conf + namespace: ingress +data: + 6379: "default/redis:6379" \ No newline at end of file diff --git a/kustomize/cn-accounts/kustomization.yaml b/kustomize/cn-accounts/kustomization.yaml new file mode 100644 index 00000000..e3b72752 --- /dev/null +++ b/kustomize/cn-accounts/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: postgres-operator + +resources: +- postgres.yaml diff --git a/kustomize/cn-accounts/postgres.yaml b/kustomize/cn-accounts/postgres.yaml new file mode 100644 index 00000000..a151d087 --- /dev/null +++ b/kustomize/cn-accounts/postgres.yaml @@ -0,0 +1,50 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: cn-accounts +spec: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.2-3.4-0 + postgresVersion: 16 + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 10Gi + users: + - name: accounts + databases: + - accounts + options: 'SUPERUSER' + service: + metadata: + annotations: + my-annotation: value1 + labels: + my-label: value2 + type: NodePort + nodePort: 32002 + monitoring: + pgmonitor: + exporter: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.6.0-0 + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.51-1 + repos: + - name: repo1 + schedules: + full: "0 1 * * 0" + differential: "0 1 * * 1-6" + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 20Gi + proxy: + pgBouncer: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.21-3 \ No newline at end of file diff --git a/kustomize/cn-lms-prod/kustomization.yaml b/kustomize/cn-lms-prod/kustomization.yaml new file mode 100644 index 00000000..e3b72752 --- /dev/null +++ b/kustomize/cn-lms-prod/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: postgres-operator + +resources: +- postgres.yaml diff --git a/kustomize/cn-lms-prod/postgres.yaml b/kustomize/cn-lms-prod/postgres.yaml new file mode 100644 index 00000000..ad8c8b95 --- /dev/null +++ b/kustomize/cn-lms-prod/postgres.yaml @@ -0,0 +1,45 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: cn-lms-prod +spec: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.3-3.4-0 + postgresVersion: 16 + postGISVersion: "3.4" + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 10Gi + users: + - name: cn-lms-prod + databases: + - cn-lms-prod + options: 'SUPERUSER' + service: + metadata: + annotations: + my-annotation: value1 + labels: + my-label: value2 + type: NodePort + nodePort: 31001 + monitoring: + pgmonitor: + exporter: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.6.0-0 + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.51-0 + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 20Gi diff --git a/kustomize/cn-lms/kustomization.yaml b/kustomize/cn-lms/kustomization.yaml new file mode 100644 index 00000000..e3b72752 --- /dev/null +++ b/kustomize/cn-lms/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: postgres-operator + +resources: +- postgres.yaml diff --git a/kustomize/cn-lms/postgres.yaml b/kustomize/cn-lms/postgres.yaml new file mode 100644 index 00000000..52185a19 --- /dev/null +++ b/kustomize/cn-lms/postgres.yaml @@ -0,0 +1,57 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: cn-lms +spec: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-gis:ubi8-16.2-3.4-0 + postgresVersion: 16 + postGISVersion: "3.4" + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 10Gi + users: + - name: cn-lms + databases: + - cn-lms + options: 'SUPERUSER' + service: + metadata: + annotations: + my-annotation: value1 + labels: + my-label: value2 + type: NodePort + nodePort: 32001 + patroni: + dynamicConfiguration: + postgresql: + parameters: + pg_hba: + - "hostnossl all all all md5" + monitoring: + pgmonitor: + exporter: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-5.5.1-0 + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.49-0 + repos: + - name: repo1 + schedules: + full: "0 1 * * 0" + differential: "0 1 * * 1-6" + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 20Gi + proxy: + pgBouncer: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.21-3 diff --git a/kustomize/cn-mattermost/cn-postgres.yaml b/kustomize/cn-mattermost/cn-postgres.yaml new file mode 100644 index 00000000..0c62798b --- /dev/null +++ b/kustomize/cn-mattermost/cn-postgres.yaml @@ -0,0 +1,57 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: cn-mattermost +spec: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.6-2 + postgresVersion: 16 + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 10Gi + users: + - name: cn-mattermost + databases: + - cn-mattermost + options: 'SUPERUSER' + service: + metadata: + annotations: + my-annotation: mattermost + labels: + my-label: mattermost + type: NodePort + nodePort: 31003 + monitoring: + pgmonitor: + exporter: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-0.16.0-0 + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.54.1-0 + repos: + - name: repo1 + schedules: + full: "0 1 * * 0" + differential: "0 1 * * 1-6" + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 20Gi + # proxy: + # pgBouncer: + # image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.21-3 + patroni: + dynamicConfiguration: + postgresql: + pg_hba: + - host cn-mattermost cn-mattermost 10.1.77.41/32 md5 + - local all all peer + - host all all 0.0.0.0/0 md5 \ No newline at end of file diff --git a/kustomize/cn-mattermost/kustomization.yaml b/kustomize/cn-mattermost/kustomization.yaml new file mode 100644 index 00000000..3fbc2cd1 --- /dev/null +++ b/kustomize/cn-mattermost/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: postgres-operator + +resources: +- cn-postgres.yaml diff --git a/kustomize/mm-mattermost/kustomization.yaml b/kustomize/mm-mattermost/kustomization.yaml new file mode 100644 index 00000000..8f27c8d3 --- /dev/null +++ b/kustomize/mm-mattermost/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: postgres-operator + +resources: +- mm-postgres.yaml \ No newline at end of file diff --git a/kustomize/mm-mattermost/mm-postgres.yaml b/kustomize/mm-mattermost/mm-postgres.yaml new file mode 100644 index 00000000..a12953d5 --- /dev/null +++ b/kustomize/mm-mattermost/mm-postgres.yaml @@ -0,0 +1,54 @@ +apiVersion: postgres-operator.crunchydata.com/v1beta1 +kind: PostgresCluster +metadata: + name: mm-mattermost +spec: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-16.6-2 + postgresVersion: 16 + instances: + - name: instance1 + dataVolumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 10Gi + users: + - name: mm-mattermost + databases: + - mm-mattermost + options: 'SUPERUSER' + service: + metadata: + annotations: + my-annotation: mm-mattermost + labels: + my-label: mm-mattermost + type: NodePort + nodePort: 31002 + monitoring: + pgmonitor: + exporter: + image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-exporter:ubi8-0.16.0-0 + backups: + pgbackrest: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:ubi8-2.54.1-0 + repos: + - name: repo1 + volume: + volumeClaimSpec: + accessModes: + - "ReadWriteOnce" + resources: + requests: + storage: 20Gi + proxy: + pgBouncer: + image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:ubi8-1.21-3 + patroni: + dynamicConfiguration: + postgresql: + pg_hba: + - host mm-mattermost m-mattermost 10.1.77.8/32 md5 + - local all all peer + - host all all 0.0.0.0/0 md5 \ No newline at end of file