Skip to content

Commit

Permalink
Delete namespace const and use upstream namespace system
Browse files Browse the repository at this point in the history
Signed-off-by: Vitor Savian <[email protected]>
  • Loading branch information
vitorsavian committed Dec 4, 2024
1 parent 1b51e4c commit 116ecff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/rke2/rc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

const (
runtimeClassesChart = "rke2-runtimeclasses"
defaultNamespace = "kube-system"

// Values from upstream, see reference at -> https://github.com/helm/helm/blob/v3.16.3/pkg/action/validate.go#L34-L37
appManagedByLabel = "app.kubernetes.io/managed-by"
Expand Down Expand Up @@ -69,8 +68,8 @@ func setRuntimes() cmds.StartupHook {
c.Annotations[helmReleaseNameAnnotation] = runtimeClassesChart
}

if namespace, ok := c.Annotations[helmReleaseNamespaceAnnotation]; !ok || namespace != defaultNamespace {
c.Annotations[helmReleaseNamespaceAnnotation] = defaultNamespace
if namespace, ok := c.Annotations[helmReleaseNamespaceAnnotation]; !ok || namespace != metav1.NamespaceSystem {
c.Annotations[helmReleaseNamespaceAnnotation] = metav1.NamespaceSystem
}

_, err = rcClient.Update(context.Background(), &c, metav1.UpdateOptions{})
Expand Down

0 comments on commit 116ecff

Please sign in to comment.