From 6d792e9f1d344b523b58bd6433ff03d8104fbc82 Mon Sep 17 00:00:00 2001 From: Thomas Sapelza Date: Thu, 29 Jan 2026 10:13:20 +0100 Subject: [PATCH 1/3] support K8s Pod affinity configuration for Pod scheduling --- operator/src/main/kubernetes/kubernetes.yml | 9 +++++++++ operator/src/main/resources/application.yml | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 operator/src/main/kubernetes/kubernetes.yml diff --git a/operator/src/main/kubernetes/kubernetes.yml b/operator/src/main/kubernetes/kubernetes.yml new file mode 100644 index 0000000..74ac1e1 --- /dev/null +++ b/operator/src/main/kubernetes/kubernetes.yml @@ -0,0 +1,9 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgresql-operator +spec: + template: + spec: + affinity: {} diff --git a/operator/src/main/resources/application.yml b/operator/src/main/resources/application.yml index 9a2bf85..bc29033 100644 --- a/operator/src/main/resources/application.yml +++ b/operator/src/main/resources/application.yml @@ -103,6 +103,12 @@ quarkus: value: ${quarkus.kubernetes.image-pull-secrets[0]} paths: - (kind == Deployment).spec.template.spec.imagePullSecrets[0].name + description: Kubernetes image pull secret to use if the OCI image is hosted on a private registry + affinity: + property: affinity + value-as-map: {} + path: (kind == Deployment).spec.template.spec.affinity + description: Kubernetes affinity configuration for Pod scheduling expressions: release-name-labels: expression: "{{ .Release.Name }}" @@ -116,6 +122,9 @@ quarkus: release-name-deployment-labels: expression: "{{ .Release.Name }}" path: (kind == Deployment).spec.template.metadata.labels.'app.kubernetes.io/name' + affinity: + expression: "{{- toYaml (.Values.app.affinity | default dict) | nindent 8 }}" + path: (kind == Deployment).spec.template.spec.affinity kubernetes: name: postgresql-operator version: ${quarkus.application.version} From 37c3aa922dd08e2f4cc87961f7a5f60516a575f0 Mon Sep 17 00:00:00 2001 From: Thomas Sapelza Date: Thu, 29 Jan 2026 11:16:28 +0100 Subject: [PATCH 2/3] also add the LICENSE notice to the generated Helm chart --- operator/src/main/helm/LICENSE | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 operator/src/main/helm/LICENSE diff --git a/operator/src/main/helm/LICENSE b/operator/src/main/helm/LICENSE new file mode 100644 index 0000000..21586f5 --- /dev/null +++ b/operator/src/main/helm/LICENSE @@ -0,0 +1,7 @@ +Copyright About Bits 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 in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. From a57be6f8044abd95495f2805257b7abe55d5fc63 Mon Sep 17 00:00:00 2001 From: Thomas Sapelza Date: Thu, 29 Jan 2026 11:36:16 +0100 Subject: [PATCH 3/3] fix company name in file LICENSE --- LICENSE | 2 +- operator/src/main/helm/LICENSE | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 21586f5..06d70fb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright About Bits GmbH +Copyright AboutBits 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 in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/operator/src/main/helm/LICENSE b/operator/src/main/helm/LICENSE index 21586f5..06d70fb 100644 --- a/operator/src/main/helm/LICENSE +++ b/operator/src/main/helm/LICENSE @@ -1,4 +1,4 @@ -Copyright About Bits GmbH +Copyright AboutBits 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 in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: