Skip to content

Commit 4b240f7

Browse files
committed
chore(redis): canonical charts naming
1 parent 349366d commit 4b240f7

5 files changed

Lines changed: 20 additions & 20 deletions

File tree

.drone/drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ steps:
115115
- name: generate chart
116116
commands:
117117
- IMAGE_TAG=$([ ! -z $DRONE_TAG ] && echo \"${DRONE_TAG:1}\" || echo \"canary\")
118-
- sed -i "s/image_tag:\ \"canary\"/image_tag:\ $IMAGE_TAG/g" charts/redis/values.yaml
118+
- sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/redis/values.yaml
119119
- helm package 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:

charts/redis/templates/redis-secret-creds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ metadata:
88
annotations:
99
"helm.sh/hook": pre-install
1010
data:
11-
{{ if eq .Values.global.redis_location "on-cluster"}}
11+
{{ if eq .Values.global.redisLocation "on-cluster"}}
1212
password: {{ randAlphaNum 32 | b64enc }}
13-
{{ else if eq .Values.global.redis_location "off-cluster"}}
13+
{{ else if eq .Values.global.redisLocation "off-cluster"}}
1414
addrs: {{ .Values.addrs | b64enc }}
1515
password: {{ .Values.password | b64enc }}
1616
{{ end }}

charts/redis/templates/redis-statefulset.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{{- if eq .Values.global.redis_location "on-cluster" }}
1+
{{- if eq .Values.global.redisLocation "on-cluster" }}
22
apiVersion: apps/v1
33
kind: StatefulSet
44
metadata:
55
name: drycc-redis
66
labels:
77
heritage: drycc
88
annotations:
9-
component.drycc.cc/version: {{ .Values.image_tag }}
9+
component.drycc.cc/version: {{ .Values.imageTag }}
1010
spec:
1111
serviceName: drycc-redis
1212
replicas: {{ .Values.replicas }}
@@ -20,16 +20,16 @@ spec:
2020
spec:
2121
containers:
2222
- name: drycc-redis
23-
image: {{.Values.image_registry}}/{{.Values.image_org}}/redis:{{ .Values.image_tag }}
24-
imagePullPolicy: {{ .Values.image_pull_policy }}
25-
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
23+
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/redis:{{ .Values.imageTag }}
24+
imagePullPolicy: {{ .Values.imagePullPolicy }}
25+
{{- if or (.Values.limitsCpu) (.Values.limitsMemory)}}
2626
resources:
2727
limits:
28-
{{- if (.Values.limits_cpu) }}
29-
cpu: {{.Values.limits_cpu}}
28+
{{- if (.Values.limitsCpu) }}
29+
cpu: {{.Values.limitsCpu}}
3030
{{- end}}
31-
{{- if (.Values.limits_memory) }}
32-
memory: {{.Values.limits_memory}}
31+
{{- if (.Values.limitsMemory) }}
32+
memory: {{.Values.limitsMemory}}
3333
{{- end}}
3434
{{- end}}
3535
command: ["/bin/boot", "--port", "6379"]

charts/redis/templates/redis-svc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if eq .Values.global.redis_location "on-cluster" }}
1+
{{- if eq .Values.global.redisLocation "on-cluster" }}
22
apiVersion: v1
33
kind: Service
44
metadata:

charts/redis/values.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
image_org: "drycc"
2-
image_pull_policy: "Always"
3-
image_tag: "canary"
4-
image_registry: "docker.io"
5-
# limits_cpu: "100m"
6-
# limits_memory: "50Mi"
1+
imageOrg: "drycc"
2+
imagePullPolicy: "Always"
3+
imageTag: "canary"
4+
imageRegistry: "docker.io"
5+
# limitsCpu: "100m"
6+
# limitsMemory: "50Mi"
77

88
global:
99
# Set the location of Workflow's redis instance
1010
#
1111
# Valid values are:
1212
# - on-cluster: Run Redis within the Kubernetes cluster
1313
# - off-cluster: Run Redis outside the Kubernetes cluster (configure in redis section)
14-
redis_location: "on-cluster"
14+
redisLocation: "on-cluster"
1515

1616
# The following parameters are configured only when using an on-cluster Redis instance
1717
replicas: 1

0 commit comments

Comments
 (0)