This library chart supplies a set of templates that can be included in the application charts.
Contains templates for application components of the following Kubernetes resources:

  • ConfigMap
  • Deployment
  • ExternalSecret
  • HorizontalPodAutoscaler
  • Ingress
  • InitContainer
  • Job
  • PersistentVolumeClaim
  • Service
  • ServiceAccount
  • ScaledObject
  • TriggerAuthentication

Meant to be flexible enough to cover every Kubernetes entity that most of the applications requires. This way, multiple applications can be deployed as a different release from the same Helm chart with different sets of values.

NOTE: ExternalSecret resource is meant to be used with an already configured essential external secrets custom resource definitions (may be supplied by the External Secrets Operator) and ClusterSecretStore resource.

NOTE: ScaledObject resource is meant to be used with an already configured custom resource definitions (may be supplied by the Event-driven Autoscaling for Kubernetes).

Add Corewide Helm repository

Make the charts discoverable by adding the repository to your list:

 shellhelm repo add corewide https://solutions.corewide.com/helm/
Log in to Corewide registry

Once you have a Corewide Solutions Portal account, get your registry password here and use it to log in via CLI:

 shellhelm registry login oci.corewide.com
Configure chart values

Chart values (see the table below) can be passed one by one using --set argument or via a configuration file. You can create one based on the defaults using the following command:

 shellhelm show values corewide/libchart > values.yaml
Install the chart from CLI

Install the chart after editing your values.yaml:

 shellhelm repo update
helm install libchart corewide/libchart --version 3.1.0 -f values.yaml
Install the chart with Terraform

Define Helm provider configuration in your project code, then:

 hclresource "helm_release" "libchart" {
  name       = "libchart"
  repository = "oci://oci.corewide.com/helm"
  chart      = "libchart"
  version    = "3.1.0"

  # define your values as set blocks:
  set {
    ...
  }
}

Library Helm chart

Library Helm chart for supplying a set of templates of main Kubernetes resources (ConfigMap, Deployment, PVC, HPA, Ingress, InitContainer, Job, ExternalSecret, and Service).
Chart
50% off
$2,050
$1,025
TOTAL $1,025
BUY
v3.1.0 released 2 weeks ago
New version approx. every 2 weeks

This library chart supplies a set of templates that can be included in the application charts.
Contains templates for application components of the following Kubernetes resources:

  • ConfigMap
  • Deployment
  • ExternalSecret
  • HorizontalPodAutoscaler
  • Ingress
  • InitContainer
  • Job
  • PersistentVolumeClaim
  • Service
  • ServiceAccount
  • ScaledObject
  • TriggerAuthentication

Meant to be flexible enough to cover every Kubernetes entity that most of the applications requires. This way, multiple applications can be deployed as a different release from the same Helm chart with different sets of values.

NOTE: ExternalSecret resource is meant to be used with an already configured essential external secrets custom resource definitions (may be supplied by the External Secrets Operator) and ClusterSecretStore resource.

NOTE: ScaledObject resource is meant to be used with an already configured custom resource definitions (may be supplied by the Event-driven Autoscaling for Kubernetes).

Create a file in the templates/ directory of your application chart (templates/include.yaml for instance) and include required templates from the library chart:

 yaml{{ include "libchart.configmap" . }}
{{ include "libchart.configmap.prerun" . }}
{{ include "libchart.configmap.init" . }}
{{ include "libchart.configmap.extrafiles" . }}
{{ include "libchart.deployment" . }}
{{ include "libchart.extraDeployments" . }}
{{ include "libchart.externalsecret" . }}
{{ include "libchart.hpa" . }}
{{ include "libchart.ingress" . }}
{{ include "libchart.job" . }}
{{ include "libchart.pvc" . }}
{{ include "libchart.extraPvc" . }}
{{ include "libchart.service" . }}
{{ include "libchart.serviceAccount" . }}
{{ include "libchart.scaledObject" . }}

Chart notes can be included in the templates/NOTES.txt:

 yaml{{ include "libchart.notes" . }}

Reference the library chart as a dependency for your application chart in corresponding Chart.yaml:

 yamldependencies:
  - name: libchart
    version: ~3.1.0
    repository: "oci://oci.corewide.com/helm"
    import-values:
      - defaults # inherit library chart values

And fetch the dependency:

 bashhelm dependency update [path-to-app-chart]

Prepare the default values file for application chart:

 bashhelm show values corewide/libchart | tail -n +3 | sed -E 's/^([[:blank:]]){4}//' > /path/to/application/chart/values.yaml

Make sure to create a separate secret for sensitive variables (like passwords and keys). Copy the default application chart values.yaml somewhere, edit the new file accordingly, and proceed with installation. You can always use --set directive for helm upgrade or helm install commands to avoid storing values files in a repository.

Example:

 bashcd /path/to/application/chart
cp values.yaml values-custom.yaml
vim values-custom.yaml
kubectl --namespace application-dev apply -f /path/to/microservice-secret.yml # creates a secret
helm --namespace application-dev install microservice helm-chart/ -f values-custom.yaml
Parameter Type Description Default Required
global map Custom parameters applied to all created Kubernetes resources no
global.labels map Custom labels for all Kubernetes resources {} no
global.annotations map Custom annotations for all Kubernetes resources {} no
replicaCount int Number of Pod replicas 1 no
configMapAnnotations map Annotations to attach to all ConfigMaps created {} no
image map A block that describes Docker image Pod template in the Deployment configuration no
image.repository string Docker image repository address "" yes
image.pullPolicy string Condition for pulling new container images Always no
image.tag string Container image tag to use for running the containers in Pods latest no
imagePullSecretNames list(string) List of the secret names with access credentials of Docker image container registry [] no
ingress map A block that describes Ingress settings configuration
ingress.enabled bool Whether Ingress resource should be enabled for the Deployment false no
ingress.ingressClassName string Ingress class name nginx no
ingress.tls_enabled bool Whether Ingress resource should have TLS configured true no
ingress.annotations map Annotations to attach to the Ingress resource cert-manager.io/cluster-issuer: letsencrypt no
ingress.hosts list(map) List of host configurations for Ingress to manage no
ingress.hosts[*].host string Domain name that Ingress will process connections for chart-example.local no
ingress.hosts[*].pathType string Defines the type of locations (routes) matching Prefix no
ingress.hosts[*].paths list(string) List of locations (routes) that Ingress will handle ["/"] no
ingress.hosts[*].port int Defines exposed application port (defaults to service.port) no
deployment map A block that describes main Deployment configuration no
deployment.strategy string Deployment strategy of the main Deployment RollingUpdate
deployment.annotations map Annotations to attach to main Deployment deployed by the chart {} no
deployment.command list(string) Command to override container command with []
deployment.args list(string) Arguments to override container args with []
pod map A block that describes Pod configuration of the main Deployment no
pod.annotations map Annotations to attach to Pods deployed by the chart {} no
pod.securityContext map Security context parameters to pass to Pods deployed by the chart {} no
securityContext map Security context parameters to pass to containers in Pods deployed by the chart {} no
serviceAccount map A block that describes ServiceAccount settings configuration
ServiceAccount.create bool Specifies whether a ServiceAccount should be created false no
serviceAccount.name string Name of the ServiceAccount to run the Pod with. If not set and create is true, the name is set to release name "" no
serviceAccount.automountToken bool Whether ServiceAccount web identity token must be mounted into the Pod it is used by true no
serviceAccount.annotations map Annotations to add to the ServiceAccount {} no
serviceAccount.labels map Labels to add to the ServiceAccount {} no
service map A block that describes Service settings configuration
service.enabled bool Whether Kubernetes Service should be enabled true no
service.port int Port to expose the application as a Kubernetes Service 80 no
service.containerPort int Port the application is listening on 80 no
service.extraPorts list The list of additional ports to expose for application [] no
service.extraPorts.port int Additional port to expose the application as a Kubernetes Service no
service.extraPorts.containerPort int Additional port the application is listening on no
service.extraPorts.protocol string Network protocol of the additional port the application is listening on TCP no
healthCheck map Container healthcheck probes no
healthCheck.liveness map Liveness probe parameters to use no
healthCheck.liveness.enabled bool Toggle liveness probe configuration false no
healthCheck.liveness.type string Type of the probe. Possible values are http and custom http no
healthCheck.liveness.path string Probe URI path to make requests. Applicable for the http type / no
healthCheck.liveness.body map YAML-encoded definition of the check mechanism. Applicable for the custom type {} no
healthCheck.liveness.initialDelaySeconds int Initial delay before probe start 2 no
healthCheck.liveness.periodSeconds int How often to perform probe command 10 no
healthCheck.liveness.timeoutSeconds int Timeout for startup probe command 1 no
healthCheck.liveness.failureThreshold int Number of consecutive probe failures before the probe is marked as failed 3 no
healthCheck.readiness map Readiness probe parameters to use no
healthCheck.readiness.enabled bool Toggle readiness probe configuration false no
healthCheck.readiness.type string Type of the probe. Possible values are http and custom http no
healthCheck.readiness.path string Probe URI path to make requests. Applicable for the http type / no
healthCheck.readiness.body map YAML-encoded definition of the check mechanism. Applicable for the custom type {} no
healthCheck.readiness.initialDelaySeconds int Initial delay before probe start 2 no
healthCheck.readiness.periodSeconds int How often to perform probe command 10 no
healthCheck.readiness.timeoutSeconds int Timeout for startup probe command 1 no
healthCheck.readiness.failureThreshold int Number of consecutive probe failures before the probe is marked as failed 3 no
healthCheck.startup map Startup probe parameters to use no
healthCheck.startup.enabled bool Toggle Startup probe configuration false no
healthCheck.startup.type string Type of the probe. Possible values are http and custom http no
healthCheck.startup.path string Probe URI path to make requests. Applicable for the http type / no
healthCheck.startup.body map YAML-encoded definition of the check mechanism. Applicable for the custom type {} no
healthCheck.startup.initialDelaySeconds int Initial delay before probe start 2 no
healthCheck.startup.periodSeconds int How often to perform probe command 10 no
healthCheck.startup.timeoutSeconds int Timeout for startup probe command 1 no
healthCheck.startup.failureThreshold int Number of consecutive probe failures before the probe is marked as failed 3 no
resources map Container resource parameters to pass to the application Pods {} no
autoscaling map A block that describes Pod autoscaling conditions
autoscaling.enabled bool Whether Pod autoscaling should be enabled false no
autoscaling.type string Pod autoscaling type to use. Possible values are: hpa for Horizontal Pod Autoscaling, and keda for Kubernetes Event-driven Autoscaling hpa no
autoscaling.minReplicas int Minimum number of Pod replicas to maintain 1 no
autoscaling.maxReplicas int Maximum number of Pod replicas to maintain 100 no
autoscaling.targetCPUUtilizationPercentage int CPU utilization percentage to trigger the autoscaling 75 no
autoscaling.targetMemoryUtilizationPercentage int Memory utilization percentage to trigger the autoscaling 80 no
autoscaling.kedaPollingInterval int Interval to check each trigger on 30 no
autoscaling.kedaCooldownPeriod int Period to wait after the last trigger reported active before scaling the resource back to 0 300 no
autoscaling.kedaTriggers list(map) List of the KEDA triggers to activate for the deployment scaling no
autoscaling.kedaTriggerAuthentication map Describe authentication parameters separately from the ScaledObject resource no
nodeSelector map Node selector to attach to the Pods deployed by the chart {} no
tolerations list(map) List of toleration policies to attach to the Pods deployed by the chart [] no
affinity map Set of node affinity parameters for Pods deployed by the chart {} no
topologySpreadConstraints list(map) List of topology spread constraints to attach to the Pods deployed by the chart [] no
initContainer map A block of code in the Kubernetes Deployment which describes the init container's configuration no
initContainer.enabled bool Add init container configuration block to Deployment false no
initContainer.name string A name of the init container init no
initContainer.image map A set of Docker image usage settings that will be used in init container no
initContainer.image.repository string Docker image container registry address for init container reportportal/k8s-wait-for no
initContainer.image.pullPolicy string Condition for pulling new container images for init container Always no
initContainer.image.tag string Container image tag to use for running the init container 2.1.5 no
initContainer.args list(string) A list of arguments of init container [] no
initContainer.extraSecretNamesForEnvFrom list(string) List of secrets (names) to populate init container environment with [] no
initContainer.env map Environment variables to pass to the init containers of application Pods {} no
initContainer.persistence.enabled bool Mounts volumes defined in .Values.persistence.volumes in the init container false no
job map Configuration block that describes kubernetes Job. Inherits SecretsProviderClass and env ConfigMap no
job.ttlSeconds string Time after which a Completed or Failed Job is deleted no
job.enabled bool Defines whether the Job should be created false no
job.backoffLimit int How many times the Job can restart before considered as failed 1 no
job.command list(string) Command entry point of the Job [] no
job.annotations map Annotations to add to the Job {} no
job.addRandomSuffix bool Option to toggle the random Job suffix name true no
job.args list(string) A list of arguments for the Job [] no
job.extraSecretNamesForEnvFrom list(string) List of secrets (names) to populate Job container environment with [] no
job.env map Environment variables to pass to the Job {} no
terminationGracePeriodSeconds int TTL in seconds for Pods after Termination (use for graceful application shutdown) 30 no
extraContainers list(map) Extra containers to run alongside the main application in the Pod deployed by the chart [] no
extraContainers[*].persistence.enabled bool Mounts volumes from .Values.persistence.volumes in the extra container false no
env map Environment variables to pass to the containers of application Pods {} no
persistence map A block that defines persistent volume settings for the main Deployment {} no
persistence.accessMode string PersistentVolumeClaim access mode ReadWriteOnce no
persistence.volumes list(map) List of volumes definitions to mount in the main container. These volumes can be mounted to other containers if specified explicitly in corresponding blocks [] no
persistence.volumes[*].name string Volume name yes
persistence.volumes[*].mountPath string Path inside container where volume will be mounted yes
persistence.volumes[*].accessMode string Per volume access mode to override persistence.accessMode no
persistence.volumes[*].size int Size of the volume in Gi 1 no
persistence.volumes[*].useExisting bool Whether to use PVC with .name that is already created false
persistence.volumes[*].storageClass string Storage class name (null for default, "-" for disabled provisioning) null no
emptyDir list(map) A block that defines emptyDir volume settings for the main Deployment [] no
emptyDir[*].name string Volume name no
emptyDir[*].path string Path inside container where volume will be mounted no
emptyDir[*].sizeLimit int Volume size limit in Gi no
emptyDir[*].tmpfs bool Set for the Kubernetes mounts volume in a tmpfs (RAM-backed filesystem) false no
extraSecretNamesForEnvFrom list(string) List of secrets (names) to populate container environment with [] no
extraConfigMapNamesForEnvFrom list(string) List of config maps (names) to populate container environment with [] no
extraDeployments list(map) List of additional Deployments to run alongside the main application [] no
extraDeployments[*].name string Name suffix of the additional Deployment yes
extraDeployments[*].image map A block that describes Docker image Pod template in the additional Deployment configuration (same as the main one unless explicitly defined) no
extraDeployments[*].strategy string Deployment strategy of the additional Deployment RollingUpdate
extraDeployments[*].replicaCount int Number of Pod replicas of additional Deployment 1 no
extraDeployments[*].resources map Container resource parameters to pass to the application Pods of additional Deployment {} no
extraDeployments[*].podSecurityContext map Security context parameters to pass to Pods of additional Deployment {} no
extraDeployments[*].command list(string) Command entry point for the Pod of additional Deployment [] no
extraDeployments[*].args list(string) A list of arguments for the Pod of additional Deployment [] no
extraDeployments[*].persistence map A block that defines persistent volume settings for each extraDeployment {} no
extraDeployments[*].persistence.accessMode string PersistentVolume access mode for the extraDeployment ReadWriteOnce no
extraDeployments[*].persistence.volumes list(map) List of PVC volumes to mount in the extraDeployment container [] no
extraDeployments[*].persistence.volumes[*].name string Volume name yes
extraDeployments[*].persistence.volumes[*].mountPath string Path inside container where volume will be mounted yes
extraDeployments[*].persistence.volumes[*].size int Size of the volume in Gi 1 no
extraDeployments[*].persistence.volumes[*].storageClass string Storage class name (null for default, "-" for disabled provisioning) null no
extraDeployments[*].mountExternalSecrets bool Whether to assign secrets generated by the ExternalSecret false no
externalSecret map A block that describes ExternalSecret settings configuration. Requires External Secret Operator and its CRDs to be preinstalled
externalSecret.clusterSecretStoreName string Name of Kubernetes ClusterSecretStore resource to be used in creation of ExternalSecret resources secrets-manager no
externalSecret.refreshInterval string Amount of time before the values reading again from the SecretStore provider 1h no
externalSecret.secretNames list(string) List of Secrets Manager's secret names to fetch the data from [] no
externalSecret.reloaderLabels map A map of labels for the ExternalSecret Reloader {} no
externalSecret.includeReloaderAnnotation bool Whether to annotate the workload to enable automatic reload by ExternalSecret Reloader true no
externalSecret.annotations map Annotations to attach to all ExternalSecrets created {} no
extraVolumeMountsFromConfigMaps list(map) List of additional volume mounts with content from external config maps [] no
extraVolumeMountsFromConfigMaps[*].name string The name of the config map yes
extraVolumeMountsFromConfigMaps[*].path string The path where content of the config map will be mounted yes
extraVolumeMountsFromConfigMaps[*].key string Config map key to fetch data from yes
extraVolumeMountsFromSecrets list(map) List of additional volume mounts with content from external secrets [] no
extraVolumeMountsFromSecrets[*].name string The name of the secret yes
extraVolumeMountsFromSecrets[*].path string The path where content of the secret will be mounted yes
extraVolumeMountsFromSecrets[*].key string Secret key to fetch data from yes
extraFilesMounts list(map) List of files to put in config maps and mount to pods [] no
extraFilesMounts[*].name string The name of config map which will be created yes
extraFilesMounts[*].path string The path where content of the config map will be mounted yes
extraFilesMounts[*].key string Config map key that will be created yes
extraFilesMounts[*].content string File content yes

These components are included as is under the terms of their corresponding licenses.

Component License
k8s-wait-for MIT

Not sure where to start?
Let's find your perfect match.