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

K8s 1.30 #45483

Draft
wants to merge 30 commits into
base: release/v2.9
Choose a base branch
from
Draft

K8s 1.30 #45483

wants to merge 30 commits into from

Conversation

vardhaman22
Copy link
Contributor

@vardhaman22 vardhaman22 commented May 14, 2024

Issue:

#45089

Problem

As per the issue k8s minor version 1.30 support needs to be added

Solution

updated all the k8s libraries to kubernetes v1.30.0

other changes done:

  1. updated wrangler from v2 to v3

  2. replaced k8s.io/gengo/examples/set-gen/sets with "k8s.io/apimachinery/pkg/util/sets" since gengo is updated to gengo/v2 in kubernetes v1.30.0 and sets package is removed from gengo/v2 ref

  3. and since gengo args package is also removed in gengo/v2 so removed args.DefaultSourceTree() function uses and added the implementation of that function directly in the code.

similar thing is done in a PR for rancher/norman

  1. apiserver types moved from one dir to another
    kubernetes/apiserver@e7eedd1#diff-179ab44de4a16de69e23c8a3fee5a0d6ef22755b90c182744f05ca9e1eca4381
    so updated imports in rancher ref

  2. bumped controller-runtime to v0.18.2 and cluster-api to v1.7.2 also updated capi crds and capi webhook yaml files.
    updated capi webhooks with custom changes also which is rancher specific change ref

  3. after updating capi crds an error occurred while running rancher

2024/05/17 08:06:42 [ERROR] error syncing 'cluster-member': handler auth-prov-v2-roletemplate: no matches for kind "Machine" in version "cluster.x-k8s.io/v1alpha3", requeuing
    2024/05/17 08:06:42 [ERROR] error syncing 'cluster-admin': handler auth-prov-v2-roletemplate: no matches for kind "Cluster" in version "cluster.x-k8s.io/v1alpha3", requeuing
    2024/05/17 08:06:43 [ERROR] error syncing 'cluster-owner': handler auth-prov-v2-roletemplate: no matches for kind "Cluster" in version "cluster.x-k8s.io/v1alpha3", requeuing

cluster.x-k8s.io/v1alpha3 is deprecated in capi v1.7.2 but it is still in crd. So fixed rancher code to not add deprecated version of a resource from a crd to validate role data. ref

  1. updated python tests test_node_fields and test_dns_fields fix needed because of addition of new fields in k8s v1.30 for these objects.

  2. updated local cluster k3s version to v1.30.0+k3s1 and also updated rancher chart kube-version annotation.

  3. bumped kubernetes libraries to v0.30.1

  4. updated golangci lint to v1.58.1 (was the latest version when i started working on this PR...needs to be bumped to v1.59.0 since it is the latest version).

NOTE: for initial verification used forked dependencies, custom KDM, custom charts repositories and did additional changes needed for these for testing.

Testing

Engineering Testing

Manual Testing

  1. tested v1.30.0 provisioning for all types of cluster.
    Screenshot from 2024-05-31 21-40-54

  2. tested upgrade from 1.29 to 1.30 for all types of cluster.
    Screenshot from 2024-05-31 22-35-33
    Screenshot from 2024-05-31 22-36-41
    Screenshot from 2024-05-31 22-42-43

Automated Testing

  • Test types added/modified:
    • Unit
    • Integration (Go Framework)
    • Integration (v2prov Framework)
    • Validation (Go Framework)
    • Other - Explain: EXPLAIN
    • None
    • REMOVE NOT APPLICABLE BULLET POINTS ABOVE
  • If "None" - Reason: EXPLAIN THE REASON
  • If "None" - GH Issue/PR: LINK TO GH ISSUE/PR TO ADD TESTS

Summary: TODO

QA Testing Considerations

Regressions Considerations

TODO

Existing / newly added automated tests that provide evidence there are no regressions:

  • TODO

@vardhaman22 vardhaman22 changed the title K8s 130 K8s 1.30 May 14, 2024
@vardhaman22 vardhaman22 force-pushed the k8s-130 branch 5 times, most recently from a435ee8 to ac2a89b Compare May 21, 2024 18:35
@vardhaman22 vardhaman22 requested a review from a team May 31, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants