Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osuredis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSU OTDI-managed Helm charts
osuredis
Commits
577735c1
Commit
577735c1
authored
6 years ago
by
Edward Hicks
Browse files
Options
Downloads
Patches
Plain Diff
realigned
parent
bb09cb7c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
templates/proxy-deploy.yaml
+30
-30
30 additions, 30 deletions
templates/proxy-deploy.yaml
templates/redis-ss.yaml
+113
-113
113 additions, 113 deletions
templates/redis-ss.yaml
templates/services.yaml
+29
-29
29 additions, 29 deletions
templates/services.yaml
with
172 additions
and
172 deletions
templates/proxy-deploy.yaml
+
30
−
30
View file @
577735c1
...
...
@@ -25,38 +25,38 @@ spec:
spec
:
restartPolicy
:
Always
volumes
:
-
name
:
"
tls-secret"
secret
:
secretName
:
"
{{.Values.proxy.tlsSecret}}"
-
name
:
"
config"
configMap
:
name
:
"
osuredis-{{.Values.app.name}}-config"
containers
:
-
name
:
"
proxy"
image
:
"
{{.Values.proxy.repository}}:{{.Values.proxy.tag}}"
imagePullPolicy
:
{{
.Values.proxy.pullPolicy
}}
args
:
-
"
-f"
-
"
/config/haproxy.cfg"
volumeMounts
:
-
name
:
"
tls-secret"
secret
:
secretName
:
"
{{.Values.proxy.tlsSecret}}"
mountPath
:
"
/etc/ssl/private"
readOnly
:
true
-
name
:
"
config"
configMap
:
name
:
"
osuredis-{{.Values.app.name}}-config"
containers
:
-
name
:
"
proxy"
image
:
"
{{.Values.proxy.repository}}:{{.Values.proxy.tag}}"
imagePullPolicy
:
{{
.Values.proxy.pullPolicy
}}
args
:
-
"
-f"
-
"
/config/haproxy.cfg"
volumeMounts
:
-
name
:
"
tls-secret"
mountPath
:
"
/etc/ssl/private"
readOnly
:
true
-
name
:
"
config"
mountPath
:
"
/config"
readOnly
:
true
ports
:
-
name
:
"
redis"
containerPort
:
6379
livenessProbe
:
initialDelaySeconds
:
300
periodSeconds
:
30
timeoutSeconds
:
10
failureThreshold
:
3
tcpSocket
:
port
:
6379
resources
:
{{
- toYaml .Values.proxy.resources | nindent 12
}}
mountPath
:
"
/config"
readOnly
:
true
ports
:
-
name
:
"
redis"
containerPort
:
6379
livenessProbe
:
initialDelaySeconds
:
300
periodSeconds
:
30
timeoutSeconds
:
10
failureThreshold
:
3
tcpSocket
:
port
:
6379
resources
:
{{
- toYaml .Values.proxy.resources | nindent 10
}}
{{
- with .Values.nodeSelector
}}
nodeSelector
:
{{
- toYaml . | nindent 8
}}
...
...
This diff is collapsed.
Click to expand it.
templates/redis-ss.yaml
+
113
−
113
View file @
577735c1
...
...
@@ -35,122 +35,122 @@ spec:
spec
:
restartPolicy
:
Always
volumes
:
-
name
:
"
templates"
configMap
:
name
:
"
osuredis-{{.Values.app.name}}-config"
-
name
:
"
templates"
configMap
:
name
:
"
osuredis-{{.Values.app.name}}-config"
initContainers
:
-
name
:
"
buildconfigs"
image
:
"
alpine"
imagePullPolicy
:
IfNotPresent
securityContext
:
runAsUser
:
6379
command
:
-
"
sh"
-
"
-c"
-
"
NODEID=$(echo
-n
$HOSTNAME
|
sed
's/.*
\\
-
\\
([0-9]
\\
+
\\
)$/
\\
1/g');
cat
/templates/redis.template.conf
|
sed
\"
s/
\\
[
\\
[NODEID
\\
]
\\
]/${NODEID}/g
\"
>/data/redis.conf;
cat
/templates/sentinel.template.conf
|
sed
\"
s/
\\
[
\\
[NODEID
\\
]
\\
]/${NODEID}/g
\"
>/data/sentinel.conf;
echo
''
>>/data/redis.conf;
if
[
\"
$NODEID
\"
=
'0'
];
then
echo
'slave-priority
10'
>>/data/redis.conf;
else
rm
-f
/data/dump.rdb;
echo
'slave-priority
100'
>>/data/redis.conf;
echo
'slaveof
osuredis-{{.Values.app.name}}-0.{{.Release.Namespace}}.svc.cluster.local
6379'
>>/data/redis.conf;
fi"
volumeMounts
:
-
name
:
"
persistent-data"
mountPath
:
"
/data"
-
name
:
"
templates"
mountPath
:
"
/templates"
readOnly
:
true
-
name
:
"
buildconfigs"
image
:
"
alpine"
imagePullPolicy
:
IfNotPresent
securityContext
:
runAsUser
:
6379
command
:
-
"
sh"
-
"
-c"
-
"
NODEID=$(echo
-n
$HOSTNAME
|
sed
's/.*
\\
-
\\
([0-9]
\\
+
\\
)$/
\\
1/g');
cat
/templates/redis.template.conf
|
sed
\"
s/
\\
[
\\
[NODEID
\\
]
\\
]/${NODEID}/g
\"
>/data/redis.conf;
cat
/templates/sentinel.template.conf
|
sed
\"
s/
\\
[
\\
[NODEID
\\
]
\\
]/${NODEID}/g
\"
>/data/sentinel.conf;
echo
''
>>/data/redis.conf;
if
[
\"
$NODEID
\"
=
'0'
];
then
echo
'slave-priority
10'
>>/data/redis.conf;
else
rm
-f
/data/dump.rdb;
echo
'slave-priority
100'
>>/data/redis.conf;
echo
'slaveof
osuredis-{{.Values.app.name}}-0.{{.Release.Namespace}}.svc.cluster.local
6379'
>>/data/redis.conf;
fi"
volumeMounts
:
-
name
:
"
persistent-data"
mountPath
:
"
/data"
-
name
:
"
templates"
mountPath
:
"
/templates"
readOnly
:
true
containers
:
-
name
:
"
redis"
image
:
"
{{.Values.redis.repository}}:{{.Values.redis.tag}}"
imagePullPolicy
:
{{
.Values.redis.pullPolicy
}}
securityContext
:
runAsUser
:
6379
args
:
-
"
/data/redis.conf"
ports
:
-
name
:
"
redis"
image
:
"
{{.Values.redis.repository}}:{{.Values.redis.tag}}"
imagePullPolicy
:
{{
.Values.redis.pullPolicy
}}
securityContext
:
runAsUser
:
6379
args
:
-
"
/data/redis.conf"
ports
:
-
name
:
"
redis"
containerPort
:
6379
volumeMounts
:
-
name
:
"
persistent-data"
mountPath
:
"
/data"
livenessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
failureThreshold
:
3
tcpSocket
:
port
:
6379
readinessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
exec
:
command
:
-
"
redis-cli"
-
"
-a"
-
"
{{.Values.app.password}}"
-
"
PING"
-
"
|"
-
"
tr"
-
"
-d"
-
"
[:space:]"
-
"
|"
-
"
xargs"
-
"
-n1"
-
"
-r"
-
"
test"
-
"
PONG"
-
"
="
resources
:
{{
- toYaml .Values.redis.resources | nindent 12
}}
-
name
:
"
sentinel"
image
:
"
{{.Values.sentinel.repository}}:{{.Values.sentinel.tag}}"
imagePullPolicy
:
{{
.Values.sentinel.pullPolicy
}}
securityContext
:
runAsUser
:
6379
args
:
-
"
/data/sentinel.conf"
-
"
--sentinel"
ports
:
-
containerPort
:
26379
volumeMounts
:
-
name
:
"
persistent-data"
mountPath
:
"
/data"
livenessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
failureThreshold
:
3
tcpSocket
:
port
:
26379
readinessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
exec
:
command
:
-
"
redis-cli"
-
"
-p"
-
"
26379"
-
"
PING"
-
"
|"
-
"
tr"
-
"
-d"
-
"
[:space:]"
-
"
|"
-
"
xargs"
-
"
-n1"
-
"
-r"
-
"
test"
-
"
PONG"
-
"
="
resources
:
{{
- toYaml .Values.sentinel.resources | nindent 12
}}
containerPort
:
6379
volumeMounts
:
-
name
:
"
persistent-data"
mountPath
:
"
/data"
livenessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
failureThreshold
:
3
tcpSocket
:
port
:
6379
readinessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
exec
:
command
:
-
"
redis-cli"
-
"
-a"
-
"
{{.Values.app.password}}"
-
"
PING"
-
"
|"
-
"
tr"
-
"
-d"
-
"
[:space:]"
-
"
|"
-
"
xargs"
-
"
-n1"
-
"
-r"
-
"
test"
-
"
PONG"
-
"
="
resources
:
{{
- toYaml .Values.redis.resources | nindent 10
}}
-
name
:
"
sentinel"
image
:
"
{{.Values.sentinel.repository}}:{{.Values.sentinel.tag}}"
imagePullPolicy
:
{{
.Values.sentinel.pullPolicy
}}
securityContext
:
runAsUser
:
6379
args
:
-
"
/data/sentinel.conf"
-
"
--sentinel"
ports
:
-
containerPort
:
26379
volumeMounts
:
-
name
:
"
persistent-data"
mountPath
:
"
/data"
livenessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
failureThreshold
:
3
tcpSocket
:
port
:
26379
readinessProbe
:
initialDelaySeconds
:
10
periodSeconds
:
60
timeoutSeconds
:
10
exec
:
command
:
-
"
redis-cli"
-
"
-p"
-
"
26379"
-
"
PING"
-
"
|"
-
"
tr"
-
"
-d"
-
"
[:space:]"
-
"
|"
-
"
xargs"
-
"
-n1"
-
"
-r"
-
"
test"
-
"
PONG"
-
"
="
resources
:
{{
- toYaml .Values.sentinel.resources | nindent 10
}}
{{
- with .Values.nodeSelector
}}
nodeSelector
:
{{
- toYaml . | nindent 8
}}
...
...
This diff is collapsed.
Click to expand it.
templates/services.yaml
+
29
−
29
View file @
577735c1
...
...
@@ -11,11 +11,11 @@ metadata:
spec
:
type
:
LoadBalancer
ports
:
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
nodePort
:
{{
.Values.proxy.nodePort
}}
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
nodePort
:
{{
.Values.proxy.nodePort
}}
selector
:
component
:
"
proxy"
app.kubernetes.io/name
:
"
osuredis-{{.Values.app.name}}"
...
...
@@ -34,14 +34,14 @@ metadata:
spec
:
type
:
ClusterIP
ports
:
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
-
name
:
"
sentinel"
port
:
26379
targetPort
:
26379
protocol
:
TCP
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
-
name
:
"
sentinel"
port
:
26379
targetPort
:
26379
protocol
:
TCP
selector
:
component
:
"
redis"
app.kubernetes.io/name
:
"
osuredis-{{.Values.app.name}}"
...
...
@@ -61,14 +61,14 @@ metadata:
spec
:
type
:
ClusterIP
ports
:
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
-
name
:
"
sentinel"
port
:
26379
targetPort
:
26379
protocol
:
TCP
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
-
name
:
"
sentinel"
port
:
26379
targetPort
:
26379
protocol
:
TCP
selector
:
component
:
"
redis"
app.kubernetes.io/name
:
"
osuredis-{{.Values.app.name}}"
...
...
@@ -88,14 +88,14 @@ metadata:
spec
:
type
:
ClusterIP
ports
:
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
-
name
:
"
sentinel"
port
:
26379
targetPort
:
26379
protocol
:
TCP
-
name
:
"
redis"
port
:
6379
targetPort
:
6379
protocol
:
TCP
-
name
:
"
sentinel"
port
:
26379
targetPort
:
26379
protocol
:
TCP
selector
:
component
:
"
redis"
app.kubernetes.io/name
:
"
osuredis-{{.Values.app.name}}"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment