https://github.com/baloise-incubator/generic-chart
General purpose Helm Chart
https://github.com/baloise-incubator/generic-chart
gitops helm-chart
Last synced: 12 months ago
JSON representation
General purpose Helm Chart
- Host: GitHub
- URL: https://github.com/baloise-incubator/generic-chart
- Owner: baloise-incubator
- License: mit
- Created: 2020-03-14T21:39:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T15:01:30.000Z (over 2 years ago)
- Last Synced: 2025-02-13T12:47:35.956Z (about 1 year ago)
- Topics: gitops, helm-chart
- Language: Mustache
- Size: 196 KB
- Stars: 6
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Generic Helm Chart
This chart is a template for common Kubernetes resource manifests, which should cover most use cases. Please read
through the list of possible configuration parameters. If you miss a specific feature, you can easily add it via a pull
request. If you don't think you can do that, just create a JIRA issue in the Container Platform Team JIRA project (Key:
COP)
## Change Log
In [CHANGELOG.md](./CHANGELOG.md) are all changes since version `1.0.0` tracked with the corresponding **migration
guides**.
## Examples
You can find an example setup using the generic-chart in the [examples directory](./examples/). If you search of a more
specific use-case, have a look at the test values.yaml in the [tests/](./tests) directory.
## Configuration
| Parameter | Description | Default |
|------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|
| **replicaCount** | Amount of `Pod` replicas | `1` |
| **topologyKey** | topologyKey | `` |
| **revisionHistoryLimit** | Amount of old `ReplicaSets` for this `Deployment` should be retained | `1` |
| **image.repository** | URL to the container registry with organisation and repository | `nil` |
| **image.tag** | Image tag of the provided container repository | `nil` |
| **image.pullPolicy** | The pull policy when a image should be pulled (`IfNotPresent`, `Always`) | `IfNotPresent` |
| **imagePullSecrets** | Reference a `Secret` which should be use to authenticate against a container registry | `nil` |
| **nameOverride** | Override the fullname with this name | "" |
| **namespaceOverride** | Overrides the namespace in every resource | `nil` |
| **serviceAccount.create** | If a `ServiceAccount` should be created. If `false` a `ServiceAccount` must be provided and configured correctly with its name under `serviceAccount.name`. | `true` |
| **serviceAccount.name** | Name of the `ServiceAccount`. If not set and create is true, a name is generated using the name template | `nil` |
| **serviceAccount.automountServiceAccountToken** | If `true` the `Secret` with the `Token` and `Certificates` of the `ServiceAccount` is mounted. Only required when access to the master API is necessary | `false` |
| **serviceAccount.annotations** | Sets [`annotations`](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) for the `ServiceAccount` | `{}` |
| **network** | Map of ports which should be exposed for services type ClusterIP. Adds `ports` section to the Pod template, adds `ports` section to Service and can create `Ingress` or `Route` and `ServiceMonitor` for the ports. | `network.http.servicePort: 8080` |
| **network.{}.servicePort** | Port number of the `Service` (e.g. 8080, 8443). If `nil` no port on the `Service` is exposed | `nil` |
| **network.{}.containerPort** | The port which is exposed on the `Pod`. If `nil` corresponds to the `network.{}.servicePort` | `nil` |
| **network.{}.ingress** | If not `nil` creates an `Ingress` or `Route` for the `Service` and its `servicePort`. If set to `{}` see `ingress.zone` | `nil` |
| **network.{}.ingress.host** | Sets the hostname for the `Ingress` or `Route`. If `nil` see `ingress.zone` | `nil` |
| **network.{}.ingress.annotations** | Sets [`annotations`](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) for the `Ingress` or `Route` instance | `{}` |
| **network.{}.ingress.path** | Sets the path for the `Ingress` or `Route` instance | `/` |
| **network.{}.ingress.termination** | [TLS termination](https://docs.openshift.com/container-platform/3.11/architecture/networking/routes.html#route-types) for the `Ingress` or `Route` instance. Possible values are `edge`, `passthrough` or `reencrypt` | `edge` |
| **network.{}.ingress.enableIstioIngressGateway** | Publish this service outside service mesh | `false` |
| **network.{}.ingress.addAsEnv** | If true, adds `network.{}.ingress.host` as environment variable. Default name is "INGRESS_HOST_" | `false` |
| **network.{}.ingress.envNameOverride** | Overrides the generated environment variable name which is set by `network.{}.ingress.addAsEnv` | `nil` |
| **network.{}.ingress.enableIstioIngressGateway** | Publish this service outside service mesh | `false` |
| **network.{}.serviceMonitor** | If set to `{}` creates a `ServiceMonitor` for the `Service` and its `servicePort` with default values for `interval`,`path` and `scheme` | `nil` |
| **network.{}.serviceMonitor.interval** | Interval at which metrics should be scraped | `30s` |
| **network.{}.serviceMonitor.path** | HTTP path to scrape for metrics. | `/metrics` |
| **network.{}.serviceMonitor.scheme** | HTTP scheme to scrape metrics | `http` |
| **network.{}.serviceMonitor.extraConfig** | Any additional configuration available under `endpoints` of the `ServiceMonitor` | `nil` |
| **serviceLoadBalancer** | Map of ports which should be exposed for services type LoadBalancer. Adds `ports` section to the Pod template, adds `ports` section to Service and can create `ServiceMonitor` for the ports. | `nil` |
| **serviceLoadBalancer.{}.servicePort** | Port number of the `Service` (e.g. 8080, 8443). If `nil` no port on the `Service` is exposed | `nil` |
| **serviceLoadBalancer.{}.containerPort** | The port which is exposed on the `Pod`. If `nil` corresponds to the `network.{}.servicePort` | `nil` |
| **serviceLoadBalancer.{}.serviceMonitor** | If set to `{}` creates a `ServiceMonitor` for the `Service` and its `servicePort` with default values for `interval`,`path` and `scheme` | `nil` |
| **serviceLoadBalancer.{}.serviceMonitor.interval** | Interval at which metrics should be scraped | `30s` |
| **serviceLoadBalancer.{}.serviceMonitor.path** | HTTP path to scrape for metrics. | `/metrics` |
| **serviceLoadBalancer.{}.serviceMonitor.scheme** | HTTP scheme to scrape metrics | `http` |
| **serviceLoadBalancer.{}.serviceMonitor.extraConfig** | Any additional configuration available under `endpoints` of the `ServiceMonitor` | `nil` |
| **serviceLoadBalancerIP** | LoadBalancer IP on which service will be exposed | `nil` |
| **serviceLoadBalancerAnnotations** | Sets [`annotations`](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) for the LoadBalancer type `Service` | `nil` |
| **service.type** | `Service` type (`ClusterIP`, `NodePort`, `ExternalName`) | `ClusterIP` |
| **service.annotations** | Sets [`annotations`](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) for the `Service` | |
| **ingress.controller** | Sets the type of the ingress controller (e.g. Route, Ingress) | `Route` |
| **ingress.zone** | ***Deprecated***: If set to `ch` or `sh` and `network.{}.ingress.host` is `nil`, the hostname is generated (~ $CHART_NAME-$RELEASE_NAME.$ZONE$ENV.os1.balgroupit.com) | `nil` |
| **externalSecret.secretStoreRef** | .spec.secretStoreRef of ExternalSecret | `{}` |
| **externalSecret.target** | .spec.target of ExternalSecret | `externalSecret.target` |
| **externalSecret.addAsEnv** | Mounts all referenced secret keys as environment variables | `true` |
| **externalSecret.mountPath** | If set, mounts all referenced Secret keys as file. Path should NOT end with a `/`. | `nil` |
| **externalSecret.overrideName** | Overrides default name of [`ExternalSecret`](https://external-secrets.io/v0.5.8/api-externalsecret/) or its resulting [`Secret`](https://kubernetes.io/docs/concepts/configuration/secret/) | `.Release.Name` |
| **externalSecret.refs** | References to secrets in HashiCorp Vault | `[]` |
| **externalSecret.refs.vaultPath** | Path to secret in HashiCorp Vault (e.g. secrets/apps/exampleApplication/T/exampleSecret) | `[]` |
| **externalSecret.refs.vaultKey** | Key of the secret in HashiCorp Vault (e.g. password) | `nil` |
| **externalSecret.refs.secretKey** | Key for secret in the Kubernetes Secret (e.g. USERNAME). If not defined, `externalSecret.refs.vaultKey` is used. | `externalSecret.refs.vaultKey` |
| **externalSecret.refs.addAsEnv** | If true, secretKey is mounted as environment variable. Overrides externalSecret.addAsEnv | `externalSecret.addAsEnv` |
| **externalSecret.refs.mountPath** | If set, secretKey is mounted as file on given mountPath. Can only overrides externalSecret.mountPath but disable it | `externalSecret.mountPath` |
| **externalSecret.refsFrom** | References to secrets in HashiCorp Vault using all KV-pairs from a specified path | `[]` |
| **externalSecret.refsFrom.vaultPath** | Path to secret in HashiCorp Vault (e.g. secrets/apps/exampleApplication/T/exampleSecret), all contained KV-pairs will be added | `[]` |
| **env** | List of environment variables for the `Deployment` | `nil` |
| **envFrom** | Set environment variables from a `ConfigMap` or `Secret`. See [`envFrom`](https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#configure-all-key-value-pairs-in-a-configmap-as-container-environment-variables) | `nil` |
| **deployment.stateful.enabled** | If true uses [`StatefulSet`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) instead of [`Deployment`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) | `false` |
| **deployment.stateful.podManagementPolicy** | Defines [`podManagementPolicy`](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies) for the `StatefulSet` | `OrderedReady` |
| **deployment.stateful.servicePerPod** | If `deployment.stateful` is true, a Service per stateful Pod is created. Required for e.g. Remote EJBs | `true` |
| **deployment.stateful.routePerService** | If `deployment.stateful` is true, a Route per stateful Service is created. Required for e.g. Remote EJBs | `true` |
| **deployment.strategy** | Specifies the [`strategy`](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy) used to replace old Pods by new ones | `type: RollingUpdate` |
| **persistence.enabled** | If `true` a [`PVC`](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) is created | `false` |
| **persistence.name** | The name of the PVC | `generic-chart.name` |
| **persistence.accessModes** | [`accessModes`](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) of the PVC (ReadWriteOnce, ReadWriteMany) | `ReadWriteOnce` |
| **persistence.storageClass** | [`storageClass`] of the PVC (trident-nfs-snapshot, trident-nfs) | `nil` |
| **persistence.size** | Size of the PVC (e.g. 512Mi, 10Gi, 1Ti) | `nil` |
| **persistence.volumeMountPath** | Path where to volume should be mounted (e.g. `/var/data/`). If set, `volumes` and `volumeMounts` are configured | `nil` |
| **persistence.annotations** | Sets [`annotations`](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) for the `PersistentVolumeClaim` | `{}` |
| **volumes** | Set [`Volumes`](https://kubernetes.io/docs/concepts/storage/volumes/) available to the `Pod` | `[]` |
| **volumeMounts** | Mounts a [`Volume`](https://kubernetes.io/docs/concepts/storage/volumes/) defined in `volumes` in the container. | `[]` |
| **readinessProbe** | Defines the [`readinessProbe`](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) | `{}` |
| **livenessProbe** | Defines the [`livenessProbe`](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) | `{}` |
| **startupProbe** | Defines the [`startupProbe`](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) | `{}` |
| **resources** | CPU/Memory resource [`requests/limits`](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#resource-requests-and-limits-of-pod-and-container) | `{}` |
| **podSecurityContext** | [`securityContext`](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) of the `Pod` | `{}` |
| **securityContext** | [`securityContext`](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for the container | `{}` |
| **nodeSelector** | [`nodeSelector`](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector) schedules Pods only on matching nodes | `{}` |
| **tolerations** | [`tolerations`](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) allows to schedule `Pods` on nodes with [`taints`](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) | `{}` |
| **affinity** | Set [`affinity`](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#node-affinity-beta-feature) to control how pods are scheduled | `{}` |
| **defaultAffinityRules.enabled** | If `true` prevents that the `Pod` defined in `replicaCount` are not scheduled on the same node | `true` |
| **annotations** | Sets [`annotations`](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) for the `Pod` | `{}` |
| **command** | Sets [`command`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#define-a-command-and-arguments-when-you-create-a-pod) for the `Pod`. | `[]` |
| **args** | Sets [`args`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#define-a-command-and-arguments-when-you-create-a-pod) for the `Pod`. | `[]` |
| **initContainers** | Sets [`initContainers`](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) for the `Pod`. | `[]` |
| **additionalContainers** | Define additional containers for the `Pod`. | `[]` |
| **enableServiceMesh** | Enable or disable deployment of pods in a service mesh | `false` |
| **enableReloader** | Enable or disable automatic restarts of pods if a referenced ConfigMap or Secret has changed. [More Info](https://github.com/stakater/Reloader) | `false` |
## Contributions
If you contribute new featuers or fix a bug, please update the `.version` in the `Chart.yaml` according
to [SemVer](https://semver.org/) and update the documentation.
## Testing
To run tests
```bash
make test
```
To update the snapshot files
```bash
make test-update
```
If you want to add your own test case, simply copy [tests/simple](./tests/simple) in a new directory and adjust the
test.yaml and values.yaml accordingly.