Skip to content

Commit

Permalink
Mark propagate labels as experimental (#561)
Browse files Browse the repository at this point in the history
Signed-off-by: Danil-Grigorev <[email protected]>
  • Loading branch information
Danil-Grigorev authored May 30, 2024
1 parent 7f512c7 commit 51fbb00
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions charts/rancher-turtles/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ questions:
label: "Enable RKE2 Provider"
type: boolean
- variable: rancherTurtles.features.propagate-labels.enabled
default: true
description: "Specify that the labels from CAPI should be propagated to Rancher"
default: false
description: "(Experimental) Specify that the labels from CAPI should be propagated to Rancher"
type: boolean
label: Propagate CAPI Labels
group: "Rancher Turtles Features Settings"
Expand Down
2 changes: 1 addition & 1 deletion charts/rancher-turtles/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rancherTurtles:
managementv3-cluster:
enabled: false
propagate-labels:
enabled: true
enabled: false
etcd-snapshot-restore:
enabled: false
addon-provider-fleet:
Expand Down
2 changes: 1 addition & 1 deletion feature/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ func init() {
var defaultGates = map[featuregate.Feature]featuregate.FeatureSpec{
RancherKubeSecretPatch: {Default: false, PreRelease: featuregate.Beta},
ManagementV3Cluster: {Default: false, PreRelease: featuregate.Beta},
PropagateLabels: {Default: true, PreRelease: featuregate.Beta},
PropagateLabels: {Default: false, PreRelease: featuregate.Beta},
EtcdSnapshotRestore: {Default: false, PreRelease: featuregate.Beta},
}
7 changes: 7 additions & 0 deletions internal/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/rancher/turtles/feature"
"github.com/rancher/turtles/internal/test/helpers"
"k8s.io/client-go/kubernetes/scheme"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down Expand Up @@ -50,6 +51,12 @@ var (
ctx = ctrl.SetupSignalHandler()
)

func init() {
utilruntime.Must(feature.MutableGates.SetFromMap(map[string]bool{
string(feature.PropagateLabels): true,
}))
}

func setup() {
utilruntime.Must(clusterv1.AddToScheme(scheme.Scheme))
utilruntime.Must(operatorv1.AddToScheme(scheme.Scheme))
Expand Down

0 comments on commit 51fbb00

Please sign in to comment.