diff --git a/charts/other/app-template/README.md b/charts/other/app-template/README.md index 5a4b8129..3ebbf83d 100644 --- a/charts/other/app-template/README.md +++ b/charts/other/app-template/README.md @@ -31,128 +31,7 @@ The [CI tests](../../library/common-test/ci) contain a number of scenarios that ## Upgrade instructions -### From 1.x.x to 2.0.x - -> :warning: **IMPORTANT** Because a new label has been introduced in the controller labelSelector (which is an immutable field), Deployments cannot be upgraded in place! -> [More details](https://www.datree.io/resources/kubernetes-error-codes-field-is-immutable) - -Given the following real-life example values.yaml for app-template v1: - -
-Expand - -```yaml -image: - repository: ghcr.io/onedr0p/sabnzbd - tag: latest - pullPolicy: IfNotPresent - -podSecurityContext: - runAsUser: 568 - runAsGroup: 568 - fsGroup: 568 - fsGroupChangePolicy: "OnRootMismatch" - supplementalGroups: - - 65539 - -service: - main: - ports: - http: - port: 8080 - -ingress: - main: - enabled: true - ingressClassName: "ingress-nginx" - hosts: - - host: sabnzbd.bjw-s.dev - paths: - - path: / - -persistence: - media: - enabled: true - existingClaim: nas-media - mountPath: /data/nas-media - -probes: - liveness: - enabled: false - readiness: - enabled: false - startup: - enabled: false -``` - -
- -The values for app-template v2.x would become this: - -```yaml -defaultPodOptions: - securityContext: - runAsUser: 568 - runAsGroup: 568 - fsGroup: 568 - fsGroupChangePolicy: "OnRootMismatch" - supplementalGroups: - - 65539 - -controllers: - main: - containers: - main: - image: - repository: ghcr.io/onedr0p/sabnzbd - tag: latest - pullPolicy: IfNotPresent - - probes: - liveness: - enabled: false - readiness: - enabled: false - startup: - enabled: false - -service: - main: - ports: - http: - port: 8080 - -ingress: - main: - enabled: true - className: "ingress-nginx" - hosts: - - host: sabnzbd.bjw-s.dev - paths: - - path: / - service: - name: main - port: http - -persistence: - media: - existingClaim: nas-media - globalMounts: - - path: /data/nas-media -``` - -#### Changes in this example - -This is not meant as an exhaustive list of changes, but rather a "most common" example. - -- `podSecurityContext` has been moved to `defaultPodOptions.securityContext`. It is also possible to configure this on a controller-specific basis by moving it to `controllers.main.pod.securityContext` instead. -- `image` has been moved to `controllers.main.containers.main.image` so that multiple containers can be configured. -- `ingress.main.ingressClassName` has been renamed to `ingress.main.className`. -- `ingress.main.enabled` can be removed, since items are considered enabled by default (they can still be disabled by adding `enabled: false`). -- `ingress.main.hosts.*.paths.*.service` is now required since there is no more concept of a default "primary" service. -- `persistence.media.mountPath` has been moved to `persistence.media.globalMounts.*.path` to allow multiple mountPaths for the same persistence item. -- `persistence.media.enabled` can be removed, since items are considered enabled by default (they can still be disabled by adding `enabled: false`). -- `probes` has been moved to `controllers.main.containers.main.probes` so that multiple containers can be configured. +Upgrade instructions can be found in the [documentation](https://bjw-s.github.io/helm-charts/docs/app-template/#upgrade-instructions). ## Support diff --git a/charts/other/app-template/README.md.gotmpl b/charts/other/app-template/README.md.gotmpl index 4e7697f8..9c5b0dc6 100644 --- a/charts/other/app-template/README.md.gotmpl +++ b/charts/other/app-template/README.md.gotmpl @@ -35,128 +35,7 @@ The [CI tests](../../library/common-test/ci) contain a number of scenarios that ## Upgrade instructions -### From 1.x.x to 2.0.x - -> :warning: **IMPORTANT** Because a new label has been introduced in the controller labelSelector (which is an immutable field), Deployments cannot be upgraded in place! -> [More details](https://www.datree.io/resources/kubernetes-error-codes-field-is-immutable) - -Given the following real-life example values.yaml for app-template v1: - -
-Expand - -```yaml -image: - repository: ghcr.io/onedr0p/sabnzbd - tag: latest - pullPolicy: IfNotPresent - -podSecurityContext: - runAsUser: 568 - runAsGroup: 568 - fsGroup: 568 - fsGroupChangePolicy: "OnRootMismatch" - supplementalGroups: - - 65539 - -service: - main: - ports: - http: - port: 8080 - -ingress: - main: - enabled: true - ingressClassName: "ingress-nginx" - hosts: - - host: sabnzbd.bjw-s.dev - paths: - - path: / - -persistence: - media: - enabled: true - existingClaim: nas-media - mountPath: /data/nas-media - -probes: - liveness: - enabled: false - readiness: - enabled: false - startup: - enabled: false -``` - -
- -The values for app-template v2.x would become this: - -```yaml -defaultPodOptions: - securityContext: - runAsUser: 568 - runAsGroup: 568 - fsGroup: 568 - fsGroupChangePolicy: "OnRootMismatch" - supplementalGroups: - - 65539 - -controllers: - main: - containers: - main: - image: - repository: ghcr.io/onedr0p/sabnzbd - tag: latest - pullPolicy: IfNotPresent - - probes: - liveness: - enabled: false - readiness: - enabled: false - startup: - enabled: false - -service: - main: - ports: - http: - port: 8080 - -ingress: - main: - enabled: true - className: "ingress-nginx" - hosts: - - host: sabnzbd.bjw-s.dev - paths: - - path: / - service: - name: main - port: http - -persistence: - media: - existingClaim: nas-media - globalMounts: - - path: /data/nas-media -``` - -#### Changes in this example - -This is not meant as an exhaustive list of changes, but rather a "most common" example. - -- `podSecurityContext` has been moved to `defaultPodOptions.securityContext`. It is also possible to configure this on a controller-specific basis by moving it to `controllers.main.pod.securityContext` instead. -- `image` has been moved to `controllers.main.containers.main.image` so that multiple containers can be configured. -- `ingress.main.ingressClassName` has been renamed to `ingress.main.className`. -- `ingress.main.enabled` can be removed, since items are considered enabled by default (they can still be disabled by adding `enabled: false`). -- `ingress.main.hosts.*.paths.*.service` is now required since there is no more concept of a default "primary" service. -- `persistence.media.mountPath` has been moved to `persistence.media.globalMounts.*.path` to allow multiple mountPaths for the same persistence item. -- `persistence.media.enabled` can be removed, since items are considered enabled by default (they can still be disabled by adding `enabled: false`). -- `probes` has been moved to `controllers.main.containers.main.probes` so that multiple containers can be configured. +Upgrade instructions can be found in the [documentation](https://bjw-s.github.io/helm-charts/docs/app-template/#upgrade-instructions). ## Support diff --git a/docs/app-template/index.md b/docs/app-template/index.md index 462c920e..04f58754 100644 --- a/docs/app-template/index.md +++ b/docs/app-template/index.md @@ -27,7 +27,135 @@ examples/helm/values.yaml ## Upgrade instructions ---8<-- "charts/other/app-template/README.md:34:155" +### From 1.x.x to 2.0.x + +!!! warning + + **IMPORTANT** Because a new label has been introduced in the controller labelSelector (which is an immutable field), Deployments cannot be upgraded in place! + [More details](https://www.datree.io/resources/kubernetes-error-codes-field-is-immutable) + +!!! info + + Some items (Ingress, ports, persistence items, etc) now default to being enabled by default. However, this is not always the case for some of the `items due to overrides in the default `values.yaml`. + [More background](https://github.com/bjw-s/helm-charts/issues/205) + +Given the following real-life example values.yaml for app-template v1: + +
+Expand + +```yaml +image: + repository: ghcr.io/onedr0p/sabnzbd + tag: latest + pullPolicy: IfNotPresent + +podSecurityContext: + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + fsGroupChangePolicy: "OnRootMismatch" + supplementalGroups: + - 65539 + +service: + main: + ports: + http: + port: 8080 + +ingress: + media: + enabled: true + ingressClassName: "ingress-nginx" + hosts: + - host: sabnzbd.bjw-s.dev + paths: + - path: / + +persistence: + media: + enabled: true + existingClaim: nas-media + mountPath: /data/nas-media + +probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false +``` + +
+ +The values for app-template v2.x would become this: + +```yaml +defaultPodOptions: + securityContext: + runAsUser: 568 + runAsGroup: 568 + fsGroup: 568 + fsGroupChangePolicy: "OnRootMismatch" + supplementalGroups: + - 65539 + +controllers: + main: + containers: + main: + image: + repository: ghcr.io/onedr0p/sabnzbd + tag: latest + pullPolicy: IfNotPresent + + probes: + liveness: + enabled: false + readiness: + enabled: false + startup: + enabled: false + +service: + main: + ports: + http: + port: 8080 + +ingress: + media: + enabled: true + className: "ingress-nginx" + hosts: + - host: sabnzbd.bjw-s.dev + paths: + - path: / + service: + name: main + port: http + +persistence: + media: + existingClaim: nas-media + globalMounts: + - path: /data/nas-media +``` + +#### Changes in this example + +This is not meant as an exhaustive list of changes, but rather a "most common" example. + +- `podSecurityContext` has been moved to `defaultPodOptions.securityContext`. It is also possible to configure this on a controller-specific basis by moving it to `controllers.main.pod.securityContext` instead. +- `image` has been moved to `controllers.main.containers.main.image` so that multiple containers can be configured. +- `ingress.media.ingressClassName` has been renamed to `ingress.main.className`. +- `ingress.media.enabled` can be removed, since items are considered enabled by default (they can still be disabled by adding `enabled: false`). +- `ingress.media.hosts.*.paths.*.service` is now required since there is no more concept of a default "primary" service. +- `persistence.media.mountPath` has been moved to `persistence.media.globalMounts.*.path` to allow multiple mountPaths for the same persistence item. +- `persistence.media.enabled` can be removed, since items are considered enabled by default (they can still be disabled by adding `enabled: false`). +- `probes` has been moved to `controllers.main.containers.main.probes` so that multiple containers can be configured. ## Source code