Skip to content

Commit 9317219

Browse files
committed
initial
0 parents  commit 9317219

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+9315
-0
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release Charts
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- Lint and Test Charts
7+
branches:
8+
- master
9+
types:
10+
- completed
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Configure Git
22+
run: |
23+
git config user.name "$GITHUB_ACTOR"
24+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
25+
26+
- name: Set up Helm
27+
uses: azure/setup-helm@v3
28+
with:
29+
version: v3.10.0
30+
31+
- name: Run chart-releaser
32+
uses: helm/chart-releaser-action@v1.4.1
33+
env:
34+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint and Test Charts
2+
3+
on: [push]
4+
5+
jobs:
6+
lint-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Set up Helm
15+
uses: azure/setup-helm@v3
16+
with:
17+
version: v3.10.0
18+
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.9'
22+
check-latest: true
23+
24+
- name: Set up chart-testing
25+
uses: helm/chart-testing-action@v2.3.1
26+
27+
- name: Run chart-testing (list-changed)
28+
id: list-changed
29+
run: |
30+
changed=$(ct list-changed --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }})
31+
if [[ -n "$changed" ]]; then
32+
echo "::set-output name=changed::true"
33+
fi
34+
35+
- name: Run chart-testing (lint)
36+
run: ct lint --chart-dirs charts --target-branch ${{ github.event.repository.default_branch }}

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
# Binaries for programs and plugins
3+
*.exe
4+
*.exe~
5+
*.dll
6+
*.so
7+
*.dylib
8+
bin
9+
testbin/*
10+
11+
# Test binary, build with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool, specifically when used with LiteIDE
15+
*.out
16+
17+
# Kubernetes Generated files - skip generated files, except for vendored files
18+
19+
!vendor/**/zz_generated.*
20+
config/tarantool.io_*.yaml
21+
22+
23+
# editor and IDE paraphernalia
24+
.idea
25+
*.swp
26+
*.swo
27+
*~

LICENSE

Lines changed: 145 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Tarantool Helm Charts repository
2+
3+
This repository contains enterprise helm charts for different Tarantool products.
4+
5+
## Charts
6+
7+
| Charts | Description |
8+
|---------------------------------------------------|-------------------------------------|
9+
| [cartridge](./charts/cartridge) | Tarantool Cartridge app helm chart. |
10+
| [tarantool-operator](./charts/tarantool-operator) | Tarantool Operator app helm chart. |

charts/cartridge/Chart.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
apiVersion: v2
3+
name: cartridge
4+
description: Tarantool Cartridge application template.
5+
type: application
6+
version: 0.0.0
7+
appVersion: 2.7.6
8+
kubeVersion: ">=1.16-0"
9+
icon: https://static.tarantool.io/pub/220829-1248-ae7bca7/tarantool/images/logo-tarantool-full.svg
10+
home: https://github.com/tarantool/helm-charts
11+
keywords:
12+
- tarantool
13+
- cartridge
14+
- tarantool-operator
15+
- tarantool-cartridge
16+
sources:
17+
- https://github.com/tarantool/helm-charts
18+
- https://github.com/tarantool/tarantool
19+
- https://github.com/tarantool/tarantool-operator
20+
- https://github.com/tarantool/cartridge
21+
maintainers:
22+
- name: kluevandrew
23+
email: andrey.klyuev@vk.team
24+
url: https://www.tarantool.io
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
CHART NAME: {{ .Chart.Name }}
2+
CHART VERSION: {{ .Chart.Version }}
3+
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 }}
6+
7+
** Please be patient while the chart is being deployed **
8+
9+
To access Cartridge UI do the one of following steps:
10+
{{- range .Values.tarantool.roles }}
11+
{{- $service := dict }}
12+
{{- if .service }}
13+
{{- $service = (mergeOverwrite (include "role.default.service" (dict "role" . "context" $) | fromYaml) .service) }}
14+
{{- else }}
15+
{{- $service = (include "role.default.service" (dict "role" . "context" $) | fromYaml) }}
16+
{{- end }}
17+
kubectl -n {{ $.Release.Namespace }} port-forward svc/{{ include "chart.resource.fullname" (dict "context" $ "suffix" (.name)) }} {{ $.Values.tarantool.ports.http }}
18+
{{- end }}
19+
20+
{{ if or (not .Values.tarantool.auth.password) (eq .Values.tarantool.auth.password "") -}}
21+
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
23+
{{- end -}}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- $password := (include "tarantool.auth.password.b64" . | trim) -}}
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "auth") }}
6+
labels: {{- include "chart.labels" . | nindent 4 }}
7+
{{- if .Values.annotations }}
8+
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
9+
{{- end }}
10+
data:
11+
TARANTOOL_PASSWORD: {{ $password }}
12+
TARANTOOL_CLUSTER_COOKIE: {{ $password }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- if .Values.tarantool.config }}
2+
apiVersion: tarantool.io/v1beta1
3+
kind: CartridgeConfig
4+
metadata:
5+
name: {{ include "chart.fullname" . }}
6+
labels: {{- include "chart.labels" . | nindent 4 }}
7+
{{- if .Values.annotations }}
8+
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
9+
{{- end }}
10+
spec:
11+
data: | {{- .Values.tarantool.config | toYaml | nindent 4 }}
12+
{{- end -}}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{{- include "validation.bucketCount" . -}}
2+
apiVersion: tarantool.io/v1beta1
3+
kind: Cluster
4+
metadata:
5+
name: {{ include "chart.fullname" . }}
6+
labels: {{- include "chart.labels" . | nindent 4 }}
7+
{{- if .Values.annotations }}
8+
annotations: {{- tpl (.Values.annotations | toYaml) $ | nindent 4 }}
9+
{{- end }}
10+
spec:
11+
domain: {{ .Values.clusterDomain }}
12+
listenPort: {{ .Values.tarantool.ports.tarantool }}
13+
foreignLeader: {{ .Values.tarantool.foreignLeader }}
14+
failover:
15+
mode: {{ .Values.tarantool.failover.mode | quote }}
16+
{{- if not (eq .Values.tarantool.failover.mode "disabled") }}
17+
{{- include "validation.failover.timeout" . }}
18+
{{- include "validation.failover.etcd2.lockDelay" . }}
19+
timeout: {{ .Values.tarantool.failover.timeout | float64 }}
20+
{{- if eq .Values.tarantool.failover.mode "stateful" }}
21+
fencing: {{ .Values.tarantool.failover.fencing }}
22+
fencingPause: {{ .Values.tarantool.failover.fencingPause | float64}}
23+
fencingTimeout: {{ .Values.tarantool.failover.fencingTimeout | float64 }}
24+
{{- if eq .Values.tarantool.failover.mode "stateful" }}
25+
stateProvider: {{ .Values.tarantool.failover.stateProvider }}
26+
{{- if eq .Values.tarantool.failover.stateProvider "etcd2" }}
27+
etcd2:
28+
endpoints: {{ .Values.tarantool.failover.etcd2.endpoints | toYaml | nindent 6 }}
29+
username: {{ .Values.tarantool.failover.etcd2.username }}
30+
prefix: {{ include "failover.etcd2.prefix" . }}
31+
lockDelay: {{ .Values.tarantool.failover.etcd2.lockDelay | float64 }}
32+
{{- if .Values.tarantool.failover.etcd2.password }}
33+
password:
34+
namespace: "{{ .Release.Namespace }}"
35+
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "etcd2") }}
36+
{{- end }}
37+
{{- end -}}
38+
{{- if eq .Values.tarantool.failover.stateProvider "stateboard" }}
39+
stateboard:
40+
uri: {{ .Values.tarantool.failover.stateboard.uri | toYaml | nindent 6 }}
41+
{{- if .Values.tarantool.failover.stateboard.password }}
42+
password:
43+
namespace: "{{ .Release.Namespace }}"
44+
name: {{ include "chart.resource.fullname" (dict "context" . "suffix" "stateboard") }}
45+
{{- end }}
46+
{{- end -}}
47+
{{- end -}}
48+
{{- end -}}
49+
{{- end -}}

0 commit comments

Comments
 (0)