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

Set kubeconfig volume path for kube-vip static pod based on OS #7396

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

abhay-krishna
Copy link
Member

@abhay-krishna abhay-krishna commented Jan 27, 2024

For Bottlerocket, the admin kubeconfig volume path is /var/lib/kubeadm/admin.conf, but in our templates, this field is set as /etc/kubernetes/admin.conf for all OS families. During cluster creation, the CAPI kubeadm bootstrap controller patches the kube-vip static pod manifest to change it to the correct hostPath value for Bottlerocket. Instead of doing that, we could set it to the correct path ourselves since we know the OS at the time of cluster creation itself. This migration will help when we make the kubeconfig path dynamic based on the Kubernetes version in #7368.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 27, 2024
@@ -296,7 +296,11 @@ spec:
hostNetwork: true
volumes:
- hostPath:
{{- if (eq .format "bottlerocket") }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we weren't doing br in baremetal anymore?

Copy link
Member Author

@abhay-krishna abhay-krishna Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't be doing it for Kubernetes 1.29 onwards. This is just for the existing Kubernetes versions. I am going to remove this hardcoded value so that we can control the path from EKS-A provider templates. So we need this change across all providers to maintain the current behavior.

Copy link
Member

@abhinavmpandey08 abhinavmpandey08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/woof
/approve

@eks-distro-bot
Copy link
Collaborator

@abhinavmpandey08: dog image

In response to this:

/lgtm
/woof
/approve

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@abhay-krishna
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhay-krishna, abhinavmpandey08

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhay-krishna,abhinavmpandey08]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot merged commit 5b38312 into aws:main Jan 29, 2024
10 checks passed
@abhay-krishna abhay-krishna deleted the kube-vip-hostpath branch March 6, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants