apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
    meta.helm.sh/release-name: memcached
    meta.helm.sh/release-namespace: openstack
    openstackhelm.openstack.org/release_uuid: ""
  creationTimestamp: "2026-04-07T12:55:11Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: Helm
    application: memcached
    component: server
    release_group: memcached
  name: memcached-memcached
  namespace: openstack
  resourceVersion: "2493"
  uid: effb13eb-947d-42f0-8168-d36d232f23a7
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      application: memcached
      component: server
      release_group: memcached
  strategy:
    rollingUpdate:
      maxSurge: 3
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      annotations:
        configmap-bin-hash: 697e6cfc2956a32471343c14345aeb52bd8d2d1b1846a7c3d7b7e9b0337dcc4f
        openstackhelm.openstack.org/release_uuid: ""
      creationTimestamp: null
      labels:
        application: memcached
        component: server
        release_group: memcached
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: release_group
                  operator: In
                  values:
                  - memcached
                - key: application
                  operator: In
                  values:
                  - memcached
                - key: component
                  operator: In
                  values:
                  - server
              topologyKey: kubernetes.io/hostname
            weight: 10
      containers:
      - command:
        - /tmp/memcached.sh
        env:
        - name: MEMCACHED_PORT
          value: "11211"
        - name: MEMCACHED_MAX_CONNECTIONS
          value: "8192"
        - name: MEMCACHED_MEMORY
          value: "1024"
        image: harbor.atmosphere.dev/docker.io/library/memcached:1.6.26
        imagePullPolicy: IfNotPresent
        name: memcached
        ports:
        - containerPort: 11211
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: 11211
          timeoutSeconds: 1
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp
          name: pod-tmp
        - mountPath: /tmp/memcached.sh
          name: memcached-bin
          readOnly: true
          subPath: memcached.sh
      - command:
        - /tmp/memcached-exporter.sh
        - start
        image: harbor.atmosphere.dev/quay.io/prometheus/memcached-exporter:v0.14.3
        imagePullPolicy: IfNotPresent
        name: memcached-exporter
        ports:
        - containerPort: 9150
          name: metrics
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          periodSeconds: 10
          successThreshold: 1
          tcpSocket:
            port: 9150
          timeoutSeconds: 1
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp
          name: pod-tmp
        - mountPath: /tmp/memcached-exporter.sh
          name: memcached-bin
          readOnly: true
          subPath: memcached-exporter.sh
      dnsPolicy: ClusterFirst
      initContainers:
      - command:
        - kubernetes-entrypoint
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: INTERFACE_NAME
          value: eth0
        - name: PATH
          value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
        - name: DEPENDENCY_SERVICE
        - name: DEPENDENCY_DAEMONSET
        - name: DEPENDENCY_CONTAINER
        - name: DEPENDENCY_POD_JSON
        - name: DEPENDENCY_CUSTOM_RESOURCE
        image: harbor.atmosphere.dev/ghcr.io/vexxhost/kubernetes-entrypoint:edge@sha256:8921b64b87af184a1421dd856b2703bcf3cff9f50863cd0d18371cf964a87bd3
        imagePullPolicy: IfNotPresent
        name: init
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
          runAsUser: 65534
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      nodeSelector:
        openstack-control-plane: enabled
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext:
        runAsUser: 65534
      serviceAccount: memcached-memcached
      serviceAccountName: memcached-memcached
      shareProcessNamespace: true
      terminationGracePeriodSeconds: 30
      volumes:
      - emptyDir: {}
        name: pod-tmp
      - configMap:
          defaultMode: 365
          name: memcached-memcached-bin
        name: memcached-bin
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2026-04-07T12:55:11Z"
    lastUpdateTime: "2026-04-07T12:55:11Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2026-04-07T12:55:11Z"
    lastUpdateTime: "2026-04-07T12:55:19Z"
    message: ReplicaSet "memcached-memcached-6479589586" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
