From 31662dcd703a905630bae5597f4b263f735ae40f Mon Sep 17 00:00:00 2001 From: pprokop Date: Fri, 18 Nov 2016 16:49:06 +0100 Subject: [PATCH] Adding memcached --- memcached/Chart.yaml | 3 +++ memcached/templates/deployment.yaml | 35 +++++++++++++++++++++++++++++ memcached/templates/service.yaml | 10 +++++++++ memcached/values.yaml | 7 ++++++ 4 files changed, 55 insertions(+) create mode 100644 memcached/Chart.yaml create mode 100644 memcached/templates/deployment.yaml create mode 100644 memcached/templates/service.yaml create mode 100644 memcached/values.yaml diff --git a/memcached/Chart.yaml b/memcached/Chart.yaml new file mode 100644 index 0000000000..da13ea28d2 --- /dev/null +++ b/memcached/Chart.yaml @@ -0,0 +1,3 @@ +description: Chart for memcached +name: memcached +version: 0.1.0 diff --git a/memcached/templates/deployment.yaml b/memcached/templates/deployment.yaml new file mode 100644 index 0000000000..d278b61fcd --- /dev/null +++ b/memcached/templates/deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: memcached +spec: + replicas: 1 + template: + metadata: + labels: + app: memcached + spec: + nodeSelector: + {{ .Values.global.deployment.control_node_label }}: enabled + containers: + - name: memcached + image: {{ .Values.global.deployment.image.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" + ports: + - containerPort: {{ .Values.network.port }} + readinessProbe: + tcpSocket: + port: {{ .Values.network.port }} diff --git a/memcached/templates/service.yaml b/memcached/templates/service.yaml new file mode 100644 index 0000000000..d5ced07e02 --- /dev/null +++ b/memcached/templates/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: memcached +spec: + sessionAffinity: ClientIP + ports: + - port: {{ .Values.network.port }} + selector: + app: memcached diff --git a/memcached/values.yaml b/memcached/values.yaml new file mode 100644 index 0000000000..7d4c75478e --- /dev/null +++ b/memcached/values.yaml @@ -0,0 +1,7 @@ +global: + deployment: + image: + memcached: quay.io/stackanetes/stackanetes-memcached:newton + control_node_label: openstack-control-plane +network: + port: 11211