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

✨ Update to 1.4 CAPI #661

Merged
merged 14 commits into from
Oct 26, 2023
Merged

Conversation

cprivitere
Copy link
Member

@cprivitere cprivitere commented Oct 26, 2023

What this PR does / why we need it:
This PR tracks the changes to update to version 1.4 of the CAPI libraries.

As part of the upgrade, we're implementing a recommended change -- the addition of an explicit default security context for the controller-manager deployment.

Finally, tooling in the makefile was updated to match the versions used in the upstream cluster-api project as of v1.4.6.

Fixes #564

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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 Oct 26, 2023
Signed-off-by: Chris Privitere <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
- Add missing package comments
- Add missing exported function comments
- also add periods to end of many comments

Signed-off-by: Chris Privitere <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
- remove unused functions
- add new required functions
- rename of one mhc remediation test

Signed-off-by: Chris Privitere <[email protected]>
@cprivitere cprivitere requested review from displague and removed request for deitch and detiber October 26, 2023 21:12
Signed-off-by: Chris Privitere <[email protected]>
requests:
cpu: 100m
memory: 35Mi
securityContext:
Copy link
Member

@displague displague Oct 26, 2023

Choose a reason for hiding this comment

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

nice. all we need to do is connect to APIs, no privs/root needed.

Copy link
Member

Choose a reason for hiding this comment

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

Is 35Mi sufficient?

}

func (r *PacketClusterReconciler) reconcileDelete(ctx context.Context, clusterScope *scope.ClusterScope) (ctrl.Result, error) {
func (r *PacketClusterReconciler) reconcileDelete(_ context.Context, _ *scope.ClusterScope) (ctrl.Result, error) {
// Initially I created this handler to remove an elastic IP when a cluster
Copy link
Member

Choose a reason for hiding this comment

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

rereading this for the first time in a while.. We probably should clean up after ourselves for any resources we dynamically provisioned. We could offer preservation behaviors in a few different ways (possibly all of them):

  • IP reservation tags locked (? this wouldn't be conventional for IP reservations. Unlike devices there is no "locked" field on the EM API resource. most likely this would look like other CAPP EM tags)
  • CAPP configuration parameters --no-ip-reservation-cleanup
  • PacketCluster configuration parameters

#617
#226

@@ -113,7 +125,7 @@ func (p *Client) NewDevice(ctx context.Context, req CreateDeviceRequest) (*metal
stringWriter := &strings.Builder{}
userData := string(userDataRaw)
userDataValues := map[string]interface{}{
"kubernetesVersion": pointer.StringPtrDerefOr(req.MachineScope.Machine.Spec.Version, ""),
"kubernetesVersion": ptr.Deref(req.MachineScope.Machine.Spec.Version, ""),
Copy link
Member

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: cprivitere, displague

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:
  • OWNERS [cprivitere,displague]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@displague
Copy link
Member

/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 26, 2023
@k8s-ci-robot k8s-ci-robot merged commit dc74571 into kubernetes-sigs:main Oct 26, 2023
3 checks passed
@cprivitere cprivitere deleted the capi-1.4 branch October 26, 2023 21:51
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

Update CAPP to 1.4 base
3 participants