Comments (3)
@sergey-kalin, I was looking at a proper way to solve this, because like I said earlier it doesn't feel the right solution making calls into AWS control plane from a webhook.
There is a way to add additional node labels from the worker bootstrap script (i.e. /etc/eks/bootstrap.sh). The way you go about this is to use kubelet-extra-args with the bootstrap script.
So you're going to have a little script that would make a curl request into AWS metadata plane to find the zone ID mapping, then create new labels with kubelet-extra-args in the same script. You wrap it all together by running the script from a terraform launch template at EKS cluster creation time:
{
filename = "custom-labels.sh"
content_type = "text/cloud-boothook"
vars = {}
}
from envars-from-node-labels.
@danfromtitan I'm using Java version of aws ec2 describe-availability-zones
actually, just getting all zones visible to container and filtering one needed.
There is same method for Go SDK - https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.DescribeAvailabilityZones
Please mind it requires ec2:DescribeAvailabilityZones
permission granted through e.g. service account
from envars-from-node-labels.
This is a use case on the very edge of the implementation design, mainly because zone IDs are specific to a subscription account, not so much to an EKS node. I understand the usefulness of it though, so I'll add a zone ID label next to the zone name.
What is the API call you're making now to determine the zone ID @sergey-kalin ?
from envars-from-node-labels.
Related Issues (8)
- From another namespace webhook is not triggering HOT 3
- provide a helm chart and docker image for easier webhook deployment HOT 1
- Service went into `CrashLoopBackOff` failing to create a secret HOT 7
- Helm Chart: Multiple namespaces in selector HOT 3
- On pod termination secret envars-* does not exist HOT 2
- Patching breaks pod rollouts
- Patching breaks pod rollouts HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envars-from-node-labels.