Skip to content

Commit

Permalink
chore(base-cluster): this is now supported 🥳 (#1135)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
cwrau and renovate[bot] authored Sep 17, 2024
1 parent 05583fc commit 515ce2d
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions charts/base-cluster/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[modeline]: # ( vim: set ft=markdown: )
{{- $majorVersion := index ((.Files.Get "Chart.yaml" | fromYaml).version | split ".") "_0" -}}
{{- $fluxMajorVersion := "2" -}}

{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

Expand All @@ -17,7 +19,7 @@
git init

# create empty cluster HelmRelease;
flux create helmrelease --export base-cluster -n flux-system --source HelmRepository/teuto-net.flux-system --chart base-cluster --chart-version 5.x.x > cluster.yaml
flux create helmrelease --export base-cluster -n flux-system --source HelmRepository/teuto-net.flux-system --chart base-cluster --chart-version {{ $majorVersion }}.x.x > cluster.yaml

# maybe use the following name for your cluster;
kubectl get node -o jsonpath='{.items[0].metadata.annotations.cluster\.x-k8s\.io/cluster-name}'
Expand All @@ -30,7 +32,7 @@ vi cluster.yaml
# create HelmRelease for flux to manage itself
kubectl create namespace flux-system --dry-run=client -o yaml > flux.yaml
flux create source helm --url https://fluxcd-community.github.io/helm-charts flux -n flux-system --export >> flux.yaml
flux create helmrelease --export flux -n flux-system --source HelmRepository/flux.flux-system --chart flux2 --chart-version 2.x.x >> flux.yaml
flux create helmrelease --export flux -n flux-system --source HelmRepository/flux.flux-system --chart flux2 --chart-version {{ $fluxMajorVersion }}.x.x >> flux.yaml

# add, commit and push resources
git add cluster.yaml flux.yaml
Expand All @@ -40,11 +42,11 @@ git push
# after this you should be on the KUBECONFIG for the cluster
# we explicitly do not use `flux bootstrap` or `flux install` as this creates kustomization stuff and installs flux manually
kubectl apply --server-side -f flux.yaml # ignore the errors about missing CRDs
helm install -n flux-system flux flux2 --repo https://fluxcd-community.github.io/helm-charts --version 2.x.x --atomic
helm install -n flux-system flux flux2 --repo https://fluxcd-community.github.io/helm-charts --version {{ $fluxMajorVersion }}.x.x --atomic

# manual initial installation of the chart, afterwards the chart takes over
# after the installation finished, follow the on-screen instructions to configure your flux, distribute KUBECONFIGs, ...
helm install -n flux-system base-cluster oci://ghcr.io/teutonet/teutonet-helm-charts/base-cluster --version 4.x.x --atomic --values <(cat cluster.yaml | yq -y .spec.values)
helm install -n flux-system base-cluster oci://ghcr.io/teutonet/teutonet-helm-charts/base-cluster --version {{ $majorVersion }}.x.x --atomic --values <(cat cluster.yaml | yq -y .spec.values)

# you can use this command to get the instructions again
# e.g. when adding users, gitRepositories, ...
Expand Down Expand Up @@ -302,7 +304,7 @@ haven't already.
### 5.x.x -> 6.0.0

The kyverno 2.x.x -> 3.x.x upgrade cannot be done without manual intervention, see
https://artifacthub.io/packages/helm/kyverno/kyverno#option-1---uninstallation-and-reinstallation
<https://artifacthub.io/packages/helm/kyverno/kyverno#option-1---uninstallation-and-reinstallation>

So you have to backup your resources and delete the kyverno HelmReleases before the
upgrade, they will be recreated in version 6.
Expand Down

0 comments on commit 515ce2d

Please sign in to comment.