common

Version: 1.3.2 Type: library

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

Dependencies

RepositoryNameVersion

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: 1.3.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.

Custom configuration

N/A

Values

Important: When deploying an application Helm chart you can add more values from our common library chart here

KeyTypeDefaultDescription
addonsobjectSee belowThe common chart supports several add-ons. These can be configured under this key.
addons.codeserverobjectSee values.yamlThe common library supports adding a code-server add-on to access files. It can be configured under this key. For more info, check out our docs
addons.codeserver.argslist["--auth","none"]Set codeserver command line arguments. Consider setting --user-data-dir to a persistent location to preserve code-server setting changes
addons.codeserver.enabledboolfalseEnable running a code-server container in the pod
addons.codeserver.envobject{}Set any environment variables for code-server here
addons.codeserver.gitobjectSee belowOptionally allow access a Git repository by passing in a private SSH key
addons.codeserver.git.deployKeystring""Raw SSH private key
addons.codeserver.git.deployKeyBase64string""Base64-encoded SSH private key. When both variables are set, the raw SSH key takes precedence.
addons.codeserver.git.deployKeySecretstring""Existing secret containing SSH private key The chart expects it to be present under the id_rsa key.
addons.codeserver.image.pullPolicystring"IfNotPresent"Specify the code-server image pull policy
addons.codeserver.image.repositorystring"ghcr.io/coder/code-server"Specify the code-server image
addons.codeserver.image.tagstring"4.9.1"Specify the code-server image tag
addons.codeserver.ingress.enabledboolfalseEnable an ingress for the code-server add-on.
addons.codeserver.ingress.ingressClassNamestringnilSet the ingressClass that is used for this ingress.
addons.codeserver.service.enabledbooltrueEnable a service for the code-server add-on.
addons.codeserver.volumeMountslist[]Specify a list of volumes that get mounted in the code-server container. At least 1 volumeMount is required!
addons.codeserver.workingDirstring""Specify the working dir that will be opened when code-server starts If not given, the app will default to the mountpah of the first specified volumeMount
addons.netshootobjectSee values.yamlThe common library supports adding a netshoot add-on to troubleshoot network issues within a Pod. It can be configured under this key.
addons.netshoot.enabledboolfalseEnable running a netshoot container in the pod
addons.netshoot.envobject{}Set any environment variables for netshoot here
addons.netshoot.image.pullPolicystring"IfNotPresent"Specify the netshoot image pull policy
addons.netshoot.image.repositorystring"ghcr.io/nicolaka/netshoot"Specify the netshoot image
addons.netshoot.image.tagstring"v0.8"Specify the netshoot image tag
addons.vpnobjectSee values.yamlThe common chart supports adding a VPN add-on. It can be configured under this key.
addons.vpn.argslist[]Override the args for the vpn sidecar container
addons.vpn.configFilestringnilProvide a customized vpn configuration file to be used by the VPN.
addons.vpn.configFileSecretstringnilReference an existing secret that contains the VPN configuration file The chart expects it to be present under the vpnConfigfile key.
addons.vpn.enabledboolfalseEnable running a VPN in the pod to route traffic through a VPN
addons.vpn.envobject{}All variables specified here will be added to the vpn sidecar container See the documentation of the VPN image for all config values
addons.vpn.gluetunobjectSee belowMake sure to read the documentation to see how to configure this addon!
addons.vpn.gluetun.image.pullPolicystring"IfNotPresent"Specify the Gluetun image pull policy
addons.vpn.gluetun.image.repositorystring"docker.io/qmcgaw/gluetun"Specify the Gluetun image
addons.vpn.gluetun.image.tagstring"v3.32.0"Specify the Gluetun image tag
addons.vpn.livenessProbeobject{}Optionally specify a livenessProbe, e.g. to check if the connection is still being protected by the VPN
addons.vpn.networkPolicy.annotationsobject{}Provide additional annotations which may be required.
addons.vpn.networkPolicy.egressstringnilThe egress configuration for your network policy, All outbound traffic from the pod will be blocked unless specified here. [ref] [recipes]
addons.vpn.networkPolicy.enabledboolfalseIf set to true, will deploy a network policy that blocks all outbound traffic except traffic specified as allowed
addons.vpn.networkPolicy.labelsobject{}Provide additional labels which may be required.
addons.vpn.networkPolicy.podSelectorLabelsobject{}Provide additional podSelector labels which may be required.
addons.vpn.scriptsobjectSee values.yamlProvide custom up/down scripts that can be used by the vpn configuration.
addons.vpn.securityContextobjectSee values.yamlSet the VPN container securityContext
addons.vpn.typestring"gluetun"Specify the VPN type. Valid options are gluetun.
affinityobject{}Defines affinity constraint rules. [ref]
argslist[]Override the args for the default container
automountServiceAccountTokenbooltrueSpecifies whether a service account token should be automatically mounted.
commandlist[]Override the command(s) for the default container
configMapsobjectSee belowConfigure configMaps for the chart here. Additional configMaps can be added by adding a dictionary key similar to the 'config' object.
configMaps.config.annotationsobject{}Annotations to add to the configMap
configMaps.config.dataobject{}configMap data content. Helm template enabled.
configMaps.config.enabledboolfalseEnables or disables the configMap
configMaps.config.labelsobject{}Labels to add to the configMap
controller.annotationsobject{}Set annotations on the deployment/statefulset/daemonset/cronjob
controller.cronjobobjectSee belowCronJob configuration. Required only when using controller.type: cronjob.
controller.cronjob.concurrencyPolicystring"Forbid"Specifies how to treat concurrent executions of a job that is created by this cron job, valid values are Allow, Forbid or Replace
controller.cronjob.failedJobsHistoryint1The number of failed Jobs to keep
controller.cronjob.schedulestring"*/20 * * * *"Sets the CronJob time when to execute your jobs
controller.cronjob.startingDeadlineSecondsint30The deadline in seconds for starting the job if it misses its scheduled time for any reason
controller.cronjob.successfulJobsHistoryint1The number of succesful Jobs to keep
controller.cronjob.ttlSecondsAfterFinishedstringnilIf this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted.
controller.enabledbooltrueenable the controller.
controller.labelsobject{}Set labels on the deployment/statefulset/daemonset/cronjob
controller.podManagementPolicystringnilSet statefulset podManagementPolicy, valid values are Parallel and OrderedReady (default).
controller.replicasint1Number of desired pods
controller.restartPolicystringAlways. When controller.type is cronjob it defaults to Never.Set Container restart policy.
controller.revisionHistoryLimitint3ReplicaSet revision history limit
controller.rollingUpdate.partitionstringnilSet statefulset RollingUpdate partition
controller.rollingUpdate.surgestringnilSet deployment RollingUpdate max surge
controller.rollingUpdate.unavailablestringnilSet deployment RollingUpdate max unavailable
controller.strategystringnilSet 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.
controller.typestring"deployment"Set the controller type. Valid options are deployment, daemonset, statefulset or cronjob
dnsConfigobject{}Optional DNS settings, configuring the ndots option may resolve nslookup issues on some Kubernetes setups.
dnsPolicystringnilDefaults to "ClusterFirst" if hostNetwork is false and "ClusterFirstWithHostNet" if hostNetwork is true.
enableServiceLinksbooltrueEnable/disable the generation of environment variables for services. [ref]
envstringnilMain 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 }}'
envFromlist[]Secrets and/or ConfigMaps that will be loaded as environment variables. [ref]
global.annotationsobject{}Set additional global annotations. Helm templates can be used.
global.fullnameOverridestringnilSet the entire name definition
global.labelsobject{}Set additional global labels. Helm templates can be used.
global.nameOverridestringnilSet an override for the prefix of the fullname
hostAliaseslist[]Use hostAliases to add custom entries to /etc/hosts - mapping IP addresses to hostnames. [ref]
hostNetworkboolfalseWhen using hostNetwork make sure you set dnsPolicy to ClusterFirstWithHostNet
hostnamestringnilAllows specifying explicit hostname setting
image.pullPolicystringnilimage pull policy
image.repositorystringnilimage repository
image.tagstringnilimage tag
imagePullSecretslist[]Set image pull secrets
ingressobjectSee belowConfigure the ingresses for the chart here. Additional ingresses can be added by adding a dictionary key similar to the 'main' ingress.
ingress.main.annotationsobject{}Provide additional annotations which may be required.
ingress.main.enabledboolfalseEnables or disables the ingress
ingress.main.hosts[0].hoststring"chart-example.local"Host address. Helm template can be passed.
ingress.main.hosts[0].paths[0].pathstring"/"Path. Helm template can be passed.
ingress.main.hosts[0].paths[0].service.namestringnilOverrides the service name reference for this path
ingress.main.hosts[0].paths[0].service.portstringnilOverrides the service port reference for this path
ingress.main.ingressClassNamestringnilSet the ingressClass that is used for this ingress.
ingress.main.labelsobject{}Provide additional labels which may be required.
ingress.main.nameOverridestringnilOverride the name suffix that is used for this ingress.
ingress.main.primarybooltrueMake 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.tlslist[]Configure TLS for the ingress. Both secretName and hosts can process a Helm template.
initContainersobject{}Specify any initContainers here as dictionary items. Each initContainer should have its own key. The dictionary item key will determine the order. Helm templates can be used.
lifecycleobject{}Configure the lifecycle for the main container
nodeSelectorobject{}Node selection constraint [ref]
persistenceobjectSee belowConfigure persistence for the chart here. Additional items can be added by adding a dictionary key similar to the 'config' key. [ref]
persistence.configobjectSee belowDefault persistence for configuration files.
persistence.config.accessModestring"ReadWriteOnce"AccessMode for the persistent volume. Make sure to select an access mode that is supported by your storage provider! [ref]
persistence.config.enabledboolfalseEnables or disables the persistence item
persistence.config.existingClaimstringnilIf you want to reuse an existing claim, the name of the existing PVC can be passed here.
persistence.config.mountPathstringnilWhere to mount the volume in the main container. Defaults to /<name_of_the_volume>, setting to '-' creates the volume but disables the volumeMount.
persistence.config.nameOverridestringnilOverride the name suffix that is used for this volume.
persistence.config.readOnlyboolfalseSpecify if the volume should be mounted read-only.
persistence.config.retainboolfalseSet to true to retain the PVC upon helm uninstall
persistence.config.sizestring"1Gi"The amount of storage that is requested for the persistent volume.
persistence.config.storageClassstringnilStorage 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.subPathstringnilUsed in conjunction with existingClaim. Specifies a sub-path inside the referenced volume instead of its root
persistence.config.typestring"pvc"Sets the persistence type Valid options are pvc, emptyDir, hostPath, secret, configMap or custom
persistence.sharedobjectSee belowCreate an emptyDir volume to share between all containers [[ref]]https://kubernetes.io/docs/concepts/storage/volumes/#emptydir)
persistence.shared.mediumstringnilSet the medium to "Memory" to mount a tmpfs (RAM-backed filesystem) instead of the storage medium that backs the node.
persistence.shared.sizeLimitstringnilIf the SizeMemoryBackedVolumes feature gate is enabled, you can specify a size for memory backed volumes.
podAnnotationsobject{}Set annotations on the pod
podLabelsobject{}Set labels on the pod
podSecurityContextobject{}Configure the Security Context for the Pod
priorityClassNamestringnilCustom priority class for different treatment by the scheduler
probesobjectSee below[ref]
probes.livenessobjectSee belowLiveness probe configuration
probes.liveness.customboolfalseSet this to true if you wish to specify your own livenessProbe
probes.liveness.enabledbooltrueEnable the liveness probe
probes.liveness.specobjectSee belowThe spec field contains the values for the default livenessProbe. If you selected custom: true, this field holds the definition of the livenessProbe.
probes.liveness.typestring"TCP"sets the probe type when not using a custom probe
probes.readinessobjectSee belowRedainess probe configuration
probes.readiness.customboolfalseSet this to true if you wish to specify your own readinessProbe
probes.readiness.enabledbooltrueEnable the readiness probe
probes.readiness.specobjectSee belowThe spec field contains the values for the default readinessProbe. If you selected custom: true, this field holds the definition of the readinessProbe.
probes.readiness.typestring"TCP"sets the probe type when not using a custom probe
probes.startupobjectSee belowStartup probe configuration
probes.startup.customboolfalseSet this to true if you wish to specify your own startupProbe
probes.startup.enabledbooltrueEnable the startup probe
probes.startup.specobjectSee belowThe spec field contains the values for the default startupProbe. If you selected custom: true, this field holds the definition of the startupProbe.
probes.startup.typestring"TCP"sets the probe type when not using a custom probe
resourcesobject{}Set the resource requests / limits for the main container.
routeobjectSee belowConfigure 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.annotationsobject{}Provide additional annotations which may be required.
route.main.enabledboolfalseEnables or disables the route
route.main.hostnameslist[]Host addresses
route.main.kindstring"HTTPRoute"Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute
route.main.labelsobject{}Provide additional labels which may be required.
route.main.nameOverridestringnilOverride the name suffix that is used for this route.
route.main.parentRefslist[{"group":"gateway.networking.k8s.io","kind":"Gateway","name":null,"namespace":null,"sectionName":null}]Configure the resource the route attaches to.
route.main.ruleslist[{"backendRefs":[{"group":"","kind":"Service","name":null,"namespace":null,"port":null,"weight":1}],"matches":[{"path":{"type":"PathPrefix","value":"/"}}]}]Configure rules for routing. Defaults to the primary service.
route.main.rules[0].backendRefslist[{"group":"","kind":"Service","name":null,"namespace":null,"port":null,"weight":1}]Configure backends where matching requests should be sent.
runtimeClassNamestringnilAllow specifying a runtimeClassName other than the default one (ie: nvidia)
schedulerNamestringnilAllows specifying a custom scheduler name
secretsobjectSee belowUse 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.annotationsobject{}Annotations to add to the Secret
secrets.secret.enabledboolfalseEnables or disables the Secret
secrets.secret.labelsobject{}Labels to add to the Secret
secrets.secret.stringDataobject{}Secret stringData content. Helm template enabled.
securityContextobject{}Configure the Security Context for the main container
serviceobjectSee belowConfigure the services for the chart here. Additional services can be added by adding a dictionary key similar to the 'main' service.
service.main.annotationsobject{}Provide additional annotations which may be required.
service.main.enabledbooltrueEnables or disables the service
service.main.externalTrafficPolicystringnil[ref]
service.main.ipFamilieslist[]The ip families that should be used. Options: IPv4, IPv6
service.main.ipFamilyPolicystringnilSpecify the ip policy. Options: SingleStack, PreferDualStack, RequireDualStack
service.main.labelsobject{}Provide additional labels which may be required.
service.main.nameOverridestringnilOverride the name suffix that is used for this service
service.main.portsobjectSee belowConfigure the Service port information here. Additional ports can be added by adding a dictionary key similar to the 'http' service.
service.main.ports.http.enabledbooltrueEnables or disables the port
service.main.ports.http.extraSelectorLabelsobject{}Allow adding additional match labels
service.main.ports.http.nodePortstringnilSpecify the nodePort value for the LoadBalancer and NodePort service types. [ref]
service.main.ports.http.portstringnilThe port number
service.main.ports.http.primarybooltrueMake 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.protocolstring"HTTP"Port protocol. Support values are HTTP, HTTPS, TCP and UDP. HTTPS and HTTPS spawn a TCP service and get used for internal URL and name generation
service.main.ports.http.targetPortstringnilSpecify 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.primarybooltrueMake this the primary service (used in probes, notes, etc...). If there is more than 1 service, make sure that only 1 service is marked as primary.
service.main.typestring"ClusterIP"Set the service type
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createboolfalseSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
serviceMonitorobjectSee belowConfigure the ServiceMonitors for the chart here. Additional ServiceMonitors can be added by adding a dictionary key similar to the 'main' ServiceMonitors.
serviceMonitor.main.annotationsobject{}Provide additional annotations which may be required.
serviceMonitor.main.enabledboolfalseEnables or disables the serviceMonitor.
serviceMonitor.main.endpointslistSee values.yamlConfigures the endpoints for the serviceMonitor.
serviceMonitor.main.labelsobject{}Provide additional labels which may be required.
serviceMonitor.main.nameOverridestringnilOverride the name suffix that is used for this serviceMonitor.
serviceMonitor.main.selectorobject{}Configures a custom selector for the serviceMonitor, this takes precedence over specifying a service name. Helm templates can be used.
serviceMonitor.main.serviceNamestring"{{ include \"bjw-s.common.lib.chart.names.fullname\" $ }}"Configures the target Service for the serviceMonitor. Helm templates can be used.
sidecarsobject{}Specify any sidecar containers here as dictionary items. Each sidecar container should have its own key. Helm templates can be used.
termination.gracePeriodSecondsstringnil[ref]
termination.messagePathstringnil[ref]
termination.messagePolicystringnil[ref]
tolerationslist[]Specify taint tolerations [ref]
topologySpreadConstraintslist[]Defines topologySpreadConstraint rules. [ref]
volumeClaimTemplateslist[]Used in conjunction with controller.type: statefulset to create individual disks for each instance.

Support


Autogenerated from chart metadata using helm-docs v1.11.0