Skip to content

Commit 9cd8733

Browse files
author
lijianguo
committed
chore(redis): use common affinity template
1 parent ebadddf commit 9cd8733

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

.drone/drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ steps:
116116
commands:
117117
- IMAGE_TAG=$([ ! -z $DRONE_TAG ] && echo \"${DRONE_TAG:1}\" || echo \"canary\")
118118
- sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/redis/values.yaml
119-
- helm package charts/redis --version ${DRONE_TAG:-v1.0.0}
119+
- helm package -u charts/redis --version ${DRONE_TAG:-v1.0.0}
120120
- curl -u $CHARTMUSEUM_USERNAME:$CHARTMUSEUM_PASSWORD -F chart=@redis-${DRONE_TAG:-v1.0.0}.tgz "$CHARTMUSEUM_API/api/$([ -z $DRONE_TAG ] && echo testing || echo stable)/charts"
121121
environment:
122122
CHARTMUSEUM_USERNAME:

charts/redis/Chart.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
name: redis
22
home: https://github.com/drycc/redis
3-
version: v1.0.0
3+
apiVersion: v2
4+
dependencies:
5+
- name: common
6+
repository: https://charts.drycc.cc/stable
7+
version: 1.x.x
48
description: A Redis database for use inside a Kubernetes cluster.
59
maintainers:
610
- name: Drycc Team
711
email: engineering@drycc.com
12+
version: v1.0.0

charts/redis/templates/redis-statefulset.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ spec:
1818
labels:
1919
app: drycc-redis
2020
spec:
21-
{{- if .Values.global.common }}
22-
{{- include "common.affinity" (dict "key" "app" "values" (list "drycc-redis")) | indent 6 }}
23-
{{- end }}
21+
{{- include "common.affinities.nodes.soft" (dict "key" "app" "values" (list "drycc-redis")) | indent 6 }}
2422
containers:
2523
- name: drycc-redis
2624
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/redis:{{ .Values.imageTag }}

0 commit comments

Comments
 (0)