Skip to content

Commit

Permalink
Merge pull request #1033 from Danil-Grigorev/remove-rancher-kubeconfi…
Browse files Browse the repository at this point in the history
…g-label

Remove rancher-kubeconfigs feature
  • Loading branch information
alexander-demicev authored Jan 23, 2025
2 parents da2656a + 0fd81f6 commit 612a3ad
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 735 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/e2e-long.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,8 @@ jobs:
artifact_name: artifacts_v2prov
MANAGEMENT_CLUSTER_ENVIRONMENT: eks
secrets: inherit
e2e_update_labels:
needs: publish_e2e_image
uses: ./.github/workflows/run-e2e-suite.yaml
with:
test_suite: test/e2e/suites/update-labels
test_name: Update labels
run_azure_janitor: false
artifact_name: artifacts_update_labels
MANAGEMENT_CLUSTER_ENVIRONMENT: eks
secrets: inherit
clean_e2e_image:
if: always()
needs: [e2e_import_gitops_v3, e2e_v2prov, e2e_update_labels]
needs: [e2e_import_gitops_v3, e2e_v2prov]
uses: ./.github/workflows/e2e-image-clean.yaml
secrets: inherit
6 changes: 0 additions & 6 deletions charts/rancher-turtles/questions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,6 @@ questions:
type: boolean
label: Cleanup CAPI Operator installation
group: "CAPI Operator cleanup settings"
- variable: rancherTurtles.features.rancher-kubeconfigs.label
default: false
description: "(Experimental) Specify that the kubeconfigs generated by Rancher should be automatically patched to contain the CAPI expected labels"
type: boolean
label: Label Rancher Kubeconfigs
group: "Rancher Turtles Features Settings"
- variable: cluster-api-operator.cluster-api.rke2.enabled
default: "true"
description: "Flag to enable or disable installation of the RKE2 provider for Cluster API. By default this is enabled."
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 @@ -8,8 +8,6 @@ rancherTurtles:
rancherInstalled: true
kubectlImage: registry.k8s.io/kubernetes/kubectl:v1.30.0
features:
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 612a3ad

Please sign in to comment.