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

Feat: Add external OCI cloud controller manager #11378

Conversation

tico88612
Copy link
Member

@tico88612 tico88612 commented Jul 13, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

  • Upgrade OCI cloud controller manager and unify the variable naming.
  • In-tree cloud provider will remove at K8s v1.31. To avoid ambiguity, I suggest v2.27 would be better to remove roles/kubernetes-app/cloud-provider.
  • Unified puts the external cloud controller manager into role/kubernetes-app/external_cloud_controller.

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Add external Oracle cloud infrastructure cloud controller manager

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Jul 13, 2024
@k8s-ci-robot k8s-ci-robot requested review from ErikJiang and mzaian July 13, 2024 07:19
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 13, 2024
@tico88612 tico88612 force-pushed the feat/external-oci-cloud-controller-manager branch from f095ad4 to 466ec5c Compare July 13, 2024 08:28
@yankay
Copy link
Member

yankay commented Jul 15, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 15, 2024
@yankay
Copy link
Member

yankay commented Aug 6, 2024

Thanks @tico88612

The release note maybe
”Add external Oracle cloud infrastructure cloud controller manager “
is better.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tico88612, yankay

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 Aug 6, 2024
@ant31
Copy link
Contributor

ant31 commented Aug 8, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 8, 2024
@tico88612
Copy link
Member Author

/retest-required

@tico88612 tico88612 force-pushed the feat/external-oci-cloud-controller-manager branch from 466ec5c to a94fb0f Compare August 8, 2024 11:52
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 8, 2024
@tico88612 tico88612 force-pushed the feat/external-oci-cloud-controller-manager branch from a94fb0f to 3d71a93 Compare September 11, 2024 16:53
@tico88612
Copy link
Member Author

@VannTen, Could you help me with this PR? I want to remove the cloud provider from roles and call it Cloud Controller Manager. Thank you!

@VannTen
Copy link
Contributor

VannTen commented Oct 4, 2024

Hum, OCI is somewhat ambiguous name ... is there a way to use which denotes clearly this is the oracle cloud infra controller ? I know the previous internal was named OCI, but since we're creating a new one anyway, maybe we could have a less confusing name ? (-> confusion with open container image)

For the content itself:
I've seen several check of the form : var is defined and var == something -> can we have the var in defaults instead or is there some things preventing that ?

Thanks

@tico88612
Copy link
Member Author

Hum, OCI is somewhat ambiguous name ... is there a way to use which denotes clearly this is the oracle cloud infra controller ? I know the previous internal was named OCI, but since we're creating a new one anyway, maybe we could have a less confusing name ? (-> confusion with open container image)

OCI is an awkward acronym; it conflicts with the Open Container Initiative, and I don't have a better idea now.

Some of the code was migrated from roles/kubernetes-app/cloud-provider because the (in-tree) cloud-provider was removed to avoid confusion later. Incidentally, the Oracle cloud provider was upgraded.

For the content itself:
I've seen several check of the form : var is defined and var == something -> can we have the var in defaults instead or is there some things preventing that ?

Previously, the variables cloud_provider and external_cloud_provider were defined before executing the associated tasks. I was under the impression that there were anti-dumbing checks.

@VannTen
Copy link
Contributor

VannTen commented Oct 4, 2024 via email

@tico88612 tico88612 force-pushed the feat/external-oci-cloud-controller-manager branch from 3d71a93 to 6610267 Compare October 8, 2024 15:31
@tico88612
Copy link
Member Author

I meant more stuf list oci_security_lists or external_oci_auth_user

I think giving a default value to the user setting is unnecessary because it's not a required option in Kubespray, and it's only triggered if external_cloud_provider is set to oci.

@VannTen
Copy link
Contributor

VannTen commented Oct 8, 2024 via email

@tico88612
Copy link
Member Author

It's not only about defaults, it's also about documentation. One of the goals is to use roles/defaults/*.yml as documentation ultimately, rather than the sample inventory. It also makes templates more readable (IMO) to not have the double checks (is defined + testing the value)

What do you mean? Do other user settings go to roles/kubernetes-apps/external_cloud_controller/oci/defaults/main.yml?

@VannTen
Copy link
Contributor

VannTen commented Oct 11, 2024 via email

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
@tico88612 tico88612 force-pushed the feat/external-oci-cloud-controller-manager branch from 6610267 to b58a8ef Compare October 13, 2024 04:15
@tico88612
Copy link
Member Author

Wouldn't adding the user setting eliminate the need for roles/kubernetes-apps/external_cloud_controller/oci/tasks/oci-credential-check.yml? (except that the value check for external_oracle_load_balancer_security_list_management_mode must be [“All”, “Frontend”, “None”])

@tico88612 tico88612 requested a review from VannTen October 13, 2024 05:57
@VannTen
Copy link
Contributor

VannTen commented Oct 14, 2024 via email

@tico88612 tico88612 force-pushed the feat/external-oci-cloud-controller-manager branch from b58a8ef to 3c29c15 Compare October 14, 2024 17:46
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
@tico88612 tico88612 force-pushed the feat/external-oci-cloud-controller-manager branch from 3c29c15 to 44986c3 Compare October 14, 2024 17:47
@tico88612
Copy link
Member Author

tico88612 commented Oct 14, 2024

This method doesn't need to check whether the string is defined; it just needs to ensure it's not empty.

PTAL, thanks!

@ant31
Copy link
Contributor

ant31 commented Oct 15, 2024

can you please update the release note as suggested @yankay

looks good thanks

@tico88612 tico88612 changed the title Feat: Upgrade external OCI cloud controller manager Feat: Add external OCI cloud controller manager Oct 15, 2024
@tico88612
Copy link
Member Author

@ant31 updated.

@tico88612
Copy link
Member Author

Can this be merged? This is related to #11633.

Make the asserts check for Oracle Cloud Infrastructure external cloud
controller more compact, and hence readable.
Allows to put them back in the main tasks for less back and forth when
reading the code.
@VannTen
Copy link
Contributor

VannTen commented Oct 31, 2024

@tico88612 I added a commit to make the assert more compact, what do you think ?

@tico88612
Copy link
Member Author

tico88612 commented Oct 31, 2024

@VannTen I think I learned a pretty good solution from you, and it's better to read, too. Thank you!

@VannTen
Copy link
Contributor

VannTen commented Oct 31, 2024

Then
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2024
@k8s-ci-robot k8s-ci-robot merged commit 20df445 into kubernetes-sigs:master Oct 31, 2024
39 of 40 checks passed
kpoxo6op pushed a commit to kpoxo6op/kubespray that referenced this pull request Dec 27, 2024
* Feat: add external OCI cloud controller manager template & variable

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>

* Feat: add external OCI cloud controller manager workflow

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>

* Feat: migrate external OCI CCM config check from OCI cloud provider

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>

* cloud_controller: oracle: simpler asserts

Make the asserts check for Oracle Cloud Infrastructure external cloud
controller more compact, and hence readable.
Allows to put them back in the main tasks for less back and forth when
reading the code.

---------

Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
Co-authored-by: Max Gautier <mg@max.gautier.name>
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. 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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.

5 participants