Skip to content

Commit

Permalink
Remove rancher-kubeconfigs feature
Browse files Browse the repository at this point in the history
Current rancher version used with turtles uses CAPI 1.9, so the feature
is no longer needed and thus removed.

Signed-off-by: Danil-Grigorev <[email protected]>
  • Loading branch information
Danil-Grigorev committed Jan 23, 2025
1 parent bb867c5 commit fa20acc
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 722 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e-long.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ jobs:
artifact_name: artifacts_v2prov
MANAGEMENT_CLUSTER_ENVIRONMENT: eks
secrets: inherit
e2e_update_labels:
e2e_embedded_capi_disabled_v3:
needs: publish_e2e_image
uses: ./.github/workflows/run-e2e-suite.yaml
with:
test_suite: test/e2e/suites/update-labels
test_name: Update labels
test_suite: test/e2e/suites/embedded-capi-disabled-v3
test_name: Embedded CAPI disabled [v3]
run_azure_janitor: false
artifact_name: artifacts_update_labels
artifact_name: artifacts_embedded_capi_v3
MANAGEMENT_CLUSTER_ENVIRONMENT: eks
secrets: inherit
clean_e2e_image:
Expand Down
2 changes: 1 addition & 1 deletion charts/rancher-turtles/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
containers:
- args:
- --leader-elect
- --feature-gates=rancher-kube-secret-patch={{ index .Values "rancherTurtles" "features" "rancher-kubeconfigs" "label"}},addon-provider-fleet={{ index .Values "rancherTurtles" "features" "addon-provider-fleet" "enabled"}},agent-tls-mode={{ index .Values "rancherTurtles" "features" "agent-tls-mode" "enabled"}}
- --feature-gates=addon-provider-fleet={{ index .Values "rancherTurtles" "features" "addon-provider-fleet" "enabled"}},agent-tls-mode={{ index .Values "rancherTurtles" "features" "agent-tls-mode" "enabled"}}
{{- range .Values.rancherTurtles.managerArguments }}
- {{ . }}
{{- end }}
Expand Down
2 changes: 0 additions & 2 deletions charts/rancher-turtles/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ rancherTurtles:
rancher-webhook:
cleanup: true
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0
rancher-kubeconfigs:
label: false
etcd-snapshot-restore:
enabled: false
image: controller
Expand Down
9 changes: 2 additions & 7 deletions feature/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import (
)

const (
// RancherKubeSecretPatch is used to enable patching of the Rancher v2prov created kubeconfig
// secrets so that they can be used with CAPI 1.5.x.
RancherKubeSecretPatch featuregate.Feature = "rancher-kube-secret-patch" //nolint:gosec

// ExternalFleet allows to disable in-tree management of the Fleet clusters
// in the imported rancher clusters, by setting "provisioning.cattle.io/externally-managed"
// annotation.
Expand All @@ -41,7 +37,6 @@ func init() {
}

var defaultGates = map[featuregate.Feature]featuregate.FeatureSpec{
RancherKubeSecretPatch: {Default: false, PreRelease: featuregate.Beta},
ExternalFleet: {Default: true, PreRelease: featuregate.Beta},
AgentTLSMode: {Default: false, PreRelease: featuregate.Beta},
ExternalFleet: {Default: true, PreRelease: featuregate.Beta},
AgentTLSMode: {Default: false, PreRelease: featuregate.Beta},
}
1 change: 1 addition & 0 deletions internal/controllers/import_controller_v3.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func (r *CAPIImportManagementV3Reconciler) SetupWithManager(ctx context.Context,
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=*,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=management.cattle.io,resources=clusters;clusters/status;clusterregistrationtokens,verbs=get;list;watch;create;update;delete;deletecollection;patch
// +kubebuilder:rbac:groups=management.cattle.io,resources=clusterregistrationtokens/status;settings,verbs=get;list;watch
// +kubebuilder:rbac:groups=provisioning.cattle.io,resources=clusters;clusters/status,verbs=get;list;watch
//
//nolint:lll

Expand Down
161 changes: 0 additions & 161 deletions internal/controllers/patch_kcfg_controller.go

This file was deleted.

Loading

0 comments on commit fa20acc

Please sign in to comment.