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

Fix: install calico-kube-controller on kdd #9358

Conversation

wayfrro
Copy link
Contributor

@wayfrro wayfrro commented Oct 4, 2022

What type of PR is this?

This partially reverts 2de5c48#diff-c94700ab11e60a92e9706fb87b3a61796ff8b2a7a36e18fd465e173203d6574dL14 - which makes kubespray not installing policy controller when using calico with kubernetes data store.

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #9300

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

[Calico] Install calico-kube-controller also when using kdd datastore

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 4, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @wayfrro. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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 the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 4, 2022
@wayfrro
Copy link
Contributor Author

wayfrro commented Oct 4, 2022

FYI @cristicalin

Copy link
Contributor

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

/cc @oomichi

roles/kubernetes-apps/policy_controller/meta/main.yml Outdated Show resolved Hide resolved
tags:
- policy-controller

- role: policy_controller/calico
when:
- kube_network_plugin == 'canal'
- calico_datastore != "kdd"
- calico_datastore != "kdd" or calico_policy_version is version('v3.6.0', '>=')
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't we just leave one dependency on this role for both calico and canal with enable_network_policy set to true? It makes little sense to me otherwise. Something like:

---
dependencies:
  - role: policy_controller/calico
    when:
      - kube_network_plugin in ['calico', 'canal']
      - enable_network_policy
    tags:
      - policy-controller

Copy link
Member

Choose a reason for hiding this comment

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

@wayfrro haha exactly what I wrote yesterday too #9358 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Indeed it's cleaner that way but the original intent of the PR you are referencing was a clean up which accidentally triggered this bug.

@wayfrro please update the PR with the code you proposed above which better communicates the intention of having the policy controller dependency on both calico and canal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cristicalin Done.

@k8s-ci-robot k8s-ci-robot requested a review from oomichi October 5, 2022 02:26
@floryut
Copy link
Member

floryut commented Oct 5, 2022

Not sure I fully understand why we don't check enable_network_policy for canal but well 🤷

@oomichi
Copy link
Contributor

oomichi commented Oct 5, 2022

Not sure I fully understand why we don't check enable_network_policy for canal but well 🤷

Yeah, that seems strange.
But it would be good enough to investigate/solve it later to concentrate on fixing the corresponding issue with this pr.

/ok-to-test
/lgtm

@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 Oct 5, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 5, 2022
@yankay
Copy link
Member

yankay commented Oct 8, 2022

Great Fix, it's very useful.
Thank you @wayfrro.

@cyclinder
Copy link
Contributor

Thanks @wayfrro

/lgtm

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 10, 2022
Copy link
Member

@floryut floryut left a comment

Choose a reason for hiding this comment

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

@wayfrro Thanks for the update 👍

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floryut, wayfrro

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 Oct 10, 2022
@oomichi
Copy link
Contributor

oomichi commented Oct 11, 2022

/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 11, 2022
@k8s-ci-robot k8s-ci-robot merged commit 3b99d24 into kubernetes-sigs:master Oct 11, 2022
azuwis pushed a commit to azuwis/kubespray that referenced this pull request Nov 7, 2022
* Fix: install policy controller on kdd too

* Remove the calico_policy_version condition altogether

* Install policy controller both on canal and calico under same condition
k8s-ci-robot pushed a commit that referenced this pull request Nov 7, 2022
* Fix: install policy controller on kdd too

* Remove the calico_policy_version condition altogether

* Install policy controller both on canal and calico under same condition

Co-authored-by: Piotr Kowalczyk <7711184+wayfrro@users.noreply.github.com>
salifou pushed a commit to salifou/kubespray that referenced this pull request Nov 13, 2022
* Fix: install policy controller on kdd too

* Remove the calico_policy_version condition altogether

* Install policy controller both on canal and calico under same condition
@floryut floryut mentioned this pull request Jan 4, 2023
enneitex pushed a commit to enneitex/kubespray that referenced this pull request Jan 25, 2023
* Fix: install policy controller on kdd too

* Remove the calico_policy_version condition altogether

* Install policy controller both on canal and calico under same condition
HoKim98 pushed a commit to ulagbulag/kubespray that referenced this pull request Mar 8, 2023
* Fix: install policy controller on kdd too

* Remove the calico_policy_version condition altogether

* Install policy controller both on canal and calico under same condition
nolimitkun pushed a commit to nolimitkun/kubespray that referenced this pull request Mar 19, 2023
* Fix: install policy controller on kdd too

* Remove the calico_policy_version condition altogether

* Install policy controller both on canal and calico under same condition
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/bug Categorizes issue or PR as related to a bug. 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. 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.

kubespray don't install calico-kube-controller
7 participants