mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 21:30:28 +02:00
Allow specifying init_containers in Postgres CRD (#445)
* Add support for init_containers
This commit is contained in:
committed by
Sergey Dudoladov
parent
6f6a599c90
commit
3544cc90fa
@@ -273,6 +273,32 @@ are always passed to sidecars:
|
||||
|
||||
The PostgreSQL volume is shared with sidecars and is mounted at `/home/postgres/pgdata`.
|
||||
|
||||
|
||||
## InitContainers Support
|
||||
|
||||
Each cluster can specify arbitrary init containers to run. These containers can be
|
||||
used to run custom actions before any normal and sidecar containers start.
|
||||
An init container can be specified like this:
|
||||
|
||||
```yaml
|
||||
apiVersion: "acid.zalan.do/v1"
|
||||
kind: postgresql
|
||||
|
||||
metadata:
|
||||
name: acid-minimal-cluster
|
||||
spec:
|
||||
...
|
||||
init_containers:
|
||||
- name: "container-name"
|
||||
image: "company/image:tag"
|
||||
env:
|
||||
- name: "ENV_VAR_NAME"
|
||||
value: "any-k8s-env-things"
|
||||
```
|
||||
|
||||
`init_containers` accepts full `v1.Container` definition.
|
||||
|
||||
|
||||
## Increase volume size
|
||||
|
||||
PostgreSQL operator supports statefulset volume resize if you're using the
|
||||
|
||||
Reference in New Issue
Block a user