templates: add apiserver-url.env file#2232
templates: add apiserver-url.env file#2232openshift-merge-robot merged 1 commit intoopenshift:masterfrom squeed:apiserver-url-env-file
Conversation
|
Nice, CI seems basically green. |
There was a problem hiding this comment.
For things like the binaries extracted to the host? Or code running in a container? Both?
There was a problem hiding this comment.
The motivating use case is the CNO, which is in a container (and thus bind-mounts it), but I suspect we'll find a few more uses for it.
There was a problem hiding this comment.
Maybe we should add something like a "MCO internals" package that things like the SDN could vendor in that would have this as a constant.
There was a problem hiding this comment.
oh, that's a decent idea - as long as it won't annoy go mod.
There was a problem hiding this comment.
That said, this path is certainly not changeable, so parameterizing it isn't really useful.
Up to you.
A few components need to know the URL of the internal apiserver load balancer. Most notably, the network operator does. Right now, the only way to get this is to parse the kubelet's kubeconfig, but this is fragile. So, write down an environment file that just sets the "usual" service environment variables. Then we can just seamlessly souce the environment file.
|
@cgwalters I updated to add a |
| package constants | ||
|
|
||
| // constants defines some file paths that are shared outside of the | ||
| // MCO package; and thus consumed by other users |
There was a problem hiding this comment.
Thanks! This should help us in the future in doing things like searching across the OpenShift repos to see which other projects are using bits from the MCO.
|
/retest |
|
@cgwalters could I get a lgtm again? |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, squeed The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@squeed: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Azure node controller needs to know the URL of the internal apiserver load balancer. To do it, this commit creates an environment file with required env variables, that can be consumed by the controller. This approach is similar to what we do on master nodes: openshift#2232
A few components need to know the URL of the internal apiserver load balancer. Most notably, the network operator does.
Right now, the only way to get this is to parse the kubelet's kubeconfig, but this is fragile. So, write down an environment file that just sets the "usual" service environment variables. Then we can just seamlessly source the environment file.
Ref: SDN-1347