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

remove helm-tiller addon #19636

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion deploy/addons/aliyun_mirror.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"gcr.io/k8s-minikube/gvisor-addon": "registry.cn-hangzhou.aliyuncs.com/google_containers/gvisor-addon",
"gcr.io/k8s-minikube/kicbase": "registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase",
"gcr.io/k8s-minikube/storage-provisioner": "registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisioner",
"gcr.io/kubernetes-helm/tiller": "registry.cn-hangzhou.aliyuncs.com/google_containers/tiller",
"registry.k8s.io/addon-resizer": "registry.cn-hangzhou.aliyuncs.com/google_containers/addon-resizer",
"registry.k8s.io/busybox": "registry.cn-hangzhou.aliyuncs.com/google_containers/busybox",
"registry.k8s.io/cluster-autoscaler": "registry.cn-hangzhou.aliyuncs.com/google_containers/cluster-autoscaler",
Expand Down
4 changes: 0 additions & 4 deletions deploy/addons/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@ var (
//go:embed gvisor/*.tmpl
GvisorAssets embed.FS

// HelmTillerAssets assets for helm-tiller addon
//go:embed helm-tiller/*.tmpl helm-tiller/*.yaml
HelmTillerAssets embed.FS

// IngressDNSAssets assets for ingress-dns addon
//go:embed ingress-dns/ingress-dns-pod.yaml.tmpl
IngressDNSAssets embed.FS
Expand Down
23 changes: 0 additions & 23 deletions deploy/addons/helm-tiller/README.md

This file was deleted.

83 changes: 0 additions & 83 deletions deploy/addons/helm-tiller/helm-tiller-dp.yaml.tmpl

This file was deleted.

42 changes: 0 additions & 42 deletions deploy/addons/helm-tiller/helm-tiller-rbac.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions deploy/addons/helm-tiller/helm-tiller-svc.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions pkg/addons/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ var Addons = []*Addon{
validations: []setFn{isRuntimeContainerd},
callbacks: []setFn{EnableOrDisableAddon, verifyAddonStatus},
},
{
name: "helm-tiller",
set: SetBool,
callbacks: []setFn{EnableOrDisableAddon},
},
{
name: "ingress",
set: SetBool,
Expand Down
23 changes: 0 additions & 23 deletions pkg/minikube/assets/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,29 +525,6 @@ var Addons = map[string]*Addon{
}, map[string]string{
"GvisorAddon": "gcr.io",
}),
"helm-tiller": NewAddon([]*BinAsset{
MustBinAsset(addons.HelmTillerAssets,
"helm-tiller/helm-tiller-dp.yaml.tmpl",
vmpath.GuestAddonsDir,
"helm-tiller-dp.yaml",
"0640"),
MustBinAsset(addons.HelmTillerAssets,
"helm-tiller/helm-tiller-rbac.yaml",
vmpath.GuestAddonsDir,
"helm-tiller-rbac.yaml",
"0640"),
MustBinAsset(addons.HelmTillerAssets,
"helm-tiller/helm-tiller-svc.yaml",
vmpath.GuestAddonsDir,
"helm-tiller-svc.yaml",
"0640"),
}, false, "helm-tiller", "3rd party (Helm)", "", "https://v2.helm.sh/docs/using_helm/", map[string]string{
"Tiller": "helm/tiller:v2.17.0@sha256:4c43eb385032945cad047d2350e4945d913b90b3ab43ee61cecb32a495c6df0f",
}, map[string]string{
// GCR is deprecated in helm
// https://github.com/helm/helm/issues/10004#issuecomment-894478908
"Tiller": "ghcr.io",
}),
"ingress-dns": NewAddon([]*BinAsset{
MustBinAsset(addons.IngressDNSAssets,
"ingress-dns/ingress-dns-pod.yaml.tmpl",
Expand Down
3 changes: 0 additions & 3 deletions site/content/en/docs/contrib/tests.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ tests the registry addon
#### validateMetricsServerAddon
tests the metrics server addon by making sure "kubectl top pods" returns a sensible result

#### validateHelmTillerAddon
tests the helm tiller addon by running "helm version" inside the cluster

#### validateOlmAddon
tests the OLM addon

Expand Down
30 changes: 0 additions & 30 deletions site/content/en/docs/handbook/addons/helm-tiller.md

This file was deleted.

62 changes: 0 additions & 62 deletions test/integration/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ func TestAddons(t *testing.T) {
if !NoneDriver() { // none driver does not support ingress
args = append(args, "--addons=ingress", "--addons=ingress-dns")
}
if !arm64Platform() {
args = append(args, "--addons=helm-tiller")
}
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil {
t.Fatalf("%s failed: %v", rr.Command(), err)
Expand Down Expand Up @@ -148,7 +145,6 @@ func TestAddons(t *testing.T) {
{"Ingress", validateIngressAddon},
{"InspektorGadget", validateInspektorGadgetAddon},
{"MetricsServer", validateMetricsServerAddon},
{"HelmTiller", validateHelmTillerAddon},
{"Olm", validateOlmAddon},
{"CSI", validateCSIDriverAndSnapshots},
{"Headlamp", validateHeadlampAddon},
Expand Down Expand Up @@ -437,64 +433,6 @@ func validateMetricsServerAddon(ctx context.Context, t *testing.T, profile strin
}
}

// validateHelmTillerAddon tests the helm tiller addon by running "helm version" inside the cluster
func validateHelmTillerAddon(ctx context.Context, t *testing.T, profile string) {

defer PostMortemLogs(t, profile)

if arm64Platform() {
t.Skip("skip Helm test on arm64")
}

client, err := kapi.Client(profile)
if err != nil {
t.Fatalf("failed to get Kubernetes client for %s: %v", profile, err)
}

start := time.Now()
if err := kapi.WaitForDeploymentToStabilize(client, "kube-system", "tiller-deploy", Minutes(6)); err != nil {
t.Errorf("failed waiting for tiller-deploy deployment to stabilize: %v", err)
}
t.Logf("tiller-deploy stabilized in %s", time.Since(start))

if _, err := PodWait(ctx, t, profile, "kube-system", "app=helm", Minutes(6)); err != nil {
t.Fatalf("failed waiting for helm pod: %v", err)
}

if NoneDriver() {
_, err := exec.LookPath("socat")
if err != nil {
t.Skipf("socat is required by kubectl to complete this test")
}
}

want := "Server: &version.Version"
// Test from inside the cluster (`helm version` use pod.list permission.)
checkHelmTiller := func() error {

rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "run", "--rm", "helm-test", "--restart=Never", "--image=docker.io/alpine/helm:2.16.3", "-it", "--namespace=kube-system", "--", "version"))
if err != nil {
return err
}
if rr.Stderr.String() != "" {
t.Logf("%v: unexpected stderr: %s", rr.Command(), rr.Stderr)
}
if !strings.Contains(rr.Stdout.String(), want) {
return fmt.Errorf("%v stdout = %q, want %q", rr.Command(), rr.Stdout, want)
}
return nil
}

if err := retry.Expo(checkHelmTiller, 500*time.Millisecond, Minutes(2)); err != nil {
t.Errorf("failed checking helm tiller: %v", err.Error())
}

rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "addons", "disable", "helm-tiller", "--alsologtostderr", "-v=1"))
if err != nil {
t.Errorf("failed disabling helm-tiller addon. arg %q.s %v", rr.Command(), err)
}
}

// validateOlmAddon tests the OLM addon
func validateOlmAddon(ctx context.Context, t *testing.T, profile string) {
t.Skip("Skipping OLM addon test until https://github.com/operator-framework/operator-lifecycle-manager/issues/2534 is resolved")
Expand Down
Loading