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

failed to generate talos config: missing kind #68

Closed
mdallaire opened this issue Dec 1, 2022 · 7 comments
Closed

failed to generate talos config: missing kind #68

mdallaire opened this issue Dec 1, 2022 · 7 comments

Comments

@mdallaire
Copy link

I am reorganizing my talhelper configs by splitting up patches in their dedicated files to be called from the main files but I am getting the following error: failed to generate talos config: missing kind

There is no new configuration done, just moving existing patches to files.

talconfig.yaml

...
  - hostname: k8s-05
    ipAddress: 10.0.20.205
    controlPlane: false
    installDisk: /dev/nvme0n1
    nameservers:
      - 10.0.20.1
    networkInterfaces:
      - interface: eth0
        mtu: 1500
        addresses:
          - 10.0.20.205/24
        routes:
          - network: 0.0.0.0/0
            gateway: 10.0.20.1
    patches:
      - |-
        - op: add
          path: /machine/install/extraKernelArgs
          value:
            - nomodeset
        - "@./intel-ucode-patch.yaml"
...

intel-ucode-patch.yaml

- op: add
  path: /machine/install/extensions
  value:
    - image: ghcr.io/siderolabs/intel-ucode:20221108
@budimanjojo
Copy link
Owner

budimanjojo commented Dec 2, 2022

Hi! The indentation of the line - "@./intel-ucode-patch.yaml is wrong. It needs to be aligned with the first index of nodes.[].patches like this:

    patches:
      - |-
        - op: add
          path: /machine/install/extraKernelArgs
          value:
            - nomodeset
      - "@./intel-ucode-patch.yaml"

@mdallaire
Copy link
Author

Thank you! that was exactly my problem, I had misread the sample config.

@Yan-Solo
Copy link

Hi

I was getting the same error. So now I was trying to use the default config and I'm still getting the same message. Do I hvae to take any other steps?

Thanks!

@budimanjojo
Copy link
Owner

Hi

I was getting the same error. So now I was trying to use the default config and I'm still getting the same message. Do I hvae to take any other steps?

Thanks!

Hi! Can u show me what default config are u using and what version of talhelper you're using?

@Yan-Solo
Copy link

Yan-Solo commented Jan 20, 2023

Hi
I'm trying with v1.5.3 now. I also tried on my laptop which is running 1.5.6-1

❯ talhelper gensecret -f ./talconfig.yaml > talsecret.sops.yaml
2023/01/20 12:09:05 failed to generate secret bundle: missing kind

on ⛵ dwse-test () ~/talhelper on ☁️  (eu-west-1) 
❯ cat talconfig.yaml 
clusterName: home-cluster
talosVersion: v1.0.6
kubernetesVersion: v1.23.6
endpoint: https://192.168.200.10:6443
domain: home-cluster.local
allowSchedulingOnMasters: true
additionalMachineCertSans:
  - 192.168.200.10
additionalApiServerCertSans:
  - home-cluster.local
clusterPodNets:
  - 10.244.0.0/16
clusterSvcNets:
  - 10.96.0.0/12
cniConfig:
  name: custom
  urls:
    - https://raw.githubusercontent.com/bjw-s/home-ops/main/infrastructure/talos/cluster-0/cni/install.yaml
nodes:
  - hostname: kmaster1
    ipAddress: 192.168.200.11
    installDiskSelector:
      size: 4GB
      model: WDC*
      name: /sys/block/sda/device/name
      busPath: /pci0000:00/0000:00:17.0/ata1/host0/target0:0:0/0:0:0:0
    controlPlane: true
    nodeLabels:
      rack: rack1a
      zone: us-east-1a
    disableSearchDomain: true
    kernelModules:
      - name: br_netfilter
        parameters:
          - nf_conntrack_max=131072
    nameservers:
      - 1.1.1.1
      - 8.8.8.8
    networkInterfaces:
      - interface: eth0
        addresses:
          - 192.168.200.12/24
        mtu: 1500
        routes:
          - network: 0.0.0.0/0
            gateway: 192.168.200.1
      - interface: eth1
        dhcp: true
        ignore: true
  - hostname: kworker1
    ipAddress: 192.168.200.13
    controlPlane: false
    installDisk: /dev/sdb
    patches:
      - |-
        machine:
          network:
            interfaces:
              - addresses:
                  - 192.168.200.11/24
                interface: eth1
                routes:
                  - gateway: 192.168.200.1
                  - network: 0.0.0.0/0
controlPlane:
  patches:
    - |-
      - op: add
        path: /machine/kubelet/extraArgs
        value:
          feature-gates: GracefulNodeShutdown=true,MixedProtocolLBService=true
          rotate-server-certificates: "true"
    - "@./extraKernelArgs-patch.yaml"
worker:
  patches:
    - |-
      - op: add
        path: /machine/kubelet/extraArgs
        value:
          feature-gates: GracefulNodeShutdown=false,MixedProtocolLBService=false
          rotate-server-certificates: "true"

on ⛵ dwse-test () ~/talhelper on ☁️  (eu-west-1) 
❯ talhelper --version
talhelper version 1.5.3

@Yan-Solo
Copy link

Hey again, very sorry to waste your time. Thanks for responding so quicly.
With my sleepy head I went for scenario one in the readme while I should have been using scenario 2.

So my issue was purely me failing to read documentation. Thanks for the great tool!

@budimanjojo
Copy link
Owner

@Yan-Solo Great that u solved it. But I want to also point out the error that you received is because you're giving it the wrong file. It shouldn't be talhelper gensecret -f ./talconfig.yaml > talsecret.sops.yaml but talhelper gensecret -f ./clusterconfig/clusterName-nodeName.yaml. Give it the generated talos machine config for it to read secrets from that file.

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

No branches or pull requests

3 participants