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

[Feature] Make HttpPutResponseHopLimit configurable #7665

Open
nikita-b opened this issue Mar 19, 2024 · 4 comments
Open

[Feature] Make HttpPutResponseHopLimit configurable #7665

nikita-b opened this issue Mar 19, 2024 · 4 comments
Labels
kind/feature New feature or request priority/important-longterm Important over the long term, but may not be currently staffed and/or may require multiple releases

Comments

@nikita-b
Copy link

What feature/behavior/change do you want?

We need to have HttpPutResponseHopLimit == 3

Why do you want this feature?

We use DIND in our Kubernetes cluster (it's cluster for Gitlab agents) and we can't disable IMDSv1 because hop from DIND container is 3

@nikita-b nikita-b added the kind/feature New feature or request label Mar 19, 2024
Copy link
Contributor

Hello nikita-b 👋 Thank you for opening an issue in eksctl project. The team will review the issue and aim to respond within 1-5 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

@TiberiuGC
Copy link
Collaborator

TiberiuGC commented Mar 20, 2024

Hi @nikita-b , may I ask a couple questions for clarification:

  • are you using self-managed or EKS-managed nodes? For EKS-managed nodes, as a workaround, you can use a custom launch template where you manually configure hop limit to 3.
  • from what I see, eksctl sets hop limit by default to 2, regardless which IMDS version is being used (code snippet below). Do you want to have configurable hop limit just to be able to disable IMDSv1? If so, how does your cluster config look at the moment so that IMDSv1 works with hop limit 2?

func makeMetadataOptions(ng *api.NodeGroupBase) *gfnec2.LaunchTemplate_MetadataOptions {
imdsv2TokensRequired := "optional"
if api.IsEnabled(ng.DisableIMDSv1) || api.IsEnabled(ng.DisablePodIMDS) {
imdsv2TokensRequired = "required"
}
hopLimit := 2
if api.IsEnabled(ng.DisablePodIMDS) {
hopLimit = 1
}
return &gfnec2.LaunchTemplate_MetadataOptions{
HttpPutResponseHopLimit: gfnt.NewInteger(hopLimit),
HttpTokens: gfnt.NewString(imdsv2TokensRequired),
}
}

@nikita-b
Copy link
Author

nikita-b commented Mar 27, 2024

Hello @TiberiuGC,

are you using self-managed or EKS-managed nodes? For EKS-managed nodes, as a workaround, you can use a custom launch template where you manually configure hop limit to 3.

We use self-managed nodes.

from what I see, eksctl sets hop limit by default to 2, regardless which IMDS version is being used (code snippet below). Do you want to have configurable hop limit just to be able to disable IMDSv1? If so, how does your cluster config look at the moment so that IMDSv1 works with hop limit 2?

Nope, I want to have access to AWS metadata from containers that with Docker-in-Docker. Because in this case we have hop == 3 (Container with application network interface -> Container with Docker network interface -> Host network interface).

@CrisNevares
Copy link

+1. I would like to be able to specify the hopLimit in my clusterConfig so I can avoid having to create launch templates prior to creating the cluster just so I can set the hop limit = 2.

@TiberiuGC TiberiuGC added the priority/important-longterm Important over the long term, but may not be currently staffed and/or may require multiple releases label Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request priority/important-longterm Important over the long term, but may not be currently staffed and/or may require multiple releases
Projects
None yet
Development

No branches or pull requests

3 participants