Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multisite feature #58

Merged
merged 23 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
88179d6
Multisite feature support
ants Oct 3, 2024
0254ff9
Change Helm values to default use_configmaps on
ants Oct 4, 2024
644a9f5
Make default role name for human administrators humans
ants Oct 4, 2024
a6866bc
Assume post_init.sh will create pam role
ants Oct 4, 2024
b59c7cc
Add missing postgres-od permission for events.k8s.io apigroup
ants Oct 4, 2024
cb5ed19
Move etcd config to subobject and add protocol support
ants Oct 11, 2024
c477974
Update license, maintainers and security to refer to Cybertec
ants Oct 12, 2024
d9643b3
Rename etcd host to hosts
ants Oct 12, 2024
9c1e14b
Remove existing charts
ants Oct 12, 2024
a629f64
Fix typos in CRDs
ants Oct 13, 2024
c116b10
Remove defaults to spilo image
ants Oct 13, 2024
ece42b0
Update metadata of operator chart
ants Oct 13, 2024
2cb97d0
Move multisite.etcd config into a subobject
ants Oct 13, 2024
7d68150
Unify CRDs between helm and manifests folder
ants Oct 13, 2024
b61e0df
Unify cluster roles between helm and manifests folder
ants Oct 13, 2024
604cd3b
Add a Helm chart for provisioning a cluster
ants Oct 13, 2024
8b4d660
Copy missing volume section to materialized crds
ants Oct 13, 2024
a066469
Remove unused backup.pgbackrest.repos[].pvcsize parameter
ants Oct 13, 2024
154b90f
Update Helm charts for 0.8.0
ants Oct 13, 2024
f269cd7
cluster chart: rename clusterSpecification to cluster
ants Oct 13, 2024
2c6d703
Use PostgreSQL 17 by default
ants Oct 13, 2024
c659a48
Update database image to correct name
ants Oct 14, 2024
5f10037
Update version table in README
ants Oct 14, 2024
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
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2023 Zalando SE
2024 CYBERTEC PostgreSQL International GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 3 additions & 6 deletions MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
Sergey Dudoladov <[email protected]>
Felix Kunde <[email protected]>
Jan Mussler <[email protected]>
Jociele Padilha <[email protected]>
Ida Novindasari <[email protected]>
Polina Bungina <[email protected]>
Matthias Grömmer <[email protected]>
Ants Aasma <[email protected]>
Rafia Sabih <[email protected]>
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ The Operator project is being driven forward by CYBERTEC and is currently in pro

| Release | Postgres versions | pgBackRest versions | Patroni versions | K8s versions | Golang |
| :-------- | :---------------: | :-------------------: | :--------------: | :----------------:| :-----: |
| 0.7.0 | 12 &rarr; 16 | 2.52.1 | 3.3.1 | 1.21+ | 1.21.7 |
| next rc | 13 &rarr; 16 | 2.51 | 3.3.1 | 1.21+ | 1.21.7 |
| 0.8.0 | 13 &rarr; 17 | 2.53 | 4.0.2 | 1.21+ | 1.21.7 |

## Getting started

Expand All @@ -73,4 +72,4 @@ There is a browser-friendly version of this documentation at

## Community

Coming soon
Coming soon
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Security

If you have discovered a security vulnerability, please email tech-security@zalando.de.
If you have discovered a security vulnerability, please email security@cybertec.at.
23 changes: 23 additions & 0 deletions charts/postgres-cluster/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
17 changes: 17 additions & 0 deletions charts/postgres-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2
name: postgres-cluster
description: Deploys a PostgreSQL cluster using the PostgreSQL operator

type: application
version: 0.8.0

appVersion: "0.8.0-1"

maintainers:
- name: CYBERTEC PostgreSQL International GmbH
email: [email protected]

sources:
- https://github.com/cybertec-postgresql/cybertec-pg-operator

engine: gotpl
19 changes: 19 additions & 0 deletions charts/postgres-cluster/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
entries:
postgres-cluster:
- apiVersion: v2
appVersion: 0.8.0-1
created: "2024-10-14T00:52:56.851410174+03:00"
description: Deploys a PostgreSQL cluster using the PostgreSQL operator
digest: f275636dc39a2db215633cc3d7449e86fd18d1cc29aed7f06af5006137bebad5
maintainers:
- email: [email protected]
name: CYBERTEC PostgreSQL International GmbH
name: postgres-cluster
sources:
- https://github.com/cybertec-postgresql/cybertec-pg-operator
type: application
urls:
- postgres-cluster-0.8.0.tgz
version: 0.8.0
generated: "2024-10-14T00:52:56.850805082+03:00"
Binary file not shown.
5 changes: 5 additions & 0 deletions charts/postgres-cluster/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Database cluster object has been created and the operator should start initializing it now.

To wait for the initialization to complete you can issue the following command:

kubectl wait --for=jsonpath='.status.PostgresClusterStatus'=Running -n {{ .Release.Namespace }} pg/{{ .Release.Name }} --timeout=1h
50 changes: 50 additions & 0 deletions charts/postgres-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "postgres-cluster.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "postgres-cluster.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "postgres-cluster.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

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

{{/*
Selector labels
*/}}
{{- define "postgres-cluster.selectorLabels" -}}
app.kubernetes.io/name: {{ include "postgres-cluster.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
17 changes: 17 additions & 0 deletions charts/postgres-cluster/templates/postgresql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: cpo.opensource.cybertec.at/v1
kind: postgresql
metadata:
name: {{ .Values.clusterName | default .Release.Name }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "postgres-cluster.labels" . | nindent 4 }}
{{- with .Values.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.extraAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end}}

spec:
{{- toYaml .Values.cluster | nindent 2 }}
Loading
Loading