- The `monitoring` namespace and the `kube-prometheus-stack` Helm release were adopted from existing cluster resources via the Pulumi `import` option. Be careful with renames or changes that would force a replace.
- The `monitoring` namespace and the `kube-prometheus-stack` Helm release were originally adopted from existing cluster resources and are now `protected`. Be careful with renames or changes that would force a replace.
@@ -8,7 +8,6 @@ Use this to rebuild the k3s cluster from new VMs. **It destroys everything store
- **`02-k8s-bootstrap` commands run once.** They are recorded as done in state, so after new VMs appear, `pulumi up` would report them unchanged and install nothing.
- **`02-k8s-bootstrap` commands run once.** They are recorded as done in state, so after new VMs appear, `pulumi up` would report them unchanged and install nothing.
- **`03`–`05` state describes the old cluster.** The fixed `clusterIdentifier` tells Pulumi it is still the same cluster, so it would try to update resources that no longer exist.
- **`03`–`05` state describes the old cluster.** The fixed `clusterIdentifier` tells Pulumi it is still the same cluster, so it would try to update resources that no longer exist.
- **`05-monitoring` adopts existing resources.** Its two `import` options fail on a fresh cluster, where those resources don't exist yet.
## Before you start
## Before you start
@@ -60,11 +59,11 @@ Use this to rebuild the k3s cluster from new VMs. **It destroys everything store
## 2. Clear the state of `02`–`05`
## 2. Clear the state of `02`–`05`
Only do this after the old VMs are gone. It removes Pulumi's records and doesn't touch real resources or `Pulumi.dev.yaml`.
Only do this after the old VMs are gone. It removes Pulumi's records and doesn't touch real resources or `Pulumi.dev.yaml`. `--force` is needed because `05-monitoring` protects its namespace and Helm release, so check that the old cluster is really gone before running it.
```bash
```bash
for S in 05-monitoring 04-k8s-apps 03-k8s-infra 02-k8s-bootstrap; do
for S in 05-monitoring 04-k8s-apps 03-k8s-infra 02-k8s-bootstrap; do
pulumi state delete --all --yes --stack dev --cwd "$S"
pulumi state delete --all --force --yes --stack dev --cwd "$S"
done
done
```
```
@@ -94,7 +93,7 @@ Deploy these through Gitea, because the runners have the `helm` CLI that `03` ne
1. Run the **Deploy k8s Infra** workflow manually.
1. Run the **Deploy k8s Infra** workflow manually.
2. Run the **Deploy k8s Apps** workflow manually.
2. Run the **Deploy k8s Apps** workflow manually.
3. Open a PR that removes both `import` options from `05-monitoring/index.ts`, unless they are already gone. Re-enable the **Deploy Monitoring** workflow and merge the PR, which deploys `05`. If the options were already gone, run the workflow manually instead.
3. Run the **Deploy Monitoring** workflow manually.
## 5. Verify
## 5. Verify
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.