diff --git a/memcached/templates/deployment.yaml b/memcached/templates/deployment.yaml index 318425485f..41dd4faa0e 100644 --- a/memcached/templates/deployment.yaml +++ b/memcached/templates/deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: memcached spec: - replicas: 1 + replicas: {{ .Values.resources.memcached.replicas }} template: metadata: labels: @@ -14,20 +14,15 @@ spec: containers: - name: memcached image: {{ .Values.images.memcached }} - imagePullPolicy: Always - env: - - name: INTERFACE_NAME - value: "eth0" - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: COMMAND - value: "memcached -v -p {{ .Values.network.port }} -U 0 -c 8192 -m 1024" + imagePullPolicy: {{ .Values.images.pull_policy }} + command: ["sh", "-xec"] + args: + - | + exec memcached -v \ + -p {{ .Values.network.port }} \ + -U 0 \ + -c {{ .Values.memcached.max_connections }} \ + -m {{ .Values.memcached.memory }}; ports: - containerPort: {{ .Values.network.port }} readinessProbe: diff --git a/memcached/values.yaml b/memcached/values.yaml index 5961b23104..16c0e7020c 100644 --- a/memcached/values.yaml +++ b/memcached/values.yaml @@ -5,6 +5,7 @@ images: memcached: quay.io/stackanetes/stackanetes-memcached:newton + pull_policy: "IfNotPresent" labels: node_selector_key: openstack-control-plane @@ -12,3 +13,11 @@ labels: network: port: 11211 + +memcached: + memory: 1024 + max_connections: 8192 + +resources: + memcached: + replicas: 1