Skip to content

Commit 92cf0ef

Browse files
authored
Merge pull request #11 from tarantool/rc2
RC2
2 parents fad2e69 + 3550ab0 commit 92cf0ef

36 files changed

+394
-229
lines changed

charts/cartridge/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ apiVersion: v2
33
name: cartridge
44
description: Tarantool Cartridge application template.
55
type: application
6-
version: 1.0.0-rc1
7-
appVersion: 2.7.6
6+
version: 1.0.0-rc2
7+
appVersion: 1.0.0
88
kubeVersion: ">=1.16-0"
99
icon: https://static.tarantool.io/pub/220829-1248-ae7bca7/tarantool/images/logo-tarantool-full.svg
1010
home: https://github.com/tarantool/helm-charts
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
CHART NAME: {{ .Chart.Name }}
22
CHART VERSION: {{ .Chart.Version }}
33
APP VERSION: {{ .Chart.AppVersion }}
4-
CLUSTER NAME: {{ include "chart.fullname" . }}
5-
CLUSTER CONN: {{ .Values.tarantool.auth.user }}@{{ include "chart.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.tarantool.ports.tarantool }}
4+
CLUSTER NAME: {{ include "cartridge.fullname" . }}
5+
CLUSTER CONN: {{ .Values.tarantool.auth.user }}@{{ include "cartridge.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}:{{ .Values.tarantool.ports.tarantool }}
66

77
** Please be patient while the chart is being deployed **
88

99
To access Cartridge UI do the one of following steps:
1010
{{- range .Values.tarantool.roles }}
1111
{{- $service := dict }}
1212
{{- if .service }}
13-
{{- $service = (mergeOverwrite (include "role.default.service" (dict "role" . "context" $) | fromYaml) .service) }}
13+
{{- $service = (mergeOverwrite (include "cartridge.role.default.service" (dict "role" . "context" $) | fromYaml) .service) }}
1414
{{- else }}
15-
{{- $service = (include "role.default.service" (dict "role" . "context" $) | fromYaml) }}
15+
{{- $service = (include "cartridge.role.default.service" (dict "role" . "context" $) | fromYaml) }}
1616
{{- end }}
17-
kubectl -n {{ $.Release.Namespace }} port-forward svc/{{ include "chart.resource.fullname" (dict "context" $ "suffix" (.name)) }} {{ $.Values.tarantool.ports.http }}
17+
kubectl -n {{ $.Release.Namespace }} port-forward svc/{{ include "cartridge.resource.fullname" (dict "context" $ "suffix" (.name)) }} {{ $.Values.tarantool.ports.http }}
1818
{{- end }}
1919

2020
{{ if or (not .Values.tarantool.auth.password) (eq .Values.tarantool.auth.password "") -}}
2121
To retrieve your tarantool application password for user {{ .Values.tarantool.auth.user }} do the following steps:
22-
kubectl -n {{ .Release.Namespace }} get secret {{ include "chart.resource.fullname" (dict "context" . "suffix" "auth") }} -o jsonpath="{.data.TARANTOOL_PASSWORD}" | base64 --decode
22+
kubectl -n {{ .Release.Namespace }} get secret {{ include "cartridge.resource.fullname" (dict "context" . "suffix" "auth") }} -o jsonpath="{.data.TARANTOOL_PASSWORD}" | base64 --decode
2323
{{- end -}}

charts/cartridge/templates/auth-secret.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{{- $password := (include "tarantool.auth.password.b64" . | trim) -}}
1+
{{- $password := (include "cartridge.auth.password.b64" . | trim) -}}
22
apiVersion: v1
33
kind: Secret
44
metadata:
5-
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "auth") }}
6-
labels: {{- include "chart.labels" . | nindent 4 }}
5+
name: {{ include "cartridge.resource.fullname" (dict "context" . "suffix" "auth") }}
6+
labels: {{- include "cartridge.labels" . | nindent 4 }}
77
{{- if .Values.annotations }}
88
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
99
{{- end }}

charts/cartridge/templates/cartridge-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
apiVersion: tarantool.io/v1beta1
33
kind: CartridgeConfig
44
metadata:
5-
name: {{ include "chart.fullname" . }}
6-
labels: {{- include "chart.labels" . | nindent 4 }}
5+
name: {{ include "cartridge.fullname" . }}
6+
labels: {{- include "cartridge.labels" . | nindent 4 }}
77
{{- if .Values.annotations }}
88
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
99
{{- end }}

charts/cartridge/templates/cluster.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{{- include "validation.bucketCount" . -}}
1+
{{- include "cartridge.validation.bucketCount" . -}}
22
apiVersion: tarantool.io/v1beta1
33
kind: Cluster
44
metadata:
5-
name: {{ include "chart.fullname" . }}
6-
labels: {{- include "chart.labels" . | nindent 4 }}
5+
name: {{ include "cartridge.fullname" . }}
6+
labels: {{- include "cartridge.labels" . | nindent 4 }}
77
{{- if .Values.annotations }}
88
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
99
{{- end }}
@@ -14,8 +14,8 @@ spec:
1414
failover:
1515
mode: {{ .Values.tarantool.failover.mode | quote }}
1616
{{- if not (eq .Values.tarantool.failover.mode "disabled") }}
17-
{{- include "validation.failover.timeout" . }}
18-
{{- include "validation.failover.etcd2.lockDelay" . }}
17+
{{- include "cartridge.validation.failover.timeout" . }}
18+
{{- include "cartridge.validation.failover.etcd2.lockDelay" . }}
1919
timeout: {{ .Values.tarantool.failover.timeout | float64 }}
2020
{{- if eq .Values.tarantool.failover.mode "stateful" }}
2121
fencing: {{ .Values.tarantool.failover.fencing }}
@@ -27,12 +27,12 @@ spec:
2727
etcd2:
2828
endpoints: {{ .Values.tarantool.failover.etcd2.endpoints | toYaml | nindent 6 }}
2929
username: {{ .Values.tarantool.failover.etcd2.username }}
30-
prefix: {{ include "failover.etcd2.prefix" . }}
30+
prefix: {{ include "cartridge.failover.etcd2.prefix" . }}
3131
lockDelay: {{ .Values.tarantool.failover.etcd2.lockDelay | float64 }}
3232
{{- if .Values.tarantool.failover.etcd2.password }}
3333
password:
3434
namespace: "{{ .Release.Namespace }}"
35-
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "etcd2") }}
35+
name: {{ include "cartridge.resource.fullname" (dict "context" . "suffix" "etcd2") }}
3636
{{- end }}
3737
{{- end -}}
3838
{{- if eq .Values.tarantool.failover.stateProvider "stateboard" }}
@@ -41,7 +41,7 @@ spec:
4141
{{- if .Values.tarantool.failover.stateboard.password }}
4242
password:
4343
namespace: "{{ .Release.Namespace }}"
44-
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "stateboard") }}
44+
name: {{ include "cartridge.resource.fullname" (dict "context" . "suffix" "stateboard") }}
4545
{{- end }}
4646
{{- end -}}
4747
{{- end -}}

charts/cartridge/templates/failover-secret.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
apiVersion: v1
55
kind: Secret
66
metadata:
7-
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "etcd2") }}
8-
labels: {{- include "chart.labels" . | nindent 4 }}
7+
name: {{ include "cartridge.resource.fullname" (dict "context" . "suffix" "etcd2") }}
8+
labels: {{- include "cartridge.labels" . | nindent 4 }}
99
{{- if .Values.annotations }}
1010
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
1111
{{- end }}
@@ -18,8 +18,8 @@ data:
1818
apiVersion: v1
1919
kind: Secret
2020
metadata:
21-
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "stateboard") }}
22-
labels: {{- include "chart.labels" . | nindent 4 }}
21+
name: {{ include "cartridge.resource.fullname" (dict "context" . "suffix" "stateboard") }}
22+
labels: {{- include "cartridge.labels" . | nindent 4 }}
2323
{{- if .Values.annotations }}
2424
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
2525
{{- end }}

charts/cartridge/templates/helpers/_auth.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{{/*
22
Retrive existing ot generates new tarantool password (cluster coockie)
33
*/}}
4-
{{- define "tarantool.auth.password.b64" -}}
4+
{{- define "cartridge.auth.password.b64" -}}
55
{{- if .Values.tarantool.auth.password -}}
66
{{- .Values.tarantool.auth.password | b64enc -}}
77
{{- else -}}
88
{{/*If password not set in values.yaml*/}}
99
{{/*lookup for previous secret with password*/}}
10-
{{- $fullname := (printf "%s-auth" (include "chart.fullname" . )) -}}
10+
{{- $fullname := (printf "%s-auth" (include "cartridge.fullname" . )) -}}
1111
{{- $oldPassword := "" -}}
1212
{{- $oldPasswordSecret := lookup "v1" "Secret" .Release.Namespace $fullname -}}
1313
{{- if $oldPasswordSecret -}}
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{{/*
22
Name of chart
33
*/}}
4-
{{- define "chart.name" -}}
4+
{{- define "cartridge.name" -}}
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

@@ -10,7 +10,7 @@ Create a default fully qualified app name.
1010
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
1111
If release name contains chart name it will be used as a full name.
1212
*/}}
13-
{{- define "chart.fullname" -}}
13+
{{- define "cartridge.fullname" -}}
1414
{{- if .Values.fullnameOverride }}
1515
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
1616
{{- else }}
@@ -26,35 +26,35 @@ If release name contains chart name it will be used as a full name.
2626
{{/*
2727
Subresource name
2828
*/}}
29-
{{- define "chart.resource.fullname" -}}
30-
{{- printf "%s-%s" (include "chart.fullname" .context) .suffix | trunc 63 | trimSuffix "-" }}
29+
{{- define "cartridge.resource.fullname" -}}
30+
{{- printf "%s-%s" (include "cartridge.fullname" .context) .suffix | trunc 63 | trimSuffix "-" }}
3131
{{- end -}}
3232

3333
{{/*
3434
Standard label
3535
*/}}
36-
{{- define "chart.standard-labels" -}}
37-
app.kubernetes.io/name: {{ include "chart.name" . }}
36+
{{- define "cartridge.standard-labels" -}}
37+
app.kubernetes.io/name: {{ include "cartridge.name" . }}
3838
app.kubernetes.io/instance: {{ .Release.Name }}
3939
app.kubernetes.io/managed-by: {{ .Release.Service }}
4040
app.kubernetes.io/part-of: tarantool
4141
app.kubernetes.io/component: tarantool
42-
tarantool.io/cluster-name: {{ include "chart.fullname" . }}
42+
tarantool.io/cluster-name: {{ include "cartridge.fullname" . }}
4343
{{- end -}}
4444

4545
{{/*
4646
Standard and user labels
4747
*/}}
48-
{{- define "chart.labels" -}}
49-
{{- include "chart.standard-labels" . | indent 0 }}
48+
{{- define "cartridge.labels" -}}
49+
{{- include "cartridge.standard-labels" . | indent 0 }}
5050
{{- if .Values.labels }}
5151
{{- tpl (.Values.labels | toYaml) $ | nindent 0 }}
5252
{{- end }}
5353
{{- end -}}
5454

55-
{{- define "chart.matchLabels" -}}
56-
app.kubernetes.io/name: {{ include "chart.name" . }}
55+
{{- define "cartridge.matchLabels" -}}
56+
app.kubernetes.io/name: {{ include "cartridge.name" . }}
5757
app.kubernetes.io/instance: {{ .Release.Name }}
5858
app.kubernetes.io/component: tarantool
59-
tarantool.io/cluster-name: {{ include "chart.fullname" . }}
59+
tarantool.io/cluster-name: {{ include "cartridge.fullname" . }}
6060
{{- end -}}

charts/cartridge/templates/helpers/_probes.tpl renamed to charts/cartridge/templates/helpers/_containers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- define "container.probe" -}}
1+
{{- define "cartridge.container.probe" -}}
22
{{- $context := .context -}}
33
{{- $defaultProbe := .default -}}
44
{{- $roleCustomProbe := .customProbe -}}

charts/cartridge/templates/helpers/_environment.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{{- define "tarantool.environment.app" }}
1+
{{- define "cartridge.environment.app" }}
22
{{- $ := .context -}}
33
{{- $role := .role -}}
4-
{{- $clusterName := (include "chart.fullname" $) -}}
4+
{{- $clusterName := (include "cartridge.fullname" $) -}}
55
{{- $memtxMemory := ($role.memtxMemory | default $.Values.tarantool.memtxMemory) -}}
6-
{{- $memtxMemoryBytes := (include "tarantool.memory_quantity_to_bytes" $memtxMemory) | int64 -}}
6+
{{- $memtxMemoryBytes := (include "cartridge.math.memory_quantity_to_bytes" $memtxMemory) | int64 -}}
77
{{- $probeUriTimeout := ($role.probeUriTimeout | default $.Values.tarantool.probeUriTimeout) }}
88
- name: TARANTOOL_INSTANCE_NAME
99
valueFrom:
@@ -33,7 +33,7 @@
3333
value: {{ $.Values.tarantool.runDir | quote }}
3434
{{- end }}
3535

36-
{{- define "tarantool.environment.extra" }}
36+
{{- define "cartridge.environment.extra" }}
3737
{{- $context := .context }}
3838
{{- $exist := dict }}
3939
{{- range $_, $list := .extra }}

0 commit comments

Comments
 (0)