Skip to content
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

Allow extraManifests to be specified #1495

Merged
merged 2 commits into from
May 28, 2024

Conversation

wasurerarenai
Copy link
Contributor

Talos v1.7 now requires ExtensionServiceConfig's defined for configuring System Extensions (ex. nut-config). Talhelper added support for these in budimanjojo/talhelper#431, but including these in config.yaml looks like it could get pretty messy.

The node.extraManifests object supports including external files and works for including these needed configs. This patch adds parsing of the bootstrap_node_inventory[].manifests key to allow these to be included.

Example config.yaml

bootstrap_node_inventory:
  - name: node1
...
    manifests:
      - manifests/nut-config.yaml

Results in:

$ talhelper genconfig -dn
...
+++ b/.../home-kubernetes-node1.yaml
...
   allowSchedulingOnControlPlanes: true
+---
+apiVersion: v1alpha1
+kind: ExtensionServiceConfig
+name: nut-client
+configFiles:
+  - content: |-
+        MONITOR ${upsmonUpsName}@${upsmonHost}:${upsmonPort} 1 ${upsmonUser} ${upsmonPasswd} slave                                                                                                              +        SHUTDOWNCMD "/sbin/poweroff"
+    mountPath: /usr/local/etc/nut/upsmon.conf

with the manifests/nut-config.yaml content of:

apiVersion: v1alpha1
kind: ExtensionServiceConfig
name: nut-client
configFiles:
  - content: |-
        MONITOR ${upsmonUpsName}@${upsmonHost}:${upsmonPort} 1 ${upsmonUser} ${upsmonPasswd} slave
        SHUTDOWNCMD "/sbin/poweroff"
    mountPath: /usr/local/etc/nut/upsmon.conf

Allow extraManifests to be specified.
Allow extraManifests to be specified.
@github-actions github-actions bot added the area/bootstrap Changes made in the bootstrap directory label May 28, 2024
@onedr0p onedr0p merged commit 10118c2 into onedr0p:main May 28, 2024
2 checks passed
@wasurerarenai wasurerarenai deleted the wasurerarenai-patch-1 branch May 28, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bootstrap Changes made in the bootstrap directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants