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: replace usage of clusterName to for k8s upgrade #2704

Merged
merged 4 commits into from
Jun 26, 2023
Merged

Conversation

mikecutalo
Copy link
Contributor

@mikecutalo mikecutalo commented Jun 23, 2023

Description

Clutch relies on cluster information throughout the application, previously we relied on the clusterName field on the objectmeta which has since been deprecated.

To replace this we utilize our own label cluster.clutch.sh/name to denote which cluster the object belongs to, these helper functions are used to standardize the getting and setting of this field.

This unblocks our ability to upgrade to the latest k8s client.

Testing Performed

Unit

@mikecutalo mikecutalo changed the title k8s: remove usage of clusterName to upgrade k8s k8s: replace usage of clusterName to for k8s upgrade Jun 23, 2023
@mikecutalo mikecutalo marked this pull request as ready for review June 23, 2023 21:27
@mikecutalo mikecutalo requested a review from a team as a code owner June 23, 2023 21:27
@@ -94,49 +90,3 @@ func TestApplyListOptions(t *testing.T) {
})
}
}

func TestApplyClusterMetadata(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I simply moved this test to kube_cluster_test.go

backend/service/k8s/kube_cluster.go Outdated Show resolved Hide resolved
@mikecutalo mikecutalo merged commit b19a36d into main Jun 26, 2023
8 checks passed
@mikecutalo mikecutalo deleted the upgrade-k8s branch June 26, 2023 16:29
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.

4 participants