Commit Graph

47 Commits

Author SHA1 Message Date
Felix Kunde 73f72414f6
bump go version to 1.22.5 (#2699) 2024-07-23 13:25:29 +02:00
Matthias Adler 2ef7d58578
chore: update package dependencies when building image (#2665)
* chore: update package dependencies when building image

Install available updates alongside installation of packages to remove known vulnerabilities from images.

Example for issues in plain alpine:3 image (v3.20):

```sh
$ grype alpine:3
 ✔ Vulnerability DB                [updated]
 ✔ Loaded image                                                            alpine:3
 ✔ Parsed image                    sha256:1d34ffeaf190be23d3de5a8de0a436676b758f48f
 ✔ Cataloged contents              dac15f325cac528994a5efe78787cd03bdd796979bda52fd
   ├── ✔ Packages                        [14 packages]
   ├── ✔ File digests                    [77 files]
   ├── ✔ File metadata                   [77 locations]
   └── ✔ Executables                     [17 executables]
 ✔ Scanned for vulnerabilities     [8 vulnerability matches]
   ├── by severity: 0 critical, 0 high, 6 medium, 0 low, 0 negligible (2 unknown)
   └── by status:   8 fixed, 0 not-fixed, 0 ignored
NAME           INSTALLED   FIXED-IN    TYPE  VULNERABILITY   SEVERITY
busybox        1.36.1-r28  1.36.1-r29  apk   CVE-2023-42365  Medium
busybox        1.36.1-r28  1.36.1-r29  apk   CVE-2023-42364  Medium
busybox-binsh  1.36.1-r28  1.36.1-r29  apk   CVE-2023-42365  Medium
busybox-binsh  1.36.1-r28  1.36.1-r29  apk   CVE-2023-42364  Medium
libcrypto3     3.3.0-r2    3.3.0-r3    apk   CVE-2024-4741   Unknown
libssl3        3.3.0-r2    3.3.0-r3    apk   CVE-2024-4741   Unknown
ssl_client     1.36.1-r28  1.36.1-r29  apk   CVE-2023-42365  Medium
ssl_client     1.36.1-r28  1.36.1-r29  apk   CVE-2023-42364  Medium
```

Issue would be solved by also upgrading installed packages:

```sh
$ apk -U upgrade --no-cache
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
(1/5) Upgrading busybox (1.36.1-r28 -> 1.36.1-r29)
Executing busybox-1.36.1-r29.post-upgrade
(2/5) Upgrading busybox-binsh (1.36.1-r28 -> 1.36.1-r29)
(3/5) Upgrading libcrypto3 (3.3.0-r2 -> 3.3.1-r0)
(4/5) Upgrading libssl3 (3.3.0-r2 -> 3.3.1-r0)
(5/5) Upgrading ssl_client (1.36.1-r28 -> 1.36.1-r29)
Executing busybox-1.36.1-r29.trigger
OK: 8 MiB in 14 packages
```

Furthermore, this commit reduces accidental complexity from the Docker build process.
Most notably, use pre-made official golang images for building postgres-operator.

* Update docker/DebugDockerfile

---------

Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
2024-06-18 17:21:03 +02:00
Felix Kunde 6cde8e8c0b
Bump to v1.12.0 (#2639)
* bump tp v1.12.0
* code-generator and apiextensions-apiserver still on to 0.25.9 to allow code-generation on GH
* bump go in github action and mini fix in UI
* update UI Dockerfile

---------

Co-authored-by: Ida Novindasari <idanovinda@gmail.com>
2024-05-31 15:29:29 +02:00
Felix Kunde 83878fe447
make bucket prefix for logical backup configurable (#2609)
* make bucket prefix for logical backup configurable
* include container comparison in logical backup diff
* add unit test and update description for compareContainers
* don't rely on users putting / in the config - reflect other comments from review
2024-04-23 14:24:04 +02:00
Jociele Padilha a5663da64f
add the pg version 16 (#2557)
* add the pg version 16

* add comma after pg16 in crds api

* change minimal_major_version to 12

* add new spilo image for pg16

* edit the registry from current and lazy spilo

* Update e2e/run.sh

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

* Update README.md

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

* add pg 11 to be compatible for the existing DBs

* update pq, pyyaml,k8s and kind version

* skip test_infrastructure_roles

* skip another test

* remove the skipping

* adjust the verification of new Patroni version states

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-03-13 16:43:25 +01:00
Håkon Solbjørg 06947eed28
chore(build): Add OCI label for container image source (#2541)
As specified in the OpenContainers Annotations Spec:
https://specs.opencontainers.org/image-spec/annotations/
2024-03-04 09:39:45 +01:00
Felix Kunde 23f4fdb327
update go and dependencies (#2554) 2024-02-23 13:58:11 +01:00
Dominic Giebert 569fc57fc8
Implement CI for UI, Logical Backup Images to GHCR (#2527)
* Implement CI for UI, Logical Backup Images to GHCR

---------

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2024-02-14 17:59:40 +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
Felix Kunde 96077c47d6
bump ubuntu version in logical-backup Dockerfile (#2478) 2023-11-29 15:58:52 +01: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
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
Polina Bungina a9c6d46f7d
Add pipeline to publish ghcr multi-arch image (#2268)
Refactor operator image build process
Add a pipeline to build and publish arm64/amd64 image in ghcr on every
pushed tag
2023-04-17 15:28:27 +02:00
Felix Kunde 29cec0ceda
configurable resources for logical backup pod template (#710)
* new config options to specify resources for logical backup jobs
* bug in logical backup script for s3 dumps
* define enum for logical_backup_provider
* changed order of logical backup azure options
* fix unit test for stream comparison
2023-01-05 15:19:36 +01:00
Stef Graces bb2617a53f
Add logical backup for azure (#2052)
* Add logical backup for azure
2023-01-05 12:16:41 +01:00
Felix Kunde 3e148ea57e
enable operator support for pg15 and drop support for 9.5 and 9.6 (#2140)
* enable operator support for pg15 and drop support for 9.5 and 9.6
* not offer 15 in UI before spilo-15 is available
2022-12-15 12:17:27 +01:00
Philip Haberkern 920f3dee3e
bumped to alpine base image 3.15 (#2027)
* Bumped Alpine to 3.15

Co-authored-by: Philip Haberkern <Philip.haberkern>
2022-10-18 11:02:04 +02:00
Marcel Fest a081173f26
Added IPv6 support K8s Service. (#1405) 2022-03-28 16:40:22 +02:00
A. Stoewer 695ad44caf
Logical backup retention time (#1337)
* Add optional logical backup retention time
* Set defaults for potentially unbound variables, so that the script will work with older operator versions
* Document retention time parameter for logical backups
* Add retention time parameter to resources and charts

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2022-03-02 17:39:33 +01:00
Felix Kunde 087c379687
move to go 1.17.4 and update dependencies (#1717)
* move to go 1.17.4 and update dependencies
* use go install for mockgen and kind
2021-12-16 15:13:30 +01:00
Felix Kunde 1eafd688d0
restart master first in some edge cases (#1655)
* restart master first in some edge cases

* edge case is when desired is lower than effective

* wait after config patch and restart on sync whenever we see pending_restart

* convert options to int to check decrease and add unit test

* minor update to e2e tests

* wait only after restart not every sync

* using spilo 14 e2e images
2021-10-26 16:43:19 +02:00
amirmd76 d3183604a7
Fix logical backup script sigpipe problem (#1623) 2021-09-30 14:36:17 +02:00
Felix Kunde 4d2b51de41
upgrade pip to latest version to avoid broken deps (#1357) 2021-02-10 11:24:24 +01:00
Felix Kunde ff46bb069b
update docker base images and UI dependencies (#1302)
* update docker base images and UI dependencies
* use latest compliant base image
2021-01-13 10:40:55 +01:00
Felix Kunde 2eac36d003
update year in generated code and maintainer info in Dockerfiles (#1298)
* update year in generated code and maintainer info in Dockerfiles

* minor update in admin docs
2021-01-08 17:07:28 +01:00
Tom Stewart f6c51abff6
update depreciated MAINTAINER field (#1276) 2021-01-04 11:52:08 +01:00
Felix Kunde 102178409b
bump tp v1.6.0 (#1265)
* bump tp v1.6.0
* update logical-backup image
* Using smaller image for e2e test.
* fix env var name in docs
* add postgresql-client-13 to logical backup image

Co-authored-by: Jan Mussler <janm81@gmail.com>
2020-12-18 13:10:35 +01:00
Pavel Tumik fbd04896c2
Add ability to upload logical backup to gcs (#1173)
Support logical backup provider/storage S3 and GCS equivalent
2020-12-16 10:41:08 +01:00
Jan Mussler 7f7beba66b
Improving e2e more (#1185)
* Add curl to operator image.

* Wait for idle operator in delete.
2020-10-29 13:59:22 +01:00
Dmitry Dolgov 9dfa433363
Connection pooler (#799)
Connection pooler support

Add support for a connection pooler. The idea is to make it generic enough to
be able to switch between different implementations (e.g. pgbouncer or
odyssey). Operator needs to create a deployment with pooler and a service for
it to access.

For connection pool to work properly, a database needs to be prepared by
operator, namely a separate user have to be created with an access to an
installed lookup function (to fetch credential for other users).

This setups is supposed to be used only by robot/application users. Usually a
connection pool implementation is more CPU bounded, so it makes sense to create
several pods for connection pool with more emphasize on cpu resources. At the
moment there are no special affinity or tolerations assigned to bring those
pods closer to the database. For availability purposes minimal number of
connection pool pods is 2, ideally they have to be distributed between
different nodes/AZ, but it's not enforced in the operator itself. Available
configuration supposed to be ergonomic and in the normal case require minimum
changes to a manifest to enable connection pool. To have more control over the
configuration and functionality on the pool side one can customize the
corresponding docker image.

Co-authored-by: Felix Kunde <felix-kunde@gmx.de>
2020-03-25 12:57:26 +01:00
Vito Botta a660d758a5 Add region setting for logical backups to non-AWS storage (#813)
* Add region setting for logical backups to non-AWS storage
2020-02-10 11:48:24 +01:00
Felix Kunde e6ce00050f
reduce tracing of dumps and include Pg12 (#791) 2020-01-13 18:23:04 +01:00
Frederik Wagner 7037974d48 fix s3 bucket endpoint/sse configuration in logical backup dump.sh (#750) 2019-12-04 17:47:05 +01:00
Armin Nesiren 5f87384d7f Passing endpoint, access and secret key to logical-backup container (#628)
* Added possibility to add custom annotations to LoadBalancer service.

* Added parameters for custom endpoint, access and secret key for logical backup.

* Modified dump.sh so it knows how to handle new features. Configurable S3 SSE
2019-11-26 10:40:49 +01:00
Felix Kunde f9487e41c1 inject cluster name label into logical backup pod (#725)
* inject cluster name label into logical backup pod
2019-11-20 13:58:41 +01:00
Felix Kunde bb855fd9bc
fetch cluster_name_label from configuration (#684) 2019-10-11 16:07:13 +02:00
Felix Kunde 2c3c7fd244
query namespaced K8s API in logical backup script (#623) 2019-07-18 14:00:30 +02:00
Felix Kunde 4fc5822b24
Update docs for v1.2 (#609)
* update docs and move parts from README to index.md
* fix typos, headings and code alignment in docs
2019-07-11 17:19:27 +02:00
Erik Inge Bolsø 028b834ea6 postgres-operator deployment template: run operator as non-root, and with readonly filesystem (#582) 2019-06-14 15:47:08 +02:00
Sergey Dudoladov 3ffc8ac5fa
Sample logical backup image. (#572)
* Sample logical backup image.

Based on the earlier work by Dmitry Dolgov @erthalion
2019-05-31 15:51:58 +02:00
Dmitry Dolgov dcf637d4ea Fix typo in port (#219) 2018-02-02 15:51:26 +01:00
Dmitrii Dolgov bf7df5d5b5 Add debug mode
You can specify an environment variable DEBUG 1/0 to enable/disable
debug mode. Debug mode assumes delve dependency for remote debugging,
and debugging symbols for go build.
2018-02-02 10:39:39 +01:00
Murat Kabilov ae77fa15e8 Pod Rolling update
introduce Pod events channel;
add parsing of the MaintenanceWindows section;
skip deleting Etcd key on cluster delete;
use external etcd host;
watch for tpr/pods in the namespace of the operator pod only;
2017-05-12 11:41:25 +02:00
Murat Kabilov 6e2d64bd50 Create human users from teams api 2017-05-12 11:37:09 +02:00
Murat Kabilov 75e6bfa55c makefile improvements 2017-05-12 11:37:07 +02:00
Oleksandr Shulgin 7974dc8c4e Move Dockerfile to a subdir for smaller build context 2017-05-12 11:36:22 +02:00