Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright 2021 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# For those usages not covered by the Apache License, Version 2.0 please
# contact: legal@canonical.com
#
# To get in touch with the maintainers, please contact:
# osm-charmers@lists.launchpad.net
##
version: 2
containers:
- name: %(name)s
image: %(docker_image_path)s
kubernetes:
readinessProbe:
tcpSocket:
port: %(client-port)s
initialDelaySeconds: 10
timeoutSeconds: 5
failureThreshold: 6
successThreshold: 1
livenessProbe:
tcpSocket:
port: %(client-port)s
initialDelaySeconds: 20
ports:
- containerPort: %(client-port)s
name: client
- containerPort: %(server-port)s
name: server
- containerPort: %(leader-election-port)s
name: leader-election
config:
ALLOW_ANONYMOUS_LOGIN: 'yes'
command:
- sh
- -c
- "start-zookeeper \
--servers=%(zookeeper-units)s \
--data_dir=/var/lib/zookeeper/data \
--data_log_dir=/var/lib/zookeeper/data/log \
--conf_dir=/opt/zookeeper/conf \
--client_port=%(client-port)s \
--election_port=%(leader-election-port)s \
--server_port=%(server-port)s \
--tick_time=2000 \
--init_limit=10 \
--sync_limit=5 \
--heap=512M \
--max_client_cnxns=60 \
--snap_retain_count=3 \
--purge_interval=12 \
--max_session_timeout=40000 \
--min_session_timeout=4000 \
--log_level=INFO"
# readinessProbe:
# exec:
# command:
# - sh
# - -c
# - "zookeeper-ready 2181"
# initialDelaySeconds: 10
# timeoutSeconds: 5
# failureThreshold: 6
# successThreshold: 1
# livenessProbe:
# exec:
# command:
# - sh
# - -c
# - "zookeeper-ready 2181"
# initialDelaySeconds: 20