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 copies of upstream calico kdd CRDs #6956

Closed
wants to merge 4 commits into from

Conversation

hafe
Copy link
Contributor

@hafe hafe commented Nov 26, 2020

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup

/kind design

/kind documentation
/kind failing-test
/kind feature
/kind flake

What this PR does / why we need it:

This is an attempt to manage the problem of making sure calico CRDs are in sync with upstream (projectcalico). By keeping an exact identical copy of the CRDs, a simple recursive diff can be used to check for differences. This check (and eventual update) should be included in the process when bumping the calico version.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added kind/design Categorizes issue or PR as related to design. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Nov 26, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @hafe. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 26, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hafe
To complete the pull request process, please assign mattymo after the PR has been reviewed.
You can assign the PR to them by writing /assign @mattymo in a comment when ready.

The full list of commands accepted by this bot can be found 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 size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 26, 2020
@hafe
Copy link
Contributor Author

hafe commented Nov 26, 2020

How do we solve this? We want to keep exact copies and not modify them

@LuckySB
Copy link
Contributor

LuckySB commented Nov 28, 2020

/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 28, 2020
@hafe hafe force-pushed the calico-crds branch 3 times, most recently from a73775a to 49d3c8e Compare November 30, 2020 07:04
@hafe
Copy link
Contributor Author

hafe commented Dec 1, 2020

/test packet_centos7_calico-ha-once-localhost

@k8s-ci-robot
Copy link
Contributor

@hafe: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test pull-kubespray-yamllint

Use /test all to run all jobs.

In response to this:

/test packet_centos7_calico-ha-once-localhost

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.

@hafe
Copy link
Contributor Author

hafe commented Dec 1, 2020

/retest

@mirwan
Copy link
Contributor

mirwan commented Dec 12, 2020

@hafe
The diff between files in https://github.com/projectcalico/calico/tree/.../_includes/charts/calico/crds/kdd and those in roles/network_plugin/calico/files/crds/kdd seems only to be the annotations and creationTimestamp in metadata.
Have you considered simply maintaining a kustomize file in kubespray (that removes these annotations), using unarchive module with https://github.com/projectcalico/calico/releases/download/{{ calico_version }}/release-{{ calico_version }}.tgz and applying the manifests with kustomize ?

@hafe
Copy link
Contributor Author

hafe commented Dec 12, 2020

No because I may not familiar with kustomize. A good way forward would be if projectcalico provided templates (e.g a helm chart) but from the discussions that doesn't seem to happen soon. There are other projects maintaining helm charts for calico

@hafe
Copy link
Contributor Author

hafe commented Dec 12, 2020

Thanks for the first feedback!

@champtar
Copy link
Contributor

Downloading the source from their repo would make next upgrades way easier. @mirwan do we really need kustomize ? isn't kubectl apply enough ?

@mirwan
Copy link
Contributor

mirwan commented Dec 21, 2020

@champtar
There are some metadata in the manifests from projectcalico/calico that we may want to get rid of (as they are neither in roles/network_plugin/calico/templates/kdd-crds.yml.j2 nor in the CRDs in the current PR), like annotations and creationTimestamp.
If it is actually required, using kustomize for that purpose seems the simplest way

@champtar
Copy link
Contributor

@mirwan I was confused by your message because I couldn't find them, but they have been very recently removed: projectcalico/calico@2e28c85 (3.16.5/3.17)
Also kustomize is part of kubectl for some release now, so this is 100% acceptable to use it

@mirwan
Copy link
Contributor

mirwan commented Dec 21, 2020

@champtar Indeed, from 3.17/3.16.5, these have been removed, but if we want to have all the calico versions handled in kubespray (3.15.2, 3.16 prior to 3.16.5) covered by this feature, we should get rid of these...

@champtar
Copy link
Contributor

sed could also do the trick if it's only those 3 lines ;)

@hafe
Copy link
Contributor Author

hafe commented Dec 21, 2020

@champtar Indeed, from 3.17/3.16.5, these have been removed, but if we want to have all the calico versions handled in kubespray (3.15.2, 3.16 prior to 3.16.5) covered by this feature, we should get rid of these...

I hope that the next kubespray release will only care about exactly one version of components. That would a lot of things a lot more easier!

@hafe
Copy link
Contributor Author

hafe commented Dec 21, 2020

@mirwan I was confused by your message because I couldn't find them, but they have been very recently removed: projectcalico/calico@2e28c85 (3.16.5/3.17)
Also kustomize is part of kubectl for some release now, so this is 100% acceptable to use it

Still kubespray would have to maintain templates?

@champtar
Copy link
Contributor

champtar commented Jan 5, 2021

@mirwan I was confused by your message because I couldn't find them, but they have been very recently removed: projectcalico/calico@2e28c85 (3.16.5/3.17)
Also kustomize is part of kubectl for some release now, so this is 100% acceptable to use it

Still kubespray would have to maintain templates?

I don't think we need to maintain them in tree, download calico source from GH and apply the CRDs

@hafe
Copy link
Contributor Author

hafe commented Jan 5, 2021

It would be better if kubespray used some existing templates. Just found this:
https://hub.kubeapps.com/charts/aws/aws-calico

@champtar
Copy link
Contributor

champtar commented Jan 5, 2021

It would be better if kubespray used some existing templates. Just found this:
https://hub.kubeapps.com/charts/aws/aws-calico

There are still at 3.15.1 ... and the job is only to download the sources, extract them and kubectl apply, with worst case scenario a sed to remove 3 lines. We also want everything to work offline / with separate download step, and we haven't implemented that for helm yet.

@mirwan mirwan mentioned this pull request Mar 13, 2021
@champtar
Copy link
Contributor

/close superseded by #7372

@k8s-ci-robot
Copy link
Contributor

@hafe: PR needs rebase.

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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 19, 2021
@floryut floryut closed this Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/design Categorizes issue or PR as related to design. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants