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

Use separate cloud.config file for in-tree vs out-of-tree components #12435

Merged
merged 3 commits into from
Sep 30, 2021

Conversation

rifelpet
Copy link
Member

@rifelpet rifelpet commented Sep 28, 2021

Seeing if this fixes kubernetes/cloud-provider#51

My thinking is that if we dont provide a --cloud-config, apiserver's PV admission plugin will not be enabled (or will be a no-op) and instead the EBS CSI Driver controller will provide the equivalent labels on PVs.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 28, 2021
@rifelpet
Copy link
Member Author

/test pull-kops-e2e-ipv6-ci

@rifelpet
Copy link
Member Author

rifelpet commented Sep 28, 2021

(oops wrong one)
/test pull-kops-e2e-aws-cloud-controller-manager

EDIT: sorry I was getting mixed up. the ipv6-ci job is the relevant job for this issue because the issue occurs when NodeIPFamilies is set in the cloud.config file.

@olemarkus
Copy link
Member

The errors you are seeing there are expected, I think. We see those in periodics as well.

@rifelpet
Copy link
Member Author

Do you think the correct behavior is to not set apiserver's --cloud-config when --cloud-provider == external? I'm having a hard time finding documentation that mentions what these values should be exactly.

@hakman
Copy link
Member

hakman commented Sep 29, 2021

The failures for pull-kops-e2e-ipv6-ci are quite more compared to the periodic test:
https://testgrid.k8s.io/kops-ipv6#kops-grid-scenario-ipv6-calico

Not sure how well this is documented, but we should find someone to chat with, because our change to CCM is not very compatible with the tests:

can't store data at section "global", variable "NodeIPFamilies"

@hakman hakman reopened this Sep 29, 2021
@olemarkus
Copy link
Member

As mentioned on slack, all cloud provider config we provide specifically targets external CCMs and are not used by the other components. So I think we should not set this on the other components. That API server even tries to read this when CCM is external is probably a bug.

@rifelpet
Copy link
Member Author

@rifelpet
Copy link
Member Author

trying again to confirm the volume tests pass when --cloud-config isnt set:

/test pull-kops-e2e-ipv6-ci

@hakman
Copy link
Member

hakman commented Sep 29, 2021

Much better now :)

@rifelpet
Copy link
Member Author

Agreed. I'm testing the removal of the admission plugin altogether given that it shouldn't be able to function without in-tree cloud provider code and --cloud-config.

/test pull-kops-e2e-ipv6-ci

@hakman
Copy link
Member

hakman commented Sep 29, 2021

I may be wrong, but looks like less tests are failing compared to periodic ones.

@rifelpet
Copy link
Member Author

Yes I think we should proceed with both removing --cloud-config and the admission plugin when using external CCM but I'm going to double check in the sig-cloud-provider meeting today

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 30, 2021
@rifelpet
Copy link
Member Author

/test pull-kops-e2e-ipv6-ci

@rifelpet
Copy link
Member Author

/test pull-kops-e2e-ipv6-ci

@rifelpet
Copy link
Member Author

The suggestion from the sig-cloud-provider meeting today was to use separate cloud.config files for in-tree vs out-of-tree components. This way we keep the PV Label admission plugin enabled until CCMs have webhook support (kubernetes/enhancements#2928 KEP slated for alpha in 1.23, plus implementation lag for each provider) and we don't have to rely on any upstream in-tree changes being made.

I updated this PR to create a separate in-tree.cloud.config file that is used by kube-apiserver, kube-controller-manager, and kubelet, keeping the original cloud.config file for use by any external CCM pods.

I'm open to supporting this logic a different way (conditionally creating the second file only if using an external CCM, or only on AWS since that is the only provider experiencing this issue so far, or only on AWS and IPv6, etc.) I figured using a different filename for in-tree sets us up for long-term use of the original cloud.config filename once in-tree is fully removed.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 30, 2021
@olemarkus
Copy link
Member

At some point we may move the external cloudconfig file to the individual CCMs. I suspect CCMs will stop using the generic CCMs at some point too and rather rely on configmaps or CRDs.

The current implementation here looks good to me.

@olemarkus
Copy link
Member

/test pull-kops-e2e-ipv6-ci

Copy link
Member

@hakman hakman left a comment

Choose a reason for hiding this comment

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

Looks ok to me too, except for the name. Either we should go with 'external.cloud.config' for the other or switch to 'in-tree-cloud.config' to avoid creating a new file extension.
But just a nit and I don't mind if we keep it as is.
/lgtm

nodeup/pkg/model/cloudconfig.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Sep 30, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 30, 2021
@rifelpet
Copy link
Member Author

/test pull-kops-e2e-ipv6-ci

@k8s-ci-robot
Copy link
Contributor

@rifelpet: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kops-e2e-ipv6-ci 1f6e3ea link true /test pull-kops-e2e-ipv6-ci

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@rifelpet rifelpet marked this pull request as ready for review September 30, 2021 14:10
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 30, 2021
@rifelpet rifelpet changed the title Don't set apiserver's --cloud-config when using external CCM Use separate cloud.config file for in-tree vs out-of-tree components Sep 30, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

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 Sep 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 0acebaf into kubernetes:master Sep 30, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Sep 30, 2021
k8s-ci-robot added a commit that referenced this pull request Sep 30, 2021
…35-origin-release-1.22

Automated cherry pick of #12435: Use separate cloud.config files for in-tree vs
@hakman
Copy link
Member

hakman commented Oct 2, 2021

For reference --node-ip=:: fixes the test because of kubernetes/kubernetes#103307.

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/nodeup cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/office-hours lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PV Admission breaks when external provider's CloudConfig diverges
4 participants