Commit Graph

1165 Commits

Author SHA1 Message Date
Felix Kunde ab25fb29b7
make Postgres 14 available (#1636)
* make Postgres 14 available
* don't be too hard to 9.5
* bump Spilo image and more docs updates
* update e2e test upgrading to 14
2021-10-12 12:00:59 +02:00
Felix Kunde f7b221de25
bump kind and use k8s = self.k8s in every test (#1640) 2021-10-08 17:24:17 +02:00
Jan Mussler d0d7a32d52
Clearing up error on resize failure message. (#1641)
* Clearing up error message.
2021-10-08 17:11:21 +02:00
amirmd76 d3183604a7
Fix logical backup script sigpipe problem (#1623) 2021-09-30 14:36:17 +02:00
Youki Shiraishi 698377719f
docs: fix typos in credential names (#1627) 2021-09-30 14:34:48 +02:00
Felix Kunde c8dc7ca871
fix operator 1.7.0 helm package (#1616) 2021-09-14 17:04:22 +02:00
Wolfgang Ebner e74b1bd359
use relative path instead of $PWD for go:generate (for go 1.17 compatibility) (#1615) 2021-09-14 14:54:41 +02:00
Michael McMillan 458d7a1144
Fix malformed YAML in the manifest (#1602)
The ports section should be a list. Without this fix  you'll trigger the following error:

```
Warning  Create  2m38s  postgres-operator  json: cannot unmarshal object into Go struct field Sidecar.spec.sidecars.ports of type []v1.ContainerPort
```
2021-09-13 18:42:08 +02:00
Damiano Albani 9e291d0857
Expand list of variable types supported for ConfigMap generation (#1603) 2021-09-13 18:41:48 +02:00
Felix Kunde ba6c3c39af
bump operator to v1.7.0 (#1599) 2021-08-27 14:33:54 +02:00
Felix Kunde 62ed7e470f
improve pooler sync (#1593)
* remove role from installLookupFunction and run it on database sync, too
* fix condition to decide on syncing pooler
* trigger lookup from database sync only if pooler is set
* use empty spec everywhere and do not sync if one lookupfunction was passed
* do not sync pooler after being disabled
2021-08-27 12:41:37 +02:00
Felix Kunde 7469efac88
enhance docs on clone and restore (#1592)
* enhance docs on clone and restore

* add chapter about upgrading the operator

* add section for standby clusters

* Update docs/administrator.md

Co-authored-by: Alexander Kukushkin <cyberdemn@gmail.com>

Co-authored-by: Alexander Kukushkin <cyberdemn@gmail.com>
2021-08-27 10:44:06 +02:00
Aaron Peschel 1dd0cd9691
Add Support for Azure WAL-G Backups (#1537)
This commit adds support for using an Azure storage account as a backup
location.

It uses the existing GCS functionality as a reference for what to do,
and follows the example set by GCS as closely as possible.

The decision to name the cloud provider key "aws_or_gcp" is unfortunate
while adding support for Azure, but I have left it alone to allow for
this changeset to be backwards compatible.
2021-08-26 14:59:03 +02:00
John Rood 2d2ce6197b
Add volume selector (#1385)
* Add volume selector
* Add slightly better documentation and gofmt changes
* Update generated deepcopy
* Add test for PV selector

Co-authored-by: John Rood <j.rood@picturae.com>
2021-08-26 14:57:54 +02:00
Quan Hoang 1b3366e9f4
Support affinity in connection pooler deployments (#1464) 2021-08-24 15:25:03 +02:00
Felix Kunde f0815fc5bd
remove debug log of Spilo env vars (#1591) 2021-08-23 15:44:34 +02:00
golgoth31 f105533543
feat: Add extraEnvs to operator-ui helm chart (#1582)
* feat: Add extraEnvs to operator-ui helm chart
* chore: Add env variables exemple to exemple manifest
* docs: Add comments on ui extraenvs
2021-08-20 15:11:11 +02:00
Felix Kunde 282b6d2863
allow secrets of default users in a different namespace (#1581)
* allow secrets of default users in a different namespace
* add warning in case secretNamespace is ignored
2021-08-18 16:00:26 +02:00
Markus Heinemann 47dc0a9aee
fix(ui): update ingress api versions in helm chart for newer k8s vers… (#1575)
* fix(ui): update ingress api versions in helm chart for newer k8s versions
* fix(ui): update ingress api version in plain manifest
2021-08-12 11:52:32 +02:00
Felix Kunde 66620d5049
refactor restarting instances (#1535)
* refactor restarting instances and reduce listPods calls
* only add parameters to set if it differs from effective config
* update e2e test for updating Postgres config
* patch config only once
2021-08-09 16:23:41 +02:00
Felix Kunde 2057ad8191
reorder e2e tests to follow alphabetical sorting (#1567)
* reorder e2e tests to follow alphabetical sorting
* e2e: finish waiting for pod failover only if all pods were replaced
* wait for sync in rolling update timeout test
2021-07-27 11:41:27 +02:00
Felix Kunde 58bab073da
fix searching for users with namespace in name (#1569)
* fix searching for users with namespace in name and improve e2e test
* remove reformatting username to query
2021-07-27 09:46:55 +02:00
Remo Wenger b1fab703ee
Fix typo (#1559) 2021-07-20 10:54:06 +02:00
yelhouti 8f03cd1aa9
document where the chart is hosted (#1554)
* document where the chart is hosted
2021-07-20 10:53:48 +02:00
Julian b9d6c4ebed
Add namespace to helm chart resources that need them (#1531) 2021-07-07 14:47:49 +02:00
Rafia Sabih fa604027cf
Move flag to configmap (#1540)
* Move flag to configmap

Co-authored-by: Rafia Sabih <rafia.sabih@zalando.de>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2021-07-02 08:46:21 +02:00
Jan Mussler 330c2c4c0b
Do not modify if values are below gp3 minimum throughput. (#1543)
* Do not modify if values are below gp3 minimum throughput.
2021-06-30 15:01:55 +02:00
Felix Kunde 54e506c00b
define default access privileges for default users too (#1512)
* define default access privileges for default users too
* extend docs on defaultUsers
2021-06-22 16:45:28 +02:00
Sergey Dudoladov 53fb540c35
Add basic retry around switchover (#1510)
* add basic retry around switchover


Co-authored-by: Sergey Dudoladov <sergey.dudoladov@gmail.com>
2021-06-17 08:48:26 +02:00
Igor Yanchenko ebb3204cdd
restart instances via rest api instead of recreating pods, fixes bug with being unable to decrease some values, like max_connections (#1103)
* restart instances via rest api instead of recreating pods
* Ignore differences in bootstrap.dcs when compare SPILO_CONFIGURATION
* isBootstrapOnlyParameter is rewritten, instead of whitelist it uses blacklist
* added e2e test for max_connections decreasing
* documentation updated
* pending_restart flag added to restart api call, wait fot ttl seconds after restart
* refactoring, /restart returns error if pending_restart is set to true and patroni is not pending restart
* restart postgresql instances within pods only if pod's restart is not required
* patroni might need to restart postgresql after pods were recreated if values like max_connections decreased
* instancesRestart is not critical, try to restart pods if not successful
* cleanup

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2021-06-14 11:00:58 +02:00
Rafia Sabih 75a9e2be38
Create cross namespace secrets (#1490)
* Create cross namespace secrets

* add test cases

* fixes

* Fixes
- include namespace in secret name only when namespace is provided
- use username.namespace as key to pgUsers only when namespace is
  provided
- avoid conflict in the role creation in db by checking namespace
  alongwith the username

* Update unit tests

* Fix test case

* Fixes

- update regular expression for usernames
- add test to allow check for valid usernames
- create pg roles with namespace (if any) appended in rolename

* add more test cases for valid usernames

* update docs

* fixes as per review comments

* update e2e

* fixes

* Add toggle to allow namespaced secrets

* update docs

* comment update

* Update e2e/tests/test_e2e.py

* few minor fixes

* fix unit tests

* fix e2e

* fix e2e attempt 2

* fix e2e

Co-authored-by: Rafia Sabih <rafia.sabih@zalando.de>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2021-06-11 10:35:30 +02:00
Felix Kunde 9668ac21a3
using quote in UI deployment template (#1514) 2021-06-04 16:14:58 +02:00
Damiano Albani b300fca364
Keep single values.yaml in operator chart while supporting ConfigMap & CRD (#1224)
* Keep single values.yaml while supporting ConfigMap & CRD

Co-authored-by: Damiano Albani <damiano.albani@geodan.nl>
2021-06-03 09:28:18 +02:00
Felix Kunde a37e78bd9a
bump operator to v1.6.3 (#1503) 2021-05-28 11:53:10 +02:00
Felix Kunde dd9c3907b7
pick first container if postgres is not found (#1505)
* pick first container if postgres is not found

* minor change
2021-05-28 11:44:10 +02:00
Felix Kunde 7884af2d59
get postgres container by name, not index (#1504) 2021-05-27 18:56:58 +02:00
Felix Kunde 48cdca645d
rework additional volume test (#1502) 2021-05-27 18:37:30 +02:00
Quan Hoang af5378eea5
Mount additional volumes to 'postgres' container when 'targetContains` is an empty list (#1475)
* Mount additional volumes to 'postgres' container when 'targetContainers' is an empty list

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2021-05-27 14:56:14 +02:00
Felix Kunde eeb59c5bfd
Rename roles that are removed from PostgresTeam CRD (#1457)
* rename db roles that are removed from manifests

* extend PostgresTeam e2e test

* make suffix configurable and add deprecated field to pgUser struct

* deny LOGIN from deprecated roles

* update feature documentation
2021-05-21 15:49:39 +02:00
Felix Kunde 7a8dc6084d
use 0.20.6 K8s release (#1495) 2021-05-17 14:14:31 +02:00
Jan Mussler a993300325
Update readme to reflect major version upgrade. (#1488) 2021-05-12 10:50:16 +02:00
Quan Hoang 18e2efe4e3
Update sts when modifying additionalVolumes (#1474) 2021-05-10 12:16:47 +02:00
Felix Kunde f0f7f25d30
Fix go lint errors (#1468)
* fix linter errors
* fix linter errors in kubectl plugin
* update PyYAML dependency in e2e tests
* declare a testVolume in volume_test
2021-05-10 11:48:03 +02:00
Felix Kunde 32e6c135b9
replace statefulset on annotation diff (#1449)
* replace statefulset on annotation diff
* remove update annotation function for statefulset
* add unit test for syncing annotations
* add inherited annotation to unit test
2021-04-22 11:22:52 +02:00
Felix Kunde 6b73ac4282
fix pooler sync with empty cluster name (#1448) 2021-04-09 14:08:28 +02:00
Felix Kunde 0745ce7cce
Remove team label from UI deployment (#1444)
* helm chart remove 1.6.0 archive from 1.6.0 archive
* remove team label from UI deployment
2021-04-07 17:22:06 +02:00
Aisuko bd6db87bf7
Fix broken address of user documents (#1443)
Signed-off-by: aisuko <urakiny@gmail.com>
2021-04-07 17:21:16 +02:00
Felix Kunde c18241f187
Bump v1.6.2 (#1433)
* helm chart remove 1.6.0 archive from 1.6.0 archive

* bump operator to v1.6.2

* fix pointer deref

* skip connection pooler sync when empty

* revert pooler change and minor update to version msg

* do not log query on error when creating or altering users
2021-04-01 11:53:07 +02:00
neelasha-09 9e93c0a4ef
Fix for AllowPrivilegeEscalation : issue-1403 (#1412)
* Fix for AllowPrivilegeEscalation : issue-1403

* fixed syntax error

* Aligned the value for parameter

* Aligned the value for parameter

* Update crds.go

* Aligned the parameter spilo_allow_privilege_escalation

* Parameters sorted in Alphabetical order in manifests yaml

* Parameters sorted in Alphabetical order in manifests yaml

* Update pkg/controller/operator_config.go

* Update docs/reference/operator_parameters.md

Co-authored-by: Neelam Sharma <neelasha@amdocs.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2021-03-29 10:37:59 +02:00
Dat Tang f54435ea9c
[UI] Parameterize TEAMS list (#1375)
* Parameterize TEAMS list

* Update charts/postgres-operator-ui/values.yaml

* Update charts/postgres-operator-ui/values.yaml

Co-authored-by: Dat Tang <datthanh.tag-ext@bankelf.eu>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2021-03-29 10:37:50 +02:00