Skip to content

[WIP] OCPEDGE-649: check if CCMO present#3999

Closed
qJkee wants to merge 4 commits into
openshift:masterfrom
qJkee:OCPVE-628
Closed

[WIP] OCPEDGE-649: check if CCMO present#3999
qJkee wants to merge 4 commits into
openshift:masterfrom
qJkee:OCPVE-628

Conversation

@qJkee
Copy link
Copy Markdown
Contributor

@qJkee qJkee commented Oct 24, 2023

Add check if CCMO is present within the cluster. If not, then do not pass the flag to kubelet related to the cloud providers

Here I try to read the install config from the cluster or from the disc and detect enabled capabilities.
If CloudController capability is disabled(cloud controller manager operator is not installed to the cluster) we return an empty value passed to the --cloud-provider kubelet flag. We pass external only in case if cloud provider is actually external to support manual installation of providers

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 24, 2023
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Oct 24, 2023

@qJkee: This pull request references OCPVE-628 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.15.0" version, but no target version was set.

Details

In response to this:

Add check if CCMO is present within the cluster. If not, then do not pass the flag to kubelet related to the cloud providers

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.

@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 24, 2023
@openshift-ci openshift-ci Bot requested review from cdoern and djoshy October 24, 2023 15:21
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Oct 24, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: qJkee
Once this PR has been reviewed and has the lgtm label, please assign sinnykumari for approval. For more information see the Kubernetes Code Review Process.

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

Details 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

@qJkee qJkee marked this pull request as draft October 29, 2023 16:46
@qJkee qJkee marked this pull request as ready for review October 29, 2023 18:27
@openshift-ci openshift-ci Bot requested review from jkyros and sinnykumari October 29, 2023 18:28
@qJkee qJkee marked this pull request as draft November 17, 2023 16:25
@qJkee qJkee marked this pull request as ready for review November 23, 2023 10:02
@qJkee qJkee changed the title [WIP] OCPVE-628: POC: check if CCMO present OCPVE-628: POC: check if CCMO present Nov 23, 2023
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 23, 2023
@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Nov 23, 2023

/hold until openshift/api#1579 gets merged

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 23, 2023
@sinnykumari
Copy link
Copy Markdown
Contributor

Is this work expected to merge in 4.15 or right now it is mainly a POC? Right now linked card is epic, please link it to a story with details so that we can understand what exactly we need to review. Also, as per PR description, it seems like it will require qe testing because we are skipping passing kubelet flags.

@qJkee qJkee changed the title OCPVE-628: POC: check if CCMO present OCPEDGE-649: check if CCMO present Nov 23, 2023
@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Nov 23, 2023

@qJkee: This pull request references OCPEDGE-649 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

Details

In response to this:

Add check if CCMO is present within the cluster. If not, then do not pass the flag to kubelet related to the cloud providers

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.

@openshift-ci-robot
Copy link
Copy Markdown
Contributor

openshift-ci-robot commented Nov 23, 2023

@qJkee: This pull request references OCPEDGE-649 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

Details

In response to this:

Add check if CCMO is present within the cluster. If not, then do not pass the flag to kubelet related to the cloud providers

Here I try to read the install config from the cluster or from the disc and detect enabled capabilities.
If CloudController capability is disabled(cloud controller manager operator is not installed to the cluster) we return an empty value passed to the --cloud-provider kubelet flag. We pass external only in case if cloud provider is actually external to support manual installation of providers

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.

Copy link
Copy Markdown
Contributor

@cdoern cdoern left a comment

Choose a reason for hiding this comment

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

I don't think we can safely merge a PR with a replaced API. Also some general comments about comments, errors etc.

Comment thread go.mod Outdated
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/openshift/api => github.com/qjkee/api v0.0.0-20231024160705-d90a3dcdd9ec
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think we can ship with a replace in the go.mod

Copy link
Copy Markdown
Contributor Author

@qJkee qJkee Nov 27, 2023

Choose a reason for hiding this comment

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

It's just for using api objects.
Once I get this approved/lgtm I'll merge my branch to the upstream(openshift/api) and then just bump regular openshift/api version.
See openshift/api#1579 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is going to conflict with: #4012 which we want to get in first for TRT. So i advise we hold off on this one until the API bump from the linked PR gets in.

Comment thread pkg/controller/template/render.go Outdated
Comment thread pkg/controller/template/render.go Outdated
Comment thread pkg/controller/template/render.go Outdated
Comment thread pkg/controller/template/render.go Outdated
Comment thread pkg/controller/template/render.go Outdated
@sinnykumari
Copy link
Copy Markdown
Contributor

sinnykumari commented Nov 28, 2023

Thanks all for reviewing the PR! Putting hold for QE pre-merge testing.
/cc @sergiordlr @rioliu-rh
@qJkee Is this functionality already getting tested by a QE? If not, can you help with steps our QE can take to test this functionality?

@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Nov 28, 2023

@sinnykumari
Yeah, QE did pre-merge testing at OCPEDGE-269

Copy link
Copy Markdown
Contributor

@cdoern cdoern left a comment

Choose a reason for hiding this comment

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

As long as comments are added and the errors are more fatal I can get behind this. However, I do not think we can merge this because it'll wreak havoc against: #4012 I see what Joel is saying about merging and agreeing on the dependencies first. However, merging this will make it impossible for the above PR to merge since the API code I am using will not include this custom API code.

@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 29, 2023
@sinnykumari
Copy link
Copy Markdown
Contributor

Overall this looks fine, also as per #3999 (comment) , respective QE team is already testing this functionality.

Major missing item is getting openshift/api#1579 merged and adapting this PR to switch back to using openshit/api

Copy link
Copy Markdown
Contributor

@cdoern cdoern left a comment

Choose a reason for hiding this comment

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

I think I found what is breaking the unit tests, PTAL

version: ""
type: ""
replicas: 3
kind: ConfigMap
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is the configmap causing the error in the bootstrap_unit test logs that says bootstrap_test.go:432: Unknown object type *v1.ConfigMap

@@ -0,0 +1,49 @@
apiVersion: v1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need this? it seems to be breaking bootstrap tests

Comment thread pkg/controller/cloud-controller-cap/capability.go Outdated
@qJkee qJkee changed the title OCPEDGE-649: check if CCMO present [WIP] OCPEDGE-649: check if CCMO present Dec 11, 2023
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 11, 2023
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 11, 2023
@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Dec 20, 2023

/retest

@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Jan 17, 2024

/test unit

@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Jan 17, 2024

/retest

2 similar comments
@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Jan 26, 2024

/retest

@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Jan 31, 2024

/retest

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 9, 2024
Add check if CCMO is present within the cluster.
If not, then do not pass the flag --cloud-provider
to the kubelet
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 9, 2024
@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Feb 9, 2024

/retest

2 similar comments
@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Feb 12, 2024

/retest

@qJkee
Copy link
Copy Markdown
Contributor Author

qJkee commented Feb 12, 2024

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Feb 14, 2024

@qJkee: 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
ci/prow/okd-scos-e2e-aws-ovn 45eee00 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

Details

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants