Commit Graph

1398 Commits

Author SHA1 Message Date
Felix Kunde 4a0c483514
add unit test and documentation for finalizers (#2509)
* add unit test and documentation for finalizers
* error msg with lower case and cover sync case
* try to avoid adding json-patch dependency
* use Update to remove finalizer
* changing status and finalizer during create
* do not call Delete() twice
2024-01-22 12:13:40 +01:00
Felix Kunde 3bad9aaded
fix when syncing standby discription (#2513) 2024-01-12 10:41:17 +01:00
Felix Kunde 39f426d56f
hugepages empty on default and updated date in codegen files (#2512)
* hugepages empty on default using string pointer and updated date of codegen files
2024-01-12 09:25:51 +01:00
Matthias Adler 30ff382475
chore: add "macedigital" as codeowner & maintainer (#2511)
Add new user to `CODEOWNERS` and `MAINTAINERS`.

Should enable me to get notified on new issues and pull-requests for maintaining the project.
2024-01-11 18:51:22 +01:00
Christian Rohmann 743aade45f
Use finalizers to avoid losing delete events and to ensure full resource cleanup (#941)
* Add Finalizer functions to Cluster; add/remove finalizer on Create/Delete events
* Check if clusters have a deletion timestamp and we missed that event. Run Delete() and remove finalizer when done.
* Fix nil handling when using Service from map; Remove Service, Endpoint entries from their maps - just like with Secrets
* Add handling of ResourceNotFound to all delete functions (Service, Endpoint, LogicalBackup CronJob, PDB and Secret) - this is not a real error when deleting things
* Emit events when there are issues deleting resources to the user is informed
* Depend the removal of the Finalizer on all resources being deleted successfully first. Otherwise the next sync run should let us try again
* Add config option to enable finalizers
* Removed dangling whitespace at EOL
* config.EnableFinalizers is a bool pointer

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-01-04 16:22:53 +01:00
Silas 9581ba969b
Add hugepages 2Mi and 1Gi fields to ResourceDescription and pass them to the statefulset (#2311)
* Add hugepages-2Mi and 1Gi to ResourceDescription type and crd (#1549, #1788)
* Add tests for hugepages resource requests/limits
* Add tests for hugepages resource requests/limits on sidecars, too
* Add docs for hugepages support
* Add link to kubernetes docs on hugepages
* Add tests for hugepages not being set on container if not requested in custom resource
* Add hugepages resources fields to manifest docs
* Add hugepages resources fields to complete manifest example
* Add hugepages resources fields to chart crd

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-01-04 15:59:27 +01:00
Davide Bizzarri 3ca26d0dc8
Make PodDisruptionBudget master label selector optional (#2364)
* Make PDB master label selector optional

* Update pkg/apis/acid.zalan.do/v1/crds.go

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-01-04 15:58:24 +01:00
dependabot[bot] 182a6d9b65
Bump golang.org/x/net from 0.9.0 to 0.17.0 in /kubectl-pg (#2443)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.9.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-01-04 14:49:29 +01:00
andrejshapal 0367a07ba8
Populating crd labels and annotations in logical backup job pod manifest (#2456)
* Adding custom pod labels to logical backup job
* Adding custom annotations to logical backup job pod
* Adding job InheritedAnnotations and InheritedLabel tests
2024-01-04 14:03:16 +01:00
Felix Kunde dad5b132ec
Standby cluster promotion by changing manifest (#2472)
* Standby cluster promotion by changing manifest
* Updated the documentation

---------

Co-authored-by: Senthilnathan M <snathanm@vmware.com>
2024-01-04 12:33:50 +01:00
Stef Graces bbba15f9bf
Logical backup secret (#2051)
* Add logical backup secret
2024-01-04 11:09:16 +01:00
dependabot[bot] f6add42b7e
Bump gevent from 22.10.2 to 23.9.1 in /ui (#2433)
Bumps [gevent](https://github.com/gevent/gevent) from 22.10.2 to 23.9.1.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/22.10.2...23.9.1)

---
updated-dependencies:
- dependency-name: gevent
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-04 11:07:26 +01:00
dependabot[bot] c4df33c4ce
Bump golang.org/x/crypto from 0.8.0 to 0.17.0 in /kubectl-pg (#2502)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.8.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.8.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-04 11:06:42 +01:00
dependabot[bot] ef74170901
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 (#2501)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-04 11:06:28 +01:00
seeker 7ceedead35
Fix VolumeClaimTemplates index out of range problem (#2493)
when the desired statefulset has different numbers of volume claim template with current cluster,  will be panic because of index out of range
2024-01-04 11:05:15 +01:00
Jan Mussler 9d52a95782
User Alpine 3 to stay up to date (#2488)
User Alpine 3 to stay up to date
2024-01-03 16:48:22 +01:00
MisguidedEmails 957e8722c3
📝 "*" can be used for UI TARGET_NAMESPACE option (#2412)
Similar to "WATCHED_NAMESPACE" for the operator itself, "*" is a valid option for the UI. Without it clusters in multiple namespaces - rather, those not in the TARGET_NAMESPACE - will not show in the UI. Which can be confusing for users.
2024-01-03 16:47:59 +01:00
Felix Kunde 39fcf2e6b9
remove Users section from Patroni Bootstrap (#2490) 2024-01-03 16:47:21 +01:00
Felix Kunde 9ee14f26cb
let isSystemUsername check all system users (#2489)
* let isSystemUsername check all system users
* extend robot user unit test
* reset system users for initSystemUser test
2023-12-08 15:21:56 +01:00
Felix Kunde 96077c47d6
bump ubuntu version in logical-backup Dockerfile (#2478) 2023-11-29 15:58:52 +01:00
dependabot[bot] 409e4c7834
Bump golang.org/x/net from 0.9.0 to 0.17.0 (#2442)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.9.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-17 18:27:10 +02:00
Felix Kunde f41c14f468
improve additional teams lookup (#2445)
* improve additional teams lookup

---------

Co-authored-by: Jan Mussler <janm81@gmail.com>
2023-10-16 16:48:19 +02:00
Nikola Markovic 8ae769a567
Improve appearance of Readme image in github dark mode (#2431) 2023-10-16 11:54:51 +02:00
Ida Novindasari 62f04d6b6d
Migrate cdp overlay to use cdp runtime (#2416)
* update cdp overlay to use cdp runtime
* remove e2e tests from cdp pipeline because of a docker in docker problem

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-10-16 10:40:34 +02:00
Felix Kunde dc872abb51
support new stream fields in CRD (#2427) 2023-09-20 11:57:49 +02:00
Felix Kunde b1fca41dd0
add info on secret name for prepared users (#2425) 2023-09-19 21:22:11 +02:00
Felix Kunde e03fdaaa51
add support for recovery section in event streams (#2421) 2023-09-19 17:15:50 +02:00
Ida Novindasari 102a22e486
generate deepcopy to show new pvc data type (#2420) 2023-09-15 17:06:13 +02:00
Felix Kunde 8fc4b9ba5a
on PVC when_scaled:retain check pod count, too (#2415)
* on PVC when_scaled:retain check pod count and wait for replica label
2023-09-12 13:50:58 +02:00
Ida Novindasari 36389b27bc
Enable specifying PVC retention policy for auto deletion (#2343)
* Enable specifying PVC retention policy for auto deletion
* enable StatefulSetAutoDeletePVC in featureGates
* skip node affinity test
2023-09-08 13:17:37 +02:00
Felix Kunde 552bd26c0f
bump to v1.10.1 (#2410)
* bump to v1.10.1
2023-09-07 22:46:26 +02:00
Thinking Chen 781d17b85c
Add service account name in connection pooler (#2352) 2023-09-04 16:26:21 +02:00
Felix Kunde eb0d55ea49
[UI] revert index.html base url and provide USE_AWS_INSTANCE_PROFILE example (#2403)
* revert index.html base url and provide USE_AWS_INSTANCE_PROFILE example
2023-09-04 16:25:53 +02:00
Trung Minh Lai 28c27efe43
Handle retry connect to Postgres when ping return EOF error. (#2339)
* Handle retry connect to Postgres when ping return EOF error.
* Update pkg/cluster/database.go

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

---------

Co-authored-by: Trung Minh Lai <trung.lai@hitachivantara.com>
Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-08-25 17:53:18 +02:00
wasap ccc74ae947
Update complete-postgres-manifest.yaml (#2324)
* Update complete-postgres-manifest.yaml

add maxDBConnections settings to connectionPooler

* Update manifests/complete-postgres-manifest.yaml

Lets use more moderate number here

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2023-08-25 16:04:43 +02:00
Pavan 7d620b0ccc
Update supported kubernetes versions in version matrix (#2402)
In v1.10.0 we we have started using policy API v1 for PDBs and policy API v1  is available from Kubernetes version 1.21. So, updating the kubernetes supported  version in matrix chart of v1.9, v1.10 to k8s 1.21+
2023-08-25 16:04:13 +02:00
idanovinda 2204c2f992
[UI] Bump python libraries flask, requests and werkzeug (#2404)
Co-authored-by: inovindasari <ida.novindasari@zalando.de>
2023-08-25 15:36:38 +02:00
Felix Kunde 334ceab18e
log error why ebs volume modifying fails (#2395) 2023-08-18 13:18:35 +02:00
Jan Jansen 7372e91956
check pg version (#2342)
Fixes #1678

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
2023-08-10 18:06:17 +02:00
Eduardo 5b310cea31
[#2119] fix imagePullSecrets indentation (#2371) 2023-08-01 11:02:06 +02:00
weeix 14ba4e107c
Update the link to a post (#2360)
The link to Daniel Westermann's post "Getting started with the Zalando Operator for PostgreSQL" is outdated. This commit updates the link.
2023-08-01 11:01:43 +02:00
yoshihikoueno 7e98240b51
Fix wrong default value description (#2382) 2023-07-28 09:39:59 +02:00
Jociele Padilha 04f18b9716
fix extraction of EBS volume id when there's no region prefix (#2351)
* add prefix /vol- on when EBS doesn't have
* add new unit test for to get the volumeID
* add a prefix to search in the string of volumeID

---------

Co-authored-by: Jociele Padilha <jociele.padilha@zalando.de>
2023-06-12 15:18:19 +02:00
Felix Kunde af084a5a65
bump go to 1.19.8 everywhere (#2300) 2023-04-21 16:53:06 +02:00
Polina Bungina 7622d14b08
Remove scm-source.json creation (#2301) 2023-04-21 16:45:15 +02:00
Felix Kunde c580e509d3
Bump v1.10.0 (#2299)
* bump to v1.9.1
* update year in license and add links to more blog posts
* bump go to 1.19 and update dependencies
* go for 1.10.0 instead of 1.9.1
* fix unit test - removed obsolete ClusterName field
* fix DNS template in UI helm chart deployment file
2023-04-20 18:21:43 +02:00
Felix Kunde 611e48c51e
rename failsafe_mode option in opconfig CRD (#2298) 2023-04-20 14:28:24 +02:00
Nick Douma 3f4e44de82
Interpret KUBERNETES_SERVICE_HOST as hostname if not parsed as IP address (#2285)
* Interpret KUBERNETES_SERVICE_HOST as hostname if not parsed as IP address

This allows correctly connecting to the Kubernetes API when the service host
is set as a hostname. This is at least the case on gardener.cloud . I'm
running the patched version in production.

Related to #2047 which describes the same problem I had.

* Reindent logical-backup/dump.sh

---------

Co-authored-by: Nick Douma <nick.douma@cyso.com>
2023-04-19 15:42:27 +02:00
Dr. Jan-Philip Gehrcke ec701f6d30
run_operator_locally.sh: more retrying, debuggability (#2218)
actually retry kubectl port-forward
and better messages
2023-04-19 12:05:36 +02:00
drivebyer 1e64ae788e
Fix some errors be ignored (#2290)
Signed-off-by: drivebyer <yang.wu@daocloud.io>
2023-04-17 17:25:07 +02:00