From 208ce2120d4cb85265e5d51b44d7373d2334dcb4 Mon Sep 17 00:00:00 2001 From: Sam Dowell Date: Mon, 21 Oct 2024 16:05:28 -0700 Subject: [PATCH] PR feedback follow up for manual install (#1456) --- e2e/testcases/cli_test.go | 4 +- .../uninstall}/uninstall_configmanagement.sh | 0 installation/README.md | 50 +------------------ 3 files changed, 4 insertions(+), 50 deletions(-) rename {installation => e2e/testdata/configmanagement/uninstall}/uninstall_configmanagement.sh (100%) diff --git a/e2e/testcases/cli_test.go b/e2e/testcases/cli_test.go index 66b071319d..eefbe12edf 100644 --- a/e2e/testcases/cli_test.go +++ b/e2e/testcases/cli_test.go @@ -1809,7 +1809,7 @@ func TestACMUninstallScript(t *testing.T) { ))) nt.T.Log("Running uninstall script should fail when HNC is enabled") - out, err := nt.Shell.Command("./../../installation/uninstall_configmanagement.sh").CombinedOutput() + out, err := nt.Shell.Command("./../testdata/configmanagement/uninstall/uninstall_configmanagement.sh").CombinedOutput() if err == nil { nt.T.Fatal("Expected uninstall script to return non-zero exit code") } @@ -1836,7 +1836,7 @@ func TestACMUninstallScript(t *testing.T) { nt.Must(nt.Validate(util.ACMOperatorDeployment, configsync.ControllerNamespace, k8sobjects.DeploymentObject())) nt.T.Log("Running uninstall script to remove ACM operator") - nt.Must(nt.Shell.Command("./../../installation/uninstall_configmanagement.sh").CombinedOutput()) + nt.Must(nt.Shell.Command("./../testdata/configmanagement/uninstall/uninstall_configmanagement.sh").CombinedOutput()) nt.T.Log("Wait for legacy resources to be NotFound...") tg = taskgroup.New() diff --git a/installation/uninstall_configmanagement.sh b/e2e/testdata/configmanagement/uninstall/uninstall_configmanagement.sh similarity index 100% rename from installation/uninstall_configmanagement.sh rename to e2e/testdata/configmanagement/uninstall/uninstall_configmanagement.sh diff --git a/installation/README.md b/installation/README.md index e46d2d2ec6..71d3235b6b 100644 --- a/installation/README.md +++ b/installation/README.md @@ -1,9 +1,7 @@ # Installing Config Sync manually This document is a guide on how to manually install Config Sync on a Kubernetes -cluster without Fleet Management. - -The recommended approach is to [install Config Sync managed by fleet](https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/installing-config-sync). +cluster. This document includes configurations for some common user journeys, but is not an exhaustive list of how a Config Sync installation can be customized. @@ -15,51 +13,7 @@ This guide requires the following command line tools: - [kubectl](https://kubernetes.io/docs/tasks/tools/) - [kustomize](https://github.com/kubernetes-sigs/kustomize) -## Uninstall Config Management - -**Prerequisites**: -- Set the kubectl context in your shell to the desired cluster before proceeding. -- Ensure [hierarchy controller is disabled](https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/migrate-hierarchy-controller#kubectl) before proceeding. - - -If you have previously installed Config Management on your cluster, Config Management -must first be uninstalled before following this guide to install/upgrade Config Sync. - -You can check if Config Management is installed on your cluster with the following command: - -```shell -kubectl get configmanagement -``` - -If the output is not empty, Config Management is currently installed on the cluster -and must be uninstalled before proceeding. To uninstall Config Management, there are -two options: -- Use `nomos migrate --remove-configmanagement` -- Use the [uninstall script](uninstall_configmanagement.sh) provided in this directory. - -### Using `nomos migrate` - -Install the [nomos CLI](https://cloud.google.com/kubernetes-engine/enterprise/config-sync/docs/how-to/nomos-command) -of version 1.20.0 or greater. Then run the following command to update the cluster -in your current kubectl context: - -```shell -nomos migrate --remove-configmanagement -``` - -### Using the uninstall shell script - -The `nomos` approach is recommended, however a simple shell script is also provided -as an alternative approach that does not require installing the `nomos` binary. -The script can be run directly to update the cluster in your current kubectl context: - -```shell -./uninstall_configmanagement.sh -``` - -## Install Config Sync - -### Rendering the installation manifest +## Rendering the installation manifest A [kustomization file](kustomization.yaml) is provided in this directory with some common use cases commented out. Edit the kustomization file accordingly for