Update Memcached Chart to increase image portability

This commit updates the Memcached chart to allow use with images other than Stackanetes, define ImagePullPolicy, and provide config params in the values.yaml.
This commit is contained in:
portdirect 2017-01-01 16:32:39 +00:00
parent 5918cb19b8
commit 4d5a8bc606
2 changed files with 19 additions and 15 deletions

View File

@ -3,7 +3,7 @@ kind: Deployment
metadata: metadata:
name: memcached name: memcached
spec: spec:
replicas: 1 replicas: {{ .Values.resources.memcached.replicas }}
template: template:
metadata: metadata:
labels: labels:
@ -14,20 +14,15 @@ spec:
containers: containers:
- name: memcached - name: memcached
image: {{ .Values.images.memcached }} image: {{ .Values.images.memcached }}
imagePullPolicy: Always imagePullPolicy: {{ .Values.images.pull_policy }}
env: command: ["sh", "-xec"]
- name: INTERFACE_NAME args:
value: "eth0" - |
- name: POD_NAME exec memcached -v \
valueFrom: -p {{ .Values.network.port }} \
fieldRef: -U 0 \
fieldPath: metadata.name -c {{ .Values.memcached.max_connections }} \
- name: NAMESPACE -m {{ .Values.memcached.memory }};
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: COMMAND
value: "memcached -v -p {{ .Values.network.port }} -U 0 -c 8192 -m 1024"
ports: ports:
- containerPort: {{ .Values.network.port }} - containerPort: {{ .Values.network.port }}
readinessProbe: readinessProbe:

View File

@ -5,6 +5,7 @@
images: images:
memcached: quay.io/stackanetes/stackanetes-memcached:newton memcached: quay.io/stackanetes/stackanetes-memcached:newton
pull_policy: "IfNotPresent"
labels: labels:
node_selector_key: openstack-control-plane node_selector_key: openstack-control-plane
@ -12,3 +13,11 @@ labels:
network: network:
port: 11211 port: 11211
memcached:
memory: 1024
max_connections: 8192
resources:
memcached:
replicas: 1