Skip to content

fix(shopware): omit optional null fields in spec.network and spec.container#270

Open
DeividsP-P wants to merge 2 commits into
shopware:mainfrom
arvato-systems-cxm:fix/null-store-fields
Open

fix(shopware): omit optional null fields in spec.network and spec.container#270
DeividsP-P wants to merge 2 commits into
shopware:mainfrom
arvato-systems-cxm:fix/null-store-fields

Conversation

@DeividsP-P
Copy link
Copy Markdown
Contributor

Fixes null field rendering for optional fields in spec.network and spec.container that cause CRD schema validation failures when the fields are not configured.

Problem

When optional fields are not set, templates render the field key with a null value:

ingressLabels: null
gatewayName: null
imagePullSecrets: null

The Store CRD rejects null values for typed fields, producing errors such as:

spec.network.gatewayName: Invalid value: "null": must be of type string: "null"
spec.network.ingressLabels: Invalid value: "null": must be of type object: "null"
spec.container.imagePullSecrets: Invalid value: "null": must be of type array: "null"

Fix

Move field keys inside {{- with }} guards so the entire field is omitted when not configured.

spec.network: ingressLabels, gatewayName, gatewaySectionName, gatewayNamespace, gatewayAnnotations, gatewayLabels

spec.container: imagePullSecrets, topologySpreadConstraints, nodeSelector, affinity, labels, annotations

DeividsP-P and others added 2 commits May 20, 2026 15:31
…tainer

Move field keys inside {{- with }} guards so fields are omitted entirely
when not configured, rather than rendering as null. This prevents CRD
schema validation failures for typed fields (object, string, array).

Fields fixed in spec.network:
- ingressLabels
- gatewayName
- gatewaySectionName
- gatewayNamespace
- gatewayAnnotations
- gatewayLabels

Fields fixed in spec.container:
- imagePullSecrets
- topologySpreadConstraints
- nodeSelector
- affinity
- labels
- annotations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant