mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-03 08:37:03 +02:00
25 KiB
25 KiB
common
Function library for Helm charts
Requirements
Kubernetes: >=1.22.0-0
Dependencies
Repository | Name | Version |
---|
Installing the Chart
This is a Helm Library Chart.
🚨 WARNING: THIS CHART IS NOT MEANT TO BE INSTALLED DIRECTLY
Using this library
Include this chart as a dependency in your Chart.yaml
e.g.
# Chart.yaml
dependencies:
- name: common
version: 2.0.1
repository: https://bjw-s.github.io/helm-charts/
For more information, take a look at the Docs.
Configuration
Read through the 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
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] |
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 <order>-<identifier> combination. |
controllers.main.containers.main.probes | object | See below | [ref] |
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] |
controllers.main.containers.main.terminationMessagePolicy | string | nil |
[ref] |
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 <order>-<identifier> 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] |
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] |
defaultPodOptions.hostAliases | list | [] |
Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. [ref] |
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] |
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] |
defaultPodOptions.tolerations | list | [] |
Specify taint tolerations [ref] |
defaultPodOptions.topologySpreadConstraints | list | [] |
Defines topologySpreadConstraint rules. [ref] |
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] |
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] |
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] |
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 /<name_of_the_peristence_item> . 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, nfs, 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] |
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] |
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] |
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
Autogenerated from chart metadata using helm-docs v1.11.0