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

Inject CLUSTER_NAME env variable for each NSM appended client #2

Open
denis-tingaikin opened this issue Jul 12, 2022 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@denis-tingaikin
Copy link
Member

denis-tingaikin commented Jul 12, 2022

Description

Currently clientinfo chain element can work with CLUSTER_NAME env https://github.com/networkservicemesh/sdk/blob/main/pkg/tools/clientinfo/clientinfo.go#L30

But we dont use it yet, because k8s at this moment doesn't have an option to get cluster name without any special complex steps.

Solution

  1. Wait when https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/2149-clusterid#property-idk8sio will be able for k8s users.
  2. Add check in cmd-admission-webhook-k8s on do we have a CRD related to k8s about api
  3. Add CLUSTER_NAME env variable into NSC with value from cluster property crd.
@denis-tingaikin
Copy link
Member Author

Controller is in progress https://github.com/kubernetes-sigs/about-api

@edwarnicke This is blocked while about api in progress.

Should we just wait for the about-api release?

@denis-tingaikin denis-tingaikin added the enhancement New feature or request label Jul 12, 2022
@edwarnicke
Copy link
Member

@denis-tingaikin https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/2149-clusterid#property-idk8sio is a CRD. It is either already set when we run our admissions controller, in which case we simply use it's value, or it isn't in which case we should setup the CRD and set it to a value ourselves.

Its not at all clear to me what the https://github.com/kubernetes-sigs/about-api controller would do, or when it would expect to be in GA.

@denis-tingaikin
Copy link
Member Author

denis-tingaikin commented Jul 12, 2022

@denis-tingaikin https://github.com/kubernetes/enhancements/tree/master/keps/sig-multicluster/2149-clusterid#property-idk8sio is a CRD. It is either already set when we run our admissions controller, in which case we simply use it's value, or it isn't in which case we should setup the CRD and set it to a value ourselves.

Yeah, that what we are planning to do when https://github.com/kubernetes-sigs/about-api will be ready.

Currently, as I can see CRD is not ready and is not using in k8s. Correct me if I wrong.

@denis-tingaikin
Copy link
Member Author

@edwarnicke
Copy link
Member

@denis-tingaikin Yes... but what is the controller doing other than adding the CRD? Is there any reason for us not to add the CRD if its not already present?

@denis-tingaikin denis-tingaikin transferred this issue from networkservicemesh/cmd-admission-webhook-k8s Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants