common

by Bitnami

Helm chartv2.41.0App 2.41.0Verified publisher

A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.

About this chart

Common library for Bitnami packages

A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself.

Overview of Common

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

TL;DR

dependencies:
  - name: common
    version: 2.x.x
    repository: oci://MY-OCI-REGISTRY
helm dependency update
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ include "common.names.fullname" . }}
data:
  myvalue: "Hello World"

Why use Bitnami Secure Images?

Those are hardened, minimal CVE images built and maintained by Bitnami. Bitnami Secure Images are based on the cloud-optimized, security-hardened enterprise OS Photon Linux. Why choose BSI images?

  • Hardened secure images of popular open source software with Near-Zero Vulnerabilities
  • Vulnerability Triage & Prioritization with VEX Statements, KEV and EPSS Scores
  • Compliance focus with FIPS, STIG, and air-gap options, including secure bill of materials (SBOM)
  • Software supply chain provenance attestation through in-toto
  • First class support for the internet’s favorite Helm charts

Each image comes with valuable security metadata. You can view the metadata in our public catalog here. Note: Some data is only available with commercial subscriptions to BSI.

If you are looking for our previous generation of images based on Debian Linux, please see the Bitnami Legacy registry.

Introduction

This chart provides a common template helpers which can be used to develop new charts using Helm package manager.

Before you begin

  • Kubernetes 1.23+
  • Helm 3.8.0+

Parameters

The following table lists the helpers available in the library which are scoped in different sections.

Affinities

Helper identifierDescriptionExpected Input
common.affinities.nodes.softReturn a soft nodeAffinity definitiondict "key" "FOO" "values" (list "BAR" "BAZ")
common.affinities.nodes.hardReturn a hard nodeAffinity definitiondict "key" "FOO" "values" (list "BAR" "BAZ")
common.affinities.nodesReturn a nodeAffinity definitiondict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")
common.affinities.topologyKeyReturn a topologyKey definitiondict "topologyKey" "FOO"
common.affinities.pods.softReturn a soft podAffinity/podAntiAffinity definitiondict "component" "FOO" "context" $
common.affinities.pods.hardReturn a hard podAffinity/podAntiAffinity definitiondict "component" "FOO" "context" $
common.affinities.podsReturn a podAffinity/podAntiAffinity definitiondict "type" "soft" "key" "FOO" "values" (list "BAR" "BAZ")

Capabilities

Helper identifierDescriptionExpected Input
common.capabilities.kubeVersionReturn the target Kubernetes version (using client default if .Values.kubeVersion is not set).. Chart context
common.capabilities.apiVersions.hasReturn true if the apiVersion is supporteddict "version" "batch/v1" "context" $
common.capabilities.job.apiVersionReturn the appropriate apiVersion for job.. Chart context
common.capabilities.cronjob.apiVersionReturn the appropriate apiVersion for cronjob.. Chart context
common.capabilities.daemonset.apiVersionReturn the appropriate apiVersion for daemonset.. Chart context
common.capabilities.deployment.apiVersionReturn the appropriate apiVersion for deployment.. Chart context
common.capabilities.statefulset.apiVersionReturn the appropriate apiVersion for statefulset.. Chart context
common.capabilities.ingress.apiVersionReturn the appropriate apiVersion for ingress.. Chart context
common.capabilities.rbac.apiVersionReturn the appropriate apiVersion for RBAC resources.. Chart context
common.capabilities.crd.apiVersionReturn the appropriate apiVersion for CRDs.. Chart context
common.capabilities.policy.apiVersionReturn the appropriate apiVersion for podsecuritypolicy.. Chart context
common.capabilities.networkPolicy.apiVersionReturn the appropriate apiVersion for networkpolicy.. Chart context
common.capabilities.apiService.apiVersionReturn the appropriate apiVersion for APIService.. Chart context
common.capabilities.hpa.apiVersionReturn the appropriate apiVersion for Horizontal Pod Autoscaler. Chart context
common.capabilities.vpa.apiVersionReturn the appropriate apiVersion for Vertical Pod Autoscaler.. Chart context
common.capabilities.psp.supportedReturns true if PodSecurityPolicy is supported. Chart context
common.capabilities.supportsHelmVersionReturns true if the used Helm version is 3.3+. Chart context
common.capabilities.admissionConfiguration.supportedReturns true if AdmissionConfiguration is supported. Chart context
common.capabilities.admissionConfiguration.apiVersionReturn the appropriate apiVersion for AdmissionConfiguration.. Chart context
common.capabilities.podSecurityConfiguration.apiVersionReturn the appropriate apiVersion for PodSecurityConfiguration.. Chart context

Certificates

Helper identifierDescriptionExpected Input
common.certs.sansReturns a space-separated list of Subject Alternative Names (SANs) to create a TLS certificatedict "namespace" "default" "clusterDomain" "cluster.local" "serviceName" "my-service" "headlessServiceName" "my-service-headless"

Compatibility

Helper identifierDescriptionExpected Input
common.compatibility.isOpenshiftReturn true if the detected platform is Openshift. Chart context
common.compatibility.renderSecurityContextRender a compatible securityContext depending on the platform. By default it is maintained as it is. In other platforms like Openshift we remove default user/group values that do not work out of the box with the restricted-v1 SCCdict "secContext" .Values.containerSecurityContext "context" $

Errors

Helper identifierDescriptionExpected Input
common.errors.upgrade.passwords.emptyIt will ensure required passwords are given when we are upgrading a chart. If validationErrors is not empty it will throw an error and will stop the upgrade action.dict "validationErrors" (list $validationError00 $validationError01) "context" $
common.errors.insecureImagesThrow error when original container images are replaced. The error can be bypassed by setting the global.security.allowInsecureImages to true.dict "images" (list .Values.path.to.the.imageRoot) "context" $

Images

Helper identifierDescriptionExpected Input
common.images.imageReturn the proper and full image namedict "imageRoot" .Values.path.to.the.image "global" $, see ImageRoot for the structure.
common.images.pullSecretsReturn the proper Docker Image Registry Secret Names (deprecated: use common.images.renderPullSecrets instead)dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "global" .Values.global
common.images.renderPullSecretsReturn the proper Docker Image Registry Secret Names (evaluates values as templates)dict "images" (list .Values.path.to.the.image1, .Values.path.to.the.image2) "context" $
common.images.versionReturn the proper image versiondict "imageRoot" .Values.path.to.the.image "chart" .Chart , see ImageRoot for the structure.

Ingress

Helper identifierDescriptionExpected Input
common.ingress.backendGenerate a proper Ingress backend entry depending on the

Deploy common with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has common on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcommon is pinned at v2.41.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply