-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding helm chart to the repository #606
Open
zer0stars
wants to merge
6
commits into
tablelandnetwork:main
Choose a base branch
from
DIMO-Network:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c247973
Adding helm chart to the repository
zer0stars cc2c7d3
Deleted duplicated files
zer0stars e8c46d4
Removing duplicated file
zer0stars 4e8f9c0
Merge branch 'tablelandnetwork:main' into main
zer0stars 62ea311
Updating tableland node and configs for amoy
zer0stars 7f9a1bc
increase rps to 30
JamesReate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v1 | ||
description: Official Tableland helm chart for | ||
home: https://github.com/tablelandnetwork/go-tableland | ||
maintainers: | ||
- email: [email protected] | ||
name: Tableland | ||
name: tableland | ||
version: 0.5.0 | ||
appVersion: v1.8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
1. Watch the tableland node come up . | ||
$ kubectl get pods --namespace={{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "tableland.name" . }} -w | ||
2. Watch the node logs . | ||
$ kubectl logs --namespace={{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "tableland.name" . }} -c tableland -f | ||
2. Port forward the pod to your local pc . | ||
$ kubectl port-forward --namespace={{ .Release.Namespace }} svc/{{ template "tableland.uname" . }} {{ .Values.httpPort }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# Tableland Validator Node Helm Chart | ||
|
||
This Helm chart installs a Tableland Validator Node in a Kubernetes cluster. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.18+ | ||
- Helm 3.0+ | ||
|
||
## Get Repo Info | ||
|
||
```shell | ||
helm repo add [repo-name] [repo-url] | ||
helm repo update | ||
``` | ||
|
||
|
||
# Install Chart | ||
|
||
```shell | ||
helm install [release-name] [chart] -f values.yaml | ||
``` | ||
|
||
|
||
# Uninstall Chart | ||
```shell | ||
helm uninstall [release-name] | ||
``` | ||
|
||
Configuration | ||
------------- | ||
|
||
The following table lists the configurable parameters of the Tableland Validator Node chart and their default values, specified in `values.yaml`. | ||
|
||
| Parameter | Description | Default | | ||
| --- | --- | --- | | ||
| `fullnameOverride` | Override the full resource names | `""` | | ||
| `image` | Tableland image | `textile/tableland` | | ||
| `imageTag` | Image tag | `"v1.8.1-beta-3"` | | ||
| `imagePullPolicy` | Image pull policy | `"IfNotPresent"` | | ||
| `imagePullSecrets` | Specify image pull secrets | `[]` | | ||
| `httpPort` | Http port of the application | `8080` | | ||
| `httpsPort` | Https port of the application | `8443` | | ||
| `metricsPort` | Metrics port of the application | `8888` | | ||
| `...` | ... | ... | | ||
|
||
You can specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```shell | ||
helm install [release-name] [repo-name]/tableland-validator-node --set imagePullPolicy=Always | ||
``` | ||
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, | ||
|
||
|
||
```shell | ||
helm install [release-name] [repo-name]/tableland-validator-node -f values.yaml | ||
`````` | ||
|
||
### Image | ||
|
||
| Parameter | Description | Default | | ||
| --- | --- | --- | | ||
| `image.repository` | Tableland image name | `textile/tableland` | | ||
| `image.tag` | Image tag | `v1.8.1-beta-3` | | ||
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | | ||
| `imagePullSecrets` | Specify image pull secrets | `[]` | | ||
|
||
### Pod Settings | ||
|
||
| Parameter | Description | Default | | ||
| --- | --- | --- | | ||
| `podAnnotations` | Annotations for pods | `{}` | | ||
| `resources` | Resource limits and requests | `{}` | | ||
| `terminationGracePeriod` | Time to wait for clean shutdown | `120` | | ||
| `...` | ... | ... | | ||
|
||
### Configurations | ||
|
||
Specify configurations for Tableland in `config` key. You can edit the configuration provided to the node under the values.yaml config key. | ||
|
||
### Configurations | ||
|
||
### Extra Environment Variables | ||
|
||
`extraEnvs` provides a way to add extra environment variables. Use this to insert additional secret environment variables. | ||
|
||
### Ingress | ||
|
||
| Parameter | Description | Default | | ||
| --- | --- | --- | | ||
| `ingress.enabled` | Enables Ingress | `false` | | ||
| `ingress.className` | Ingress Class Name | `nginx` | | ||
| `ingress.hosts` | Ingress accepted hostnames | `[]` | | ||
| `ingress.annotations` | Ingress annotations | `{}` | | ||
| `ingress.tls` | Ingress TLS configuration | `[]` | | ||
|
||
### RBAC settings, Persistence, etc. | ||
|
||
The rest of the parameters (RBAC settings, Persistence, Extra Containers, etc.) can be found in the provided `values.yaml` file. Ensure to review and tailor them according to your use-case. | ||
|
||
### Note | ||
|
||
Ensure to review and customize the `values.yaml` file as per your deployment strategy to provide specific settings for environment variables, resources, etc. | ||
|
||
# Configuration | ||
|
||
The following table lists the configurable parameters of the Tableland Validator Node chart and their default values, specified in values.yaml. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
1. Watch the tableland node come up . | ||
$ kubectl get pods --namespace={{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "tableland.name" . }} -w | ||
2. Watch the node logs . | ||
$ kubectl logs --namespace={{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "tableland.name" . }} -c tableland -f | ||
2. Port forward the pod to your local pc . | ||
$ kubectl port-forward --namespace={{ .Release.Namespace }} svc/{{ template "tableland.uname" . }} {{ .Values.httpPort }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "tableland.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "tableland.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
*/}} | ||
{{- define "tableland.fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{- define "tableland.uname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "tableland.labels" -}} | ||
helm.sh/chart: {{ include "tableland.chart" . }} | ||
{{ include "tableland.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "tableland.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "tableland.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{- define "tableland.endpoints" -}} | ||
{{- $replicas := int (toString (.Values.replicas)) }} | ||
{{- $uname := (include "tableland.uname" .) }} | ||
{{- range $i, $e := untilStep 0 $replicas 1 -}} | ||
{{ $uname }}-{{ $i }}, | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Use the fullname if the serviceAccount value is not set | ||
*/}} | ||
{{- define "tableland.serviceAccount" -}} | ||
{{- .Values.rbac.serviceAccountName | default (include "tableland.uname" .) -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "tableland.uname" . }}-config | ||
labels: | ||
heritage: {{ .Release.Service | quote }} | ||
release: {{ .Release.Name | quote }} | ||
chart: "{{ .Chart.Name }}" | ||
app: "{{ template "tableland.uname" . }}" | ||
data: | ||
{{- range $path, $config := .Values.config }} | ||
{{ $path }}: |- | ||
{{ $config | indent 4 -}} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "tableland.uname" . -}} | ||
{{- $svcPort := .Values.service.port -}} | ||
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} | ||
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} | ||
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} | ||
{{- end }} | ||
{{- end }} | ||
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1 | ||
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
{{- else -}} | ||
apiVersion: extensions/v1beta1 | ||
{{- end }} | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }} | ||
labels: | ||
{{- include "tableland.labels" . | nindent 4 }} | ||
{{- with .Values.ingress.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} | ||
ingressClassName: {{ .Values.ingress.className }} | ||
{{- end }} | ||
{{- if .Values.ingress.tls }} | ||
tls: | ||
{{- range .Values.ingress.tls }} | ||
- hosts: | ||
{{- range .hosts }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
secretName: {{ .secretName }} | ||
{{- end }} | ||
{{- end }} | ||
rules: | ||
{{- range .Values.ingress.hosts }} | ||
- host: {{ .host | quote }} | ||
http: | ||
paths: | ||
{{- range .paths }} | ||
- path: {{ .path }} | ||
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} | ||
pathType: {{ .pathType }} | ||
{{- end }} | ||
backend: | ||
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} | ||
service: | ||
name: {{ $fullName }} | ||
port: | ||
number: 8080 | ||
{{- else }} | ||
serviceName: {{ $fullName }} | ||
servicePort: {{ $svcPort }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- if .Values.maxUnavailable }} | ||
apiVersion: policy/v1 | ||
kind: PodDisruptionBudget | ||
metadata: | ||
name: "{{ template "tableland.uname" . }}-pdb" | ||
spec: | ||
maxUnavailable: {{ .Values.maxUnavailable }} | ||
selector: | ||
matchLabels: | ||
app: "{{ template "tableland.uname" . }}" | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
kind: Service | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ template "tableland.uname" . }} | ||
labels: | ||
{{- include "tableland.labels" . | nindent 4 }} | ||
{{- if .Values.service.labels }} | ||
{{ toYaml .Values.service.labels | indent 4 }} | ||
{{- end }} | ||
annotations: | ||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" | ||
spec: | ||
publishNotReadyAddresses: true | ||
selector: | ||
{{- include "tableland.selectorLabels" . | nindent 4 }} | ||
ports: | ||
- name: {{ .Values.service.httpPortName | default "http" }} | ||
port: {{ .Values.httpPort }} | ||
- name: {{ .Values.service.httpsPortName | default "https" }} | ||
port: {{ .Values.httpsPort }} | ||
- name: {{ .Values.service.monHttpsPortName | default "mon-http" }} | ||
port: {{ .Values.metricsPort }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- if .Values.rbac.create -}} | ||
{{- $fullName := include "tableland.uname" . -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: "{{ template "tableland.serviceAccount" . }}" | ||
annotations: | ||
{{- with .Values.rbac.serviceAccountAnnotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
labels: | ||
{{- include "tableland.labels" . | nindent 4 }} | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{- if .Values.serviceMonitor.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: {{ template "tableland.uname" . }}-monitor | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "tableland.labels" . | nindent 4 }} | ||
spec: | ||
selector: | ||
matchLabels: | ||
{{- include "tableland.selectorLabels" . | nindent 6 }} | ||
namespaceSelector: | ||
matchNames: | ||
- {{ .Release.Namespace }} | ||
endpoints: | ||
- port: {{ .Values.serviceMonitor.port }} | ||
{{- if .Values.serviceMonitor.interval }} | ||
interval: {{ .Values.serviceMonitor.interval }} | ||
{{- end }} | ||
path: {{ .Values.serviceMonitor.path | quote }} | ||
{{- end }} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is
/tableland-validator-node
?