Skip to content
Snippets Groups Projects
Commit 577735c1 authored by Edward Hicks's avatar Edward Hicks :8ball:
Browse files

realigned

parent bb09cb7c
No related branches found
No related tags found
No related merge requests found
......@@ -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 }}
......
......@@ -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 }}
......
......@@ -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}}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment