Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
1 change: 1 addition & 0 deletions operator/src/main/kubernetes/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ spec:
template:
spec:
affinity: {}
imagePullSecrets: [{}]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Doesn’t this cause a Kubernetes validation issue? It renders the following in the Helm chart:

imagePullSecrets:
  - {}

Each imagePullSecrets entry is supposed to have a name property.

You could either:

  • Remove the field entirely if no secrets are needed.
  • Use an empty array as a placeholder

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.

I did not manage to fix the generated values.yaml file to not generate

app:
  imagePullSecrets:
    - {}

but I wrote a test that validates that this indeed works with the Kubernetes (at least with v1.34) API.

For K3s I can't select v1.35 yet.

In a follow-up PR I would like to add a CI test matrix that tests the operator against a range of still supported K8s versions.
It should build the image before the test matrix (without publishing it yet) and then install the Helm chart and validate that the deployment is up and running.

14 changes: 6 additions & 8 deletions operator/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ quarkus:
value: IfNotPresent
paths:
- (kind == Deployment).spec.template.spec.containers.(name == ${quarkus.kubernetes.name}).imagePullPolicy
image-pull-secrets:
property: imagePullSecrets
value-as-list: []
paths:
- (kind == Deployment).spec.template.spec.imagePullSecrets
description: Kubernetes image pull secrets to use if the OCI image is hosted on a private registry
resource-requests-cpu:
property: resources.requests.cpu
value: ${quarkus.kubernetes.resources.requests.cpu}
Expand All @@ -99,12 +105,6 @@ quarkus:
value: ${quarkus.kubernetes.resources.limits.memory}
paths:
- (kind == Deployment).spec.template.spec.containers.(name == ${quarkus.kubernetes.name}).resources.limits.memory
image-pull-secret:
property: imagePullSecret
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: {}
Expand Down Expand Up @@ -149,8 +149,6 @@ quarkus:
version: ${quarkus.application.version}
add-version-to-label-selectors: false
image-pull-policy: IfNotPresent
image-pull-secrets:
- github-container-registry
replicas: 1
annotations:
"app.kubernetes.io/version": ${quarkus.application.version}
Expand Down