Description
Installing the config-server helm chart fails with the following error:
Error: INSTALLATION FAILED: failed to create typed patch object (config-server/config-server; apps/v1, Kind=Deployment):
.spec.template.spec.containers[name="config-server"].resources.javaOpts: field not declared in schema
Root Cause
In helm/config-server/values.yaml, javaOpts is nested inside the resources: block:
resources:
limits:
cpu: 300m
memory: 3000Mi
requests:
cpu: 150m
memory: 1500Mi
javaOpts: >- # ← incorrectly placed here
-XX:+UseZGC ...
The deployment template renders resources via {{ toYaml .Values.resources }}, which dumps javaOpts directly into the Kubernetes container resources: field. Kubernetes only allows limits, requests, and claims under resources — any other key fails schema validation.
Fix
Move javaOpts to a separate top-level additionalResources: key (consistent with other charts in this repo such as idgenerator, ridgenerator, pridgenerator) and render it as a JDK_JAVA_OPTIONS environment variable in deployment.yaml.
values.yaml
resources:
limits:
cpu: 300m
memory: 3000Mi
requests:
cpu: 150m
memory: 1500Mi
additionalResources:
javaOpts: >-
-XX:+UseZGC -XX:+ZGenerational ...
deployment.yaml
env:
- name: JDK_JAVA_OPTIONS
value: {{ .Values.additionalResources.javaOpts }}
Affected Component
helm/config-server/values.yaml
helm/config-server/templates/deployment.yaml
Branch
release-1.3.x
Description
Installing the
config-serverhelm chart fails with the following error:Root Cause
In
helm/config-server/values.yaml,javaOptsis nested inside theresources:block:The deployment template renders
resourcesvia{{ toYaml .Values.resources }}, which dumpsjavaOptsdirectly into the Kubernetes containerresources:field. Kubernetes only allowslimits,requests, andclaimsunderresources— any other key fails schema validation.Fix
Move
javaOptsto a separate top-leveladditionalResources:key (consistent with other charts in this repo such asidgenerator,ridgenerator,pridgenerator) and render it as aJDK_JAVA_OPTIONSenvironment variable indeployment.yaml.values.yaml
deployment.yaml
Affected Component
helm/config-server/values.yamlhelm/config-server/templates/deployment.yamlBranch
release-1.3.x