mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
9 years ago
|
{% set REDIS_PORT = 6379 %}
|
||
9 years ago
|
{% set WORKERS = properties['workers'] if properties and properties['workers'] else 2 %}
|
||
9 years ago
|
|
||
|
resources:
|
||
|
- name: redis-master
|
||
9 years ago
|
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
|
||
9 years ago
|
properties:
|
||
|
# This has to be overwritten since service names are hard coded in the code
|
||
|
service_name: redis-master
|
||
|
service_port: {{ REDIS_PORT }}
|
||
|
target_port: {{ REDIS_PORT }}
|
||
|
container_port: {{ REDIS_PORT }}
|
||
|
replicas: 1
|
||
|
container_name: master
|
||
|
image: redis
|
||
|
|
||
|
- name: redis-slave
|
||
9 years ago
|
type: https://raw.githubusercontent.com/kubernetes/deployment-manager/master/templates/replicatedservice/v1/replicatedservice.py
|
||
9 years ago
|
properties:
|
||
|
# This has to be overwritten since service names are hard coded in the code
|
||
|
service_name: redis-slave
|
||
|
service_port: {{ REDIS_PORT }}
|
||
|
container_port: {{ REDIS_PORT }}
|
||
|
replicas: {{ WORKERS }}
|
||
|
container_name: worker
|
||
|
image: kubernetes/redis-slave:v2
|
||
|
# An example of how to specify env variables.
|
||
|
env:
|
||
|
- name: GET_HOSTS_FROM
|
||
|
value: env
|
||
|
- name: REDIS_MASTER_SERVICE_HOST
|
||
|
value: redis-master
|