[bitnami/memcached] Chart standardized (#8668)

* [bitnami/memcached] Chart standardized

Signed-off-by: juan131 <juanariza@vmware.com>

* Implement requested changes

Signed-off-by: juan131 <juanariza@vmware.com>

* [bitnami/memcached] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
Juan Ariza Toledano
2022-01-19 15:40:44 +01:00
committed by GitHub
parent f96570de4c
commit 7b99d3ba23
15 changed files with 975 additions and 562 deletions

View File

@@ -22,4 +22,4 @@ name: memcached
sources: sources:
- https://github.com/bitnami/bitnami-docker-memcached - https://github.com/bitnami/bitnami-docker-memcached
- http://memcached.org/ - http://memcached.org/
version: 5.15.14 version: 6.0.0

View File

@@ -58,115 +58,205 @@ The command removes all the Kubernetes components associated with the chart and
### Common parameters ### Common parameters
| Name | Description | Value | | Name | Description | Value |
| ------------------- | -------------------------------------------------------------------------------------------- | --------------- | | ------------------------ | -------------------------------------------------------------------------------------------- | --------------- |
| `nameOverride` | String to partially override common.names.fullname template (will maintain the release name) | `""` | | `kubeVersion` | Override Kubernetes version | `""` |
| `fullnameOverride` | String to fully override common.names.fullname template | `""` | | `nameOverride` | String to partially override common.names.fullname template (will maintain the release name) | `""` |
| `commonLabels` | Labels to add to all deployed objects | `{}` | | `fullnameOverride` | String to fully override common.names.fullname template | `""` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` | | `clusterDomain` | Kubernetes Cluster Domain | `cluster.local` |
| `clusterDomain` | Default Kubernetes cluster domain | `cluster.local` | | `extraDeploy` | Extra objects to deploy (evaluated as a template) | `[]` |
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` | | `commonLabels` | Add labels to all the deployed resources | `{}` |
| `commonAnnotations` | Add annotations to all the deployed resources | `{}` |
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
| `diagnosticMode.command` | Command to override all containers in the deployment/statefulset | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in the deployment/statefulset | `["infinity"]` |
### Memcached parameters ### Memcached parameters
| Name | Description | Value | | Name | Description | Value |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------- | | -------------------- | ------------------------------------------------------------------------ | --------------------- |
| `image.registry` | Memcached image registry | `docker.io` | | `image.registry` | Memcached image registry | `docker.io` |
| `image.repository` | Memcached image repository | `bitnami/memcached` | | `image.repository` | Memcached image repository | `bitnami/memcached` |
| `image.tag` | Memcached image tag (immutable tags are recommended) | `1.6.13-debian-10-r0` | | `image.tag` | Memcached image tag (immutable tags are recommended) | `1.6.13-debian-10-r0` |
| `image.pullPolicy` | Memcached image pull policy | `IfNotPresent` | | `image.pullPolicy` | Memcached image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
| `image.debug` | Enable image debug mode | `false` | | `image.debug` | Specify if debug values should be set | `false` |
| `architecture` | Memcached architecture. Allowed values: standalone or high-availability | `standalone` | | `architecture` | Memcached architecture. Allowed values: standalone or high-availability | `standalone` |
| `hostAliases` | Add deployment host aliases | `[]` | | `auth.enabled` | Enable Memcached authentication | `false` |
| `memcachedUsername` | Memcached admin user | `""` | | `auth.username` | Memcached admin user | `""` |
| `memcachedPassword` | Memcached admin password | `""` | | `auth.password` | Memcached admin password | `""` |
| `replicaCount` | Number of containers | `1` | | `command` | Override default container command (useful when using custom images) | `[]` |
| `command` | Default container command (useful when using custom images) | `[]` | | `args` | Override default container args (useful when using custom images) | `[]` |
| `arguments` | Default container args (useful when using custom images) | `["/run.sh"]` | | `extraEnvVars` | Array with extra environment variables to add to Memcached nodes | `[]` |
| `extraEnv` | Additional env vars to pass | `[]` | | `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars for Memcached nodes | `""` |
| `podDisruptionBudget.create` | Specifies whether a Pod disruption budget should be created | `false` | | `extraEnvVarsSecret` | Name of existing Secret containing extra env vars for Memcached nodes | `""` |
| `podDisruptionBudget.minAvailable` | Minimum number of pods that need to be available | `""` |
| `podDisruptionBudget.maxUnavailable` | Maximum number of pods that can be unavailable | `1` |
| `service.type` | Kubernetes service type for Memcached | `ClusterIP` | ### Deployment/Statefulset parameters
| `service.port` | Memcached service port | `11211` |
| `service.nodePort` | Kubernetes Service nodePort | `""` | | Name | Description | Value |
| `service.loadBalancerIP` | `loadBalancerIP` if service type is `LoadBalancer` | `""` | | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- |
| `service.annotations` | Additional annotations for Memcached service | `{}` | | `replicaCount` | Number of Memcached nodes | `1` |
| `autoscaling.enabled` | Enable memcached statefulset autoscaling (requires architecture: "high-availability") | `false` | | `containerPorts.memcached` | Memcached container port | `11211` |
| `autoscaling.minReplicas` | memcached statefulset autoscaling minimum number of replicas | `3` | | `livenessProbe.enabled` | Enable livenessProbe on Memcached containers | `true` |
| `autoscaling.maxReplicas` | memcached statefulset autoscaling maximum number of replicas | `6` | | `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
| `autoscaling.targetCPU` | memcached statefulset autoscaling target CPU percentage | `50` | | `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `autoscaling.targetMemory` | memcached statefulset autoscaling target CPU memory | `50` | | `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
| `resources.limits` | CPU/Memory resource limits | `{}` | | `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `6` |
| `resources.requests` | CPU/Memory resource requests | `{}` | | `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `portName` | Name of the main port exposed by memcached | `memcache` | | `readinessProbe.enabled` | Enable readinessProbe on Memcached containers | `true` |
| `securityContext.enabled` | Enable security context | `true` | | `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
| `securityContext.fsGroup` | Group ID for the container | `1001` | | `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `5` |
| `securityContext.runAsUser` | User ID for the container | `1001` | | `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` |
| `securityContext.readOnlyRootFilesystem` | Enable read-only filesystem | `false` | | `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `6` |
| `podLabels` | Pod extra labels | `{}` | | `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `podAnnotations` | Pod annotations | `{}` | | `startupProbe.enabled` | Enable startupProbe on Memcached containers | `false` |
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | | `startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `30` |
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` | | `startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` | | `startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
| `nodeAffinityPreset.key` | Node label key to match. Ignored if `affinity` is set. | `""` | | `startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` |
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` | | `startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `affinity` | Affinity for pod assignment | `{}` | | `customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` | | `customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` | | `customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains | `{}` | | `lifecycleHooks` | for the Memcached container(s) to automate configuration before or after startup | `{}` |
| `priorityClassName` | Pod priority | `""` | | `resources.limits` | The resources limits for the Memcached containers | `{}` |
| `initContainers` | Add additional init containers to the Memcached pod | `[]` | | `resources.requests.memory` | The requested memory for the Memcached containers | `256Mi` |
| `sidecars` | Add additional sidecar containers to the Memcached pod | `[]` | | `resources.requests.cpu` | The requested cpu for the Memcached containers | `250m` |
| `serviceAccount.create` | Enable creation of ServiceAccount for memcached pods | `true` | | `podSecurityContext.enabled` | Enabled Memcached pods' Security Context | `true` |
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` | | `podSecurityContext.fsGroup` | Set Memcached pod's Security Context fsGroup | `1001` |
| `serviceAccount.automountServiceAccountToken` | Enable/disable auto mounting of the service account token | `true` | | `containerSecurityContext.enabled` | Enabled Memcached containers' Security Context | `true` |
| `persistence.enabled` | Enable persistence using PVC (Requires architecture: "high-availability") | `false` | | `containerSecurityContext.runAsUser` | Set Memcached containers' Security Context runAsUser | `1001` |
| `persistence.storageClass` | PVC Storage Class for Memcached volume | `""` | | `containerSecurityContext.runAsNonRoot` | Set Memcached containers' Security Context runAsNonRoot | `true` |
| `persistence.annotations` | Persistent Volume Claim annotations | `{}` | | `hostAliases` | Add deployment host aliases | `[]` |
| `persistence.accessModes` | Persistent Volume Access Mode | `["ReadWriteOnce"]` | | `podLabels` | Extra labels for Memcached pods | `{}` |
| `persistence.size` | PVC Storage Request for Memcached volume | `8Gi` | | `podAnnotations` | Annotations for Memcached pods | `{}` |
| `metrics.enabled` | Start a side-car prometheus exporter | `false` | | `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `metrics.image.registry` | Memcached exporter image registry | `docker.io` | | `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
| `metrics.image.repository` | Memcached exporter image repository | `bitnami/memcached-exporter` | | `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
| `metrics.image.tag` | Memcached exporter image tag (immutable tags are recommended) | `0.9.0-debian-10-r268` | | `nodeAffinityPreset.key` | Node label key to match Ignored if `affinity` is set. | `""` |
| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` | | `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `affinity` | Affinity for pod assignment | `{}` |
| `metrics.podAnnotations` | Metrics exporter pod Annotation and Labels | `{}` | | `nodeSelector` | Node labels for pod assignment | `{}` |
| `metrics.portName` | Memcached exporter port name | `metrics` | | `tolerations` | Tolerations for pod assignment | `[]` |
| `metrics.resources.limits` | The resources limits for the container | `{}` | | `topologySpreadConstraints` | Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template | `{}` |
| `metrics.resources.requests` | The requested resources for the container | `{}` | | `podManagementPolicy` | StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees. There are two valid pod management policies: `OrderedReady` and `Parallel` | `Parallel` |
| `metrics.livenessProbe.enabled` | Enable livenessProbe | `true` | | `priorityClassName` | Name of the existing priority class to be used by Memcached pods, priority class needs to be created beforehand | `""` |
| `metrics.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` | | `schedulerName` | Kubernetes pod scheduler registry | `""` |
| `metrics.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` | | `updateStrategy.type` | Memcached statefulset strategy type | `RollingUpdate` |
| `metrics.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` | | `updateStrategy.rollingUpdate` | Memcached statefulset rolling update configuration parameters | `{}` |
| `metrics.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` | | `extraVolumes` | Optionally specify extra list of additional volumes for the Memcached pod(s) | `[]` |
| `metrics.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` | | `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Memcached container(s) | `[]` |
| `metrics.readinessProbe.enabled` | Enable readinessProbe | `true` | | `sidecars` | Add additional sidecar containers to the Memcached pod(s) | `[]` |
| `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` | | `initContainers` | Add additional init containers to the Memcached pod(s) | `[]` |
| `metrics.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` | | `autoscaling.enabled` | Enable memcached statefulset autoscaling (requires architecture: "high-availability") | `false` |
| `metrics.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `1` | | `autoscaling.minReplicas` | memcached statefulset autoscaling minimum number of replicas | `3` |
| `metrics.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` | | `autoscaling.maxReplicas` | memcached statefulset autoscaling maximum number of replicas | `6` |
| `metrics.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` | | `autoscaling.targetCPU` | memcached statefulset autoscaling target CPU percentage | `50` |
| `metrics.service.type` | Kubernetes service type for Prometheus metrics | `ClusterIP` | | `autoscaling.targetMemory` | memcached statefulset autoscaling target CPU memory | `50` |
| `metrics.service.port` | Prometheus metrics service port | `9150` | | `pdb.create` | Deploy a pdb object for the Memcached pod | `false` |
| `metrics.service.annotations` | Annotations for the Prometheus metrics service | `{}` | | `pdb.minAvailable` | Minimum available Memcached replicas | `""` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator | `false` | | `pdb.maxUnavailable` | Maximum unavailable Memcached replicas | `1` |
| `metrics.serviceMonitor.namespace` | The namespace in which the ServiceMonitor will be created | `""` |
| `metrics.serviceMonitor.interval` | The interval at which metrics should be scraped | `""` |
| `metrics.serviceMonitor.scrapeTimeout` | The timeout after which the scrape is ended | `""` | ### Traffic Exposure parameters
| `metrics.serviceMonitor.selector` | Additional labels for ServiceMonitor resource | `{}` |
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` | | Name | Description | Value |
| `metrics.serviceMonitor.relabelings` | Metrics relabelings to add to the scrape endpoint, applied before scraping | `[]` | | ---------------------------------- | --------------------------------------------------------------------------------------- | ----------- |
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | | `service.type` | Kubernetes Service type | `ClusterIP` |
| `volumePermissions.image.repository` | Init container volume-permissions image repository | `bitnami/bitnami-shell` | | `service.ports.memcached` | Memcached service port | `11211` |
| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `10-debian-10-r307` | | `service.nodePorts.memcached` | Node port for Memcached | `""` |
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` | | `service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
| `volumePermissions.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | | `service.clusterIP` | Memcached service Cluster IP | `""` |
| `volumePermissions.resources.limits` | Init container volume-permissions resource limits | `{}` | | `service.loadBalancerIP` | Memcached service Load Balancer IP | `""` |
| `volumePermissions.resources.requests` | Init container volume-permissions resource requests | `{}` | | `service.loadBalancerSourceRanges` | Memcached service Load Balancer sources | `[]` |
| `service.externalTrafficPolicy` | Memcached service external traffic policy | `Cluster` |
| `service.annotations` | Additional custom annotations for Memcached service | `{}` |
| `service.extraPorts` | Extra ports to expose in the Memcached service (normally used with the `sidecar` value) | `[]` |
### Other Parameters
| Name | Description | Value |
| --------------------------------------------- | ---------------------------------------------------------------------- | ------- |
| `serviceAccount.create` | Enable creation of ServiceAccount for Memcached pod | `false` |
| `serviceAccount.name` | The name of the ServiceAccount to use. | `""` |
| `serviceAccount.automountServiceAccountToken` | Allows auto mount of ServiceAccountToken on the serviceAccount created | `true` |
| `serviceAccount.annotations` | Additional custom annotations for the ServiceAccount | `{}` |
### Persistence parameters
| Name | Description | Value |
| --------------------------- | ------------------------------------------------------------------------ | ------------------- |
| `persistence.enabled` | Enable Memcached data persistence using PVC. If false, use emptyDir | `false` |
| `persistence.existingClaim` | Name of an existing PVC to use (only when deploying a single replica) | `""` |
| `persistence.storageClass` | PVC Storage Class for Memcached data volume | `""` |
| `persistence.accessModes` | PVC Access modes | `["ReadWriteOnce"]` |
| `persistence.size` | PVC Storage Request for Memcached data volume | `8Gi` |
| `persistence.annotations` | Annotations for the PVC | `{}` |
| `persistence.selector` | Selector to match an existing Persistent Volume for Memcached's data PVC | `{}` |
### Volume Permissions parameters
| Name | Description | Value |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------- | ---------------------------- |
| `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume | `false` |
| `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` |
| `volumePermissions.image.repository` | Init container volume-permissions image repository | `bitnami/bitnami-shell` |
| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `10-debian-10-r304` |
| `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` |
| `volumePermissions.image.pullSecrets` | Init container volume-permissions image pull secrets | `[]` |
| `volumePermissions.resources.limits` | Init container volume-permissions resource limits | `{}` |
| `volumePermissions.resources.requests` | Init container volume-permissions resource requests | `{}` |
| `volumePermissions.containerSecurityContext.runAsUser` | User ID for the init container | `0` |
| `metrics.enabled` | Start a side-car prometheus exporter | `false` |
| `metrics.image.registry` | Memcached exporter image registry | `docker.io` |
| `metrics.image.repository` | Memcached exporter image repository | `bitnami/memcached-exporter` |
| `metrics.image.tag` | Memcached exporter image tag (immutable tags are recommended) | `0.9.0-debian-10-r268` |
| `metrics.image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `metrics.image.pullSecrets` | Specify docker-registry secret names as an array | `[]` |
| `metrics.containerPorts.metrics` | Memcached Prometheus Exporter container port | `9150` |
| `metrics.resources.limits` | Init container volume-permissions resource limits | `{}` |
| `metrics.resources.requests` | Init container volume-permissions resource requests | `{}` |
| `metrics.livenessProbe.enabled` | Enable livenessProbe on Memcached Prometheus exporter containers | `true` |
| `metrics.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `15` |
| `metrics.livenessProbe.periodSeconds` | Period seconds for livenessProbe | `10` |
| `metrics.livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `5` |
| `metrics.livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `3` |
| `metrics.livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
| `metrics.readinessProbe.enabled` | Enable readinessProbe on Memcached Prometheus exporter containers | `true` |
| `metrics.readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `5` |
| `metrics.readinessProbe.periodSeconds` | Period seconds for readinessProbe | `10` |
| `metrics.readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `3` |
| `metrics.readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `3` |
| `metrics.readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
| `metrics.startupProbe.enabled` | Enable startupProbe on Memcached Prometheus exporter containers | `false` |
| `metrics.startupProbe.initialDelaySeconds` | Initial delay seconds for startupProbe | `10` |
| `metrics.startupProbe.periodSeconds` | Period seconds for startupProbe | `10` |
| `metrics.startupProbe.timeoutSeconds` | Timeout seconds for startupProbe | `1` |
| `metrics.startupProbe.failureThreshold` | Failure threshold for startupProbe | `15` |
| `metrics.startupProbe.successThreshold` | Success threshold for startupProbe | `1` |
| `metrics.customLivenessProbe` | Custom livenessProbe that overrides the default one | `{}` |
| `metrics.customReadinessProbe` | Custom readinessProbe that overrides the default one | `{}` |
| `metrics.customStartupProbe` | Custom startupProbe that overrides the default one | `{}` |
| `metrics.podAnnotations` | Memcached Prometheus exporter pod Annotation and Labels | `{}` |
| `metrics.service.ports.metrics` | Prometheus metrics service port | `9150` |
| `metrics.service.clusterIP` | Static clusterIP or None for headless services | `""` |
| `metrics.service.sessionAffinity` | Control where client requests go, to the same pod or round-robin | `None` |
| `metrics.service.annotations` | Annotations for the Prometheus metrics service | `{}` |
| `metrics.serviceMonitor.enabled` | Create ServiceMonitor Resource for scraping metrics using Prometheus Operator | `false` |
| `metrics.serviceMonitor.namespace` | Namespace for the ServiceMonitor Resource (defaults to the Release Namespace) | `""` |
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `""` |
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `""` |
| `metrics.serviceMonitor.additionalLabels` | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | `{}` |
| `metrics.serviceMonitor.selector` | Prometheus instance selector labels | `{}` |
| `metrics.serviceMonitor.relabelings` | RelabelConfigs to apply to samples before scraping | `[]` |
| `metrics.serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
| `metrics.serviceMonitor.honorLabels` | Specify honorLabels parameter to add the scrape endpoint | `false` |
| `metrics.serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `""` |
The above parameters map to the environment variables defined in the [bitnami/memcached](https://github.com/bitnami/bitnami-docker-memcached) container image. For more information please refer to the [bitnami/memcached](https://github.com/bitnami/bitnami-docker-memcached) container image documentation. The above parameters map to the environment variables defined in the [bitnami/memcached](https://github.com/bitnami/bitnami-docker-memcached) container image. For more information please refer to the [bitnami/memcached](https://github.com/bitnami/bitnami-docker-memcached) container image documentation.
@@ -174,7 +264,7 @@ The above parameters map to the environment variables defined in the [bitnami/me
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
```console ```console
$ helm install my-release --set memcachedUsername=user,memcachedPassword=password bitnami/memcached $ helm install my-release --set auth.username=user,auth.password=password bitnami/memcached
``` ```
The above command sets the Memcached admin account username and password to `user` and `password` respectively. The above command sets the Memcached admin account username and password to `user` and `password` respectively.
@@ -223,24 +313,22 @@ If you encounter errors when working with persistent volumes, refer to our [trou
Find more information about how to deal with common errors related to Bitnamis Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues). Find more information about how to deal with common errors related to Bitnamis Helm charts in [this troubleshooting guide](https://docs.bitnami.com/general/how-to/troubleshoot-helm-chart-issues).
## Notable changes
### 4.0.0
Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
Use the workaround below to upgrade from versions previous to 4.0.0. The following example assumes that the release name is memcached:
```console
$ kubectl delete deployment memcached --cascade=false
$ helm upgrade memcached bitnami/memcached
```
### 3.0.0
This release uses the new bash based `bitnami/memcached` container which uses bash scripts for the start up logic of the container and is smaller in size.
## Upgrading ## Upgrading
### To 5.0.0
This major release renames several values in this chart and adds missing features, in order to be inline with the rest of assets in the Bitnami charts repository.
Some affected values are:
- `memcachedUsername` and `memcachedPassword` have regrouped under the `auth` map.
- `arguments` has been renamed to `args`.
- `extraEnv` has been renamed to `extraEnvVars`.
- `service.port`, `service.internalPort` and `service.externalPort` have been regrouped under the `service.ports` map.
- `metrics.kafka.service.port` has been regrouped under the `metrics.kafka.service.ports` map.
- `metrics.jmx.service.port` has been regrouped under the `metrics.jmx.service.ports` map.
- `updateStrategy` (string) and `rollingUpdatePartition` are regrouped under the `updateStrategy` map.
### To 5.3.0 ### To 5.3.0
This version introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/master/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade. This version introduces `bitnami/common`, a [library chart](https://helm.sh/docs/topics/library_charts/#helm) as a dependency. More documentation about this new utility could be found [here](https://github.com/bitnami/charts/tree/master/bitnami/common#bitnami-common-library-chart). Please, make sure that you have updated the chart dependencies before executing any upgrade.
@@ -251,6 +339,20 @@ This version introduces `bitnami/common`, a [library chart](https://helm.sh/docs
[Learn more about this change and related upgrade considerations](https://docs.bitnami.com/kubernetes/infrastructure/memcached/administration/upgrade-helm3/). [Learn more about this change and related upgrade considerations](https://docs.bitnami.com/kubernetes/infrastructure/memcached/administration/upgrade-helm3/).
### To 4.0.0
Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.
Use the workaround below to upgrade from versions previous to 4.0.0. The following example assumes that the release name is memcached:
```console
$ kubectl delete deployment memcached --cascade=false
$ helm upgrade memcached bitnami/memcached
```
### To 3.0.0
This release uses the new bash based `bitnami/memcached` container which uses bash scripts for the start up logic of the container and is smaller in size.
### To 1.0.0 ### To 1.0.0
Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments. Backwards compatibility is not guaranteed unless you modify the labels used on the chart's deployments.

View File

@@ -1,5 +0,0 @@
# Test values file for generating all of the yaml and check that
# the rendering is correct
metrics:
enabled: true

View File

@@ -0,0 +1,10 @@
# Test values file for generating hidden section of the yaml
# and check that the rendering is correct
architecture: high-availability
replicaCount: 3
persistence:
enabled: true
metrics:
enabled: true
serviceMonitor:
enabled: true

View File

@@ -2,28 +2,40 @@ CHART NAME: {{ .Chart.Name }}
CHART VERSION: {{ .Chart.Version }} CHART VERSION: {{ .Chart.Version }}
APP VERSION: {{ .Chart.AppVersion }} APP VERSION: {{ .Chart.AppVersion }}
{{- if and (not .Values.auth.enabled) (contains .Values.service.type "LoadBalancer") }}
-------------------------------------------------------------------------------
WARNING
By specifying "serviceType=LoadBalancer" and not specifying "auth.enabled=true"
you have most likely exposed the Memcached service externally without any
authentication mechanism.
For security reasons, we strongly suggest that you switch to "ClusterIP" or
"NodePort". As alternative, you can also specify valid credentials using the
"auth.username" and "auth.password" parameters.
-------------------------------------------------------------------------------
{{- end }}
** Please be patient while the chart is being deployed ** ** Please be patient while the chart is being deployed **
{{- if eq .Values.architecture "standalone" }} Memcached can be accessed via port {{ .Values.service.ports.memcached }} on the following DNS name from within your cluster:
Memcached can be accessed on port 11211 on the following DNS name from within your cluster: {{ template "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
{{- else if eq .Values.architecture "high-availability" }} {{ include "common.names.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
Memcached endpoints are exposed on the headless service named: {{ template "common.names.fullname" . }}.
{{- if eq .Values.architecture "high-availability" }}
Please see https://github.com/memcached/memcached/wiki/ConfiguringClient to understand the Memcached model and need for client-based consistent hashing. Please see https://github.com/memcached/memcached/wiki/ConfiguringClient to understand the Memcached model and need for client-based consistent hashing.
You might also want to consider more advanced routing/replication approaches with mcrouter: https://github.com/facebook/mcrouter/wiki/Replicated-pools-setup You might also want to consider more advanced routing/replication approaches with mcrouter: https://github.com/facebook/mcrouter/wiki/Replicated-pools-setup
{{- end }}
{{- if and (contains "bitnami/" .Values.image.repository) (not (.Values.image.tag | toString | regexFind "-r\\d+$|sha256:")) }}
WARNING: Rolling tag detected ({{ .Values.image.repository }}:{{ .Values.image.tag }}), please note that it is strongly recommended to avoid using rolling tags in a production environment.
+info https://docs.bitnami.com/containers/how-to/understand-rolling-tags-containers/
{{- end }} {{- end }}
{{- if .Values.metrics.enabled }} {{- if .Values.metrics.enabled }}
To access the Memcached Prometheus metrics from outside the cluster execute the following commands: To access the Memcached Prometheus metrics from outside the cluster execute the following commands:
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }}-metrics {{ .Values.metrics.service.port }}:{{ .Values.metrics.service.port }} & kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ printf "%s-metrics" (include "common.names.fullname" .) }} {{ .Values.metrics.service.ports.metrics }}:{{ .Values.metrics.service.ports.metrics }} &
curl http://127.0.0.1:{{ .Values.metrics.service.port }}/metrics curl http://127.0.0.1:{{ .Values.metrics.service.ports.metrics }}/metrics
{{- end }} {{- end }}

View File

@@ -1,14 +1,5 @@
{{/* vim: set filetype=mustache: */}} {{/* vim: set filetype=mustache: */}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "memcached.fullname" -}}
{{- include "common.names.fullname" . -}}
{{- end -}}
{{/* {{/*
Return the proper Memcached image name Return the proper Memcached image name
*/}} */}}
@@ -38,6 +29,17 @@ Return the proper Docker Image Registry Secret Names
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) -}} {{- include "common.images.pullSecrets" (dict "images" (list .Values.image .Values.metrics.image .Values.volumePermissions.image) "global" .Values.global) -}}
{{- end -}} {{- end -}}
{{/*
Create the name of the service account to use
*/}}
{{- define "memcached.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{/* {{/*
Check if there are rolling tags in the images Check if there are rolling tags in the images
*/}} */}}
@@ -54,6 +56,7 @@ Compile all warnings into a single message, and call fail.
{{- $messages := list -}} {{- $messages := list -}}
{{- $messages := append $messages (include "memcached.validateValues.architecture" .) -}} {{- $messages := append $messages (include "memcached.validateValues.architecture" .) -}}
{{- $messages := append $messages (include "memcached.validateValues.replicaCount" .) -}} {{- $messages := append $messages (include "memcached.validateValues.replicaCount" .) -}}
{{- $messages := append $messages (include "memcached.validateValues.auth" .) -}}
{{- $messages := append $messages (include "memcached.validateValues.readOnlyRootFilesystem" .) -}} {{- $messages := append $messages (include "memcached.validateValues.readOnlyRootFilesystem" .) -}}
{{- $messages := without $messages "" -}} {{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}} {{- $message := join "\n" $messages -}}
@@ -83,22 +86,20 @@ memcached: replicaCount
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/* Validate values of Memcached - securityContext.readOnlyRootFilesystem */}} {{/* Validate values of Memcached - authentication */}}
{{- define "memcached.validateValues.readOnlyRootFilesystem" -}} {{- define "memcached.validateValues.auth" -}}
{{- if and .Values.securityContext.enabled .Values.securityContext.readOnlyRootFilesystem (not (empty .Values.memcachedPassword)) -}} {{- if and .Values.auth.enabled (empty .Values.auth.username) -}}
memcached: securityContext.readOnlyRootFilesystem memcached: auth.username
Enabling authentication is not compatible with using a read-only filesystem. Enabling authentication requires setting a valid admin username.
Please disable it (--set securityContext.readOnlyRootFilesystem=false) Please set a valid username (--set auth.username="xxxx")
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/* {{/* Validate values of Memcached - containerSecurityContext.readOnlyRootFilesystem */}}
Create the name of the service account to use {{- define "memcached.validateValues.readOnlyRootFilesystem" -}}
*/}} {{- if and .Values.containerSecurityContext.enabled .Values.containerSecurityContext.readOnlyRootFilesystem .Values.auth.enabled -}}
{{- define "memcached.serviceAccountName" -}} memcached: containerSecurityContext.readOnlyRootFilesystem
{{- if .Values.serviceAccount.create -}} Enabling authentication is not compatible with using a read-only filesystem.
{{ default (include "memcached.fullname" .) .Values.serviceAccount.name }} Please disable it (--set containerSecurityContext.readOnlyRootFilesystem=false)
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

View File

@@ -15,21 +15,25 @@ spec:
selector: selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
{{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
template: template:
metadata: metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }} labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }} {{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }} {{- end }}
{{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }}
annotations: annotations:
{{- if .Values.auth.enabled }}
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }} {{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }} {{- end }}
{{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }} {{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }}
{{- end }} {{- end }}
{{- end }}
spec: spec:
{{- include "memcached.imagePullSecrets" . | nindent 6 }} {{- include "memcached.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }} {{- if .Values.hostAliases }}
@@ -53,12 +57,13 @@ spec:
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }} topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.priorityClassName }} {{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }} priorityClassName: {{ .Values.priorityClassName }}
{{- end }} {{- end }}
{{- if .Values.securityContext.enabled }} {{- if .Values.schedulerName }}
securityContext: schedulerName: {{ .Values.schedulerName }}
fsGroup: {{ .Values.securityContext.fsGroup }} {{- end }}
runAsUser: {{ .Values.securityContext.runAsUser }} {{- if .Values.podSecurityContext.enabled }}
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }} {{- end }}
serviceAccountName: {{ template "memcached.serviceAccountName" . }} serviceAccountName: {{ template "memcached.serviceAccountName" . }}
{{- if .Values.initContainers }} {{- if .Values.initContainers }}
@@ -68,73 +73,114 @@ spec:
- name: memcached - name: memcached
image: {{ template "memcached.image" . }} image: {{ template "memcached.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.command }} {{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }} command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.arguments }} {{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.arguments "context" $) | nindent 12 }} args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- end }} {{- end }}
env: env:
- name: BITNAMI_DEBUG - name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.image.debug | quote }} value: {{ ternary "true" "false" .Values.image.debug | quote }}
{{- if .Values.memcachedUsername }} {{- if .Values.auth.enabled }}
- name: MEMCACHED_USERNAME - name: MEMCACHED_USERNAME
value: {{ .Values.memcachedUsername | quote }} value: {{ .Values.auth.username | quote }}
{{- end }}
{{- if .Values.memcachedPassword }}
- name: MEMCACHED_PASSWORD - name: MEMCACHED_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ template "common.names.fullname" . }} name: {{ include "common.names.fullname" . }}
key: memcached-password key: memcached-password
{{- end }} {{- end }}
{{- if .Values.extraEnv }} {{- if .Values.extraEnvVars }}
{{- toYaml .Values.extraEnv | nindent 12 }} {{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }} {{- end }}
{{- if or .Values.extraEnvVarsCM .Values.extraEnvVarsSecret }}
envFrom:
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- end }}
ports: ports:
- name: {{ .Values.portName }} - name: memcache
containerPort: 11211 containerPort: {{ .Values.containerPorts.memcached }}
livenessProbe: {{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }}
tcpSocket: tcpSocket:
port: {{ .Values.portName }} port: memcache
initialDelaySeconds: 30 {{- else if .Values.customLivenessProbe }}
timeoutSeconds: 5 livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
failureThreshold: 6 {{- end }}
readinessProbe: {{- if .Values.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }}
tcpSocket: tcpSocket:
port: {{ .Values.portName }} port: memcache
initialDelaySeconds: 5 {{- else if .Values.customReadinessProbe }}
timeoutSeconds: 3 readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
periodSeconds: 5 {{- end }}
{{- if .Values.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: memcache
{{- else if .Values.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.resources }} {{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }} resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
- name: tmp - name: tmp
mountPath: /tmp mountPath: /tmp
{{- if .Values.securityContext.enabled }} {{- if .Values.extraVolumeMounts }}
securityContext: {{- include "common.tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $ ) | nindent 12 }}
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }} {{- end }}
{{- end }}
{{- if .Values.metrics.enabled }} {{- if .Values.metrics.enabled }}
- name: metrics - name: metrics
image: {{ template "memcached.metrics.image" . }} image: {{ template "memcached.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
ports: ports:
- name: {{ .Values.metrics.portName }} - name: metrics
containerPort: 9150 containerPort: {{ .Values.metrics.containerPorts.metrics }}
livenessProbe: {{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.metrics.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet: httpGet:
path: /metrics path: /metrics
port: {{ .Values.metrics.portName }} port: {{ .Values.metrics.containerPorts.metrics }}
initialDelaySeconds: 15 {{- else if .Values.metrics.customLivenessProbe }}
timeoutSeconds: 5 livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customLivenessProbe "context" $) | nindent 12 }}
readinessProbe: {{- end }}
{{- if .Values.metrics.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet: httpGet:
path: /metrics path: /metrics
port: {{ .Values.metrics.portName }} port: {{ .Values.metrics.containerPorts.metrics }}
initialDelaySeconds: 5 {{- else if .Values.metrics.customReadinessProbe }}
timeoutSeconds: 1 readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.metrics.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }}
port: memcache
{{- else if .Values.metrics.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.metrics.resources }} {{- if .Values.metrics.resources }}
resources: {{- toYaml .Values.metrics.resources | nindent 12 }} resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
{{- end }} {{- end }}
@@ -145,4 +191,7 @@ spec:
volumes: volumes:
- name: tmp - name: tmp
emptyDir: {} emptyDir: {}
{{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- end }} {{- end }}

View File

@@ -2,7 +2,7 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "common.names.fullname" . }}-metrics name: {{ printf "%s-metrics" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }} labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: metrics app.kubernetes.io/component: metrics
@@ -17,10 +17,14 @@ metadata:
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
type: {{ .Values.metrics.service.type }} type: ClusterIP
sessionAffinity: {{ .Values.metrics.service.sessionAffinity }}
{{- if .Values.metrics.service.clusterIP }}
clusterIP: {{ .Values.metrics.service.clusterIP }}
{{- end }}
ports: ports:
- name: metrics - name: metrics
port: {{ .Values.metrics.service.port }} port: {{ .Values.metrics.service.ports.metrics }}
targetPort: {{ .Values.metrics.portName }} targetPort: metrics
selector: {{- include "common.labels.matchLabels" . | nindent 4 }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
{{- end }} {{- end }}

View File

@@ -1,16 +1,16 @@
{{- if and .Values.podDisruptionBudget.create (eq .Values.architecture "high-availability") }} {{- if and .Values.pdb.create (eq .Values.architecture "high-availability") }}
apiVersion: policy/v1beta1 apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget kind: PodDisruptionBudget
metadata: metadata:
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }} labels: {{- include "common.labels.standard" . | nindent 4 }}
spec: spec:
{{- if .Values.podDisruptionBudget.minAvailable }} {{- if .Values.pdb.minAvailable }}
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} minAvailable: {{ .Values.pdb.minAvailable }}
{{- end }} {{- end }}
{{- if .Values.podDisruptionBudget.maxUnavailable }} {{- if .Values.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }} {{- end }}
selector: selector:
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}

View File

@@ -1,4 +1,4 @@
{{- if .Values.memcachedPassword }} {{- if .Values.auth.enabled }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
@@ -13,5 +13,5 @@ metadata:
{{- end }} {{- end }}
type: Opaque type: Opaque
data: data:
memcached-password: {{ .Values.memcachedPassword | b64enc | quote }} memcached-password: {{ default (randAlphaNum 10) .Values.auth.password | b64enc | quote }}
{{- end }} {{- end }}

View File

@@ -1,7 +1,7 @@
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "common.names.fullname" . }} name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: {{- include "common.labels.standard" . | nindent 4 }} labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }} {{- if .Values.commonLabels }}
@@ -16,19 +16,29 @@ metadata:
{{- end }} {{- end }}
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
{{- if and (eq .Values.architecture "high-availability") (eq .Values.service.type "ClusterIP") }} sessionAffinity: {{ .Values.service.sessionAffinity }}
clusterIP: None {{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }} {{- end }}
{{- if and (not (empty .Values.service.loadBalancerIP)) (eq .Values.service.type "LoadBalancer") }} {{- if or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort") }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{- if and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
{{ end }}
{{- if and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP)) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }} loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }} {{- end }}
ports: ports:
- name: memcache - name: memcache
port: {{ .Values.service.port }} port: {{ .Values.service.ports.memcached }}
targetPort: {{ .Values.portName }} targetPort: memcache
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }} {{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePorts.memcached)) }}
nodePort: {{ .Values.service.nodePort }} nodePort: {{ .Values.service.nodePorts.memcached }}
{{- else if eq .Values.service.type "ClusterIP" }} {{- else if eq .Values.service.type "ClusterIP" }}
nodePort: null nodePort: null
{{- end }} {{- end }}
{{- if .Values.service.extraPorts }}
{{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }}
{{- end }}
selector: {{- include "common.labels.matchLabels" . | nindent 4 }} selector: {{- include "common.labels.matchLabels" . | nindent 4 }}

View File

@@ -9,7 +9,11 @@ metadata:
{{- if .Values.commonLabels }} {{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }} {{- end }}
{{- if .Values.commonAnnotations }} annotations:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }}
{{- end }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.serviceAccount.annotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }} {{- end }}

View File

@@ -12,10 +12,16 @@ metadata:
{{- if .Values.commonLabels }} {{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }} {{- end }}
{{- if .Values.metrics.serviceMonitor.labels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }} {{- if .Values.commonAnnotations }}
annotations: annotations:
{{- end }} {{- end }}
spec: spec:
{{- if .Values.metrics.serviceMonitor.jobLabel }}
jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }}
{{- end }}
selector: selector:
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
{{- if .Values.metrics.serviceMonitor.selector }} {{- if .Values.metrics.serviceMonitor.selector }}
@@ -23,7 +29,7 @@ spec:
{{- end }} {{- end }}
app.kubernetes.io/component: metrics app.kubernetes.io/component: metrics
endpoints: endpoints:
- port: {{ .Values.metrics.portName }} - port: metrics
path: /metrics path: /metrics
{{- if .Values.metrics.serviceMonitor.interval }} {{- if .Values.metrics.serviceMonitor.interval }}
interval: {{ .Values.metrics.serviceMonitor.interval }} interval: {{ .Values.metrics.serviceMonitor.interval }}
@@ -31,6 +37,9 @@ spec:
{{- if .Values.metrics.serviceMonitor.scrapeTimeout }} {{- if .Values.metrics.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }} scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
{{- end }} {{- end }}
{{- if .Values.metrics.serviceMonitor.honorLabels }}
honorLabels: {{ .Values.metrics.serviceMonitor.honorLabels }}
{{- end }}
{{- if .Values.metrics.serviceMonitor.metricRelabelings }} {{- if .Values.metrics.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }} metricRelabelings: {{- toYaml .Values.metrics.serviceMonitor.metricRelabelings | nindent 6 }}
{{- end }} {{- end }}

View File

@@ -16,21 +16,25 @@ spec:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
serviceName: {{ template "common.names.fullname" . }} serviceName: {{ template "common.names.fullname" . }}
{{- if .Values.updateStrategy }}
updateStrategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
template: template:
metadata: metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }} labels: {{- include "common.labels.standard" . | nindent 8 }}
{{- if .Values.podLabels }} {{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }} {{- end }}
{{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }}
annotations: annotations:
{{- if .Values.auth.enabled }}
checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }}
{{- end }}
{{- if .Values.podAnnotations }} {{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }} {{- end }}
{{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }} {{- if and .Values.metrics.enabled .Values.metrics.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.podAnnotations "context" $) | nindent 8 }}
{{- end }} {{- end }}
{{- end }}
spec: spec:
{{- include "memcached.imagePullSecrets" . | nindent 6 }} {{- include "memcached.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }} {{- if .Values.hostAliases }}
@@ -54,12 +58,13 @@ spec:
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }} topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.topologySpreadConstraints "context" .) | nindent 8 }}
{{- end }} {{- end }}
{{- if .Values.priorityClassName }} {{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName | quote }} priorityClassName: {{ .Values.priorityClassName }}
{{- end }} {{- end }}
{{- if .Values.securityContext.enabled }} {{- if .Values.schedulerName }}
securityContext: schedulerName: {{ .Values.schedulerName }}
fsGroup: {{ .Values.securityContext.fsGroup }} {{- end }}
runAsUser: {{ .Values.securityContext.runAsUser }} {{- if .Values.podSecurityContext.enabled }}
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }} {{- end }}
serviceAccountName: {{ template "memcached.serviceAccountName" . }} serviceAccountName: {{ template "memcached.serviceAccountName" . }}
{{- if or .Values.persistence.enabled .Values.initContainers }} {{- if or .Values.persistence.enabled .Values.initContainers }}
@@ -70,10 +75,12 @@ spec:
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
command: command:
- /bin/bash - /bin/bash
args:
- -ec - -ec
- | - |
mkdir -p /cache-state
touch /cache-state/memory_file touch /cache-state/memory_file
chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} /cache-state find /cache-state -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs chown -R {{ .Values.containerSecurityContext.runAsUser }}:{{ .Values.podSecurityContext.fsGroup }}
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{- if .Values.volumePermissions.resources }} {{- if .Values.volumePermissions.resources }}
@@ -89,7 +96,80 @@ spec:
{{- end }} {{- end }}
containers: containers:
- name: memcached - name: memcached
{{- if .Values.persistence.enabled }} image: {{ template "memcached.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
{{- else if .Values.persistence.enabled }}
args:
- /run.sh
- --memory-file=/cache-state/memory_file
{{- end }}
env:
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.image.debug | quote }}
{{- if .Values.auth.enabled }}
- name: MEMCACHED_USERNAME
value: {{ .Values.auth.username | quote }}
- name: MEMCACHED_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "common.names.fullname" . }}
key: memcached-password
{{- end }}
{{- if .Values.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
{{- if or .Values.extraEnvVarsCM .Values.extraEnvVarsSecret }}
envFrom:
{{- if .Values.extraEnvVarsCM }}
- configMapRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsCM "context" $) }}
{{- end }}
{{- if .Values.extraEnvVarsSecret }}
- secretRef:
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
{{- end }}
{{- end }}
ports:
- name: memcache
containerPort: {{ .Values.containerPorts.memcached }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.livenessProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: memcache
{{- else if .Values.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.readinessProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: memcache
{{- else if .Values.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.startupProbe.enabled }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.startupProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: memcache
{{- else if .Values.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if .Values.lifecycleHooks }}
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
{{- else if .Values.persistence.enabled }}
lifecycle: lifecycle:
preStop: preStop:
exec: exec:
@@ -100,112 +180,78 @@ spec:
/usr/bin/pkill -10 memcached /usr/bin/pkill -10 memcached
sleep 60s sleep 60s
{{- end }} {{- end }}
image: {{ template "memcached.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.arguments }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.arguments "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.persistence.enabled }}
- --memory-file=/cache-state/memory_file
{{- end }}
{{- if or .Values.extraEnv .Values.memcachedUsername .Values.memcachedPassword }}
env:
{{- if .Values.memcachedUsername }}
- name: MEMCACHED_USERNAME
value: {{ .Values.memcachedUsername | quote }}
{{- end }}
{{- if .Values.memcachedPassword }}
- name: MEMCACHED_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "common.names.fullname" . }}
key: memcached-password
{{- end }}
{{- if .Values.extraEnv }}
{{- toYaml .Values.extraEnv | nindent 12 }}
{{- end }}
{{- end }}
ports:
- name: {{ .Values.portName }}
containerPort: 11211
livenessProbe:
tcpSocket:
port: {{ .Values.portName }}
initialDelaySeconds: 30
timeoutSeconds: 5
failureThreshold: 6
readinessProbe:
tcpSocket:
port: {{ .Values.portName }}
initialDelaySeconds: 5
timeoutSeconds: 3
periodSeconds: 5
{{- if .Values.resources }} {{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }} resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }}
{{- end }}
volumeMounts: volumeMounts:
{{- if .Values.persistence.enabled }} {{- if .Values.persistence.enabled }}
- name: data - name: data
mountPath: /cache-state mountPath: /cache-state
{{- end }} {{- end }}
- name: tmp - name: tmp
mountPath: /tmp mountPath: /tmp
{{- if .Values.extraVolumeMounts }}
{{- include "common.tplvalues.render" ( dict "value" .Values.extraVolumeMounts "context" $ ) | nindent 12 }}
{{- end }}
{{- if .Values.metrics.enabled }} {{- if .Values.metrics.enabled }}
- name: metrics - name: metrics
image: {{ template "memcached.metrics.image" . }} image: {{ template "memcached.metrics.image" . }}
imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
ports: ports:
- name: {{ .Values.metrics.portName }} - name: metrics
containerPort: 9150 containerPort: {{ .Values.metrics.containerPorts.metrics }}
{{- if not .Values.diagnosticMode.enabled }}
{{- if .Values.metrics.livenessProbe.enabled }} {{- if .Values.metrics.livenessProbe.enabled }}
livenessProbe: livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.livenessProbe "enabled") "context" $) | nindent 12 }}
httpGet: httpGet:
path: /metrics path: /metrics
port: {{ .Values.metrics.portName }} port: {{ .Values.metrics.containerPorts.metrics }}
initialDelaySeconds: {{ .Values.metrics.livenessProbe.initialDelaySeconds }} {{- else if .Values.metrics.customLivenessProbe }}
periodSeconds: {{ .Values.metrics.livenessProbe.periodSeconds }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customLivenessProbe "context" $) | nindent 12 }}
timeoutSeconds: {{ .Values.metrics.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.metrics.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.metrics.livenessProbe.failureThreshold }}
{{- end }} {{- end }}
{{- if .Values.metrics.readinessProbe.enabled }} {{- if .Values.metrics.readinessProbe.enabled }}
readinessProbe: readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.readinessProbe "enabled") "context" $) | nindent 12 }}
httpGet: httpGet:
path: /metrics path: /metrics
port: {{ .Values.metrics.portName }} port: {{ .Values.metrics.containerPorts.metrics }}
initialDelaySeconds: {{ .Values.metrics.readinessProbe.initialDelaySeconds }} {{- else if .Values.metrics.customReadinessProbe }}
periodSeconds: {{ .Values.metrics.readinessProbe.periodSeconds }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customReadinessProbe "context" $) | nindent 12 }}
timeoutSeconds: {{ .Values.metrics.readinessProbe.timeoutSeconds }} {{- end }}
successThreshold: {{ .Values.metrics.readinessProbe.successThreshold }} {{- if .Values.metrics.startupProbe.enabled }}
failureThreshold: {{ .Values.metrics.readinessProbe.failureThreshold }} startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.metrics.startupProbe "enabled") "context" $) | nindent 12 }}
tcpSocket:
port: metrics
{{- else if .Values.metrics.customStartupProbe }}
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.customStartupProbe "context" $) | nindent 12 }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.metrics.resources }} {{- if .Values.metrics.resources }}
resources: {{- toYaml .Values.metrics.resources | nindent 12 }} resources: {{- toYaml .Values.metrics.resources | nindent 12 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.sidecars }} {{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }} {{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $ ) | nindent 8 }}
{{- end }} {{- end }}
volumes: volumes:
- name: tmp - name: tmp
emptyDir: {} emptyDir: {}
{{- if .Values.persistence.enabled }} {{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.persistence.enabled }}
volumeClaimTemplates: volumeClaimTemplates:
- metadata: - metadata:
name: data name: data
{{- with .Values.persistence.annotations }}
annotations: annotations:
{{- range $key, $value := . }} {{- if .Values.persistence.annotations }}
{{ $key }}: {{ $value }} {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }}
{{- end }}
{{- if .Values.commonLabels }}
labels: {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }}
{{- end }} {{- end }}
{{- end }}
spec: spec:
accessModes: accessModes:
{{- range .Values.persistence.accessModes }} {{- range .Values.persistence.accessModes }}
@@ -214,6 +260,9 @@ spec:
resources: resources:
requests: requests:
storage: {{ .Values.persistence.size | quote }} storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.selector }}
selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 10 }}
{{- end }}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 8 }} {{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 8 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@@ -18,24 +18,42 @@ global:
## @section Common parameters ## @section Common parameters
## @param kubeVersion Override Kubernetes version
##
kubeVersion: ""
## @param nameOverride String to partially override common.names.fullname template (will maintain the release name) ## @param nameOverride String to partially override common.names.fullname template (will maintain the release name)
## ##
nameOverride: "" nameOverride: ""
## @param fullnameOverride String to fully override common.names.fullname template ## @param fullnameOverride String to fully override common.names.fullname template
## ##
fullnameOverride: "" fullnameOverride: ""
## @param commonLabels Labels to add to all deployed objects ## @param clusterDomain Kubernetes Cluster Domain
##
commonLabels: {}
## @param commonAnnotations Annotations to add to all deployed objects
##
commonAnnotations: {}
## @param clusterDomain Default Kubernetes cluster domain
## ##
clusterDomain: cluster.local clusterDomain: cluster.local
## @param extraDeploy Array of extra objects to deploy with the release ## @param extraDeploy Extra objects to deploy (evaluated as a template)
## ##
extraDeploy: [] extraDeploy: []
## @param commonLabels Add labels to all the deployed resources
##
commonLabels: {}
## @param commonAnnotations Add annotations to all the deployed resources
##
commonAnnotations: {}
## Enable diagnostic mode in the deployment/statefulset
##
diagnosticMode:
## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
##
enabled: false
## @param diagnosticMode.command Command to override all containers in the deployment/statefulset
##
command:
- sleep
## @param diagnosticMode.args Args to override all containers in the deployment/statefulset
##
args:
- infinity
## @section Memcached parameters ## @section Memcached parameters
@@ -46,12 +64,12 @@ extraDeploy: []
## @param image.tag Memcached image tag (immutable tags are recommended) ## @param image.tag Memcached image tag (immutable tags are recommended)
## @param image.pullPolicy Memcached image pull policy ## @param image.pullPolicy Memcached image pull policy
## @param image.pullSecrets Specify docker-registry secret names as an array ## @param image.pullSecrets Specify docker-registry secret names as an array
## @param image.debug Enable image debug mode ## @param image.debug Specify if debug values should be set
## ##
image: image:
registry: docker.io registry: docker.io
repository: bitnami/memcached repository: bitnami/memcached
tag: 1.6.13-debian-10-r0 tag: 1.6.13-debian-10-r7
## Specify a imagePullPolicy ## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images ## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@@ -71,25 +89,23 @@ image:
## @param architecture Memcached architecture. Allowed values: standalone or high-availability ## @param architecture Memcached architecture. Allowed values: standalone or high-availability
## ##
architecture: standalone architecture: standalone
## @param hostAliases Add deployment host aliases ## Authentication parameters
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## @param memcachedUsername Memcached admin user
## ref: https://github.com/bitnami/bitnami-docker-memcached#creating-the-memcached-admin-user ## ref: https://github.com/bitnami/bitnami-docker-memcached#creating-the-memcached-admin-user
## ##
memcachedUsername: "" auth:
## @param memcachedPassword Memcached admin password ## @param auth.enabled Enable Memcached authentication
## ref: https://github.com/bitnami/bitnami-docker-memcached#creating-the-memcached-admin-user ##
## enabled: false
memcachedPassword: "" ## @param auth.username Memcached admin user
## @param replicaCount Number of containers ##
## username: ""
replicaCount: 1 ## @param auth.password Memcached admin password
## @param command Default container command (useful when using custom images) ##
password: ""
## @param command Override default container command (useful when using custom images)
## ##
command: [] command: []
## @param arguments Default container args (useful when using custom images) ## @param args Override default container args (useful when using custom images)
## e.g: ## e.g:
## arguments: ## arguments:
## - /run.sh ## - /run.sh
@@ -97,100 +113,124 @@ command: []
## - -I <maxItemSize> ## - -I <maxItemSize>
## - -vv ## - -vv
## ##
arguments: args: []
- /run.sh ## @param extraEnvVars Array with extra environment variables to add to Memcached nodes
## @param extraEnv Additional env vars to pass ## e.g:
## ref: https://github.com/bitnami/bitnami-docker-memcached#configuration ## extraEnvVars:
## - name: FOO
## value: "bar"
## ##
extraEnv: [] extraEnvVars: []
## Pod disruption budget configuration ## @param extraEnvVarsCM Name of existing ConfigMap containing extra env vars for Memcached nodes
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
## ##
podDisruptionBudget: extraEnvVarsCM: ""
## @param podDisruptionBudget.create Specifies whether a Pod disruption budget should be created ## @param extraEnvVarsSecret Name of existing Secret containing extra env vars for Memcached nodes
##
create: false
## @param podDisruptionBudget.minAvailable Minimum number of pods that need to be available
##
minAvailable: ""
## @param podDisruptionBudget.maxUnavailable Maximum number of pods that can be unavailable
##
maxUnavailable: 1
## Service parameters
## ##
service: extraEnvVarsSecret: ""
## @param service.type Kubernetes service type for Memcached
##
type: ClusterIP
## @param service.port Memcached service port
##
port: 11211
## @param service.nodePort Kubernetes Service nodePort
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
##
nodePort: ""
## @param service.loadBalancerIP `loadBalancerIP` if service type is `LoadBalancer`
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer
##
loadBalancerIP: ""
## @param service.annotations Additional annotations for Memcached service
##
annotations: {}
## Memcached Autoscaling ## @section Deployment/Statefulset parameters
## @param autoscaling.enabled Enable memcached statefulset autoscaling (requires architecture: "high-availability")
## @param autoscaling.minReplicas memcached statefulset autoscaling minimum number of replicas ## @param replicaCount Number of Memcached nodes
## @param autoscaling.maxReplicas memcached statefulset autoscaling maximum number of replicas
## @param autoscaling.targetCPU memcached statefulset autoscaling target CPU percentage
## @param autoscaling.targetMemory memcached statefulset autoscaling target CPU memory
## ##
autoscaling: replicaCount: 1
## @param containerPorts.memcached Memcached container port
##
containerPorts:
memcached: 11211
## Configure extra options for Memcached containers' liveness, readiness and startup probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
## @param livenessProbe.enabled Enable livenessProbe on Memcached containers
## @param livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
## @param livenessProbe.periodSeconds Period seconds for livenessProbe
## @param livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
## @param livenessProbe.failureThreshold Failure threshold for livenessProbe
## @param livenessProbe.successThreshold Success threshold for livenessProbe
##
livenessProbe:
enabled: true
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
## @param readinessProbe.enabled Enable readinessProbe on Memcached containers
## @param readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
## @param readinessProbe.periodSeconds Period seconds for readinessProbe
## @param readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
## @param readinessProbe.failureThreshold Failure threshold for readinessProbe
## @param readinessProbe.successThreshold Success threshold for readinessProbe
##
readinessProbe:
enabled: true
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 6
successThreshold: 1
## @param startupProbe.enabled Enable startupProbe on Memcached containers
## @param startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
## @param startupProbe.periodSeconds Period seconds for startupProbe
## @param startupProbe.timeoutSeconds Timeout seconds for startupProbe
## @param startupProbe.failureThreshold Failure threshold for startupProbe
## @param startupProbe.successThreshold Success threshold for startupProbe
##
startupProbe:
enabled: false enabled: false
minReplicas: 3 initialDelaySeconds: 30
maxReplicas: 6 periodSeconds: 10
targetCPU: 50 timeoutSeconds: 1
targetMemory: 50 failureThreshold: 15
successThreshold: 1
## Memcached containers' resource requests and limits ## @param customLivenessProbe Custom livenessProbe that overrides the default one
##
customLivenessProbe: {}
## @param customReadinessProbe Custom readinessProbe that overrides the default one
##
customReadinessProbe: {}
## @param customStartupProbe Custom startupProbe that overrides the default one
##
customStartupProbe: {}
## @param lifecycleHooks for the Memcached container(s) to automate configuration before or after startup
##
lifecycleHooks: {}
## Memcached resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/ ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
## We usually recommend not to specify default resources and to leave this as a conscious ## @param resources.limits The resources limits for the Memcached containers
## choice for the user. This also increases chances charts run on environments with little ## @param resources.requests.memory The requested memory for the Memcached containers
## resources, such as Minikube. If you do want to specify resources, uncomment the following ## @param resources.requests.cpu The requested cpu for the Memcached containers
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
## @param resources.limits CPU/Memory resource limits
## @param resources.requests [object] CPU/Memory resource requests
## ##
resources: resources:
## Example:
## limits:
## cpu: 100m
## memory: 128Mi
limits: {} limits: {}
requests: requests:
memory: 256Mi memory: 256Mi
cpu: 250m cpu: 250m
## @param portName Name of the main port exposed by memcached ## Configure Pods Security Context
## If you want to override the port name (can be usefull when using a service mesh) ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
## ref for istio: https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/ ## @param podSecurityContext.enabled Enabled Memcached pods' Security Context
## @param podSecurityContext.fsGroup Set Memcached pod's Security Context fsGroup
## ##
portName: memcache podSecurityContext:
## Pod Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
## @param securityContext.enabled Enable security context
## @param securityContext.fsGroup Group ID for the container
## @param securityContext.runAsUser User ID for the container
## @param securityContext.readOnlyRootFilesystem Enable read-only filesystem
##
securityContext:
enabled: true enabled: true
fsGroup: 1001 fsGroup: 1001
## Configure Container Security Context
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
## @param containerSecurityContext.enabled Enabled Memcached containers' Security Context
## @param containerSecurityContext.runAsUser Set Memcached containers' Security Context runAsUser
## @param containerSecurityContext.runAsNonRoot Set Memcached containers' Security Context runAsNonRoot
##
containerSecurityContext:
enabled: true
runAsUser: 1001 runAsUser: 1001
readOnlyRootFilesystem: false runAsNonRoot: true
## @param podLabels Pod extra labels ## @param hostAliases Add deployment host aliases
## https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/
##
hostAliases: []
## @param podLabels Extra labels for Memcached pods
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
## ##
podLabels: {} podLabels: {}
## @param podAnnotations Pod annotations ## @param podAnnotations Annotations for Memcached pods
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
## ##
podAnnotations: {} podAnnotations: {}
@@ -209,7 +249,7 @@ nodeAffinityPreset:
## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` ## @param nodeAffinityPreset.type Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard`
## ##
type: "" type: ""
## @param nodeAffinityPreset.key Node label key to match. Ignored if `affinity` is set. ## @param nodeAffinityPreset.key Node label key to match Ignored if `affinity` is set.
## E.g. ## E.g.
## key: "kubernetes.io/e2e-az-name" ## key: "kubernetes.io/e2e-az-name"
## ##
@@ -227,22 +267,74 @@ nodeAffinityPreset:
## ##
affinity: {} affinity: {}
## @param nodeSelector Node labels for pod assignment ## @param nodeSelector Node labels for pod assignment
## ref: https://kubernetes.io/docs/user-guide/node-selection/ ## Ref: https://kubernetes.io/docs/user-guide/node-selection/
## ##
nodeSelector: {} nodeSelector: {}
## @param tolerations Tolerations for pod assignment ## @param tolerations Tolerations for pod assignment
## ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ ## Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
## ##
tolerations: [] tolerations: []
## @param topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains ## @param topologySpreadConstraints Topology Spread Constraints for pod assignment spread across your cluster among failure-domains. Evaluated as a template
## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
## ##
topologySpreadConstraints: {} topologySpreadConstraints: {}
## @param priorityClassName Pod priority ## @param podManagementPolicy StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees. There are two valid pod management policies: `OrderedReady` and `Parallel`
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ ## ref: https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/#pod-management-policy
##
podManagementPolicy: Parallel
## @param priorityClassName Name of the existing priority class to be used by Memcached pods, priority class needs to be created beforehand
## Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
## ##
priorityClassName: "" priorityClassName: ""
## @param initContainers Add additional init containers to the Memcached pod ## @param schedulerName Kubernetes pod scheduler registry
## https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
##
schedulerName: ""
## @param updateStrategy.type Memcached statefulset strategy type
## @param updateStrategy.rollingUpdate Memcached statefulset rolling update configuration parameters
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
##
updateStrategy:
type: RollingUpdate
rollingUpdate: {}
## @param extraVolumes Optionally specify extra list of additional volumes for the Memcached pod(s)
## Example Use Case: mount certificates to enable TLS
## e.g:
## extraVolumes:
## - name: zookeeper-keystore
## secret:
## defaultMode: 288
## secretName: zookeeper-keystore
## - name: zookeeper-truststore
## secret:
## defaultMode: 288
## secretName: zookeeper-truststore
##
extraVolumes: []
## @param extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Memcached container(s)
## Example Use Case: mount certificates to enable TLS
## e.g:
## extraVolumeMounts:
## - name: zookeeper-keystore
## mountPath: /certs/keystore
## readOnly: true
## - name: zookeeper-truststore
## mountPath: /certs/truststore
## readOnly: true
##
extraVolumeMounts: []
## @param sidecars Add additional sidecar containers to the Memcached pod(s)
## e.g:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: []
## @param initContainers Add additional init containers to the Memcached pod(s)
## Example: ## Example:
## initContainers: ## initContainers:
## - name: your-image-name ## - name: your-image-name
@@ -253,56 +345,180 @@ priorityClassName: ""
## containerPort: 1234 ## containerPort: 1234
## ##
initContainers: [] initContainers: []
## @param sidecars Add additional sidecar containers to the Memcached pod ## Memcached Autoscaling
## Example: ## @param autoscaling.enabled Enable memcached statefulset autoscaling (requires architecture: "high-availability")
## sidecars: ## @param autoscaling.minReplicas memcached statefulset autoscaling minimum number of replicas
## - name: your-image-name ## @param autoscaling.maxReplicas memcached statefulset autoscaling maximum number of replicas
## image: your-image ## @param autoscaling.targetCPU memcached statefulset autoscaling target CPU percentage
## imagePullPolicy: Always ## @param autoscaling.targetMemory memcached statefulset autoscaling target CPU memory
## ports:
## - name: portname
## containerPort: 1234
## ##
sidecars: [] autoscaling:
## memcached pods ServiceAccount enabled: false
minReplicas: 3
maxReplicas: 6
targetCPU: 50
targetMemory: 50
## Memcached Pod Disruption Budget
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
## @param pdb.create Deploy a pdb object for the Memcached pod
## @param pdb.minAvailable Minimum available Memcached replicas
## @param pdb.maxUnavailable Maximum unavailable Memcached replicas
##
pdb:
create: false
minAvailable: ""
maxUnavailable: 1
## @section Traffic Exposure parameters
service:
## @param service.type Kubernetes Service type
##
type: ClusterIP
## @param service.ports.memcached Memcached service port
##
ports:
memcached: 11211
## Node ports to expose
## NOTE: choose port between <30000-32767>
## @param service.nodePorts.memcached Node port for Memcached
##
nodePorts:
memcached: ""
## @param service.sessionAffinity Control where client requests go, to the same pod or round-robin
## Values: ClientIP or None
## ref: https://kubernetes.io/docs/user-guide/services/
##
sessionAffinity: None
## @param service.clusterIP Memcached service Cluster IP
## e.g.:
## clusterIP: None
##
clusterIP: ""
## @param service.loadBalancerIP Memcached service Load Balancer IP
## ref: https://kubernetes.io/docs/user-guide/services/#type-loadbalancer
##
loadBalancerIP: ""
## @param service.loadBalancerSourceRanges Memcached service Load Balancer sources
## ref: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/#restrict-access-for-loadbalancer-service
## e.g:
## loadBalancerSourceRanges:
## - 10.10.10.0/24
##
loadBalancerSourceRanges: []
## @param service.externalTrafficPolicy Memcached service external traffic policy
## ref https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
##
externalTrafficPolicy: Cluster
## @param service.annotations Additional custom annotations for Memcached service
##
annotations: {}
## @param service.extraPorts Extra ports to expose in the Memcached service (normally used with the `sidecar` value)
##
extraPorts: []
## @section Other Parameters
## Service account for Memcached to use.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
## ##
serviceAccount: serviceAccount:
## @param serviceAccount.create Enable creation of ServiceAccount for memcached pods ## @param serviceAccount.create Enable creation of ServiceAccount for Memcached pod
## ##
create: true create: false
## @param serviceAccount.name The name of the ServiceAccount to use. ## @param serviceAccount.name The name of the ServiceAccount to use.
## If not set and create is true, a name is generated using the memcached.serviceAccountName template ## If not set and create is true, a name is generated using the common.names.fullname template
## ##
name: "" name: ""
## @param serviceAccount.automountServiceAccountToken Enable/disable auto mounting of the service account token ## @param serviceAccount.automountServiceAccountToken Allows auto mount of ServiceAccountToken on the serviceAccount created
## Can be set to false if pods using this serviceAccount do not need to use K8s API
## ##
automountServiceAccountToken: true automountServiceAccountToken: true
## Persistence - used for dumping and restoring states between recreations ## @param serviceAccount.annotations Additional custom annotations for the ServiceAccount
## Ref: https://github.com/memcached/memcached/wiki/WarmRestart ##
annotations: {}
## @section Persistence parameters
## Enable persistence using Persistent Volume Claims
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
## ##
persistence: persistence:
## @param persistence.enabled Enable persistence using PVC (Requires architecture: "high-availability") ## @param persistence.enabled Enable Memcached data persistence using PVC. If false, use emptyDir
## ##
enabled: false enabled: false
## @param persistence.storageClass PVC Storage Class for Memcached volume ## @param persistence.storageClass PVC Storage Class for Memcached data volume
## If defined, storageClassName: <storageClass> ## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning ## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is ## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on ## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack) ## GKE, AWS & OpenStack)
## ##
storageClass: "" storageClass: ""
## @param persistence.annotations Persistent Volume Claim annotations ## @param persistence.accessModes PVC Access modes
##
annotations: {}
## @param persistence.accessModes Persistent Volume Access Mode
## ##
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
## @param persistence.size PVC Storage Request for Memcached volume ## @param persistence.size PVC Storage Request for Memcached data volume
## ##
size: 8Gi size: 8Gi
## @param persistence.annotations Annotations for the PVC
##
annotations: {}
## @param persistence.selector Selector to match an existing Persistent Volume for Memcached's data PVC
## If set, the PVC can't have a PV dynamically provisioned for it
## E.g.
## selector:
## matchLabels:
## app: my-app
##
selector: {}
## @section Volume Permissions parameters
##
## Init containers parameters:
## volumePermissions: Change the owner and group of the persistent volume(s) mountpoint(s) to 'runAsUser:fsGroup' on each node
##
volumePermissions:
## @param volumePermissions.enabled Enable init container that changes the owner and group of the persistent volume
##
enabled: false
## @param volumePermissions.image.registry Init container volume-permissions image registry
## @param volumePermissions.image.repository Init container volume-permissions image repository
## @param volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)
## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy
## @param volumePermissions.image.pullSecrets Init container volume-permissions image pull secrets
##
image:
registry: docker.io
repository: bitnami/bitnami-shell
tag: 10-debian-10-r313
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
## Example:
## pullSecrets:
## - myRegistryKeySecretName
##
pullSecrets: []
## Init container resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/
## @param volumePermissions.resources.limits Init container volume-permissions resource limits
## @param volumePermissions.resources.requests Init container volume-permissions resource requests
##
resources:
limits: {}
requests: {}
## Init container' Security Context
## Note: the chown of the data folder is done to containerSecurityContext.runAsUser
## and not the below volumePermissions.containerSecurityContext.runAsUser
## @param volumePermissions.containerSecurityContext.runAsUser User ID for the init container
##
containerSecurityContext:
runAsUser: 0
## Prometheus Exporter / Metrics ## Prometheus Exporter / Metrics
## ##
metrics: metrics:
@@ -320,7 +536,7 @@ metrics:
image: image:
registry: docker.io registry: docker.io
repository: bitnami/memcached-exporter repository: bitnami/memcached-exporter
tag: 0.9.0-debian-10-r268 tag: 0.9.0-debian-10-r274
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets. ## Optionally specify an array of imagePullSecrets.
## Secrets must be manually created in the namespace. ## Secrets must be manually created in the namespace.
@@ -330,40 +546,21 @@ metrics:
## - myRegistryKeySecretName ## - myRegistryKeySecretName
## ##
pullSecrets: [] pullSecrets: []
## @param metrics.podAnnotations [object] Metrics exporter pod Annotation and Labels ## @param metrics.containerPorts.metrics Memcached Prometheus Exporter container port
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
## ##
podAnnotations: containerPorts:
prometheus.io/scrape: "true" metrics: 9150
prometheus.io/port: "9150" ## Memcached Prometheus exporter container resource requests and limits
## @param metrics.portName Memcached exporter port name
## If you want to override the port name (can be usefull when using a service mesh)
## ref for istio: https://istio.io/latest/docs/ops/configuration/traffic-management/protocol-selection/
##
portName: metrics
## Memcached Prometheus exporter resource requests and limits
## ref: https://kubernetes.io/docs/user-guide/compute-resources/ ## ref: https://kubernetes.io/docs/user-guide/compute-resources/
## We usually recommend not to specify default resources and to leave this as a conscious ## @param metrics.resources.limits Init container volume-permissions resource limits
## choice for the user. This also increases chances charts run on environments with little ## @param metrics.resources.requests Init container volume-permissions resource requests
## resources, such as Minikube. If you do want to specify resources, uncomment the following
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
## @param metrics.resources.limits The resources limits for the container
## @param metrics.resources.requests The requested resources for the container
## ##
resources: resources:
## Example:
## limits:
## cpu: 100m
## memory: 128Mi
limits: {} limits: {}
## Examples:
## requests:
## cpu: 100m
## memory: 128Mi
requests: {} requests: {}
## Configure extra options for liveness probe ## Configure extra options for Memcached Prometheus exporter containers' liveness, readiness and startup probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes
## @param metrics.livenessProbe.enabled Enable livenessProbe ## @param metrics.livenessProbe.enabled Enable livenessProbe on Memcached Prometheus exporter containers
## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe ## @param metrics.livenessProbe.initialDelaySeconds Initial delay seconds for livenessProbe
## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe ## @param metrics.livenessProbe.periodSeconds Period seconds for livenessProbe
## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe ## @param metrics.livenessProbe.timeoutSeconds Timeout seconds for livenessProbe
@@ -377,9 +574,7 @@ metrics:
timeoutSeconds: 5 timeoutSeconds: 5
failureThreshold: 3 failureThreshold: 3
successThreshold: 1 successThreshold: 1
## Configure extra options for readiness probe ## @param metrics.readinessProbe.enabled Enable readinessProbe on Memcached Prometheus exporter containers
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes
## @param metrics.readinessProbe.enabled Enable readinessProbe
## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe ## @param metrics.readinessProbe.initialDelaySeconds Initial delay seconds for readinessProbe
## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe ## @param metrics.readinessProbe.periodSeconds Period seconds for readinessProbe
## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe ## @param metrics.readinessProbe.timeoutSeconds Timeout seconds for readinessProbe
@@ -390,119 +585,92 @@ metrics:
enabled: true enabled: true
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 10 periodSeconds: 10
timeoutSeconds: 1 timeoutSeconds: 3
failureThreshold: 3 failureThreshold: 3
successThreshold: 1 successThreshold: 1
## @param metrics.startupProbe.enabled Enable startupProbe on Memcached Prometheus exporter containers
## @param metrics.startupProbe.initialDelaySeconds Initial delay seconds for startupProbe
## @param metrics.startupProbe.periodSeconds Period seconds for startupProbe
## @param metrics.startupProbe.timeoutSeconds Timeout seconds for startupProbe
## @param metrics.startupProbe.failureThreshold Failure threshold for startupProbe
## @param metrics.startupProbe.successThreshold Success threshold for startupProbe
##
startupProbe:
enabled: false
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 15
successThreshold: 1
## @param metrics.customLivenessProbe Custom livenessProbe that overrides the default one
##
customLivenessProbe: {}
## @param metrics.customReadinessProbe Custom readinessProbe that overrides the default one
##
customReadinessProbe: {}
## @param metrics.customStartupProbe Custom startupProbe that overrides the default one
##
customStartupProbe: {}
## @param metrics.podAnnotations [object] Memcached Prometheus exporter pod Annotation and Labels
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
##
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.metrics.containerPorts.metrics }}"
## Service configuration
##
service: service:
## @param metrics.service.type Kubernetes service type for Prometheus metrics ## @param metrics.service.ports.metrics Prometheus metrics service port
## ##
type: ClusterIP ports:
## @param metrics.service.port Prometheus metrics service port metrics: 9150
## @param metrics.service.clusterIP Static clusterIP or None for headless services
## ref: https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address
## ##
port: 9150 clusterIP: ""
## @param metrics.service.sessionAffinity Control where client requests go, to the same pod or round-robin
## Values: ClientIP or None
## ref: https://kubernetes.io/docs/user-guide/services/
##
sessionAffinity: None
## @param metrics.service.annotations [object] Annotations for the Prometheus metrics service ## @param metrics.service.annotations [object] Annotations for the Prometheus metrics service
## ##
annotations: annotations:
prometheus.io/scrape: "true" prometheus.io/scrape: "true"
prometheus.io/port: "{{ .Values.metrics.service.port }}" prometheus.io/port: "{{ .Values.metrics.service.ports.metrics }}"
## Prometheus Operator ServiceMonitor configuration ## Prometheus Operator ServiceMonitor configuration
## ##
serviceMonitor: serviceMonitor:
## @param metrics.serviceMonitor.enabled Create ServiceMonitor resource(s) for scraping metrics using PrometheusOperator ## @param metrics.serviceMonitor.enabled Create ServiceMonitor Resource for scraping metrics using Prometheus Operator
## ##
enabled: false enabled: false
## @param metrics.serviceMonitor.namespace The namespace in which the ServiceMonitor will be created ## @param metrics.serviceMonitor.namespace Namespace for the ServiceMonitor Resource (defaults to the Release Namespace)
## e.g:
## namespace: monitoring
## ##
namespace: "" namespace: ""
## @param metrics.serviceMonitor.interval The interval at which metrics should be scraped ## @param metrics.serviceMonitor.interval Interval at which metrics should be scraped.
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
## e.g:
## interval: 10s
## ##
interval: "" interval: ""
## @param metrics.serviceMonitor.scrapeTimeout The timeout after which the scrape is ended ## @param metrics.serviceMonitor.scrapeTimeout Timeout after which the scrape is ended
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#endpoint
## e.g:
## scrapeTimeout: 10s
## ##
scrapeTimeout: "" scrapeTimeout: ""
## @param metrics.serviceMonitor.selector Additional labels for ServiceMonitor resource ## @param metrics.serviceMonitor.labels Additional labels that can be used so ServiceMonitor will be discovered by Prometheus
##
labels: {}
## @param metrics.serviceMonitor.selector Prometheus instance selector labels
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration ## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
## e.g:
## selector:
## prometheus: my-prometheus
## ##
selector: {} selector: {}
## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion ## @param metrics.serviceMonitor.relabelings RelabelConfigs to apply to samples before scraping
## ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs
## e.g:
## metricRelabelings:
## - sourceLabels: [__meta_kubernetes_pod_label_app_kubernetes_io_instance]
## separator: ;
## regex: ^(.*)$
## targetLabel: pod_name
## replacement: $1
## action: replace
##
metricRelabelings: []
## @param metrics.serviceMonitor.relabelings Metrics relabelings to add to the scrape endpoint, applied before scraping
## ref: https://github.com/bitnami/charts/tree/master/bitnami/prometheus-operator#prometheus-configuration
## e.g:
## relabelings:
## - sourceLabels: [__meta_kubernetes_pod_label_app_kubernetes_io_instance]
## separator: ;
## regex: ^(.*)$
## targetLabel: pod_name
## replacement: $1
## action: replace
## ##
relabelings: [] relabelings: []
## Init Container parameters ## @param metrics.serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion
## Change the owner and group of the persistent volume(s) mountpoint(s) to 'runAsUser:fsGroup' on each component
## values from the securityContext section of the component
##
volumePermissions:
## @param volumePermissions.image.registry Init container volume-permissions image registry
## @param volumePermissions.image.repository Init container volume-permissions image repository
## @param volumePermissions.image.tag Init container volume-permissions image tag (immutable tags are recommended)
## @param volumePermissions.image.pullPolicy Init container volume-permissions image pull policy
## @param volumePermissions.image.pullSecrets Specify docker-registry secret names as an array
##
image:
registry: docker.io
repository: bitnami/bitnami-shell
tag: 10-debian-10-r307
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
## ##
pullPolicy: IfNotPresent metricRelabelings: []
## Optionally specify an array of imagePullSecrets (secrets must be manually created in the namespace) ## @param metrics.serviceMonitor.honorLabels Specify honorLabels parameter to add the scrape endpoint
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
## Example:
## pullSecrets:
## - myRegistryKeySecretName
## ##
pullSecrets: [] honorLabels: false
## Init Container resource requests and limits ## @param metrics.serviceMonitor.jobLabel The name of the label on the target service to use as the job name in prometheus.
## ref: https://kubernetes.io/docs/user-guide/compute-resources/ ##
## We usually recommend not to specify default resources and to leave this as a conscious jobLabel: ""
## choice for the user. This also increases chances charts run on environments with little
## resources, such as Minikube. If you do want to specify resources, uncomment the following
## lines, adjust them as necessary, and remove the curly braces after 'resources:'.
## @param volumePermissions.resources.limits Init container volume-permissions resource limits
## @param volumePermissions.resources.requests Init container volume-permissions resource requests
##
resources:
## Example:
## limits:
## cpu: 100m
## memory: 128Mi
limits: {}
## Examples:
## requests:
## cpu: 100m
## memory: 128Mi
requests: {}