Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions operator/src/main/kubernetes/kubernetes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgresql-operator
spec:
template:
spec:
affinity: {}
9 changes: 9 additions & 0 deletions operator/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Comment thread
ThoSap marked this conversation as resolved.
path: (kind == Deployment).spec.template.spec.affinity
description: Kubernetes affinity configuration for Pod scheduling
expressions:
release-name-labels:
expression: "{{ .Release.Name }}"
Expand All @@ -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
Comment on lines +125 to +127
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The affinity configuration is defined twice: once as a property (lines 107-111) and once as an expression (lines 125-127). This duplication could lead to confusion about which configuration takes precedence or how they interact. Consider documenting the relationship between these two definitions or consolidating them if they serve the same purpose.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need both, one for the default value and description in the generated README.md, the other for the newline and indentation of the affinity block.

https://docs.quarkiverse.io/quarkus-helm/dev/

kubernetes:
name: postgresql-operator
version: ${quarkus.application.version}
Expand Down