-
Notifications
You must be signed in to change notification settings - Fork 26
feat(charts,modeline,upgrade): operator extension points and dev17 install fixes #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,16 +39,41 @@ machine: | |
| - {{ . }} | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- /* extraKubeletExtraArgs MUST NOT collide with the preset's | ||
| built-in extraConfig keys — yaml.v3 (used by Talos config | ||
| decode and by the upgrade-time body write-back) rejects | ||
| duplicate map keys, so a silent merge would emit a config | ||
| that cannot decode. Fail at render with a precise hint | ||
| naming the offending key; operators wanting a different | ||
| default fork the preset. */ -}} | ||
| {{- range $k, $_ := .Values.extraKubeletExtraArgs }} | ||
| {{- if or (eq $k "cpuManagerPolicy") (eq $k "maxPods") }} | ||
| {{- fail (printf "values.yaml: extraKubeletExtraArgs.%s collides with the cozystack preset's built-in kubelet.extraConfig — keys never override (yaml.v3 rejects duplicate map keys on decode). Remove the entry from extraKubeletExtraArgs, or fork the chart preset if you need a different default." $k) }} | ||
| {{- end }} | ||
| {{- end }} | ||
| extraConfig: | ||
| cpuManagerPolicy: static | ||
| maxPods: 512 | ||
| {{- with .Values.extraKubeletExtraArgs }} | ||
| {{- toYaml . | nindent 6 }} | ||
| {{- end }} | ||
| {{- /* extraSysctls MUST NOT collide with the preset's built-in | ||
| sysctls; same rationale as extraKubeletExtraArgs. */ -}} | ||
| {{- range $k, $_ := .Values.extraSysctls }} | ||
| {{- if or (eq $k "vm.nr_hugepages") (eq $k "net.ipv4.neigh.default.gc_thresh1") (eq $k "net.ipv4.neigh.default.gc_thresh2") (eq $k "net.ipv4.neigh.default.gc_thresh3") }} | ||
| {{- fail (printf "values.yaml: extraSysctls.%s collides with the cozystack preset's built-in machine.sysctls — keys never override (yaml.v3 rejects duplicate map keys on decode). Remove the entry from extraSysctls, or fork the chart preset if you need a different default." $k) }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
Comment on lines
+62
to
+66
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the |
||
| sysctls: | ||
| {{- with $.Values.nr_hugepages }} | ||
| vm.nr_hugepages: {{ . | quote }} | ||
| {{- end }} | ||
| net.ipv4.neigh.default.gc_thresh1: "4096" | ||
| net.ipv4.neigh.default.gc_thresh2: "8192" | ||
| net.ipv4.neigh.default.gc_thresh3: "16384" | ||
| {{- with .Values.extraSysctls }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| kernel: | ||
| modules: | ||
| - name: openvswitch | ||
|
|
@@ -59,6 +84,9 @@ machine: | |
| - name: spl | ||
| - name: vfio_pci | ||
| - name: vfio_iommu_type1 | ||
| {{- with .Values.extraKernelModules }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| certSANs: | ||
| - 127.0.0.1 | ||
| {{- with .Values.certSANs }} | ||
|
|
@@ -84,6 +112,9 @@ machine: | |
| devices { | ||
| global_filter = [ "r|^/dev/drbd.*|", "r|^/dev/dm-.*|", "r|^/dev/zd.*|" ] | ||
| } | ||
| {{- with .Values.extraMachineFiles }} | ||
| {{- toYaml . | nindent 2 }} | ||
| {{- end }} | ||
| install: | ||
| {{- with .Values.image }} | ||
| image: {{ . }} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better readability and maintainability, you could define a list of the built-in keys and use the
hasfunction to check for collisions. This avoids a longorchain and makes it easier to manage the list of keys.