weave-gitops
weave-gitops copied to clipboard
doc: update install and getting started for Weave GitOps to pin to a version
We currently provide no guidance within the documentation for setting appropriate controls around which updates will be automatically applied to the Weave GitOps server. By default, users will get the latest chart version and the latest image. This is most likely fine for development environments and getting started, but users will likely want to pin to either a specific version/tag or semver range (i.e. patches only) in other environments.
To do so, the HelmChart spec can be updated as per the Flux docs - https://fluxcd.io/docs/components/helm/helmreleases/
The chart.spec.version can be a fixed semver, or any semver range (i.e. >=4.0.0 <5.0.0). It is ignored for HelmRelease resources that reference a GitRepository or Bucket source.
i.e:
Pin to chart version 2.0.7:
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: ww-gitops
namespace: flux-system
spec:
chart:
spec:
chart: weave-gitops
reconcileStrategy: ChartVersion
sourceRef:
kind: HelmRepository
name: ww-gitops
version: 2.0.7
interval: 1m0s
Could also do version: 2.0.X
to accept patches, or version: 2.X.X
to accept minor updates, or a range as described above.
For image version, each time the chart updates, it sets the default image version as the latest published https://github.com/weaveworks/weave-gitops/blob/main/charts/gitops-server/values.yaml#L14. As such - in most cases, pinning the chart version should be sufficient, however a user can also override the image as shown below, for example if they wanted to test with a release candidate:
pin to a specific version.
values:
adminUser:
create: true
passwordHash: <value>
username: <value>
image:
tag: 0.8.1-rc.4
Note we publish the images both with and without a v
prefix.
In our documentation we should also describe that we try to follow SemVer with our Chart and Image versions.
Tasks:
- [ ] update example HelmRelease configuration in https://docs.gitops.weave.works/docs/installation/#install-the-helm-chart to pin to specific chart version. This version should automatically be updated on a new release.
- [ ] update Getting Started https://docs.gitops.weave.works/docs/installation/#install-the-helm-chart step 4 to include
--chart-version
specifying the latest version, as above this should automatically be updated on a new release. - [ ] Add "Managing updates" section to Installation Guide
@sympatheticmoose is this still an issue or can I close?
@JamWils still an issue. We should add guidance on this matter. The referenced PR was a tmp fix to address issues in 0.8.0
only