Skip to content

Commit

Permalink
PR feedback follow up for manual install (#1456)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdowell authored Oct 21, 2024
1 parent 13e12d3 commit 208ce21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 50 deletions.
4 changes: 2 additions & 2 deletions e2e/testcases/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand All @@ -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()
Expand Down
File renamed without changes.
50 changes: 2 additions & 48 deletions installation/README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 208ce21

Please sign in to comment.