diff --git a/.ci/mkdocs/mkdocs.yml b/.ci/mkdocs/mkdocs.yml new file mode 100644 index 00000000..1c08fc43 --- /dev/null +++ b/.ci/mkdocs/mkdocs.yml @@ -0,0 +1,82 @@ +--- +# Project information +site_name: bjw-s Helm Charts +site_url: https://bjw-s.github.io/helm-charts/ +site_author: bjw-s + +# Repository +repo_name: bjw-s/helm-charts +repo_url: https://github.com/bjw-s/helm-charts + +# Configuration +docs_dir: ../../docs +site_dir: ../../site + +theme: + name: material + custom_dir: ../../docs/overrides + features: + - announce.dismiss + - content.code.annotate + - content.code.copy + - navigation.expand + - navigation.indexes + - navigation.path + - navigation.sections + - navigation.tabs + - navigation.top + - search.suggest + palette: + scheme: slate + primary: black + accent: indigo + font: + text: Roboto + code: Roboto Mono + icon: + logo: material/kubernetes + +# Plugins +plugins: + - search: + separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' + - minify: + minify_html: true + +# Extensions +markdown_extensions: + - admonition + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets: + check_paths: true + - pymdownx.superfences + - toc: + permalink: true + toc_depth: 3 + +# Page tree +nav: + - index.md + - Common Library: + - common-library/index.md + - Storage: + - Permissions: common-library/storage/permissions.md + - Global options: common-library/storage/globalOptions.md + - Types-specific options: + - configMap: common-library/storage/types/configmap.md + - Custom: common-library/storage/types/custom.md + - emptyDir: common-library/storage/types/emptyDir.md + - hostPath: common-library/storage/types/hostPath.md + - NFS share: common-library/storage/types/nfs-share.md + - persistentVolumeClaim: common-library/storage/types/persistentVolumeClaim.md + - Secret: common-library/storage/types/secret.md + - How To...: + - common-library/howto/index.md + - Helm templates: common-library/howto/helm-templates.md + - Multiple subPaths for 1 volume: common-library/howto/multiple-subpath.md + - App Template: + - app-template/index.md diff --git a/.github/workflows/docs-release.yaml b/.github/workflows/docs-release.yaml index 17df1a17..6211e7be 100644 --- a/.github/workflows/docs-release.yaml +++ b/.github/workflows/docs-release.yaml @@ -7,8 +7,12 @@ on: - main paths: - ".github/workflows/docs-release.yaml" + - ".ci/mkdocs/mkdocs.yml" - "docs/**" +permissions: + contents: write + jobs: release-docs: name: Release documentation @@ -24,22 +28,27 @@ jobs: private_key: ${{ secrets.BJWS_APP_PRIVATE_KEY }} - name: Checkout main branch - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4 + uses: actions/checkout@v4 with: token: ${{ steps.get-app-token.outputs.token }} fetch-depth: 0 - - name: Build docs - uses: docker://ghcr.io/bjw-s/mdbook:0.4.35@sha256:ce016bc119d7501dd59e8f5f2491b0ccd6cbbb328f18ca4d6a0365ef4926e8d6 + - uses: actions/setup-python@v4 with: - args: bash -c "cd docs && mdbook build" + python-version: 3.x + + - name: Install requirements + run: pip install -r docs/requirements.txt + + - name: Build and publish docs + run: mkdocs build -f .ci/mkdocs/mkdocs.yml - name: Deploy uses: peaceiris/actions-gh-pages@v3.9.3 if: ${{ github.ref == 'refs/heads/main' }} with: github_token: ${{ steps.get-app-token.outputs.token }} - publish_dir: ./docs/book/html + publish_dir: ./site destination_dir: docs - user_name: 'bjw-s-bot[bot]' - user_email: 'bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>' + user_name: "bjw-s-bot[bot]" + user_email: "bjw-s-bot <87358111+bjw-s-bot[bot]@users.noreply.github.com>" diff --git a/.vscode/settings.json b/.vscode/settings.json index 5c288705..29d0be13 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,23 @@ { - "prettier.configPath": ".ci/prettier/.prettierrc.yaml" + "prettier.configPath": ".ci/prettier/.prettierrc.yaml", + "prettier.ignorePath": ".ci/prettier/.prettierignore", + "yaml.schemas": { + "https://json.schemastore.org/taskfile.json": [ + "Taskfile.yaml", + ".taskfiles/*.yaml" + ], + "http://json.schemastore.org/github-workflow.json": [ + ".github/workflows/*.yaml" + ], + "https://squidfunk.github.io/mkdocs-material/schema.json": [ + "mkdocs.yml" + ] + }, + "yaml.customTags": [ + "!ENV scalar", + "!ENV sequence", + "tag:yaml.org,2002:python/name:material.extensions.emoji.to_svg", + "tag:yaml.org,2002:python/name:material.extensions.emoji.twemoji", + "tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format" + ] } diff --git a/README.md b/README.md index 0495ff26..05b0bd2b 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ -## helm-charts +

helm-charts

-[![Discord](https://img.shields.io/discord/673534664354430999?style=for-the-badge&label&logo=discord&logoColor=white&color=blue)](https://discord.gg/k8s-at-home) +
@@ -49,7 +49,7 @@ If you like this project, please consider supporting my work through my [GitHub ### Discord -Join the k8s-at-home [Discord](https://discord.gg/sTMX7Vh) community on Discord. +Join the k8s-at-home [Discord](https://discord.gg/k8s-at-home) community on Discord. ### Repository topics diff --git a/charts/library/common-test/ci/advanced-values.yaml b/charts/library/common-test/ci/advanced-values.yaml index ec528757..a9853cfc 100644 --- a/charts/library/common-test/ci/advanced-values.yaml +++ b/charts/library/common-test/ci/advanced-values.yaml @@ -64,16 +64,16 @@ persistence: name: |- {{- (include "bjw-s.common.lib.chart.names.fullname" $) -}}-config advancedMounts: - main: # the controller with whe "main" identifier - main: # the container with whe "main" identifier + main: # the controller with the "main" identifier + main: # the container with the "main" identifier - path: /data/config.yaml readOnly: false subPath: config.yaml - second-container: # the container with whe "second-container" identifier + second-container: # the container with the "second-container" identifier - path: /appdata/config readOnly: true - second-controller: # the controller with whe "second-controller" identifier - main: # the container with whe "main" identifier + second-controller: # the controller with the "second-controller" identifier + main: # the container with the "main" identifier - path: /data/config.yaml readOnly: false subPath: config.yaml diff --git a/charts/library/common-test/ci/basic-values.yaml b/charts/library/common-test/ci/basic-values.yaml index f8003a6f..83d71c56 100644 --- a/charts/library/common-test/ci/basic-values.yaml +++ b/charts/library/common-test/ci/basic-values.yaml @@ -22,3 +22,8 @@ ingress: persistence: config: enabled: true + media: + enabled: true + type: persistentVolumeClaim + accessMode: ReadWriteOnce + size: 1Gi diff --git a/charts/library/common-test/tests/ingress/service_reference_test.yaml b/charts/library/common-test/tests/ingress/service_reference_test.yaml index 2f314000..057bab78 100644 --- a/charts/library/common-test/tests/ingress/service_reference_test.yaml +++ b/charts/library/common-test/tests/ingress/service_reference_test.yaml @@ -43,3 +43,71 @@ tests: name: pathService port: number: 1234 + + - it: multiple hosts with port name references should pass + set: + service: + main: + ports: + http: + port: &httpPort 8081 + http2: + enabled: true + port: &http2Port 1880 + ingress: + main: + enabled: true + className: "nginx" + hosts: + - host: http.chart-test.local + paths: + - path: / + pathType: Prefix + service: + name: main + port: http + - host: http2.chart-test.local + paths: + - path: / + pathType: Prefix + service: + name: main + port: http2 + asserts: + - documentIndex: &IngressDocument 2 + isKind: + of: Ingress + # First Ingress host + - documentIndex: *IngressDocument + equal: + path: spec.rules[0].host + value: http.chart-test.local + - documentIndex: *IngressDocument + equal: + path: spec.rules[0].http.paths[0].path + value: "/" + - documentIndex: *IngressDocument + equal: + path: spec.rules[0].http.paths[0].backend.service.name + value: "RELEASE-NAME" + - documentIndex: *IngressDocument + equal: + path: spec.rules[0].http.paths[0].backend.service.port.number + value: *httpPort + # Second Ingress host + - documentIndex: *IngressDocument + equal: + path: spec.rules[1].host + value: http2.chart-test.local + - documentIndex: *IngressDocument + equal: + path: spec.rules[1].http.paths[0].path + value: "/" + - documentIndex: *IngressDocument + equal: + path: spec.rules[1].http.paths[0].backend.service.name + value: "RELEASE-NAME" + - documentIndex: *IngressDocument + equal: + path: spec.rules[1].http.paths[0].backend.service.port.number + value: *http2Port diff --git a/charts/library/common/Chart.yaml b/charts/library/common/Chart.yaml index b0d5409e..493bb240 100644 --- a/charts/library/common/Chart.yaml +++ b/charts/library/common/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v2 name: common description: Function library for Helm charts type: library -version: 2.0.0-beta.3 +version: 2.0.0 kubeVersion: ">=1.22.0-0" keywords: - common @@ -13,7 +13,6 @@ maintainers: - name: bjw-s email: me@bjw-s.dev annotations: - # TODO: Update this before releasing artifacthub.io/changes: |- - kind: removed description: |- @@ -25,3 +24,5 @@ annotations: description: Added support for ordering (init)Containers within a controller. - kind: added description: Added support for creating Network Policies. + - kind: changed + description: Automatically detect `gateway.networking.k8s.io` API version diff --git a/charts/library/common/README.md b/charts/library/common/README.md index fd30fd44..66669530 100644 --- a/charts/library/common/README.md +++ b/charts/library/common/README.md @@ -1,11 +1,9 @@ # common -![Version: 2.0.0-beta.2](https://img.shields.io/badge/Version-2.0.0--beta.2-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) +![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) Function library for Helm charts -Since a lot of the bjw-s charts follow a similar pattern, this library was built to reduce maintenance cost between the charts that use it and try achieve a goal of being DRY. - ## Requirements Kubernetes: `>=1.22.0-0` @@ -13,13 +11,13 @@ Kubernetes: `>=1.22.0-0` ## Dependencies | Repository | Name | Version | -|------------|------|---------| +| ---------- | ---- | ------- | ## Installing the Chart This is a [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm). -**WARNING: THIS CHART IS NOT MEANT TO BE INSTALLED DIRECTLY** +**🚨 WARNING: THIS CHART IS NOT MEANT TO BE INSTALLED DIRECTLY** ## Using this library @@ -28,9 +26,9 @@ Include this chart as a dependency in your `Chart.yaml` e.g. ```yaml # Chart.yaml dependencies: -- name: common - version: 2.0.0-beta.2 - repository: https://bjw-s.github.io/helm-charts/ + - name: common + version: 2.0.0 + repository: https://bjw-s.github.io/helm-charts/ ``` For more information, take a look at the [Docs](http://bjw-s.github.io/helm-charts/docs/common-library/introduction/). @@ -39,174 +37,186 @@ For more information, take a look at the [Docs](http://bjw-s.github.io/helm-char Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. -## Custom configuration - -N/A - ## Values -**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) +**Important**: When deploying an application Helm chart you can add more values from the common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| configMaps | object | See below | Configure configMaps for the chart here. Additional configMaps can be added by adding a dictionary key similar to the 'config' object. | -| configMaps.config.annotations | object | `{}` | Annotations to add to the configMap | -| configMaps.config.data | object | `{}` | configMap data content. Helm template enabled. | -| configMaps.config.enabled | bool | `false` | Enables or disables the configMap | -| configMaps.config.labels | object | `{}` | Labels to add to the configMap | -| controllers.main.annotations | object | `{}` | Set annotations on the deployment/statefulset/daemonset/cronjob | -| controllers.main.containers.main.args | list | `[]` | Override the args for the default container | -| controllers.main.containers.main.command | list | `[]` | Override the command(s) for the default container | -| controllers.main.containers.main.env | string | `nil` | Environment variables. Template enabled. Syntax options: A) TZ: UTC B) PASSWD: '{{ .Release.Name }}' C) PASSWD: configMapKeyRef: name: config-map-name key: key-name D) PASSWD: valueFrom: secretKeyRef: name: secret-name key: key-name ... E) - name: TZ value: UTC F) - name: TZ value: '{{ .Release.Name }}' | -| controllers.main.containers.main.envFrom | list | `[]` | Secrets and/or ConfigMaps that will be loaded as environment variables. [[ref]](https://unofficial-kubernetes.readthedocs.io/en/latest/tasks/configure-pod-container/configmap/#use-case-consume-configmap-in-environment-variables) | -| controllers.main.containers.main.image.pullPolicy | string | `nil` | image pull policy | -| controllers.main.containers.main.image.repository | string | `nil` | image repository | -| controllers.main.containers.main.image.tag | string | `nil` | image tag | -| controllers.main.containers.main.lifecycle | object | `{}` | Configure the lifecycle for the container | -| controllers.main.containers.main.nameOverride | string | `nil` | Override the container name | -| controllers.main.containers.main.order | int | 99 | Override the default container order Containers get sorted alphanumerically by the `-` combination. | -| controllers.main.containers.main.probes | object | See below | [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) | -| controllers.main.containers.main.probes.liveness | object | See below | Liveness probe configuration | -| controllers.main.containers.main.probes.liveness.custom | bool | `false` | Set this to `true` if you wish to specify your own livenessProbe | -| controllers.main.containers.main.probes.liveness.enabled | bool | `true` | Enable the liveness probe | -| controllers.main.containers.main.probes.liveness.spec | object | See below | The spec field contains the values for the default livenessProbe. If you selected `custom: true`, this field holds the definition of the livenessProbe. | -| controllers.main.containers.main.probes.liveness.type | string | "TCP" | sets the probe type when not using a custom probe | -| controllers.main.containers.main.probes.readiness | object | See below | Redainess probe configuration | -| controllers.main.containers.main.probes.readiness.custom | bool | `false` | Set this to `true` if you wish to specify your own readinessProbe | -| controllers.main.containers.main.probes.readiness.enabled | bool | `true` | Enable the readiness probe | -| controllers.main.containers.main.probes.readiness.spec | object | See below | The spec field contains the values for the default readinessProbe. If you selected `custom: true`, this field holds the definition of the readinessProbe. | -| controllers.main.containers.main.probes.readiness.type | string | "TCP" | sets the probe type when not using a custom probe | -| controllers.main.containers.main.probes.startup | object | See below | Startup probe configuration | -| controllers.main.containers.main.probes.startup.custom | bool | `false` | Set this to `true` if you wish to specify your own startupProbe | -| controllers.main.containers.main.probes.startup.enabled | bool | `true` | Enable the startup probe | -| controllers.main.containers.main.probes.startup.spec | object | See below | The spec field contains the values for the default startupProbe. If you selected `custom: true`, this field holds the definition of the startupProbe. | -| controllers.main.containers.main.probes.startup.type | string | "TCP" | sets the probe type when not using a custom probe | -| controllers.main.containers.main.resources | object | `{}` | Set the resource requests / limits for the container. | -| controllers.main.containers.main.securityContext | object | `{}` | Configure the Security Context for the container | -| controllers.main.containers.main.terminationMessagePath | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle-1)] | -| controllers.main.containers.main.terminationMessagePolicy | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle-1)] | -| controllers.main.cronjob | object | See below | CronJob configuration. Required only when using `controller.type: cronjob`. | -| controllers.main.cronjob.backoffLimit | int | `6` | Limits the number of times a failed job will be retried | -| controllers.main.cronjob.concurrencyPolicy | string | `"Forbid"` | Specifies how to treat concurrent executions of a job that is created by this cron job valid values are Allow, Forbid or Replace | -| controllers.main.cronjob.failedJobsHistory | int | `1` | The number of failed Jobs to keep | -| controllers.main.cronjob.schedule | string | `"*/20 * * * *"` | Sets the CronJob time when to execute your jobs | -| controllers.main.cronjob.startingDeadlineSeconds | int | `30` | The deadline in seconds for starting the job if it misses its scheduled time for any reason | -| controllers.main.cronjob.successfulJobsHistory | int | `1` | The number of succesful Jobs to keep | -| controllers.main.cronjob.ttlSecondsAfterFinished | string | `nil` | If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. | -| controllers.main.enabled | bool | `true` | enable the controller. | -| controllers.main.initContainers | object | `{}` | Specify any initContainers here as dictionary items. Each initContainer should have its own key initContainers get sorted alphanumerically by the `-` combination. | -| controllers.main.labels | object | `{}` | Set labels on the deployment/statefulset/daemonset/cronjob | -| controllers.main.replicas | int | `1` | Number of desired pods. When using a HorizontalPodAutoscaler, set this to `null`. | -| controllers.main.revisionHistoryLimit | int | `3` | ReplicaSet revision history limit | -| controllers.main.rollingUpdate.partition | string | `nil` | Set statefulset RollingUpdate partition | -| controllers.main.rollingUpdate.surge | string | `nil` | Set deployment RollingUpdate max surge | -| controllers.main.rollingUpdate.unavailable | string | `nil` | Set deployment RollingUpdate max unavailable | -| controllers.main.statefulset | object | `{"podManagementPolicy":null,"volumeClaimTemplates":[]}` | StatefulSet configuration. Required only when using `controller.type: statefulset`. | -| controllers.main.statefulset.podManagementPolicy | string | `nil` | Set podManagementPolicy, valid values are Parallel and OrderedReady (default). | -| controllers.main.statefulset.volumeClaimTemplates | list | `[]` | Used to create individual disks for each instance. | -| controllers.main.strategy | string | `nil` | Set the controller upgrade strategy For Deployments, valid values are Recreate (default) and RollingUpdate. For StatefulSets, valid values are OnDelete and RollingUpdate (default). DaemonSets/CronJobs ignore this. | -| controllers.main.type | string | `"deployment"` | Set the controller type. Valid options are deployment, daemonset, statefulset or cronjob | -| defaultPodOptions | object | `{"affinity":{},"annotations":{},"automountServiceAccountToken":true,"dnsConfig":{},"dnsPolicy":null,"enableServiceLinks":true,"hostAliases":[],"hostIPC":false,"hostNetwork":false,"hostPID":false,"hostname":null,"imagePullSecrets":[],"labels":{},"nodeSelector":{},"priorityClassName":null,"restartPolicy":null,"runtimeClassName":null,"schedulerName":null,"securityContext":{},"terminationGracePeriodSeconds":null,"tolerations":[],"topologySpreadConstraints":[]}` | Set default options for all controllers / pods here Each of these options can be overridden on a Pod level | -| defaultPodOptions.affinity | object | `{}` | Defines affinity constraint rules. [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) | -| defaultPodOptions.annotations | object | `{}` | Set annotations on the Pod. Pod-specific values will be merged with this. | -| defaultPodOptions.automountServiceAccountToken | bool | `true` | Specifies whether a service account token should be automatically mounted. | -| defaultPodOptions.dnsConfig | object | `{}` | Configuring the ndots option may resolve nslookup issues on some Kubernetes setups. | -| defaultPodOptions.dnsPolicy | string | `nil` | Defaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true. | -| defaultPodOptions.enableServiceLinks | bool | `true` | Enable/disable the generation of environment variables for services. [[ref]](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service) | -| defaultPodOptions.hostAliases | list | `[]` | Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. [[ref]](https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/) | -| defaultPodOptions.hostIPC | bool | `false` | Use the host's ipc namespace | -| defaultPodOptions.hostNetwork | bool | `false` | When using hostNetwork make sure you set dnsPolicy to `ClusterFirstWithHostNet` | -| defaultPodOptions.hostPID | bool | `false` | Use the host's pid namespace | -| defaultPodOptions.hostname | string | `nil` | Allows specifying explicit hostname setting | -| defaultPodOptions.imagePullSecrets | list | `[]` | Set image pull secrets | -| defaultPodOptions.labels | object | `{}` | Set labels on the Pod. Pod-specific values will be merged with this. | -| defaultPodOptions.nodeSelector | object | `{}` | Node selection constraint [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) | -| defaultPodOptions.priorityClassName | string | `nil` | Custom priority class for different treatment by the scheduler | -| defaultPodOptions.restartPolicy | string | `Always`. When `controller.type` is `cronjob` it defaults to `Never`. | Set Container restart policy. | -| defaultPodOptions.runtimeClassName | string | `nil` | Allow specifying a runtimeClassName other than the default one (ie: nvidia) | -| defaultPodOptions.schedulerName | string | `nil` | Allows specifying a custom scheduler name | -| defaultPodOptions.securityContext | object | `{}` | Configure the Security Context for the Pod | -| defaultPodOptions.terminationGracePeriodSeconds | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle)] | -| defaultPodOptions.tolerations | list | `[]` | Specify taint tolerations [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) | -| defaultPodOptions.topologySpreadConstraints | list | `[]` | Defines topologySpreadConstraint rules. [[ref]](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | -| global.annotations | object | `{}` | Set additional global annotations. Helm templates can be used. | -| global.fullnameOverride | string | `nil` | Set the entire name definition | -| global.labels | object | `{}` | Set additional global labels. Helm templates can be used. | -| global.nameOverride | string | `nil` | Set an override for the prefix of the fullname | -| ingress | object | See below | Configure the ingresses for the chart here. Additional ingresses can be added by adding a dictionary key similar to the 'main' ingress. | -| ingress.main.annotations | object | `{}` | Provide additional annotations which may be required. | -| ingress.main.className | string | `nil` | Set the ingressClass that is used for this ingress. | -| ingress.main.enabled | bool | `false` | Enables or disables the ingress | -| ingress.main.hosts[0].host | string | `"chart-example.local"` | Host address. Helm template can be passed. | -| ingress.main.hosts[0].paths[0].path | string | `"/"` | Path. Helm template can be passed. | -| ingress.main.hosts[0].paths[0].service.name | string | `"main"` | Overrides the service name reference for this path This can be an actual service name, or reference a service identifier from this values.yaml | -| ingress.main.hosts[0].paths[0].service.port | string | `nil` | Overrides the service port number reference for this path | -| ingress.main.labels | object | `{}` | Provide additional labels which may be required. | -| ingress.main.nameOverride | string | `nil` | Override the name suffix that is used for this ingress. | -| ingress.main.primary | bool | `true` | Make this the primary ingress (used in probes, notes, etc...). If there is more than 1 ingress, make sure that only 1 ingress is marked as primary. | -| ingress.main.tls | list | `[]` | Configure TLS for the ingress. Both secretName and hosts can process a Helm template. | -| persistence | object | See below | Configure persistence for the chart here. Additional items can be added by adding a dictionary key similar to the 'config' key. [[ref]](https://bjw-s.github.io/helm-charts/docs/common-library/common-library-storage) | -| persistence.config.accessMode | string | `"ReadWriteOnce"` | AccessMode for the persistent volume. Make sure to select an access mode that is supported by your storage provider! [[ref]](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | -| persistence.config.advancedMounts | object | `{}` | Explicitly configure mounts for specific controllers and containers. Example: advancedMounts: main: # the controller with whe "main" identifier main: # the container with whe "main" identifier - path: /data/config.yaml readOnly: true subPath: config.yaml second-container: # the container with whe "second-container" identifier - path: /appdata/config readOnly: true second-controller: # the controller with whe "second-controller" identifier main: # the container with whe "main" identifier - path: /data/config.yaml readOnly: false subPath: config.yaml | -| persistence.config.enabled | bool | `false` | Enables or disables the persistence item. Defaults to true | -| persistence.config.existingClaim | string | `nil` | If you want to reuse an existing claim, the name of the existing PVC can be passed here. | -| persistence.config.globalMounts | list | `[]` | Configure mounts to all controllers and containers. By default the persistence item will be mounted to `/`. Example: globalMounts: - path: /config readOnly: false | -| persistence.config.retain | bool | `false` | Set to true to retain the PVC upon `helm uninstall` | -| persistence.config.size | string | `"1Gi"` | The amount of storage that is requested for the persistent volume. | -| persistence.config.storageClass | string | `nil` | Storage Class for the config volume. If set to `-`, dynamic provisioning is disabled. If set to something else, the given storageClass is used. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. | -| persistence.config.type | string | `"persistentVolumeClaim"` | Sets the persistence type Valid options are persistentVolumeClaim, emptyDir, hostPath, secret, configMap or custom | -| route | object | See below | Configure the gateway routes for the chart here. Additional routes can be added by adding a dictionary key similar to the 'main' route. [[ref]](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1alpha2) | -| route.main.annotations | object | `{}` | Provide additional annotations which may be required. | -| route.main.enabled | bool | `false` | Enables or disables the route | -| route.main.hostnames | list | `[]` | Host addresses | -| route.main.kind | string | `"HTTPRoute"` | Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute | -| route.main.labels | object | `{}` | Provide additional labels which may be required. | -| route.main.nameOverride | string | `nil` | Override the name suffix that is used for this route. | -| route.main.parentRefs | list | `[{"group":"gateway.networking.k8s.io","kind":"Gateway","name":null,"namespace":null,"sectionName":null}]` | Configure the resource the route attaches to. | -| route.main.rules | list | `[{"backendRefs":[{"group":"","kind":"Service","name":"main","namespace":null,"port":null,"weight":1}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` | Configure rules for routing. Defaults to the primary service. | -| route.main.rules[0].backendRefs | list | `[{"group":"","kind":"Service","name":"main","namespace":null,"port":null,"weight":1}]` | Configure backends where matching requests should be sent. | -| secrets | object | See below | Use this to populate secrets with the values you specify. Be aware that these values are not encrypted by default, and could therefore visible to anybody with access to the values.yaml file. Additional Secrets can be added by adding a dictionary key similar to the 'secret' object. | -| secrets.secret.annotations | object | `{}` | Annotations to add to the Secret | -| secrets.secret.enabled | bool | `false` | Enables or disables the Secret | -| secrets.secret.labels | object | `{}` | Labels to add to the Secret | -| secrets.secret.stringData | object | `{}` | Secret stringData content. Helm template enabled. | -| service | object | See below | Configure the services for the chart here. Additional services can be added by adding a dictionary key similar to the 'main' service. | -| service.main.annotations | object | `{}` | Provide additional annotations which may be required. | -| service.main.controller | string | `"main"` | Configure which controller this service should target | -| service.main.enabled | bool | `true` | Enables or disables the service | -| service.main.externalTrafficPolicy | string | `nil` | [[ref](https://kubernetes.io/docs/tutorials/services/source-ip/)] | -| service.main.extraSelectorLabels | object | `{}` | Allow adding additional match labels | -| service.main.ipFamilies | list | `[]` | The ip families that should be used. Options: IPv4, IPv6 | -| service.main.ipFamilyPolicy | string | `nil` | Specify the ip policy. Options: SingleStack, PreferDualStack, RequireDualStack | -| service.main.labels | object | `{}` | Provide additional labels which may be required. | -| service.main.nameOverride | string | `nil` | Override the name suffix that is used for this service | -| service.main.ports | object | See below | Configure the Service port information here. Additional ports can be added by adding a dictionary key similar to the 'http' service. | -| service.main.ports.http.enabled | bool | `true` | Enables or disables the port | -| service.main.ports.http.nodePort | string | `nil` | Specify the nodePort value for the LoadBalancer and NodePort service types. [[ref]](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) | -| service.main.ports.http.port | string | `nil` | The port number | -| service.main.ports.http.primary | bool | `true` | Make this the primary port (used in probes, notes, etc...) If there is more than 1 service, make sure that only 1 port is marked as primary. | -| service.main.ports.http.protocol | string | `"HTTP"` | Port protocol. Support values are `HTTP`, `HTTPS`, `TCP` and `UDP`. HTTP and HTTPS spawn a TCP service and get used for internal URL and name generation | -| service.main.ports.http.targetPort | string | `nil` | Specify a service targetPort if you wish to differ the service port from the application port. If `targetPort` is specified, this port number is used in the container definition instead of the `port` value. Therefore named ports are not supported for this field. | -| service.main.primary | bool | `true` | Make this the primary service for this controller (used in probes, notes, etc...). If there is more than 1 service targeting the controller, make sure that only 1 service is marked as primary. | -| service.main.type | string | `"ClusterIP"` | Set the service type | -| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | -| serviceAccount.create | bool | `false` | Specifies whether a service account should be created | -| serviceAccount.labels | object | `{}` | Labels to add to the service account | -| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | -| serviceMonitor | object | See below | Configure the ServiceMonitors for the chart here. Additional ServiceMonitors can be added by adding a dictionary key similar to the 'main' ServiceMonitors. | -| serviceMonitor.main.annotations | object | `{}` | Provide additional annotations which may be required. | -| serviceMonitor.main.enabled | bool | `false` | Enables or disables the serviceMonitor. | -| serviceMonitor.main.endpoints | list | See values.yaml | Configures the endpoints for the serviceMonitor. | -| serviceMonitor.main.labels | object | `{}` | Provide additional labels which may be required. | -| serviceMonitor.main.nameOverride | string | `nil` | Override the name suffix that is used for this serviceMonitor. | -| serviceMonitor.main.selector | object | `{}` | Configures a custom selector for the serviceMonitor, this takes precedence over specifying a service name. Helm templates can be used. | -| serviceMonitor.main.serviceName | string | `"{{ include \"bjw-s.common.lib.chart.names.fullname\" $ }}"` | Configures the target Service for the serviceMonitor. Helm templates can be used. | +The following table contains an overview of available values and their descriptions / default values. + +
+Expand + +| Key | Type | Default | Description | +| --------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| configMaps | object | See below | Configure configMaps for the chart here. Additional configMaps can be added by adding a dictionary key similar to the 'config' object. | +| configMaps.config.annotations | object | `{}` | Annotations to add to the configMap | +| configMaps.config.data | object | `{}` | configMap data content. Helm template enabled. | +| configMaps.config.enabled | bool | `false` | Enables or disables the configMap | +| configMaps.config.labels | object | `{}` | Labels to add to the configMap | +| controllers.main.annotations | object | `{}` | Set annotations on the deployment/statefulset/daemonset/cronjob | +| controllers.main.containers.main.args | list | `[]` | Override the args for the default container | +| controllers.main.containers.main.command | list | `[]` | Override the command(s) for the default container | +| controllers.main.containers.main.env | string | `nil` | Environment variables. Template enabled. Syntax options: A) TZ: UTC B) PASSWD: '{{ .Release.Name }}' C) PASSWD: configMapKeyRef: name: config-map-name key: key-name D) PASSWD: valueFrom: secretKeyRef: name: secret-name key: key-name ... E) - name: TZ value: UTC F) - name: TZ value: '{{ .Release.Name }}' | +| controllers.main.containers.main.envFrom | list | `[]` | Secrets and/or ConfigMaps that will be loaded as environment variables. [[ref]](https://unofficial-kubernetes.readthedocs.io/en/latest/tasks/configure-pod-container/configmap/#use-case-consume-configmap-in-environment-variables) | +| controllers.main.containers.main.image.pullPolicy | string | `nil` | image pull policy | +| controllers.main.containers.main.image.repository | string | `nil` | image repository | +| controllers.main.containers.main.image.tag | string | `nil` | image tag | +| controllers.main.containers.main.lifecycle | object | `{}` | Configure the lifecycle for the container | +| controllers.main.containers.main.nameOverride | string | `nil` | Override the container name | +| controllers.main.containers.main.order | int | 99 | Override the default container order Containers get sorted alphanumerically by the `-` combination. | +| controllers.main.containers.main.probes | object | See below | [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) | +| controllers.main.containers.main.probes.liveness | object | See below | Liveness probe configuration | +| controllers.main.containers.main.probes.liveness.custom | bool | `false` | Set this to `true` if you wish to specify your own livenessProbe | +| controllers.main.containers.main.probes.liveness.enabled | bool | `true` | Enable the liveness probe | +| controllers.main.containers.main.probes.liveness.spec | object | See below | The spec field contains the values for the default livenessProbe. If you selected `custom: true`, this field holds the definition of the livenessProbe. | +| controllers.main.containers.main.probes.liveness.type | string | "TCP" | sets the probe type when not using a custom probe | +| controllers.main.containers.main.probes.readiness | object | See below | Redainess probe configuration | +| controllers.main.containers.main.probes.readiness.custom | bool | `false` | Set this to `true` if you wish to specify your own readinessProbe | +| controllers.main.containers.main.probes.readiness.enabled | bool | `true` | Enable the readiness probe | +| controllers.main.containers.main.probes.readiness.spec | object | See below | The spec field contains the values for the default readinessProbe. If you selected `custom: true`, this field holds the definition of the readinessProbe. | +| controllers.main.containers.main.probes.readiness.type | string | "TCP" | sets the probe type when not using a custom probe | +| controllers.main.containers.main.probes.startup | object | See below | Startup probe configuration | +| controllers.main.containers.main.probes.startup.custom | bool | `false` | Set this to `true` if you wish to specify your own startupProbe | +| controllers.main.containers.main.probes.startup.enabled | bool | `true` | Enable the startup probe | +| controllers.main.containers.main.probes.startup.spec | object | See below | The spec field contains the values for the default startupProbe. If you selected `custom: true`, this field holds the definition of the startupProbe. | +| controllers.main.containers.main.probes.startup.type | string | "TCP" | sets the probe type when not using a custom probe | +| controllers.main.containers.main.resources | object | `{}` | Set the resource requests / limits for the container. | +| controllers.main.containers.main.securityContext | object | `{}` | Configure the Security Context for the container | +| controllers.main.containers.main.terminationMessagePath | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle-1)] | +| controllers.main.containers.main.terminationMessagePolicy | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle-1)] | +| controllers.main.cronjob | object | See below | CronJob configuration. Required only when using `controller.type: cronjob`. | +| controllers.main.cronjob.backoffLimit | int | `6` | Limits the number of times a failed job will be retried | +| controllers.main.cronjob.concurrencyPolicy | string | `"Forbid"` | Specifies how to treat concurrent executions of a job that is created by this cron job valid values are Allow, Forbid or Replace | +| controllers.main.cronjob.failedJobsHistory | int | `1` | The number of failed Jobs to keep | +| controllers.main.cronjob.schedule | string | `"*/20 * * * *"` | Sets the CronJob time when to execute your jobs | +| controllers.main.cronjob.startingDeadlineSeconds | int | `30` | The deadline in seconds for starting the job if it misses its scheduled time for any reason | +| controllers.main.cronjob.successfulJobsHistory | int | `1` | The number of succesful Jobs to keep | +| controllers.main.cronjob.ttlSecondsAfterFinished | string | `nil` | If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. | +| controllers.main.enabled | bool | `true` | enable the controller. | +| controllers.main.initContainers | object | `{}` | Specify any initContainers here as dictionary items. Each initContainer should have its own key initContainers get sorted alphanumerically by the `-` combination. | +| controllers.main.labels | object | `{}` | Set labels on the deployment/statefulset/daemonset/cronjob | +| controllers.main.pod | object | `{}` | | +| controllers.main.replicas | int | `1` | Number of desired pods. When using a HorizontalPodAutoscaler, set this to `null`. | +| controllers.main.revisionHistoryLimit | int | `3` | ReplicaSet revision history limit | +| controllers.main.rollingUpdate.partition | string | `nil` | Set statefulset RollingUpdate partition | +| controllers.main.rollingUpdate.surge | string | `nil` | Set deployment RollingUpdate max surge | +| controllers.main.rollingUpdate.unavailable | string | `nil` | Set deployment RollingUpdate max unavailable | +| controllers.main.statefulset | object | `{"podManagementPolicy":null,"volumeClaimTemplates":[]}` | StatefulSet configuration. Required only when using `controller.type: statefulset`. | +| controllers.main.statefulset.podManagementPolicy | string | `nil` | Set podManagementPolicy, valid values are Parallel and OrderedReady (default). | +| controllers.main.statefulset.volumeClaimTemplates | list | `[]` | Used to create individual disks for each instance. | +| controllers.main.strategy | string | `nil` | Set the controller upgrade strategy For Deployments, valid values are Recreate (default) and RollingUpdate. For StatefulSets, valid values are OnDelete and RollingUpdate (default). DaemonSets/CronJobs ignore this. | +| controllers.main.type | string | `"deployment"` | Set the controller type. Valid options are deployment, daemonset, statefulset or cronjob | +| defaultPodOptions | object | `{"affinity":{},"annotations":{},"automountServiceAccountToken":true,"dnsConfig":{},"dnsPolicy":null,"enableServiceLinks":true,"hostAliases":[],"hostIPC":false,"hostNetwork":false,"hostPID":false,"hostname":null,"imagePullSecrets":[],"labels":{},"nodeSelector":{},"priorityClassName":null,"restartPolicy":null,"runtimeClassName":null,"schedulerName":null,"securityContext":{},"terminationGracePeriodSeconds":null,"tolerations":[],"topologySpreadConstraints":[]}` | Set default options for all controllers / pods here Each of these options can be overridden on a Controller level | +| defaultPodOptions.affinity | object | `{}` | Defines affinity constraint rules. [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) | +| defaultPodOptions.annotations | object | `{}` | Set annotations on the Pod. Pod-specific values will be merged with this. | +| defaultPodOptions.automountServiceAccountToken | bool | `true` | Specifies whether a service account token should be automatically mounted. | +| defaultPodOptions.dnsConfig | object | `{}` | Configuring the ndots option may resolve nslookup issues on some Kubernetes setups. | +| defaultPodOptions.dnsPolicy | string | `nil` | Defaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true. | +| defaultPodOptions.enableServiceLinks | bool | `true` | Enable/disable the generation of environment variables for services. [[ref]](https://kubernetes.io/docs/concepts/services-networking/connect-applications-service/#accessing-the-service) | +| defaultPodOptions.hostAliases | list | `[]` | Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. [[ref]](https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/) | +| defaultPodOptions.hostIPC | bool | `false` | Use the host's ipc namespace | +| defaultPodOptions.hostNetwork | bool | `false` | When using hostNetwork make sure you set dnsPolicy to `ClusterFirstWithHostNet` | +| defaultPodOptions.hostPID | bool | `false` | Use the host's pid namespace | +| defaultPodOptions.hostname | string | `nil` | Allows specifying explicit hostname setting | +| defaultPodOptions.imagePullSecrets | list | `[]` | Set image pull secrets | +| defaultPodOptions.labels | object | `{}` | Set labels on the Pod. Pod-specific values will be merged with this. | +| defaultPodOptions.nodeSelector | object | `{}` | Node selection constraint [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) | +| defaultPodOptions.priorityClassName | string | `nil` | Custom priority class for different treatment by the scheduler | +| defaultPodOptions.restartPolicy | string | `Always`. When `controller.type` is `cronjob` it defaults to `Never`. | Set Container restart policy. | +| defaultPodOptions.runtimeClassName | string | `nil` | Allow specifying a runtimeClassName other than the default one (ie: nvidia) | +| defaultPodOptions.schedulerName | string | `nil` | Allows specifying a custom scheduler name | +| defaultPodOptions.securityContext | object | `{}` | Configure the Security Context for the Pod | +| defaultPodOptions.terminationGracePeriodSeconds | string | `nil` | [[ref](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#lifecycle)] | +| defaultPodOptions.tolerations | list | `[]` | Specify taint tolerations [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) | +| defaultPodOptions.topologySpreadConstraints | list | `[]` | Defines topologySpreadConstraint rules. [[ref]](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | +| global.annotations | object | `{}` | Set additional global annotations. Helm templates can be used. | +| global.fullnameOverride | string | `nil` | Set the entire name definition | +| global.labels | object | `{}` | Set additional global labels. Helm templates can be used. | +| global.nameOverride | string | `nil` | Set an override for the prefix of the fullname | +| ingress | object | See below | Configure the ingresses for the chart here. Additional ingresses can be added by adding a dictionary key similar to the 'main' ingress. | +| ingress.main.annotations | object | `{}` | Provide additional annotations which may be required. | +| ingress.main.className | string | `nil` | Set the ingressClass that is used for this ingress. | +| ingress.main.enabled | bool | `false` | Enables or disables the ingress | +| ingress.main.hosts[0].host | string | `"chart-example.local"` | Host address. Helm template can be passed. | +| ingress.main.hosts[0].paths[0].path | string | `"/"` | Path. Helm template can be passed. | +| ingress.main.hosts[0].paths[0].service.name | string | `"main"` | Overrides the service name reference for this path This can be an actual service name, or reference a service identifier from this values.yaml | +| ingress.main.hosts[0].paths[0].service.port | string | `nil` | Overrides the service port number reference for this path | +| ingress.main.labels | object | `{}` | Provide additional labels which may be required. | +| ingress.main.nameOverride | string | `nil` | Override the name suffix that is used for this ingress. | +| ingress.main.primary | bool | `true` | Make this the primary ingress (used in probes, notes, etc...). If there is more than 1 ingress, make sure that only 1 ingress is marked as primary. | +| ingress.main.tls | list | `[]` | Configure TLS for the ingress. Both secretName and hosts can process a Helm template. | +| networkpolicies | object | See below | Configure the networkPolicies for the chart here. Additional networkPolicies can be added by adding a dictionary key similar to the 'main' networkPolicy. | +| networkpolicies.main.controller | string | `"main"` | Configure which controller this networkPolicy should target | +| networkpolicies.main.enabled | bool | `false` | Enables or disables the networkPolicy item. Defaults to true | +| networkpolicies.main.policyTypes | list | `["Ingress","Egress"]` | The policyTypes for this networkPolicy | +| networkpolicies.main.rules | object | `{"egress":[{}],"ingress":[{}]}` | The rulesets for this networkPolicy [[ref]](https://kubernetes.io/docs/concepts/services-networking/network-policies/#networkpolicy-resource) | +| networkpolicies.main.rules.egress | list | `[{}]` | The egress rules for this networkPolicy. Allows all egress traffic by default. | +| networkpolicies.main.rules.ingress | list | `[{}]` | The ingress rules for this networkPolicy. Allows all ingress traffic by default. | +| persistence | object | See below | Configure persistence for the chart here. Additional items can be added by adding a dictionary key similar to the 'config' key. [[ref]](https://bjw-s.github.io/helm-charts/docs/common-library/common-library-storage) | +| persistence.config.accessMode | string | `"ReadWriteOnce"` | AccessMode for the persistent volume. Make sure to select an access mode that is supported by your storage provider! [[ref]](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | +| persistence.config.advancedMounts | object | `{}` | Explicitly configure mounts for specific controllers and containers. Example: advancedMounts: main: # the controller with the "main" identifier main: # the container with the "main" identifier - path: /data/config.yaml readOnly: true subPath: config.yaml second-container: # the container with the "second-container" identifier - path: /appdata/config readOnly: true second-controller: # the controller with the "second-controller" identifier main: # the container with the "main" identifier - path: /data/config.yaml readOnly: false subPath: config.yaml | +| persistence.config.enabled | bool | `false` | Enables or disables the persistence item. Defaults to true | +| persistence.config.existingClaim | string | `nil` | If you want to reuse an existing claim, the name of the existing PVC can be passed here. | +| persistence.config.globalMounts | list | `[]` | Configure mounts to all controllers and containers. By default the persistence item will be mounted to `/`. Example: globalMounts: - path: /config readOnly: false | +| persistence.config.retain | bool | `false` | Set to true to retain the PVC upon `helm uninstall` | +| persistence.config.size | string | `"1Gi"` | The amount of storage that is requested for the persistent volume. | +| persistence.config.storageClass | string | `nil` | Storage Class for the config volume. If set to `-`, dynamic provisioning is disabled. If set to something else, the given storageClass is used. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. | +| persistence.config.type | string | `"persistentVolumeClaim"` | Sets the persistence type Valid options are persistentVolumeClaim, emptyDir, hostPath, secret, configMap or custom | +| route | object | See below | Configure the gateway routes for the chart here. Additional routes can be added by adding a dictionary key similar to the 'main' route. [[ref]](https://gateway-api.sigs.k8s.io/references/spec/) | +| route.main.annotations | object | `{}` | Provide additional annotations which may be required. | +| route.main.enabled | bool | `false` | Enables or disables the route | +| route.main.hostnames | list | `[]` | Host addresses | +| route.main.kind | string | `"HTTPRoute"` | Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute | +| route.main.labels | object | `{}` | Provide additional labels which may be required. | +| route.main.nameOverride | string | `nil` | Override the name suffix that is used for this route. | +| route.main.parentRefs | list | `[{"group":"gateway.networking.k8s.io","kind":"Gateway","name":null,"namespace":null,"sectionName":null}]` | Configure the resource the route attaches to. | +| route.main.rules | list | `[{"backendRefs":[{"group":"","kind":"Service","name":"main","namespace":null,"port":null,"weight":1}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]` | Configure rules for routing. Defaults to the primary service. | +| route.main.rules[0].backendRefs | list | `[{"group":"","kind":"Service","name":"main","namespace":null,"port":null,"weight":1}]` | Configure backends where matching requests should be sent. | +| secrets | object | See below | Use this to populate secrets with the values you specify. Be aware that these values are not encrypted by default, and could therefore visible to anybody with access to the values.yaml file. Additional Secrets can be added by adding a dictionary key similar to the 'secret' object. | +| secrets.secret.annotations | object | `{}` | Annotations to add to the Secret | +| secrets.secret.enabled | bool | `false` | Enables or disables the Secret | +| secrets.secret.labels | object | `{}` | Labels to add to the Secret | +| secrets.secret.stringData | object | `{}` | Secret stringData content. Helm template enabled. | +| service | object | See below | Configure the services for the chart here. Additional services can be added by adding a dictionary key similar to the 'main' service. | +| service.main.annotations | object | `{}` | Provide additional annotations which may be required. | +| service.main.controller | string | `"main"` | Configure which controller this service should target | +| service.main.enabled | bool | `true` | Enables or disables the service | +| service.main.externalTrafficPolicy | string | `nil` | [[ref](https://kubernetes.io/docs/tutorials/services/source-ip/)] | +| service.main.extraSelectorLabels | object | `{}` | Allow adding additional match labels | +| service.main.ipFamilies | list | `[]` | The ip families that should be used. Options: IPv4, IPv6 | +| service.main.ipFamilyPolicy | string | `nil` | Specify the ip policy. Options: SingleStack, PreferDualStack, RequireDualStack | +| service.main.labels | object | `{}` | Provide additional labels which may be required. | +| service.main.nameOverride | string | `nil` | Override the name suffix that is used for this service | +| service.main.ports | object | See below | Configure the Service port information here. Additional ports can be added by adding a dictionary key similar to the 'http' service. | +| service.main.ports.http.enabled | bool | `true` | Enables or disables the port | +| service.main.ports.http.nodePort | string | `nil` | Specify the nodePort value for the LoadBalancer and NodePort service types. [[ref]](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) | +| service.main.ports.http.port | string | `nil` | The port number | +| service.main.ports.http.primary | bool | `true` | Make this the primary port (used in probes, notes, etc...) If there is more than 1 service, make sure that only 1 port is marked as primary. | +| service.main.ports.http.protocol | string | `"HTTP"` | Port protocol. Support values are `HTTP`, `HTTPS`, `TCP` and `UDP`. HTTP and HTTPS spawn a TCP service and get used for internal URL and name generation | +| service.main.ports.http.targetPort | string | `nil` | Specify a service targetPort if you wish to differ the service port from the application port. If `targetPort` is specified, this port number is used in the container definition instead of the `port` value. Therefore named ports are not supported for this field. | +| service.main.primary | bool | `true` | Make this the primary service for this controller (used in probes, notes, etc...). If there is more than 1 service targeting the controller, make sure that only 1 service is marked as primary. | +| service.main.type | string | `"ClusterIP"` | Set the service type | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `false` | Specifies whether a service account should be created | +| serviceAccount.labels | object | `{}` | Labels to add to the service account | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template | +| serviceMonitor | object | See below | Configure the ServiceMonitors for the chart here. Additional ServiceMonitors can be added by adding a dictionary key similar to the 'main' ServiceMonitors. | +| serviceMonitor.main.annotations | object | `{}` | Provide additional annotations which may be required. | +| serviceMonitor.main.enabled | bool | `false` | Enables or disables the serviceMonitor. | +| serviceMonitor.main.endpoints | list | See values.yaml | Configures the endpoints for the serviceMonitor. | +| serviceMonitor.main.labels | object | `{}` | Provide additional labels which may be required. | +| serviceMonitor.main.nameOverride | string | `nil` | Override the name suffix that is used for this serviceMonitor. | +| serviceMonitor.main.selector | object | `{}` | Configures a custom selector for the serviceMonitor, this takes precedence over specifying a service name. Helm templates can be used. | +| serviceMonitor.main.serviceName | string | `"{{ include \"bjw-s.common.lib.chart.names.fullname\" $ }}"` | Configures the target Service for the serviceMonitor. Helm templates can be used. | + +
## Support - See the [Docs](http://bjw-s.github.io/helm-charts/docs/) - Open an [issue](https://github.com/bjw-s/helm-charts/issues/new/choose) -- Join the k8s-at-home [Discord](https://discord.gg/sTMX7Vh) community +- Join the k8s-at-home [Discord](https://discord.gg/k8s-at-home) community + +--- ----------------------------------------------- Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/library/common/README.md.gotmpl b/charts/library/common/README.md.gotmpl index be774344..d339e33e 100644 --- a/charts/library/common/README.md.gotmpl +++ b/charts/library/common/README.md.gotmpl @@ -1,95 +1,64 @@ -{{- define "custom.repository.organization" -}} -bjw-s -{{- end -}} - -{{- define "custom.repository.url" -}} -https://github.com/bjw-s/helm-charts -{{- end -}} - {{- define "custom.helm.url" -}} https://bjw-s.github.io/helm-charts/ {{- end -}} -{{- define "custom.helm.path" -}} -{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }} -{{- end -}} - -{{- define "custom.notes" -}} -{{- end -}} - -{{- define "custom.requirements" -}} -## Requirements - -{{ template "chart.kubeVersionLine" . }} -{{- end -}} - -{{- define "custom.dependencies" -}} -## Dependencies - -{{ template "chart.requirementsTable" . }} -{{- end -}} - -{{- define "custom.install" -}} -## Installing the Chart - -This is a [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm). - -**WARNING: THIS CHART IS NOT MEANT TO BE INSTALLED DIRECTLY** -{{- end -}} - -{{- define "custom.usage" -}} -{{- end -}} - -{{- define "custom.configuration.header" -}} -## Configuration -{{- end -}} - -{{- define "custom.configuration.readValues" -}} -Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. -{{- end -}} - -{{- define "custom.valuesSection" -}} -## Values - -**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) - -{{ template "chart.valuesTable" . }} -{{- end -}} - -{{- define "custom.support" -}} -## Support - -- See the [Docs](http://bjw-s.github.io/helm-charts/docs/) -- Open an [issue](https://github.com/bjw-s/helm-charts/issues/new/choose) -- Join the k8s-at-home [Discord](https://discord.gg/sTMX7Vh) community -{{- end -}} - {{ template "chart.header" . }} {{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} {{ template "chart.description" . }} -{{ template "custom.notes" . }} - {{ template "chart.sourcesSection" . }} -{{ template "custom.requirements" . }} +## Requirements -{{ template "custom.dependencies" . }} +{{ template "chart.kubeVersionLine" . }} -{{ template "custom.install" . }} +## Dependencies -{{ template "custom.usage" . }} +{{ template "chart.requirementsTable" . }} -{{ template "custom.configuration.header" . }} +## Installing the Chart -{{ template "custom.configuration.readValues" . }} +This is a [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm). -{{ template "custom.custom.configuration" . }} +**🚨 WARNING: THIS CHART IS NOT MEANT TO BE INSTALLED DIRECTLY** -{{ template "custom.valuesSection" . }} +## Using this library -{{ template "custom.support" . }} +Include this chart as a dependency in your `Chart.yaml` e.g. + +```yaml +# Chart.yaml +dependencies: + - name: common + version: {{template "chart.version" .}} + repository: {{template "custom.helm.url"}} +``` + +For more information, take a look at the [Docs](http://bjw-s.github.io/helm-charts/docs/common-library/introduction/). + +## Configuration + +Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. + +## Values + +**Important**: When deploying an application Helm chart you can add more values from the common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) + +The following table contains an overview of available values and their descriptions / default values. + +
+Expand + +{{ template "chart.valuesTable" . }} + +
+ +## Support + +- See the [Docs](http://bjw-s.github.io/helm-charts/docs/) +- Open an [issue](https://github.com/bjw-s/helm-charts/issues/new/choose) +- Join the k8s-at-home [Discord](https://discord.gg/k8s-at-home) community {{ template "helm-docs.versionFooter" . }} diff --git a/charts/library/common/README_CONFIG.md.gotmpl b/charts/library/common/README_CONFIG.md.gotmpl deleted file mode 100644 index 60df7d3a..00000000 --- a/charts/library/common/README_CONFIG.md.gotmpl +++ /dev/null @@ -1,30 +0,0 @@ -{{- define "custom.notes" -}} -Since a lot of the {{ template "custom.repository.organization" . }} charts follow a similar pattern, this library was built to reduce maintenance cost between the charts that use it and try achieve a goal of being DRY. -{{- end -}} - -{{- define "custom.custom.configuration.header" -}} -## Custom configuration -{{- end -}} - -{{- define "custom.custom.configuration" -}} -{{ template "custom.custom.configuration.header" . }} - -N/A -{{- end -}} - -{{- define "custom.usage" }} -## Using this library - -Include this chart as a dependency in your `Chart.yaml` e.g. - -```yaml -# Chart.yaml -dependencies: -- name: common - version: {{ template "chart.version" . }} - repository: {{ template "custom.helm.url" }} -``` - -For more information, take a look at the [Docs](http://bjw-s.github.io/helm-charts/docs/common-library/introduction/). -{{- end -}} -{{ "" }} diff --git a/charts/library/common/templates/classes/_ingress.tpl b/charts/library/common/templates/classes/_ingress.tpl index c32d02c2..22cc32db 100644 --- a/charts/library/common/templates/classes/_ingress.tpl +++ b/charts/library/common/templates/classes/_ingress.tpl @@ -54,13 +54,28 @@ spec: backend: service: {{ $service := include "bjw-s.common.lib.service.getByIdentifier" (dict "rootContext" $rootContext "id" .service.name) | fromYaml -}} - {{ $servicePrimaryPort := dict -}} - {{ if $service -}} - {{ $servicePrimaryPort = include "bjw-s.common.lib.service.primaryPort" (dict "rootContext" $rootContext "serviceObject" $service) | fromYaml -}} + {{ $servicePort := 0 -}} + + {{ if eq (dig "port" nil .service) nil -}} + {{/* Default to the Service primary port if no port has been specified */ -}} + {{ if $service -}} + {{ $defaultServicePort := include "bjw-s.common.lib.service.primaryPort" (dict "rootContext" $rootContext "serviceObject" $service) | fromYaml -}} + {{ if $defaultServicePort -}} + {{ $servicePort = $defaultServicePort.port -}} + {{ end -}} + {{ end -}} + {{ else -}} + {{/* If a port number is given, use that */ -}} + {{ if kindIs "float64" .service.port -}} + {{ $servicePort = .service.port -}} + {{ else if kindIs "string" .service.port -}} + {{/* If a port name is given, try to resolve to a number */ -}} + {{ $servicePort = include "bjw-s.common.lib.service.getPortNumberByName" (dict "rootContext" $rootContext "serviceID" .service.name "portName" .service.port) -}} + {{ end -}} {{ end -}} name: {{ default .service.name $service.name }} port: - number: {{ default .service.port $servicePrimaryPort.port }} + number: {{ $servicePort }} {{- end }} {{- end }} {{- end }} diff --git a/charts/library/common/templates/classes/_route.tpl b/charts/library/common/templates/classes/_route.tpl index 4ccc541c..b1926683 100644 --- a/charts/library/common/templates/classes/_route.tpl +++ b/charts/library/common/templates/classes/_route.tpl @@ -7,6 +7,10 @@ within the common library. {{- $routeObject := .object -}} {{- $routeKind := $routeObject.kind | default "HTTPRoute" -}} + {{- $apiVersion := "gateway.networking.k8s.io/v1alpha2" -}} + {{- if $rootContext.Capabilities.APIVersions.Has (printf "gateway.networking.k8s.io/v1beta1/%s" $routeKind) }} + {{- $apiVersion = "gateway.networking.k8s.io/v1beta1" -}} + {{- end -}} {{- $labels := merge ($routeObject.labels | default dict) (include "bjw-s.common.lib.metadata.allLabels" $rootContext | fromYaml) @@ -16,7 +20,7 @@ within the common library. (include "bjw-s.common.lib.metadata.globalAnnotations" $rootContext | fromYaml) -}} --- -apiVersion: gateway.networking.k8s.io/v1alpha2 +apiVersion: {{ $apiVersion }} {{- if and (ne $routeKind "GRPCRoute") (ne $routeKind "HTTPRoute") (ne $routeKind "TCPRoute") (ne $routeKind "TLSRoute") (ne $routeKind "UDPRoute") }} {{- fail (printf "Not a valid route kind (%s)" $routeKind) }} {{- end }} diff --git a/charts/library/common/templates/lib/pod/fields/_volumes.tpl b/charts/library/common/templates/lib/pod/fields/_volumes.tpl index 6616dde8..56f1579a 100644 --- a/charts/library/common/templates/lib/pod/fields/_volumes.tpl +++ b/charts/library/common/templates/lib/pod/fields/_volumes.tpl @@ -93,7 +93,7 @@ Returns the value for volumes {{- $_ := set $volume.hostPath "type" . -}} {{- end -}} - {{- /* hostPath persistence type */ -}} + {{- /* nfs persistence type */ -}} {{- else if eq $persistenceValues.type "nfs" -}} {{- $_ := set $volume "nfs" dict -}} {{- $_ := set $volume.nfs "server" (required "server not set" $persistenceValues.server) -}} diff --git a/charts/library/common/templates/lib/service/_getPortNumberByName.tpl b/charts/library/common/templates/lib/service/_getPortNumberByName.tpl new file mode 100644 index 00000000..0b917470 --- /dev/null +++ b/charts/library/common/templates/lib/service/_getPortNumberByName.tpl @@ -0,0 +1,17 @@ +{{/* +Return a service port number by name for a Service object +*/}} +{{- define "bjw-s.common.lib.service.getPortNumberByName" -}} + {{- $rootContext := .rootContext -}} + {{- $identifier := .serviceID -}} + {{- $portName := .portName -}} + + {{- $service := include "bjw-s.common.lib.service.getByIdentifier" (dict "rootContext" $rootContext "id" $identifier) | fromYaml -}} + + {{- if $service -}} + {{ $servicePort := dig "ports" $portName "port" nil $service -}} + {{- if not (eq $servicePort nil) -}} + {{- $servicePort -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/charts/library/common/values.yaml b/charts/library/common/values.yaml index acc1d1f1..8440bef5 100644 --- a/charts/library/common/values.yaml +++ b/charts/library/common/values.yaml @@ -10,7 +10,7 @@ global: annotations: {} # -- Set default options for all controllers / pods here -# Each of these options can be overridden on a Pod level +# Each of these options can be overridden on a Controller level defaultPodOptions: # -- Defines affinity constraint rules. # [[ref]](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity) @@ -171,6 +171,9 @@ controllers: # size: 2Gi # storageClass: cheap-storage-class + # Controller-specific overrides for `defaultPodOptions` keys + pod: {} + containers: main: # -- Override the container name @@ -521,7 +524,7 @@ ingress: # -- Configure the gateway routes for the chart here. # Additional routes can be added by adding a dictionary key similar to the 'main' route. -# [[ref]](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1alpha2) +# [[ref]](https://gateway-api.sigs.k8s.io/references/spec/) # @default -- See below route: main: @@ -583,7 +586,7 @@ persistence: enabled: false # -- Sets the persistence type - # Valid options are persistentVolumeClaim, emptyDir, hostPath, secret, configMap or custom + # Valid options are persistentVolumeClaim, emptyDir, nfs, hostPath, secret, configMap or custom type: persistentVolumeClaim # -- Storage Class for the config volume. @@ -617,16 +620,16 @@ persistence: # -- Explicitly configure mounts for specific controllers and containers. # Example: # advancedMounts: - # main: # the controller with whe "main" identifier - # main: # the container with whe "main" identifier + # main: # the controller with the "main" identifier + # main: # the container with the "main" identifier # - path: /data/config.yaml # readOnly: true # subPath: config.yaml - # second-container: # the container with whe "second-container" identifier + # second-container: # the container with the "second-container" identifier # - path: /appdata/config # readOnly: true - # second-controller: # the controller with whe "second-controller" identifier - # main: # the container with whe "main" identifier + # second-controller: # the controller with the "second-controller" identifier + # main: # the container with the "main" identifier # - path: /data/config.yaml # readOnly: false # subPath: config.yaml diff --git a/charts/other/app-template/Chart.yaml b/charts/other/app-template/Chart.yaml index 0582094e..e021e6b2 100644 --- a/charts/other/app-template/Chart.yaml +++ b/charts/other/app-template/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 description: A common powered chart template. This can be useful for small projects that don't have their own chart. name: app-template -version: 2.0.0-beta.3 +version: 2.0.0 kubeVersion: ">=1.22.0-0" maintainers: - name: bjw-s @@ -10,12 +10,14 @@ maintainers: dependencies: - name: common repository: https://bjw-s.github.io/helm-charts - version: 2.0.0-beta.3 + version: 2.0.0 annotations: artifacthub.io/changes: |- - kind: changed description: | - Updated library version to 2.0.0-beta.3. + Updated library version to 2.0.0. links: + - name: Upgrade instructions + url: https://github.com/bjw-s/helm-charts/tree/main/charts/other/app-template#from-1xx-to-20x - name: Common library chart definition url: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/Chart.yaml diff --git a/charts/other/app-template/README.md b/charts/other/app-template/README.md new file mode 100644 index 00000000..b0a8c956 --- /dev/null +++ b/charts/other/app-template/README.md @@ -0,0 +1,150 @@ +# app-template + +![Version: 2.0.0](https://img.shields.io/badge/Version-2.0.0-informational?style=flat-square) + +A common powered chart template. This can be useful for small projects that don't have their own chart. + +## Requirements + +Kubernetes: `>=1.22.0-0` + +## Dependencies + +| Repository | Name | Version | +| ----------------------------------- | ------ | ------- | +| https://bjw-s.github.io/helm-charts | common | 2.0.0 | + +## Installing the Chart + +```bash +# Add the repository +helm repo add bjw-s https://bjw-s.github.io/helm-charts/ + +# Install the chart +helm install bjw-s app-template -f values.yaml +``` + +## Configuration + +Read through the [values.yaml](../../library/common/values.yaml) file of the [common library](../../library/common/) chart. It has several commented out suggested values. +The [CI tests](../../library/common-test/ci) contain a number of scenarios that may prove useful as well. + +## Upgrade instructions + +### From 1.x.x to 2.0.x + +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" + +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" + +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`). +- `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. + +## Support + +- See the [Docs](http://bjw-s.github.io/helm-charts/docs/) +- Open an [issue](https://github.com/bjw-s/helm-charts/issues/new/choose) +- Join the k8s-at-home [Discord](https://discord.gg/k8s-at-home) community + +--- + +Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0) diff --git a/charts/other/app-template/README.md.gotmpl b/charts/other/app-template/README.md.gotmpl new file mode 100644 index 00000000..b0a37718 --- /dev/null +++ b/charts/other/app-template/README.md.gotmpl @@ -0,0 +1,152 @@ +{{- define "custom.helm.url" -}} +https://bjw-s.github.io/helm-charts/ +{{- end -}} + +{{ template "chart.header" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.description" . }} + +{{ template "chart.sourcesSection" . }} + +## Requirements + +{{ template "chart.kubeVersionLine" . }} + +## Dependencies + +{{ template "chart.requirementsTable" . }} + +## Installing the Chart + +```bash +# Add the repository +helm repo add bjw-s {{template "custom.helm.url"}} + +# Install the chart +helm install bjw-s app-template -f values.yaml +``` + +## Configuration + +Read through the [values.yaml](../../library/common/values.yaml) file of the [common library](../../library/common/) chart. It has several commented out suggested values. +The [CI tests](../../library/common-test/ci) contain a number of scenarios that may prove useful as well. + +## Upgrade instructions + +### From 1.x.x to 2.0.x + +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" + +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" + +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`). +- `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. + +## Support + +- See the [Docs](http://bjw-s.github.io/helm-charts/docs/) +- Open an [issue](https://github.com/bjw-s/helm-charts/issues/new/choose) +- Join the k8s-at-home [Discord](https://discord.gg/k8s-at-home) community + +{{ template "helm-docs.versionFooter" . }} diff --git a/charts/other/app-template/README_CONFIG.md.gotmpl b/charts/other/app-template/README_CONFIG.md.gotmpl deleted file mode 100644 index e93d80bf..00000000 --- a/charts/other/app-template/README_CONFIG.md.gotmpl +++ /dev/null @@ -1,9 +0,0 @@ -{{- define "custom.custom.configuration.header" -}} -## Custom configuration -{{- end -}} - -{{- define "custom.custom.configuration" -}} -{{ template "custom.custom.configuration.header" . }} - -N/A -{{- end -}} diff --git a/charts/other/app-template/values.yaml b/charts/other/app-template/values.yaml index ed97d539..e69de29b 100644 --- a/charts/other/app-template/values.yaml +++ b/charts/other/app-template/values.yaml @@ -1 +0,0 @@ ---- diff --git a/docs/.gitignore b/docs/.gitignore deleted file mode 100644 index 7585238e..00000000 --- a/docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -book diff --git a/docs/src/app-template/introduction.md b/docs/app-template/index.md similarity index 82% rename from docs/src/app-template/introduction.md rename to docs/app-template/index.md index 55f0e682..bd79f9f3 100644 --- a/docs/src/app-template/introduction.md +++ b/docs/app-template/index.md @@ -1,16 +1,21 @@ +--- +hide: + - navigation +--- + # App Template ## Background Since Helm [library charts](https://helm.sh/docs/topics/library_charts/) cannot be -installed directly I have created a companion chart for the [common library](../common-library/introduction.md). +installed directly I have created a companion chart for the [common library](../common-library/index.md). ## Usage In order to use this template chart, you would deploy it as you would any other Helm chart. By setting the desired values, the common library chart will render the desired resources. -Be sure to check out the [common library docs](../common-library/introduction.md) +Be sure to check out the [common library docs](../common-library/index.md) and its [`values.yaml`](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common/values.yaml) for more information about the available configuration options. @@ -19,11 +24,16 @@ more information about the available configuration options. This is an example `values.yaml` file that would deploy the [vaultwarden](https://github.com/dani-garcia/vaultwarden) application. For more deployment examples, check out the [`examples` folder](https://github.com/bjw-s/helm-charts/tree/main/examples/). - -```yaml -{{ #include ../../../examples/helm/values.yaml }} +```yaml linenums="1" +--8<-- +examples/helm/values.yaml +--8<-- ``` +## Upgrade instructions + +--8<-- "charts/other/app-template/README.md:34:141" + ## Source code The source code for the app template chart can be found diff --git a/docs/assets/css/mdbook-admonish.css b/docs/assets/css/mdbook-admonish.css deleted file mode 100644 index 5e360387..00000000 --- a/docs/assets/css/mdbook-admonish.css +++ /dev/null @@ -1,352 +0,0 @@ -@charset "UTF-8"; -:root { - --md-admonition-icon--note: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--abstract: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--info: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--tip: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--success: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--question: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--warning: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--failure: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--danger: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--bug: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--example: - url("data:image/svg+xml;charset=utf-8,"); - --md-admonition-icon--quote: - url("data:image/svg+xml;charset=utf-8,"); - --md-details-icon: - url("data:image/svg+xml;charset=utf-8,"); -} - -:is(.admonition) { - display: flow-root; - margin: 1.5625em 0; - padding: 0 1.2rem; - color: var(--fg); - page-break-inside: avoid; - background-color: var(--bg); - border: 0 solid black; - border-inline-start-width: 0.4rem; - border-radius: 0.2rem; - box-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.05), 0 0 0.1rem rgba(0, 0, 0, 0.1); -} -@media print { - :is(.admonition) { - box-shadow: none; - } -} -:is(.admonition) > * { - box-sizing: border-box; -} -:is(.admonition) :is(.admonition) { - margin-top: 1em; - margin-bottom: 1em; -} -:is(.admonition) > .tabbed-set:only-child { - margin-top: 0; -} -html :is(.admonition) > :last-child { - margin-bottom: 1.2rem; -} - -a.admonition-anchor-link { - display: none; - position: absolute; - left: -1.2rem; - padding-right: 1rem; -} -a.admonition-anchor-link:link, a.admonition-anchor-link:visited { - color: var(--fg); -} -a.admonition-anchor-link:link:hover, a.admonition-anchor-link:visited:hover { - text-decoration: none; -} -a.admonition-anchor-link::before { - content: "§"; -} - -:is(.admonition-title, summary) { - position: relative; - margin-block: 0; - margin-inline: -1.6rem -1.2rem; - padding-block: 0.8rem; - padding-inline: 4.4rem 1.2rem; - font-weight: 700; - background-color: rgba(68, 138, 255, 0.1); - display: flex; -} -:is(.admonition-title, summary) p { - margin: 0; -} -html :is(.admonition-title, summary):last-child { - margin-bottom: 0; -} -:is(.admonition-title, summary)::before { - position: absolute; - top: 0.625em; - inset-inline-start: 1.6rem; - width: 2rem; - height: 2rem; - background-color: #448aff; - mask-image: url('data:image/svg+xml;charset=utf-8,'); - -webkit-mask-image: url('data:image/svg+xml;charset=utf-8,'); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-size: contain; - content: ""; -} -:is(.admonition-title, summary):hover a.admonition-anchor-link { - display: initial; -} - -details.admonition > summary.admonition-title::after { - position: absolute; - top: 0.625em; - inset-inline-end: 1.6rem; - height: 2rem; - width: 2rem; - background-color: currentcolor; - mask-image: var(--md-details-icon); - -webkit-mask-image: var(--md-details-icon); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-size: contain; - content: ""; - transform: rotate(0deg); - transition: transform 0.25s; -} -details[open].admonition > summary.admonition-title::after { - transform: rotate(90deg); -} - -:is(.admonition):is(.note) { - border-color: #448aff; -} - -:is(.note) > :is(.admonition-title, summary) { - background-color: rgba(68, 138, 255, 0.1); -} -:is(.note) > :is(.admonition-title, summary)::before { - background-color: #448aff; - mask-image: var(--md-admonition-icon--note); - -webkit-mask-image: var(--md-admonition-icon--note); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.abstract, .summary, .tldr) { - border-color: #00b0ff; -} - -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary) { - background-color: rgba(0, 176, 255, 0.1); -} -:is(.abstract, .summary, .tldr) > :is(.admonition-title, summary)::before { - background-color: #00b0ff; - mask-image: var(--md-admonition-icon--abstract); - -webkit-mask-image: var(--md-admonition-icon--abstract); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.info, .todo) { - border-color: #00b8d4; -} - -:is(.info, .todo) > :is(.admonition-title, summary) { - background-color: rgba(0, 184, 212, 0.1); -} -:is(.info, .todo) > :is(.admonition-title, summary)::before { - background-color: #00b8d4; - mask-image: var(--md-admonition-icon--info); - -webkit-mask-image: var(--md-admonition-icon--info); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.tip, .hint, .important) { - border-color: #00bfa5; -} - -:is(.tip, .hint, .important) > :is(.admonition-title, summary) { - background-color: rgba(0, 191, 165, 0.1); -} -:is(.tip, .hint, .important) > :is(.admonition-title, summary)::before { - background-color: #00bfa5; - mask-image: var(--md-admonition-icon--tip); - -webkit-mask-image: var(--md-admonition-icon--tip); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.success, .check, .done) { - border-color: #00c853; -} - -:is(.success, .check, .done) > :is(.admonition-title, summary) { - background-color: rgba(0, 200, 83, 0.1); -} -:is(.success, .check, .done) > :is(.admonition-title, summary)::before { - background-color: #00c853; - mask-image: var(--md-admonition-icon--success); - -webkit-mask-image: var(--md-admonition-icon--success); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.question, .help, .faq) { - border-color: #64dd17; -} - -:is(.question, .help, .faq) > :is(.admonition-title, summary) { - background-color: rgba(100, 221, 23, 0.1); -} -:is(.question, .help, .faq) > :is(.admonition-title, summary)::before { - background-color: #64dd17; - mask-image: var(--md-admonition-icon--question); - -webkit-mask-image: var(--md-admonition-icon--question); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.warning, .caution, .attention) { - border-color: #ff9100; -} - -:is(.warning, .caution, .attention) > :is(.admonition-title, summary) { - background-color: rgba(255, 145, 0, 0.1); -} -:is(.warning, .caution, .attention) > :is(.admonition-title, summary)::before { - background-color: #ff9100; - mask-image: var(--md-admonition-icon--warning); - -webkit-mask-image: var(--md-admonition-icon--warning); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.failure, .fail, .missing) { - border-color: #ff5252; -} - -:is(.failure, .fail, .missing) > :is(.admonition-title, summary) { - background-color: rgba(255, 82, 82, 0.1); -} -:is(.failure, .fail, .missing) > :is(.admonition-title, summary)::before { - background-color: #ff5252; - mask-image: var(--md-admonition-icon--failure); - -webkit-mask-image: var(--md-admonition-icon--failure); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.danger, .error) { - border-color: #ff1744; -} - -:is(.danger, .error) > :is(.admonition-title, summary) { - background-color: rgba(255, 23, 68, 0.1); -} -:is(.danger, .error) > :is(.admonition-title, summary)::before { - background-color: #ff1744; - mask-image: var(--md-admonition-icon--danger); - -webkit-mask-image: var(--md-admonition-icon--danger); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.bug) { - border-color: #f50057; -} - -:is(.bug) > :is(.admonition-title, summary) { - background-color: rgba(245, 0, 87, 0.1); -} -:is(.bug) > :is(.admonition-title, summary)::before { - background-color: #f50057; - mask-image: var(--md-admonition-icon--bug); - -webkit-mask-image: var(--md-admonition-icon--bug); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.example) { - border-color: #7c4dff; -} - -:is(.example) > :is(.admonition-title, summary) { - background-color: rgba(124, 77, 255, 0.1); -} -:is(.example) > :is(.admonition-title, summary)::before { - background-color: #7c4dff; - mask-image: var(--md-admonition-icon--example); - -webkit-mask-image: var(--md-admonition-icon--example); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -:is(.admonition):is(.quote, .cite) { - border-color: #9e9e9e; -} - -:is(.quote, .cite) > :is(.admonition-title, summary) { - background-color: rgba(158, 158, 158, 0.1); -} -:is(.quote, .cite) > :is(.admonition-title, summary)::before { - background-color: #9e9e9e; - mask-image: var(--md-admonition-icon--quote); - -webkit-mask-image: var(--md-admonition-icon--quote); - mask-repeat: no-repeat; - -webkit-mask-repeat: no-repeat; - mask-size: contain; - -webkit-mask-repeat: no-repeat; -} - -.navy :is(.admonition) { - background-color: var(--sidebar-bg); -} - -.ayu :is(.admonition), .coal :is(.admonition) { - background-color: var(--theme-hover); -} - -.rust :is(.admonition) { - background-color: var(--sidebar-bg); - color: var(--sidebar-fg); -} -.rust .admonition-anchor-link:link, .rust .admonition-anchor-link:visited { - color: var(--sidebar-fg); -} diff --git a/docs/book.toml b/docs/book.toml deleted file mode 100644 index 47e7107c..00000000 --- a/docs/book.toml +++ /dev/null @@ -1,48 +0,0 @@ -[book] -authors = ["Bernd Schorgers"] -language = "en" -multilingual = false -src = "src" -title = "Helm Charts" - -[build] -create-missing = false - -[output.html] -default-theme = "latte" -preferred-dark-theme = "macchiato" -git-repository-url = "https://github.com/bjw-s/helm-charts" -git-repository-icon = "fa-github" -no-section-label = true -additional-css = ["././assets/css/mdbook-admonish.css", "./theme/catppuccin.css", "./theme/catppuccin-highlight.css"] -git-branch = "main" -open-on-text = "[Edit this page on GitHub]" - -[output.html.fold] -enable = true -level = 1 - -[output.html.playground] -copyable = false - -[output.html.search] -limit-results = 15 - -[output.linkcheck] - -[preprocessor] - -[preprocessor.admonish] -command = "mdbook-admonish" -assets_version = "2.0.0" # do not edit: managed by `mdbook-admonish install` - -[preprocessor.emojicodes] -after = [ "links" ] - -[preprocessor.toc] -command = "mdbook-toc" -renderer = ["html"] - -[preprocessor.regex] -after = [ "links" ] -patterns = "replace-patterns.json" diff --git a/docs/src/common-library/howto/helm-templates.md b/docs/common-library/howto/helm-templates.md similarity index 96% rename from docs/src/common-library/howto/helm-templates.md rename to docs/common-library/howto/helm-templates.md index befed867..6e5399dc 100644 --- a/docs/src/common-library/howto/helm-templates.md +++ b/docs/common-library/howto/helm-templates.md @@ -1,3 +1,8 @@ +--- +hide: + - toc +--- + # Helm templates Some fields in the common library `values.yaml` allow the use of Helm templates for their values. @@ -5,7 +10,7 @@ This is often indicated by a remark similar to `Helm template enabled` in the fi This feature allows you to set the value of that key to the output of the given Helm template. -## Example: +## Example Given the following `values.yaml` diff --git a/docs/src/common-library/howto/index.md b/docs/common-library/howto/index.md similarity index 100% rename from docs/src/common-library/howto/index.md rename to docs/common-library/howto/index.md diff --git a/docs/src/common-library/howto/multiple-subpath.md b/docs/common-library/howto/multiple-subpath.md similarity index 61% rename from docs/src/common-library/howto/multiple-subpath.md rename to docs/common-library/howto/multiple-subpath.md index 26e23826..c7343040 100644 --- a/docs/src/common-library/howto/multiple-subpath.md +++ b/docs/common-library/howto/multiple-subpath.md @@ -1,10 +1,15 @@ +--- +hide: + - toc +--- + # Multiple subPaths for 1 volume It is possible to mount multiple subPaths from the same volume to a container. This can be achieved by specifying `subPath` with a list instead of a string. -## Examples: +## Example ```yaml persistence: @@ -12,20 +17,26 @@ persistence: type: configMap name: my-configMap advancedMounts: - main: # the controller with whe "main" identifier - main: # the container with whe "main" identifier + main: # (1) + main: # (2) - path: /data/config.yaml readOnly: false subPath: config.yaml - path: /data/secondConfigFile.yaml readOnly: false subPath: secondConfigFile.yaml - second-container: # the container with whe "second-container" identifier + second-container: # (3) - path: /appdata/config readOnly: true - second-controller: # the controller with whe "second-controller" identifier - main: # the container with whe "main" identifier + second-controller: # (4) + main: # (5) - path: /data/config.yaml readOnly: false subPath: config.yaml ``` + +1. the controller with the "main" identifier +2. the container with the "main" identifier +3. the container with the "second-container" identifier +4. the controller with the "second-controller" identifier +5. the container with the "main" identifier diff --git a/docs/src/common-library/introduction.md b/docs/common-library/index.md similarity index 61% rename from docs/src/common-library/introduction.md rename to docs/common-library/index.md index 518938ec..f8df8bf1 100644 --- a/docs/src/common-library/introduction.md +++ b/docs/common-library/index.md @@ -1,11 +1,16 @@ -# Common library +--- +hide: + - toc +--- -```admonish note -The Common library chart is not meant to be installed directly, application -charts use the Common library as a dependency. -See the [app template](../app-template/introduction.md ) for an example how to -deploy it. -``` +# Common Library + +!!! note + + The Common library chart is not meant to be installed directly, application + charts use the Common library as a dependency. + See the [app template](../app-template/index.md) for an example how to + deploy it. ## Background @@ -20,17 +25,17 @@ In Helm 3, their team introduced the concept of a The common library was created because I saw many charts requiring only a few select configuration options in their Helm charts. -```admonish note -Take one of the many applications like `sonarr` or `nzbget`. Each of these -charts only require setting `service`, `port`, `persistence`, `ingress` -and `image` since state and app configuration is handled by the application -itself. -``` +!!! note + + Take one of the many applications like `sonarr` or `nzbget`. Each of these + charts only require setting `service`, `port`, `persistence`, `ingress` + and `image` since state and app configuration is handled by the application + itself. In order to stay somewhat DRY (Don't Repeat Yourself) and keeping with Helm 3 usage for a Library chart, I saw this pattern and decided it was worth it to create a library. This means each one of these app charts has a -dependency on what we call the `common` library. +dependency on what I call the `common` library. ## Source code diff --git a/docs/common-library/storage/globalOptions.md b/docs/common-library/storage/globalOptions.md new file mode 100644 index 00000000..0462324f --- /dev/null +++ b/docs/common-library/storage/globalOptions.md @@ -0,0 +1,88 @@ +# Global Options + +The following options are available for all persistence types: + +## enabled + +Enables or disables the persistence item. Defaults to `true`. + +## type + +Sets the persistence type + +Valid options are: + +- [`configMap`](types/configmap.md) +- [`custom`](types/custom.md) +- [`emptyDir`](types/emptyDir.md) +- [`hostPath`](types/hostPath.md) +- [`nfs`](types/nfs-share.md) +- [`persistentVolumeClaim`](types/persistentVolumeClaim.md) +- [`secret`](types/secret.md) + +## globalMounts + +Configure mounts to all controllers and containers. By default the persistence item +will be mounted to `/`. + +**Example** + +```yaml +globalMounts: + - path: /config + readOnly: false +``` + +### path + +Where to mount the volume in the main container. Defaults to `/` + +### readOnly + +Specify if the volume should be mounted read-only + +### subPath + +Specifies a sub-path inside the referenced volume instead of its root. + +## advancedMounts + +Explicitly configure mounts for specific controllers and containers. + +**Example** + +```yaml +advancedMounts: + main: # (1) + main: # (2) + - path: /data/config.yaml + readOnly: true + subPath: config.yaml + second-container: # (3) + - path: /appdata/config + readOnly: true + + second-controller: # (4) + main: # (5) + - path: /data/config.yaml + readOnly: false + subPath: config.yaml +``` + +1. the controller with the "main" identifier +2. the container with the "main" identifier +3. the container with the "second-container" identifier +4. the controller with the "second-controller" identifier +5. the container with the "main" identifier + +### path + +Where to mount the volume in the main container. Defaults to `/` + +### readOnly + +Specify if the volume should be mounted read-only + +### subPath + +Specifies a sub-path inside the referenced volume instead of its root. diff --git a/docs/src/common-library/storage/permissions.md b/docs/common-library/storage/permissions.md similarity index 100% rename from docs/src/common-library/storage/permissions.md rename to docs/common-library/storage/permissions.md diff --git a/docs/common-library/storage/types/configmap.md b/docs/common-library/storage/types/configmap.md new file mode 100644 index 00000000..a70456b9 --- /dev/null +++ b/docs/common-library/storage/types/configmap.md @@ -0,0 +1,31 @@ +--- +hide: + - toc +--- + +# ConfigMap + +In order to mount a configMap to a mount point within the Pod you can use the +`configMap` type persistence item. + +| Field | Mandatory | Docs / Description | +| ------------- | --------- | -------------------------------------------------------------------------- | +| `name` | Yes | Which configMap should be mounted. Supports Helm templating. | +| `defaultMode` | No | The default file access permission bit. | +| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | + +!!! note + + Even if not specified, the configMap will be read-only. + +## Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: configMap + name: mySettings +``` + +This will mount the contents of the pre-existing `mySettings` configMap to `/config`. diff --git a/docs/common-library/storage/types/custom.md b/docs/common-library/storage/types/custom.md new file mode 100644 index 00000000..024fbbee --- /dev/null +++ b/docs/common-library/storage/types/custom.md @@ -0,0 +1,34 @@ +--- +hide: + - toc +--- + +# Custom + +When you wish to specify a custom volume, you can use the `custom` type. +This can be used for example to mount configMap or Secret objects. + +See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/) +for more information. + +| Field | Mandatory | Docs / Description | +| ------------ | --------- | -------------------------------- | +| `volumeSpec` | Yes | Define the raw Volume spec here. | + +## Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: custom + volumeSpec: + downwardAPI: + items: + - path: "labels" + fieldRef: + fieldPath: metadata.labels + - path: "annotations" + fieldRef: + fieldPath: metadata.annotations +``` diff --git a/docs/common-library/storage/types/emptyDir.md b/docs/common-library/storage/types/emptyDir.md new file mode 100644 index 00000000..6ffb6f54 --- /dev/null +++ b/docs/common-library/storage/types/emptyDir.md @@ -0,0 +1,28 @@ +--- +hide: + - toc +--- + +# Empty Dir + +Sometimes you need to share some data between containers, or need some +scratch space. That is where an emptyDir can come in. + +See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) +for more information. + +| Field | Mandatory | Docs / Description | +| ----------- | --------- | ---------------------------------------------------------------------------------------------------------------- | +| `medium` | No | Set this to `Memory` to mount a tmpfs (RAM-backed filesystem) instead of the storage medium that backs the node. | +| `sizeLimit` | No | If the `SizeMemoryBackedVolumes` feature gate is enabled, you can specify a size for memory backed volumes. | + +## Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: emptyDir +``` + +This will create an ephemeral emptyDir volume and mount it to `/config`. diff --git a/docs/common-library/storage/types/hostPath.md b/docs/common-library/storage/types/hostPath.md new file mode 100644 index 00000000..8e3397fe --- /dev/null +++ b/docs/common-library/storage/types/hostPath.md @@ -0,0 +1,32 @@ +--- +hide: + - toc +--- + +# Host path + +In order to mount a path from the node where the Pod is running you can use a +`hostPath` type persistence item. + +This can also be used to mount an attached USB device to a Pod. Note that +this will most likely also require setting an elevated `securityContext`. + +See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) +for more information. + +| Field | Mandatory | Docs / Description | +| -------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | +| `hostPath` | Yes | Which path on the host should be mounted. | +| `hostPathType` | No | Specifying a hostPathType adds a check before trying to mount the path. See Kubernetes documentation for options. | + +## Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: hostPath + hostPath: /dev +``` + +This will mount the `/dev` folder from the underlying host to `/dev` in the container. diff --git a/docs/common-library/storage/types/nfs-share.md b/docs/common-library/storage/types/nfs-share.md new file mode 100644 index 00000000..9d0e52cf --- /dev/null +++ b/docs/common-library/storage/types/nfs-share.md @@ -0,0 +1,32 @@ +--- +hide: + - toc +--- + +# NFS Share + +To mount an NFS share to your Pod you can either pre-create a persistentVolumeClaim +referring to it, or you can specify an inline NFS volume: + +!!! note + + Mounting an NFS share this way does not allow for specifying mount options. + If you require these, you must create a PVC to mount the share. + +| Field | Mandatory | Docs / Description | +| -------- | --------- | ------------------------------------------ | +| `server` | Yes | Host name or IP address of the NFS server. | +| `path` | Yes | The path on the server to mount. | + +## Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: nfs + server: 10.10.0.8 + path: /tank/nas/library +``` + +This will mount the NFS share `/tank/nas/library` on server `10.10.0.8` to `/config`. diff --git a/docs/common-library/storage/types/persistentVolumeClaim.md b/docs/common-library/storage/types/persistentVolumeClaim.md new file mode 100644 index 00000000..065ec654 --- /dev/null +++ b/docs/common-library/storage/types/persistentVolumeClaim.md @@ -0,0 +1,57 @@ +# Persistent Volume Claim + +This is probably the most common storage type, therefore it is also the +default when no `type` is specified. + +It can be attached in two ways. + +- [Dynamically provisioned](#dynamically-provisioned) +- [Existing claim](#existing-claim) + +## Dynamically provisioned + +Charts can be configured to create the required persistentVolumeClaim +manifests on the fly. + +| Field | Mandatory | Docs / Description | +| -------------- | --------- | ------------------------------------------------------------------------------------ | +| `accessMode` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | +| `size` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#resources) | +| `nameOverride` | No | Override the name suffix that is used for this volume. | +| `storageClass` | No | Storage class to use for this volume. | +| `retain` | No | Set to true to retain the PVC upon `helm uninstall`. | + +### Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: persistentVolumeClaim + accessMode: ReadWriteOnce + size: 1Gi +``` + +This will create a 1Gi RWO PVC named `RELEASE-NAME-config` with the default +storageClass, which will mount to `/config`. + +## Existing claim + +Charts can be configured to attach to a pre-existing persistentVolumeClaim. + +| Field | Mandatory | Docs / Description | +| --------------- | --------- | ------------------------------------------------------ | +| `existingClaim` | Yes | Name of the existing PVC | +| `nameOverride` | No | Override the name suffix that is used for this volume. | + +### Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: persistentVolumeClaim + existingClaim: myAppData +``` + +This will mount an existing PVC named `myAppData` to `/config`. diff --git a/docs/common-library/storage/types/secret.md b/docs/common-library/storage/types/secret.md new file mode 100644 index 00000000..5c1a49c2 --- /dev/null +++ b/docs/common-library/storage/types/secret.md @@ -0,0 +1,31 @@ +--- +hide: + - toc +--- + +# Secret + +In order to mount a Secret to a mount point within the Pod you can use the +`secret` type persistence item. + +| Field | Mandatory | Docs / Description | +| ------------- | --------- | -------------------------------------------------------------------------- | +| `name` | Yes | Which Secret should be mounted. Supports Helm templating. | +| `defaultMode` | No | The default file access permission bit. | +| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | + +!!! note + + Even if not specified, the Secret will be read-only. + +## Minimal configuration + +```yaml +persistence: + config: + enabled: true + type: secret + name: mySecret +``` + +This will mount the contents of the pre-existing `mySecret` Secret to `/config`. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..4f971cec --- /dev/null +++ b/docs/index.md @@ -0,0 +1,9 @@ +--- +hide: + - navigation + - toc +--- + +--8<-- +README.md +--8<-- diff --git a/docs/overrides/main.html b/docs/overrides/main.html new file mode 100644 index 00000000..3ef8d3cb --- /dev/null +++ b/docs/overrides/main.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} {% block announce %} ⚠️ Common Library and +app-template v2.0 have been released. Please raise any issues over at the +GitHub repo. {% endblock %} diff --git a/docs/replace-patterns.json b/docs/replace-patterns.json deleted file mode 100644 index 62a27b96..00000000 --- a/docs/replace-patterns.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "pattern" : "\n### 📖 Docs[\\s\\S\n]*?---\n", - "template" : "" - } -] diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 00000000..8b075042 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,5 @@ +mkdocs~=1.5,>=1.5.3 +mkdocs-material-extensions~=1.2 +pygments~=2.16 +pymdown-extensions~=10.2 +mkdocs-minify-plugin diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md deleted file mode 100644 index 6d611067..00000000 --- a/docs/src/SUMMARY.md +++ /dev/null @@ -1,29 +0,0 @@ -# Summary - -# Welcome - ---- - -- [Introduction](introduction.md) - ---- - -# Helm Charts - -- [Common Library](common-library/introduction.md) - - - [Storage](common-library/storage/index.md) - - [Permissions](common-library/storage/permissions.md) - - [Storage types](common-library/storage/types.md) - - [PersistentVolumeClaim](common-library/storage/types/pvc.md) - - [EmptyDir](common-library/storage/types/emptydir.md) - - [HostPath](common-library/storage/types/hostpath.md) - - [ConfigMap](common-library/storage/types/configmap.md) - - [Secret](common-library/storage/types/secret.md) - - [NFS share](common-library/storage/types/nfs-share.md) - - [Custom](common-library/storage/types/custom.md) - - [How to...](common-library/howto/index.md) - - [Multiple subPaths for 1 volume](common-library/howto/multiple-subpath.md) - - [Helm templates](common-library/howto/helm-templates.md) - -- [App Template](app-template/introduction.md) diff --git a/docs/src/common-library/storage/index.md b/docs/src/common-library/storage/index.md deleted file mode 100644 index 4798236d..00000000 --- a/docs/src/common-library/storage/index.md +++ /dev/null @@ -1,4 +0,0 @@ -# Common library Storage - -This page describes the different ways you can configure and attach storage to charts -using the common library. diff --git a/docs/src/common-library/storage/types.md b/docs/src/common-library/storage/types.md deleted file mode 100644 index 8e0f4471..00000000 --- a/docs/src/common-library/storage/types.md +++ /dev/null @@ -1,3 +0,0 @@ -# Storage types - -Here you can find information on the different types of storage available in the common library chart. diff --git a/docs/src/common-library/storage/types/configmap.md b/docs/src/common-library/storage/types/configmap.md deleted file mode 100644 index fc3c58e7..00000000 --- a/docs/src/common-library/storage/types/configmap.md +++ /dev/null @@ -1,25 +0,0 @@ -# ConfigMap - -In order to mount a configMap to a mount point within the Pod you can use the -`configMap` type persistence item. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | --------------------------------------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `name` | Yes | Which configMap should be mounted. Supports Helm templating. | -| `defaultMode` | No | The default file access permission bit. | -| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | -| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the configMap will be read-only. | - -## Minimal configuration: - -```yaml -persistence: - config: - enabled: true - type: configMap - name: mySettings -``` - -This will mount the contents of the pre-existing `mySettings` configMap to `/config`. diff --git a/docs/src/common-library/storage/types/custom.md b/docs/src/common-library/storage/types/custom.md deleted file mode 100644 index b97f2b5a..00000000 --- a/docs/src/common-library/storage/types/custom.md +++ /dev/null @@ -1,16 +0,0 @@ -# Custom - -When you wish to specify a custom volume, you can use the `custom` type. -This can be used for example to mount configMap or Secret objects. - -See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/) -for more information. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `volumeSpec` | Yes | Define the raw Volume spec here. | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to the value of `hostPath`. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | diff --git a/docs/src/common-library/storage/types/emptydir.md b/docs/src/common-library/storage/types/emptydir.md deleted file mode 100644 index 37e3964a..00000000 --- a/docs/src/common-library/storage/types/emptydir.md +++ /dev/null @@ -1,27 +0,0 @@ -# Empty Dir - -Sometimes you need to share some data between containers, or need some -scratch space. That is where an emptyDir can come in. - -See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) -for more information. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ---------------------------------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `medium` | No | Set this to `Memory` to mount a tmpfs (RAM-backed filesystem) instead of the storage medium that backs the node. | -| `sizeLimit` | No | If the `SizeMemoryBackedVolumes` feature gate is enabled, you can specify a size for memory backed volumes. | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | - -## Minimal configuration: - -```yaml -persistence: - config: - enabled: true - type: emptyDir -``` - -This will create an ephemeral emptyDir volume and mount it to `/config`. diff --git a/docs/src/common-library/storage/types/hostpath.md b/docs/src/common-library/storage/types/hostpath.md deleted file mode 100644 index 808a9d8c..00000000 --- a/docs/src/common-library/storage/types/hostpath.md +++ /dev/null @@ -1,32 +0,0 @@ -# Host path - -In order to mount a path from the node where the Pod is running you can use a -`hostPath` type persistence item. - -This can also be used to mount an attached USB device to a Pod. Note that -this will most likely also require setting an elevated `securityContext`. - -See the [Kubernetes docs](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) -for more information. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ----------------------------------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `hostPath` | Yes | Which path on the host should be mounted. | -| `hostPathType` | No | Specifying a hostPathType adds a check before trying to mount the path. See Kubernetes documentation for options. | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to the value of `hostPath`. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | - -## Minimal configuration: - -```yaml -persistence: - config: - enabled: true - type: hostPath - hostPath: /dev -``` - -This will mount the `/dev` folder from the underlying host to `/dev` in the container. diff --git a/docs/src/common-library/storage/types/nfs-share.md b/docs/src/common-library/storage/types/nfs-share.md deleted file mode 100644 index 5a458299..00000000 --- a/docs/src/common-library/storage/types/nfs-share.md +++ /dev/null @@ -1,31 +0,0 @@ -# NFS Share - -To mount an NFS share to your Pod you can either pre-create a persistentVolumeClaim -referring to it, or you can specify an inline NFS volume: - -```admonish note -Mounting an NFS share this way does not allow for specifying mount options. -If you require these, you must create a PVC to mount the share. -``` - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | -| `enabled` | Yes | | -| `type` | Yes | | -| `server` | Yes | Host name or IP address of the NFS server. | -| `path` | Yes | The path on the server to mount. | -| `mountPath` | No | The path on the pod to mount to. Defaults to `/` | -| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the Secret will be read-only. | - -## Minimal configuration: - -```yaml -persistence: - config: - enabled: true - type: nfs - server: 10.10.0.8 - path: /tank/nas/library -``` - -This will mount the NFS share `/tank/nas/library` on server `10.10.0.8` to `/config`. diff --git a/docs/src/common-library/storage/types/pvc.md b/docs/src/common-library/storage/types/pvc.md deleted file mode 100644 index d9e58903..00000000 --- a/docs/src/common-library/storage/types/pvc.md +++ /dev/null @@ -1,66 +0,0 @@ -# Persistent Volume Claim - -This is probably the most common storage type, therefore it is also the -default when no `type` is specified. - -It can be attached in two ways. - -- [Dynamically provisioned](#dynamically-provisioned) -- [Existing claim](#existing-claim) - -## Dynamically provisioned - -Charts can be configured to create the required persistentVolumeClaim -manifests on the fly. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `accessMode` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) | -| `size` | Yes | [link](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#resources) | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | -| `storageClass` | No | Storage class to use for this volume. | -| `retain` | No | Set to true to retain the PVC upon `helm uninstall`. | - -### Minimal configuration: - -```yaml -persistence: - config: - enabled: true - type: pvc - accessMode: ReadWriteOnce - size: 1Gi -``` - -This will create a 1Gi RWO PVC named `RELEASE-NAME-config` with the default -storageClass, which will mount to `/config`. - -## Existing claim - -Charts can be configured to attach to a pre-existing persistentVolumeClaim. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------- | -| `enabled` | Yes | | -| `type` | Yes | | -| `existingClaim` | Yes | Name of the existing PVC | -| `mountPath` | No | Where to mount the volume in the main container. Defaults to `/`. | -| `subPath` | No | Specifies a sub-path inside the referenced volume instead of its root. | -| `readOnly` | No | Specify if the volume should be mounted read-only. | -| `nameOverride` | No | Override the name suffix that is used for this volume. | - -### Minimal configuration: - -```yaml -persistence: - config: - enabled: true - type: pvc - existingClaim: myAppData -``` - -This will mount an existing PVC named `myAppData` to `/config`. diff --git a/docs/src/common-library/storage/types/secret.md b/docs/src/common-library/storage/types/secret.md deleted file mode 100644 index 295313d5..00000000 --- a/docs/src/common-library/storage/types/secret.md +++ /dev/null @@ -1,25 +0,0 @@ -# Secret - -In order to mount a Secret to a mount point within the Pod you can use the -`secret` type persistence item. - -| Field | Mandatory | Docs / Description | -| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------ | -| `enabled` | Yes | | -| `type` | Yes | | -| `name` | Yes | Which Secret should be mounted. Supports Helm templating. | -| `defaultMode` | No | The default file access permission bit. | -| `items` | No | Specify item-specific configuration. Will be passed 1:1 to the volumeSpec. | -| `readOnly` | No | Explicitly specify if the volume should be mounted read-only. Even if not specified, the Secret will be read-only. | - -## Minimal configuration: - -```yaml -persistence: - config: - enabled: true - type: secret - name: mySecret -``` - -This will mount the contents of the pre-existing `mySecret` Secret to `/config`. diff --git a/docs/src/introduction.md b/docs/src/introduction.md deleted file mode 100644 index 5e50cccb..00000000 --- a/docs/src/introduction.md +++ /dev/null @@ -1 +0,0 @@ -{{ #include ../../README.md }} diff --git a/docs/theme/catppuccin-highlight.css b/docs/theme/catppuccin-highlight.css deleted file mode 100644 index 6c3c4fa6..00000000 --- a/docs/theme/catppuccin-highlight.css +++ /dev/null @@ -1,359 +0,0 @@ -.mocha code, -.mocha .hljs { - background: #181825; -} -.mocha code .hljs-attr, -.mocha code .hljs-string { - color: #a6e3a1; -} -.mocha code .hljs-tag { - color: #f38ba8; -} -.mocha code .hljs-name { - color: #f2cdcd; -} -.mocha pre .hljs { - background: #181825 !important; -} -.mocha pre .hljs-params { - color: #f38ba8 !important; -} -.mocha pre .hljs-built_in, -.mocha pre .hljs-selector-tag, -.mocha pre .hljs-section, -.mocha pre .hljs-link { - color: #74c7ec !important; -} -.mocha pre .hljs-keyword { - color: #cba6f7 !important; -} -.mocha pre .hljs, -.mocha pre .hljs-subst { - color: #a6adc8 !important; -} -.mocha pre .hljs-title { - color: #89b4fa !important; -} -.mocha pre .hljs-attr, -.mocha pre .hljs-meta-keyword { - color: #a6e3a1 !important; -} -.mocha pre .hljs-type { - color: #89b4fa !important; -} -.mocha pre .hljs-string { - color: #a6e3a1 !important; -} -.mocha pre .hljs-tag { - color: #f38ba8 !important; -} -.mocha pre .hljs-meta, -.mocha pre .hljs-name, -.mocha pre .hljs-symbol, -.mocha pre .hljs-bullet, -.mocha pre .hljs-addition, -.mocha pre .hljs-variable, -.mocha pre .hljs-template-tag, -.mocha pre .hljs-template-variable { - color: #f2cdcd !important; -} -.mocha pre .hljs-addition { - background-color: #181825 !important; - color: #a6e3a1 !important; -} -.mocha pre .hljs-deletion { - background-color: #181825 !important; - color: #f38ba8 !important; -} -.mocha pre .hljs-comment, -.mocha pre .hljs-quote { - color: #585b70 !important; -} -.mocha pre .hljs-keyword, -.mocha pre .hljs-selector-tag, -.mocha pre .hljs-literal, -.mocha pre .hljs-title, -.mocha pre .hljs-section, -.mocha pre .hljs-doctag, -.mocha pre .hljs-type, -.mocha pre .hljs-name, -.mocha pre .hljs-strong { - font-weight: bold !important; -} -.mocha pre .hljs-literal, -.mocha pre .hljs-number { - color: #fab387 !important; -} -.mocha pre .hljs-emphasis { - font-style: italic !important; -} - -.macchiato code, -.macchiato .hljs { - background: #1e2030; -} -.macchiato code .hljs-attr, -.macchiato code .hljs-string { - color: #a6da95; -} -.macchiato code .hljs-tag { - color: #ed8796; -} -.macchiato code .hljs-name { - color: #f0c6c6; -} -.macchiato pre .hljs { - background: #1e2030 !important; -} -.macchiato pre .hljs-params { - color: #ed8796 !important; -} -.macchiato pre .hljs-built_in, -.macchiato pre .hljs-selector-tag, -.macchiato pre .hljs-section, -.macchiato pre .hljs-link { - color: #7dc4e4 !important; -} -.macchiato pre .hljs-keyword { - color: #c6a0f6 !important; -} -.macchiato pre .hljs, -.macchiato pre .hljs-subst { - color: #a5adcb !important; -} -.macchiato pre .hljs-title { - color: #8aadf4 !important; -} -.macchiato pre .hljs-attr, -.macchiato pre .hljs-meta-keyword { - color: #a6da95 !important; -} -.macchiato pre .hljs-type { - color: #8aadf4 !important; -} -.macchiato pre .hljs-string { - color: #a6da95 !important; -} -.macchiato pre .hljs-tag { - color: #ed8796 !important; -} -.macchiato pre .hljs-meta, -.macchiato pre .hljs-name, -.macchiato pre .hljs-symbol, -.macchiato pre .hljs-bullet, -.macchiato pre .hljs-addition, -.macchiato pre .hljs-variable, -.macchiato pre .hljs-template-tag, -.macchiato pre .hljs-template-variable { - color: #f0c6c6 !important; -} -.macchiato pre .hljs-addition { - background-color: #1e2030 !important; - color: #a6da95 !important; -} -.macchiato pre .hljs-deletion { - background-color: #1e2030 !important; - color: #ed8796 !important; -} -.macchiato pre .hljs-comment, -.macchiato pre .hljs-quote { - color: #5b6078 !important; -} -.macchiato pre .hljs-keyword, -.macchiato pre .hljs-selector-tag, -.macchiato pre .hljs-literal, -.macchiato pre .hljs-title, -.macchiato pre .hljs-section, -.macchiato pre .hljs-doctag, -.macchiato pre .hljs-type, -.macchiato pre .hljs-name, -.macchiato pre .hljs-strong { - font-weight: bold !important; -} -.macchiato pre .hljs-literal, -.macchiato pre .hljs-number { - color: #f5a97f !important; -} -.macchiato pre .hljs-emphasis { - font-style: italic !important; -} - -.frappe code, -.frappe .hljs { - background: #292c3c; -} -.frappe code .hljs-attr, -.frappe code .hljs-string { - color: #a6d189; -} -.frappe code .hljs-tag { - color: #e78284; -} -.frappe code .hljs-name { - color: #eebebe; -} -.frappe pre .hljs { - background: #292c3c !important; -} -.frappe pre .hljs-params { - color: #e78284 !important; -} -.frappe pre .hljs-built_in, -.frappe pre .hljs-selector-tag, -.frappe pre .hljs-section, -.frappe pre .hljs-link { - color: #85c1dc !important; -} -.frappe pre .hljs-keyword { - color: #ca9ee6 !important; -} -.frappe pre .hljs, -.frappe pre .hljs-subst { - color: #a5adce !important; -} -.frappe pre .hljs-title { - color: #8caaee !important; -} -.frappe pre .hljs-attr, -.frappe pre .hljs-meta-keyword { - color: #a6d189 !important; -} -.frappe pre .hljs-type { - color: #8caaee !important; -} -.frappe pre .hljs-string { - color: #a6d189 !important; -} -.frappe pre .hljs-tag { - color: #e78284 !important; -} -.frappe pre .hljs-meta, -.frappe pre .hljs-name, -.frappe pre .hljs-symbol, -.frappe pre .hljs-bullet, -.frappe pre .hljs-addition, -.frappe pre .hljs-variable, -.frappe pre .hljs-template-tag, -.frappe pre .hljs-template-variable { - color: #eebebe !important; -} -.frappe pre .hljs-addition { - background-color: #292c3c !important; - color: #a6d189 !important; -} -.frappe pre .hljs-deletion { - background-color: #292c3c !important; - color: #e78284 !important; -} -.frappe pre .hljs-comment, -.frappe pre .hljs-quote { - color: #626880 !important; -} -.frappe pre .hljs-keyword, -.frappe pre .hljs-selector-tag, -.frappe pre .hljs-literal, -.frappe pre .hljs-title, -.frappe pre .hljs-section, -.frappe pre .hljs-doctag, -.frappe pre .hljs-type, -.frappe pre .hljs-name, -.frappe pre .hljs-strong { - font-weight: bold !important; -} -.frappe pre .hljs-literal, -.frappe pre .hljs-number { - color: #ef9f76 !important; -} -.frappe pre .hljs-emphasis { - font-style: italic !important; -} - -.latte code, -.latte .hljs { - background: #e6e9ef; -} -.latte code .hljs-attr, -.latte code .hljs-string { - color: #40a02b; -} -.latte code .hljs-tag { - color: #d20f39; -} -.latte code .hljs-name { - color: #dd7878; -} -.latte pre .hljs { - background: #e6e9ef !important; -} -.latte pre .hljs-params { - color: #d20f39 !important; -} -.latte pre .hljs-built_in, -.latte pre .hljs-selector-tag, -.latte pre .hljs-section, -.latte pre .hljs-link { - color: #209fb5 !important; -} -.latte pre .hljs-keyword { - color: #8839ef !important; -} -.latte pre .hljs, -.latte pre .hljs-subst { - color: #6c6f85 !important; -} -.latte pre .hljs-title { - color: #1e66f5 !important; -} -.latte pre .hljs-attr, -.latte pre .hljs-meta-keyword { - color: #40a02b !important; -} -.latte pre .hljs-type { - color: #1e66f5 !important; -} -.latte pre .hljs-string { - color: #40a02b !important; -} -.latte pre .hljs-tag { - color: #d20f39 !important; -} -.latte pre .hljs-meta, -.latte pre .hljs-name, -.latte pre .hljs-symbol, -.latte pre .hljs-bullet, -.latte pre .hljs-addition, -.latte pre .hljs-variable, -.latte pre .hljs-template-tag, -.latte pre .hljs-template-variable { - color: #dd7878 !important; -} -.latte pre .hljs-addition { - background-color: #e6e9ef !important; - color: #40a02b !important; -} -.latte pre .hljs-deletion { - background-color: #e6e9ef !important; - color: #d20f39 !important; -} -.latte pre .hljs-comment, -.latte pre .hljs-quote { - color: #acb0be !important; -} -.latte pre .hljs-keyword, -.latte pre .hljs-selector-tag, -.latte pre .hljs-literal, -.latte pre .hljs-title, -.latte pre .hljs-section, -.latte pre .hljs-doctag, -.latte pre .hljs-type, -.latte pre .hljs-name, -.latte pre .hljs-strong { - font-weight: bold !important; -} -.latte pre .hljs-literal, -.latte pre .hljs-number { - color: #fe640b !important; -} -.latte pre .hljs-emphasis { - font-style: italic !important; -} diff --git a/docs/theme/catppuccin.css b/docs/theme/catppuccin.css deleted file mode 100644 index f577fd8b..00000000 --- a/docs/theme/catppuccin.css +++ /dev/null @@ -1,123 +0,0 @@ -.mocha { - --bg: #1e1e2e; - --fg: #cdd6f4; - --sidebar-bg: #181825; - --sidebar-fg: #cdd6f4; - --sidebar-non-existant: #6c7086; - --sidebar-active: #f5e0dc; - --sidebar-spacer: #6c7086; - --scrollbar: #6c7086; - --icons: #6c7086; - --icons-hover: #7f849c; - --links: #89b4fa; - --inline-code-color: #fab387; - --theme-popup-bg: #181825; - --theme-popup-border: #6c7086; - --theme-hover: #6c7086; - --quote-bg: #181825; - --quote-border: #11111b; - --table-border-color: #11111b; - --table-header-bg: #181825; - --table-alternate-bg: #11111b; - --searchbar-border-color: #11111b; - --searchbar-bg: #181825; - --searchbar-fg: #cdd6f4; - --searchbar-shadow-color: #11111b; - --searchresults-header-fg: #cdd6f4; - --searchresults-border-color: #11111b; - --searchresults-li-bg: #1e1e2e; - --search-mark-bg: #fab387; -} - -.macchiato { - --bg: #24273a; - --fg: #cad3f5; - --sidebar-bg: #1e2030; - --sidebar-fg: #cad3f5; - --sidebar-non-existant: #6e738d; - --sidebar-active: #f4dbd6; - --sidebar-spacer: #6e738d; - --scrollbar: #6e738d; - --icons: #6e738d; - --icons-hover: #8087a2; - --links: #8aadf4; - --inline-code-color: #f5a97f; - --theme-popup-bg: #1e2030; - --theme-popup-border: #6e738d; - --theme-hover: #6e738d; - --quote-bg: #1e2030; - --quote-border: #181926; - --table-border-color: #181926; - --table-header-bg: #1e2030; - --table-alternate-bg: #181926; - --searchbar-border-color: #181926; - --searchbar-bg: #1e2030; - --searchbar-fg: #cad3f5; - --searchbar-shadow-color: #181926; - --searchresults-header-fg: #cad3f5; - --searchresults-border-color: #181926; - --searchresults-li-bg: #24273a; - --search-mark-bg: #f5a97f; -} - -.frappe { - --bg: #303446; - --fg: #c6d0f5; - --sidebar-bg: #292c3c; - --sidebar-fg: #c6d0f5; - --sidebar-non-existant: #737994; - --sidebar-active: #f2d5cf; - --sidebar-spacer: #737994; - --scrollbar: #737994; - --icons: #737994; - --icons-hover: #838ba7; - --links: #8caaee; - --inline-code-color: #ef9f76; - --theme-popup-bg: #292c3c; - --theme-popup-border: #737994; - --theme-hover: #737994; - --quote-bg: #292c3c; - --quote-border: #232634; - --table-border-color: #232634; - --table-header-bg: #292c3c; - --table-alternate-bg: #232634; - --searchbar-border-color: #232634; - --searchbar-bg: #292c3c; - --searchbar-fg: #c6d0f5; - --searchbar-shadow-color: #232634; - --searchresults-header-fg: #c6d0f5; - --searchresults-border-color: #232634; - --searchresults-li-bg: #303446; - --search-mark-bg: #ef9f76; -} - -.latte { - --bg: #eff1f5; - --fg: #4c4f69; - --sidebar-bg: #e6e9ef; - --sidebar-fg: #4c4f69; - --sidebar-non-existant: #9ca0b0; - --sidebar-active: #dc8a78; - --sidebar-spacer: #9ca0b0; - --scrollbar: #9ca0b0; - --icons: #9ca0b0; - --icons-hover: #8c8fa1; - --links: #1e66f5; - --inline-code-color: #fe640b; - --theme-popup-bg: #e6e9ef; - --theme-popup-border: #9ca0b0; - --theme-hover: #9ca0b0; - --quote-bg: #e6e9ef; - --quote-border: #dce0e8; - --table-border-color: #dce0e8; - --table-header-bg: #e6e9ef; - --table-alternate-bg: #dce0e8; - --searchbar-border-color: #dce0e8; - --searchbar-bg: #e6e9ef; - --searchbar-fg: #4c4f69; - --searchbar-shadow-color: #dce0e8; - --searchresults-header-fg: #4c4f69; - --searchresults-border-color: #dce0e8; - --searchresults-li-bg: #eff1f5; - --search-mark-bg: #fe640b; -} diff --git a/docs/theme/index.hbs b/docs/theme/index.hbs deleted file mode 100644 index cf1d678e..00000000 --- a/docs/theme/index.hbs +++ /dev/null @@ -1,313 +0,0 @@ - - - - - - {{ title }} - {{#if is_print }} - - {{/if}} - {{#if base_url}} - - {{/if}} - - - - {{> head}} - - - - - - - {{#if favicon_svg}} - - {{/if}} - {{#if favicon_png}} - - {{/if}} - - - - {{#if print_enable}} - - {{/if}} - - - - {{#if copy_fonts}} - - {{/if}} - - - - - - - - {{#each additional_css}} - - {{/each}} - - {{#if mathjax_support}} - - - {{/if}} - - - - - - - - - - - - - - - - -
- -
- {{> header}} - - - - {{#if search_enabled}} - - {{/if}} - - - - -
-
- {{{ content }}} -
- - -
-
- - - -
- - {{#if live_reload_endpoint}} - - - {{/if}} - - {{#if google_analytics}} - - - {{/if}} - - {{#if playground_line_numbers}} - - {{/if}} - - {{#if playground_copyable}} - - {{/if}} - - {{#if playground_js}} - - - - - - {{/if}} - - {{#if search_js}} - - - - {{/if}} - - - - - - - {{#each additional_js}} - - {{/each}} - - {{#if is_print}} - {{#if mathjax_support}} - - {{else}} - - {{/if}} - {{/if}} - - -