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

kube-proxy-configuration in kubeadmconfigspec breaks flatcar build #138

Open
heytrav opened this issue Oct 9, 2023 · 1 comment
Open

Comments

@heytrav
Copy link
Contributor

heytrav commented Oct 9, 2023

Following #130 I am attempting to setup a Flatcar cluster which requires overriding some of specs created by this helm chart.

Based on the flatcar template I need to add the following to the controlPlane.kubeadmConfigSpec:

    preKubeadmCommands:
      - export COREOS_OPENSTACK_HOSTNAME=${COREOS_OPENSTACK_HOSTNAME%.*}
      - envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp
      - mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml

However, when I build a cluster with the helm chart, the KubeadmControlPlane always ends up with:

    preKubeadmCommands:
      - export COREOS_OPENSTACK_HOSTNAME=${COREOS_OPENSTACK_HOSTNAME%.*}
      - envsubst < /etc/kubeadm.yml > /etc/kubeadm.yml.tmp
      - mv /etc/kubeadm.yml.tmp /etc/kubeadm.yml
      - cat /run/kubeadm/kube-proxy-configuration.yaml >> /run/kubeadm/kubeadm.yaml

On Flatcar, the kubeadm.yml file is at /etc/kubeadm.yml. The folder /run/kubeadm does not exist and the last line that is added in preKubeadmCommands is causing kubeadm.service to fail with the following error:

core@trav-fc-refactor-33-control-plane-338a2e2b-bwwcc ~ $ systemctl status kubeadm.service
× kubeadm.service - kubeadm
     Loaded: loaded (/etc/systemd/system/kubeadm.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/kubeadm.service.d
             └─10-flatcar.conf
     Active: failed (Result: exit-code) since Mon 2023-10-09 19:37:05 UTC; 19s ago
    Process: 1277 ExecStart=/etc/kubeadm.sh (code=exited, status=1/FAILURE)
   Main PID: 1277 (code=exited, status=1/FAILURE)
        CPU: 9ms

Oct 09 19:37:05 trav-fc-refactor-33-control-plane-338a2e2b-bwwcc.novalocal systemd[1]: Starting kubeadm.service...
Oct 09 19:37:05 trav-fc-refactor-33-control-plane-338a2e2b-bwwcc.novalocal kubeadm.sh[1280]: /etc/kubeadm.sh: line 7: /run/kubeadm/kubeadm.yaml: No such file or directory
Oct 09 19:37:05 trav-fc-refactor-33-control-plane-338a2e2b-bwwcc.novalocal systemd[1]: kubeadm.service: Main process exited, code=exited, status=1/FAILURE
Oct 09 19:37:05 trav-fc-refactor-33-control-plane-338a2e2b-bwwcc.novalocal systemd[1]: kubeadm.service: Failed with result 'exit-code'.
Oct 09 19:37:05 trav-fc-refactor-33-control-plane-338a2e2b-bwwcc.novalocal systemd[1]: Failed to start kubeadm.service.

In the current iteration of #53 I had a conditional to prevent the following line from being added when ignitionBasedOS: true.

      - cat /run/kubeadm/kube-proxy-configuration.yaml >> /run/kubeadm/kubeadm.yaml

Currently I do not see a way to prevent this from being added just by overriding with my own values.yaml.

My question is: How do I override this to prevent this from being added to preKubeadmCommands:?

@heytrav heytrav changed the title Add way to make kube-proxy-configuration setup optional kube-proxy-configuration in kubeadmconfigspec breaks flatcar build Oct 9, 2023
@heytrav
Copy link
Contributor Author

heytrav commented Oct 10, 2023

my controlplane and nodegroup config: https://gist.github.com/heytrav/cb4ee4c60046b8d782ed9a56890ea3e7

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

1 participant