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

Added env variable for cloud-provider #106241

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

jdnurme
Copy link
Contributor

@jdnurme jdnurme commented Nov 9, 2021

What type of PR is this?

/kind feature

What this PR does / why we need it:

This allows the cloud provider to be specified as an environment variable in preparation for cloud provider extraction.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 9, 2021
@k8s-ci-robot
Copy link
Contributor

@jdnurme: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions 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.

@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Nov 9, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @jdnurme. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions 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.

@k8s-ci-robot k8s-ci-robot added area/provider/gcp Issues or PRs related to gcp provider sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Nov 9, 2021
@zouyee
Copy link
Member

zouyee commented Nov 9, 2021

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 9, 2021
@SergeyKanzhelev
Copy link
Member

I don't know the history here, can you please take a look whether KUBERNETES_PROVIDER does the same and maybe needs to be aligned. Also I noticed this env var already used in some places. Just want to make sure there are not conflicts or such. lgtm otherwise

@cheftako
Copy link
Member

I don't know the history here, can you please take a look whether KUBERNETES_PROVIDER does the same and maybe needs to be aligned. Also I noticed this env var already used in some places. Just want to make sure there are not conflicts or such. lgtm otherwise

I believe @jdnurme is trying to have a flag which only controls the cloud-provider flag passed in to Kubelet/KCM/KAS so that we can test the relevant feature gate. (

DisableCloudProviders featuregate.Feature = "DisableCloudProviders"
)

@jdnurme
Copy link
Contributor Author

jdnurme commented Nov 11, 2021

I don't know the history here, can you please take a look whether KUBERNETES_PROVIDER does the same and maybe needs to be aligned. Also I noticed this env var already used in some places. Just want to make sure there are not conflicts or such. lgtm otherwise

I believe @jdnurme is trying to have a flag which only controls the cloud-provider flag passed in to Kubelet/KCM/KAS so that we can test the relevant feature gate. (

DisableCloudProviders featuregate.Feature = "DisableCloudProviders"

)

Correct, this flag is intended for testing with cloud providers disabled.

@SergeyKanzhelev
Copy link
Member

yes, I understand this. I see that some scripts are using KUBERNETES_PROVIDER for the same purpose, thus the question on whether any of them cross-called. I didn't look seep.

Also I see this:

local -r cloud_provider="${KUBERNETES_PROVIDER}"
and wonder if there may be any confusions with the name of local var and env var.

Again, I didn't see any red flags, just want to make sure we reuse things or clean up if there is a chance.

@jdnurme
Copy link
Contributor Author

jdnurme commented Nov 11, 2021

yes, I understand this. I see that some scripts are using KUBERNETES_PROVIDER for the same purpose, thus the question on whether any of them cross-called. I didn't look seep.

Also I see this:

local -r cloud_provider="${KUBERNETES_PROVIDER}"

and wonder if there may be any confusions with the name of local var and env var.
Again, I didn't see any red flags, just want to make sure we reuse things or clean up if there is a chance.

I believe that is slightly different, simply because the KUBERNETES_PROVIDER variable seems to be specific to kubernetes platforms. In that link i see "gke" as the value being replaced. Cloud provider is non-specific to whether or not the platform is integrated with kubernetes. In this instance it's replacing "gce". I'm not confident these can be used interchangeably so I think the safest option is to keep "CLOUD_PROVIDER" as separate. In my tests, I am running against GCE, not GKE.

Copy link
Member

@SergeyKanzhelev SergeyKanzhelev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 12, 2021
@SergeyKanzhelev
Copy link
Member

/triage acceptes
/priority important-soon

@k8s-ci-robot k8s-ci-robot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Nov 12, 2021
@k8s-ci-robot
Copy link
Contributor

@SergeyKanzhelev: The label(s) triage/acceptes cannot be applied, because the repository doesn't have them.

In response to this:

/triage acceptes
/priority important-soon

Instructions 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.

@k8s-ci-robot k8s-ci-robot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Nov 12, 2021
@jdnurme
Copy link
Contributor Author

jdnurme commented Nov 12, 2021

/assign yujuhong


# CLOUD_PROVIDER defines the cloud-provider value presented to KCM, apiserver,
# and kubelet
export CLOUD_PROVIDER="${CLOUD_PROVIDER:-gce}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CLOUD_PROVIDER variable is already used here. I would suggest switching this to something like CLOUD_PROVIDER_FLAG. Its more descriptive and not yet used.

@dims
Copy link
Member

dims commented Jan 6, 2022

@jdnurme please see one pending comment from @cheftako #106241 (comment)

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2022
@cheftako
Copy link
Member

cheftako commented Feb 7, 2022

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 7, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheftako, jdnurme, SergeyKanzhelev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 7, 2022
@k8s-triage-robot
Copy link

The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass.

This bot retests PRs for certain kubernetes repos according to the following rules:

  • The PR does have any do-not-merge/* labels
  • The PR does not have the needs-ok-to-test label
  • The PR is mergeable (does not have a needs-rebase label)
  • The PR is approved (has cncf-cla: yes, lgtm, approved labels)
  • The PR is failing tests required for merge

You can:

/retest

@k8s-ci-robot k8s-ci-robot merged commit 7bffb3b into kubernetes:master Feb 8, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/provider/gcp Issues or PRs related to gcp provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants