-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Add support for cloud-controller-manager in local-up-cluster.sh #57757
Add support for cloud-controller-manager in local-up-cluster.sh #57757
Conversation
/test pull-kubernetes-unit |
cmd/hyperkube/main.go
Outdated
@@ -36,6 +36,7 @@ func main() { | |||
hk.AddServer(NewKubectlServer()) | |||
hk.AddServer(NewKubeAPIServer()) | |||
hk.AddServer(NewKubeControllerManager()) | |||
hk.AddServer(NewCloudControllerManager()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems already added as 'hk.AddAlphaServer(NewCloudControllerManager())' in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops! bad merge. thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have updated the local-up-cluster.sh too with the "alpha" syntax
5bc3203
to
8a888ef
Compare
/test pull-kubernetes-node-e2e |
hack/local-up-cluster.sh
Outdated
@@ -532,9 +533,16 @@ function start_apiserver { | |||
kube::util::create_client_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" 'client-ca' kube-aggregator system:kube-aggregator system:masters | |||
kube::util::write_client_kubeconfig "${CONTROLPLANE_SUDO}" "${CERT_DIR}" "${ROOT_CA_FILE}" "${API_HOST}" "${API_SECURE_PORT}" kube-aggregator | |||
|
|||
cloud_config="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it won't directly cause an issue, this creates both an uppercase CLOUD_CONFIG
, and a lowercase cloud_config
with very different uses. Makes it less readable/clear. Perhaps "cloud_provider_arg" or something slightly different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks fixed!
8a888ef
to
fef03a9
Compare
hack/local-up-cluster.sh
Outdated
@@ -532,9 +533,16 @@ function start_apiserver { | |||
kube::util::create_client_certkey "${CONTROLPLANE_SUDO}" "${CERT_DIR}" 'client-ca' kube-aggregator system:kube-aggregator system:masters | |||
kube::util::write_client_kubeconfig "${CONTROLPLANE_SUDO}" "${CERT_DIR}" "${ROOT_CA_FILE}" "${API_HOST}" "${API_SECURE_PORT}" kube-aggregator | |||
|
|||
cloud_config_arg="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set the "else" case value here. Saves two lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
hack/local-up-cluster.sh
Outdated
--kubeconfig "$CERT_DIR"/controller.kubeconfig \ | ||
--use-service-account-credentials \ | ||
--controllers="${KUBE_CONTROLLERS}" \ | ||
--master="https://${API_HOST}:${API_SECURE_PORT}" >"${CTLRMGR_LOG}" 2>&1 & | ||
CTLRMGR_PID=$! | ||
|
||
if [[ "${EXTERNAL_CLOUD_PROVIDER:-}" == "true" ]]; then | ||
if [ "${CLOUD_CONFIG}" == "" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if [ -z "${CLOUD_CONFIG}" ]; then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
hack/local-up-cluster.sh
Outdated
--kubeconfig "$CERT_DIR"/controller.kubeconfig \ | ||
--use-service-account-credentials \ | ||
--controllers="${KUBE_CONTROLLERS}" \ | ||
--master="https://${API_HOST}:${API_SECURE_PORT}" >"${CTLRMGR_LOG}" 2>&1 & | ||
CTLRMGR_PID=$! | ||
|
||
if [[ "${EXTERNAL_CLOUD_PROVIDER:-}" == "true" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would prefer to see this in a separate start_cloud_controller_manager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
fef03a9
to
77c7117
Compare
We need an easy way to test the new external cloud provider. So let's keep the existing CLOUD_PROVIDER and CLOUD_CONFIG as-is and add a flag EXTERNAL_CLOUD_PROVIDER to run a separate process.
@k8s-mirror-cluster-lifecycle-pr-reviews do we really want to make changes to |
It's the tool many of us (still) use to test code locally. AFAIK there is no alternative, have not even heard of any discussions around that. Especially, kubeadm is no replacement for this developer-only tool. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dims, sttts Associated issue requirement bypassed by: sttts The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
@dims switch the release-note to a dev-release-note. Ptal. I think this is nothing normal users should have to see. |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue (batch tested with PRs 55910, 57757). If you want to cherry-pick this change to another branch, please follow the instructions here. |
thanks @sttts |
What this PR does / why we need it:
We need an easy way to test the new external cloud provider. So
let's keep the existing CLOUD_PROVIDER and CLOUD_CONFIG as-is and
add a flag EXTERNAL_CLOUD_PROVIDER to run a separate process.
Since we use hyperkube to run controller-manager, let's add support
for cloud-controller-manager as well to support this use case.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
Release note: