Skip to content

Commit 70231be

Browse files
authored
Support K8s Pod affinity configuration for Pod scheduling (#12)
* support K8s Pod affinity configuration for Pod scheduling * also add the LICENSE notice to the generated Helm chart * fix company name in file LICENSE
1 parent a16c790 commit 70231be

4 files changed

Lines changed: 26 additions & 1 deletion

File tree

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright About Bits GmbH
1+
Copyright AboutBits GmbH
22

33
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:
44

operator/src/main/helm/LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright AboutBits GmbH
2+
3+
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:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
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.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: postgresql-operator
6+
spec:
7+
template:
8+
spec:
9+
affinity: {}

operator/src/main/resources/application.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,12 @@ quarkus:
103103
value: ${quarkus.kubernetes.image-pull-secrets[0]}
104104
paths:
105105
- (kind == Deployment).spec.template.spec.imagePullSecrets[0].name
106+
description: Kubernetes image pull secret to use if the OCI image is hosted on a private registry
107+
affinity:
108+
property: affinity
109+
value-as-map: {}
110+
path: (kind == Deployment).spec.template.spec.affinity
111+
description: Kubernetes affinity configuration for Pod scheduling
106112
expressions:
107113
release-name-labels:
108114
expression: "{{ .Release.Name }}"
@@ -116,6 +122,9 @@ quarkus:
116122
release-name-deployment-labels:
117123
expression: "{{ .Release.Name }}"
118124
path: (kind == Deployment).spec.template.metadata.labels.'app.kubernetes.io/name'
125+
affinity:
126+
expression: "{{- toYaml (.Values.app.affinity | default dict) | nindent 8 }}"
127+
path: (kind == Deployment).spec.template.spec.affinity
119128
kubernetes:
120129
name: postgresql-operator
121130
version: ${quarkus.application.version}

0 commit comments

Comments
 (0)