memcached

by CloudPirates

Helm chartv0.14.14App 1.6.45Apache-2.0Verified publisher

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

About this chart

Memcached

Memcached is a high-performance, distributed memory object caching system. It is an in-memory key-value store for small chunks of arbitrary data from results of database calls, API calls, or page rendering. This Helm chart deploys Memcached on Kubernetes with comprehensive configuration options for development and production environments.

Installing the Chart

To install the chart with the release name my-memcached:

helm install my-memcached oci://registry-1.docker.io/cloudpirates/memcached

To install with custom values:

helm install my-memcached oci://registry-1.docker.io/cloudpirates/memcached -f my-values.yaml

Or install directly from the local chart:

helm install my-valkey ./charts/valkey

Uninstalling the Chart

To uninstall/delete the my-memcached deployment:

helm uninstall my-memcached

This removes all the Kubernetes components associated with the chart and deletes the release.

Security & Signature Verification

This Helm chart is cryptographically signed with Cosign to ensure authenticity and prevent tampering.

Public Key:

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5U+rM2d3hDjgP5T3cLShuuQIU9vR
Z4/G+Nug6q5vRa+C3qUA1wXjbaJFAfcIrv5VjmYAYOj13shnPpp3Zh4fnQ==
-----END PUBLIC KEY-----

To verify the helm chart before installation, copy the public key to the file cosign.pub and run cosign:

cosign verify --key cosign.pub registry-1.docker.io/cloudpirates/memcached:<version>

Configuration

The following table lists the configurable parameters of the Memcached chart and their default values.

Global Parameters

ParameterDescriptionDefault
global.imageRegistryGlobal Docker Image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]

Common Parameters

ParameterDescriptionDefault
nameOverrideString to partially override memcached.fullname""
fullnameOverrideString to fully override memcached.fullname""
namespaceOverrideString to override the namespace for all resources""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
podAnnotationsAnnotations to add to the pods created by the deployment{}
podLabelsLabels to add to the pods created by the deployment{}

Deployment Parameters

ParameterDescriptionDefault
replicaCountNumber of Memcached replicas to deploy1
revisionHistoryLimitNumber of revisions to keep in history for rollback10
deploymentTypeType of workload to deploy (Deployment or StatefulSet)Deployment

Memcached Image Parameters

ParameterDescriptionDefault
image.registryMemcached image registrydocker.io
image.repositoryMemcached image repositorymemcached
image.tagMemcached image tag (immutable tags are recommended)"1.6.39@sha256:050de63e6c082df85f93ffed9c388004b3c6257a06f1904e8628a6f87658eb99"
image.pullPolicyMemcached image pull policyAlways
image.pullSecretsMemcached image pull secrets[]

Memcached Configuration Parameters

ParameterDescriptionDefault
config.memoryLimitMaximum amount of memory to use for cache (MB)64
config.maxConnectionsMaximum number of simultaneous connections1024
config.verbosityVerbosity level (0-2)0
config.extraArgsAdditional command-line arguments[]

Service Parameters

ParameterDescriptionDefault
service.typeMemcached service typeClusterIP
service.portMemcached service port11211
service.nodePortNode port for Memcached service""
service.clusterIPStatic cluster IP or "None" for headless service""
service.publishNotReadyAddressesPublish pod DNS names before pods are ready (StatefulSet peer discovery)false
service.annotationsAdditional custom annotations for Memcached service{}

Security Context Parameters

ParameterDescriptionDefault
podSecurityContext.enabledEnabled Memcached pod Security Contexttrue
podSecurityContext.fsGroupSet Memcached pod's Security Context fsGroup11211
containerSecurityContext.runAsUserSet Memcached container's Security Context runAsUser11211
containerSecurityContext.runAsNonRootSet Memcached container's Security Context runAsNonRoottrue
containerSecurityContext.allowPrivilegeEscalationSet Memcached container's privilege escalationfalse
priorityClassNamePriority class for the memcached instance""

Resources Parameters

ParameterDescriptionDefault
resourcesResource limits and requests for Memcached pod{}

Health Check Parameters

ParameterDescriptionDefault
livenessProbe.enabledEnable livenessProbe on Memcached containerstrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe30
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
livenessProbe.failureThresholdFailure threshold for livenessProbe3
livenessProbe.successThresholdSuccess threshold for livenessProbe1
readinessProbe.enabledEnable readinessProbe on Memcached containerstrue
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe5
readinessProbe.periodSecondsPeriod seconds for readinessProbe5
readinessProbe.timeoutSecondsTimeout seconds for readinessProbe5
readinessProbe.failureThresholdFailure threshold for readinessProbe3
readinessProbe.successThresholdSuccess threshold for readinessProbe1

Service Account Parameters

ParameterDescriptionDefault
serviceAccount.createSpecifies whether a service account should be createdtrue
serviceAccount.annotationsAnnotations to add to the service account{}
serviceAccount.nameThe name of the service account to use""
serviceAccount.automountServiceAccountTokenAutomatically mount service account tokenfalse

ConfigMap Parameters

ParameterDescriptionDefault
configMap.createCreate a ConfigMap for Memcached configurationfalse
configMap.dataConfigMap data{}

Ingress Parameters

ParameterDescriptionDefault
ingress.enabledEnable ingress record generation for Memcachedfalse
ingress.classNameIngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)""
ingress.annotationsAdditional annotations for the Ingress resource{}
ingress.hostsAn array with hosts and paths[{"host": "memcached.local", "paths": [{"path": "/", "pathType": "ImplementationSpecific"}]}]
ingress.tlsTLS configuration for the Ingress[]

Pod Disruption Budget Parameters

ParameterDescriptionDefault
pdb.createEnable/disable a Pod Disruption Budget creationfalse
pdb.minAvailableMinimum number/percentage of pods that should remain scheduled""
pdb.maxUnavailableMaximum number/percentage of pods that may be made unavailable""

Extra Configuration Parameters

ParameterDescriptionDefault
extraEnvVarsAdditional environment variables to set[]
extraVolumesA list of additional existing volumes that will be mounted into the container[]
extraVolumeMountsA list of additional existing volume mounts that will be mounted into the container[]
extraObjectsA list of additional Kubernetes objects to deploy alongside the release[]

Extra Objects

You can use the extraObjects array to deploy additional Kubernetes resources (such as NetworkPolicies, ConfigMaps, etc.) alongside the release. This is useful for customizing your deployment with extra manifests that are not covered by the default chart options.

Helm templating is supported in any field, but all template expressions must be quoted. For example, to use the release namespace, write namespace: "{{ .Release.Namespace }}".

Example: Deploy a NetworkPolicy with templating

extraObjects:
  - apiVersion: networking.k8s.io/v1
    kind: NetworkPolicy
    metadata:
      name: allow-dns
      namespace: "{{ .Release.Namespace }}"
    spec:
      podSelector: {}
      policyTypes:
        - Egress
      egress:
        - to:
            - namespaceSelector:
                matchLabels:
                  kubernetes.io/metadata.name: kube-system
              podSelector:
                matchLabels:
                  k8s-app: kube-dns
        - ports:
            - port: 53
              protocol: UDP
            - port: 53
              protocol: TCP

All objects in extraObjects will be rendered and deployed with the release. You can use any valid Kubernetes manifest, and reference Helm values or built-in ob

Deploy memcached with OpenTenant

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

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