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

[WIP] ⚠️ v1alpha4 updates #269

Closed
wants to merge 10 commits into from
Closed

Conversation

detiber
Copy link
Member

@detiber detiber commented Jul 23, 2021

What this PR does / why we need it:

Updates for supporting cluster-api v1alpha4.

Also includes the providerID migration from: #290

TODO:

  • Update for latest changes to ✨ Support updated providerid #290
  • Update release workflows and tooling to reflect new changes
  • Decide on sticking with Docker for released image or moving to ghcr.io
    • changing would require updates to the capp-helper migration tool
    • sticking with docker would require changes to the release workflow
  • Documentation for upgrade
    • General upgrade docs
    • Multitenancy changes
  • Release notes
  • Add cleanup for elastic IPs

Fixes: #220
Fixes: #245

@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. labels Jul 23, 2021
@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 23, 2021
clusterctl-settings.json Outdated Show resolved Hide resolved
hack/ensure-kind.sh Outdated Show resolved Hide resolved
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

the packet-cli was renamed to metal-cli https://github.com/kubernetes-sigs/cluster-api-provider-packet/pull/269/files#diff-08c9d16d2e6264ed9bece07e27aaebbfdcf991c8f2b26e48d8b1b920e21257e4R34 in the hack/ensure-packet-cli.sh

maybe worth make all the changes to reflect the new name and repo

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 20, 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 20, 2021
- op: add
path: /spec/kubeadmConfigSpec/postKubeadmCommands/-
value: 'if [ -f "/run/kubeadm/kubeadm.yaml" ]; then kubectl --kubeconfig /etc/kubernetes/admin.conf create secret generic -n kube-system metal-cloud-config --from-literal=cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}", "eipTag": ""}'' && kubectl --kubeconfig=/etc/kubernetes/admin.conf apply -f https://kube-vip.io/manifests/rbac.yaml && ctr run --rm --net-host docker.io/detiber/kube-vip:v0.3.8 vip /kube-vip manifest daemonset --arp --interface bond0 --address {{ .controlPlaneEndpoint }} --controlplane --leaderElection --inCluster --taint --metal --provider-config /etc/cloud-sa/cloud-sa.json | kubectl --kubeconfig=/etc/kubernetes/admin.conf apply -f - && rm /etc/kubernetes/manifests/kube-vip.yaml; fi'
value: 'if [ -f "/run/kubeadm/kubeadm.yaml" ]; then kubectl --kubeconfig /etc/kubernetes/admin.conf create secret generic -n kube-system metal-cloud-config --from-literal=cloud-sa.json=''{"apiKey": "{{ .apiKey }}","projectID": "${PROJECT_ID}", "eipTag": ""}'' && kubectl --kubeconfig=/etc/kubernetes/admin.conf apply -f https://kube-vip.io/manifests/rbac.yaml && ctr run --rm --net-host docker.io/detiber/kube-vip:v0.3.8 vip /kube-vip manifest daemonset --arp --interface bond0 --address {{ .controlPlaneEndpoint }} --controlplane --leaderElectionleaderElection --leaseDuration 15 --leaseRenewDuration 10 --leaseRetry 2 --inCluster --taint --metal --provider-config /etc/cloud-sa/cloud-sa.json | kubectl --kubeconfig=/etc/kubernetes/admin.conf apply -f - && rm /etc/kubernetes/manifests/kube-vip.yaml; fi'
Copy link
Member

@displague displague Sep 23, 2021

Choose a reason for hiding this comment

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

--leaderElectionleaderElection you get one vote.

Copy link
Member

@displague displague Sep 23, 2021

Choose a reason for hiding this comment

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

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: detiber

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

@detiber detiber force-pushed the capi-v0.4 branch 2 times, most recently from 6e126b8 to cfeff0e Compare September 29, 2021 19:09
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 6, 2021
detiber and others added 10 commits October 25, 2021 12:30
…x Metal cloud provider

Cluster API v1alpha4 changes:
- Update dependencies and make provider changes necessary to support Cluster API v1alpha4
- Rework e2e tests to better leverage upstream e2e test framework and upstream provided test specs
- Rework pr-based github actions to enable smoketesting of PRs using the quickstart e2e test
- Rework push based github actions to enable full e2e tests when changes are merged
- Rework relese workflow to not be dependent on push workflow

Updated cloud-provider support:
- Deploy the latest version of cloud-provider-equinix-metal by default with templates
- Update providerID prefix used from packet:// to equinixmetal:// to align with cloud-provider-equinix-metal
- Provide capp-helper migration tool to support upgrading the cloud provider on existing workload clusters and migrating the providerID for existing Nodes to facilitate migrating from packet-ccm to cloud-provider-equinix-metal

a bit of cleanup

Add additional helpers to wrappedClusterProxy to avoid intermittent issues getting the workload cluster client when handling deletion/remediation of control plane instances

Attempt to cleanup EIPs following e2e tests

Rev cloud-provider-equinix-metal to latest version in templates

Improve cleanup of EIPs following e2e tests

Make EIP cleanup work across ginkgo nodes

Bump packngo to latest

Bump github.com/google/uuid from 1.2.0 to 1.3.0

Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](google/uuid@v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Bump github.com/onsi/gomega from 1.15.0 to 1.16.0

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

update capi to v0.4.2, update e2e tests accordingly

Fix e2e test configs

stop matrix jobs from failing fast to avoid orphaning resources

Add a cli tool to cleanup CI and a github workflow to run it on a schedule

fix cleanup workflow

Change default instance to c1.small.x86 for e2e tests, allow easier configuration of plan types for e2e tests, and actually show what facility, ssh key, and plans are being used by tests

Reduce duplication of workflows with a composite action

Fixes and further improvements

- Rename ErrorMessage/ErrorReason to align with upstream (which made this change in v1alpha3)
- Add conditions to align with upstream
- Improve re-entrancy of PacketMachine controller, by standardizing tags,
  and doing a lookup by tags if providerID is not recorded
- Enable support for a comma separated list of hardwareReservationIDs

fix up path to action in github workflows

Fixup composite github aciton

fixup go.mod

update generated code

Disable kcp upgrade related tests until they can be deflaked

Allow removing the finalizer for a packetmachine when a machine fails to provision

Fixup ginkgo extra args in makefile

Fix log message

Add a cluster template for no cpem, update cluster template to use kube-vip, and rename e2e test CRS for cni

re-enable kcp-upgrade test

Re-enable all the e2e tests

Update templates, use daemonset for kube-vip, start e2e test for updgrade involving kube-vip

appease linter

patch up e2e test runs with separate module

Add migration tooling to migrate workload clusters to kube-vip

bump controller-runtime and k8s dependencies

Use latest head for cluster-api/test/e2e and add tests for clusters without CPEM enabled

Add PacketCluster to cluster-api category

bump golang to v1.16.8 and move release of capp-helper to container image

Fix pr workflow

manifest fixes

Re-enable scheduled tests, limit concurrency, remove pr-based e2e tests

Restructure templates and e2e tests to enable splitting out tests more granularly for testing

bump dependencies

Improve caching and parallelism for github actions

fix e2e test configs

fix helper after bumping ui dependencies

Fix broken test relese workflow and try to improve tool caching

improve caching for validate test job

fix e2e test template w/ cpem

override default leader election config for kube-vip

fix typo in templates

update e2e test template

switch to static pod manifests

Attempt to improve caching for workflows

fix flavor used for kcp upgrade scale-in testing

Update test configs and calico

fix e2e test configs

Decrease frequency of scheduled ci job to every 6 hours

Switch calico to use vxlan instead of ipip

bump tooling to latest versions

remove helper

update cluster template

update templates

update e2e test templates

update makefile for template changes

more updates to remove helper and serialize e2e tests

fix go mod

more fixes
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v2.3.4...v2.3.5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sigs.k8s.io/cluster-api](https://github.com/kubernetes-sigs/cluster-api) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/kubernetes-sigs/cluster-api/releases)
- [Commits](kubernetes-sigs/cluster-api@v0.4.3...v0.4.4)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/cluster-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2021
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2021
@k8s-ci-robot
Copy link
Contributor

@detiber: 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.

@detiber detiber mentioned this pull request Feb 7, 2022
6 tasks
@detiber
Copy link
Member Author

detiber commented Feb 7, 2022

/close
closing in favor of #307

@k8s-ci-robot
Copy link
Contributor

@detiber: Closed this PR.

In response to this:

/close
closing in favor of #307

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.

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. 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.

ClusterAPI stucks when Provisioning failure happens Some resources missing the cluster-api category
4 participants