Skip to content

Commit f8feb50

Browse files
committed
fix(rancher): fix template
1 parent 6f350c8 commit f8feb50

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

templates/redis/0/docker-compose.yml renamed to templates/redis/0/docker-compose.yml.tpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ services:
7373
volumes:
7474
redis-master:
7575
external: true
76-
driver: rancher-ebs
76+
per_container: true
77+
driver: '${VOLUME_DRIVER}'
7778
driver_opts:
7879
size: '${VOLUME_DRIVER_SIZE}'
7980
volumeType: '${VOLUME_DRIVER_TYPE}'
@@ -82,7 +83,8 @@ volumes:
8283

8384
redis-slave:
8485
external: true
85-
driver: rancher-ebs
86+
per_container: true
87+
driver: '${VOLUME_DRIVER}'
8688
driver_opts:
8789
size: '${VOLUME_DRIVER_SIZE}'
8890
volumeType: '${VOLUME_DRIVER_TYPE}'

templates/redis/0/rancher-compose.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
- "4.0"
1111
- "3.2"
1212
required: true
13-
label: "REdis version"
13+
label: "Redis version"
1414
- variable: REDIS_PASSWORD
15-
type: password
15+
type: string
16+
default: "mySecretPassword"
1617
required: true
1718
label: "Redis auth password"
1819
- variable: REDIS_HAPROXY_PORT
@@ -40,24 +41,34 @@
4041
required: true
4142
default: "redis=sentinel"
4243
label: "Host label for sentinel and lb nodes"
44+
- variable: "VOLUME_DRIVER"
45+
label: "Volume Driver"
46+
required: true
47+
default: "rancher-ebs"
48+
type: enum
49+
options:
50+
- local
51+
- rancher-nfs
52+
- rancher-efs
53+
- rancher-ebs
4354
- variable: VOLUME_DRIVER_SIZE
4455
type: int
45-
required: true
56+
required: false
4657
default: 10
4758
label: "Size of the EBS volume"
4859
- variable: VOLUME_DRIVER_TYPE
4960
type: string
50-
required: true
61+
required: false
5162
default: "gp2"
5263
label: "Type of volume"
5364
- variable: VOLUME_DRIVER_AZ
5465
type: string
55-
required: true
66+
required: false
5667
default: "us-east-1a"
5768
label: "The specific availability zone to create containers and EBS volume"
5869
- variable: VOLUME_DRIVER_IOPS
5970
type: int
60-
required: true
71+
required: false
6172
default: 3000
6273
label: "IOPS option"
6374

@@ -76,7 +87,7 @@ services:
7687
certs: []
7788
config: "default\n\tmode tcp\n\ttimeout connect 3s\n\ttimeout server 6s\n\t\
7889
timeout client 6s\n\nbackend 6379_\n\toption tcplog\n\toption tcp-check\n\t\
79-
tcp-check send AUTH\\ ${REDIS_PASSWORD}\\r\\n\n\ttcp-check\
90+
tcp-check send AUTH\\ mySecretPassword\\r\\n\n\ttcp-check\
8091
\ expect string +OK\n\ttcp-check send PING\\r\\n\n\ttcp-check expect string\
8192
\ +PONG\n\ttcp-check send info\\ replication\\r\\n\n\ttcp-check expect string\
8293
\ role:master\n\ttcp-check send QUIT\\r\\n\n\ttcp-check expect string +OK"

0 commit comments

Comments
 (0)