Skip to content
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

add chart to show use of tsm-node as dependency #5

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/kubeval.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ chmod +x .bin/semver2
# Compute required kubernetes api versions
apis=()

helm repo add builder-vault https://blockdaemon.github.io/builder-vault-helm/ && helm repo update

# validate charts
for CHART_DIR in ${CHART_DIRS}; do
(cd "charts/${CHART_DIR}"; helm dependency build)
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: Set up chart-testing
uses: helm/[email protected]

- name: Add repo
run: helm repo add builder-vault https://blockdaemon.github.io/builder-vault-helm/ && helm repo update

- name: Run lint
run: ct lint --config .github/ct.yaml

Expand Down Expand Up @@ -142,10 +145,14 @@ jobs:
run: |
IMAGE_TAG=$(echo ${{ env.IMAGE_TAG }} | tr -d '\r')
./.github/inject-sensitive-values.sh charts/tsm-node/ci $ECR_REPO $IMAGE_TAG ${{ secrets.PRIVATE_KEY }}
./.github/inject-sensitive-values.sh charts/tsm-cluster/ci $ECR_REPO $IMAGE_TAG ${{ secrets.PRIVATE_KEY }}

- name: Install chart-testing
uses: helm/[email protected]

- name: Add repo
run: helm repo add builder-vault https://blockdaemon.github.io/builder-vault-helm/ && helm repo update

- name: Run chart install
run: ct install --config .github/ct.yaml

Expand Down
23 changes: 23 additions & 0 deletions charts/tsm-cluster/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
12 changes: 12 additions & 0 deletions charts/tsm-cluster/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
- name: tsm-node
repository: https://blockdaemon.github.io/builder-vault-helm/
version: 0.1.2
- name: tsm-node
repository: https://blockdaemon.github.io/builder-vault-helm/
version: 0.1.2
- name: tsm-node
repository: https://blockdaemon.github.io/builder-vault-helm/
version: 0.1.2
digest: sha256:5539cf4ee151f849ce3426341f3f7aa93d2b8b8bbbe7528b8727580a636b942d
generated: "2024-02-14T10:58:45.955449-06:00"
25 changes: 25 additions & 0 deletions charts/tsm-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v2
name: tsm-cluster
description: A Helm chart to deploy a set of Blockdaemon TSM nodes to kubernetes. It can be used as is, or as inpriation to create your own "umbrella" chart that uses tsm-node as a dependency.
maintainers:
- name: Blockdaemon
email: [email protected]
type: application
version: 0.1.0
appVersion: "61.0.2"
dependencies:
- name: tsm-node
version: 0.1.2
repository: https://blockdaemon.github.io/builder-vault-helm/
alias: tsm0
condition: tsm0.enabled
- name: tsm-node
version: 0.1.2
repository: https://blockdaemon.github.io/builder-vault-helm/
alias: tsm1
condition: tsm1.enabled
- name: tsm-node
version: 0.1.2
repository: https://blockdaemon.github.io/builder-vault-helm/
alias: tsm2
condition: tsm2.enabled
117 changes: 117 additions & 0 deletions charts/tsm-cluster/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# tsm-cluster

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 61.0.2](https://img.shields.io/badge/AppVersion-61.0.2-informational?style=flat-square)

A Helm chart to deploy a set of Blockdaemon TSM nodes to kubernetes. It can be used as is, or as inpriation to create your own "umbrella" chart that uses tsm-node as a dependency.

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Blockdaemon | <[email protected]> | |

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://blockdaemon.github.io/builder-vault-helm/ | tsm0(tsm-node) | 0.1.2 |
| https://blockdaemon.github.io/builder-vault-helm/ | tsm1(tsm-node) | 0.1.2 |
| https://blockdaemon.github.io/builder-vault-helm/ | tsm2(tsm-node) | 0.1.2 |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| ingress.annotations | object | `{}` | |
| ingress.className | string | `""` | |
| ingress.enabled | bool | `false` | |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths[0].path | string | `"/"` | |
| ingress.hosts[0].paths[0].pathType | string | `"Prefix"` | |
| ingress.hosts[0].paths[0].serviceName | string | `""` | |
| ingress.hosts[0].paths[0].servicePort | int | `8080` | |
| ingress.tls | list | `[]` | |
| tsm0.affinity | object | `{}` | |
| tsm0.config.configFile | string | `""` | the TSM configuration file that will be mounted into the TSM node. MUTUALLY EXCLUSIVE with configSecretName |
| tsm0.config.configSecretName | string | `""` | The name of the secret containing the TSM configuration file. MUTUALLY EXCLUSIVE with configFile |
| tsm0.fullnameOverride | string | `""` | |
| tsm0.image.pullPolicy | string | `"IfNotPresent"` | |
| tsm0.image.repository | string | `""` | Image to use for deploying the TSM node |
| tsm0.image.tag | string | `""` | |
| tsm0.imagePullSecrets | list | `[]` | |
| tsm0.index | int | `0` | |
| tsm0.ingress.enabled | bool | `false` | |
| tsm0.mpcService | object | `{}` | Optional. Only used for flexibility to expose the mpc port outside of the cluster. |
| tsm0.nameOverride | string | `""` | |
| tsm0.nodeSelector | object | `{}` | |
| tsm0.podAnnotations | object | `{}` | |
| tsm0.podLabels | object | `{}` | |
| tsm0.podSecurityContext | object | `{}` | |
| tsm0.replicaCount | int | `1` | |
| tsm0.resources | object | `{}` | |
| tsm0.sdkService | object | `{"type":"ClusterIP"}` | The primary service definition for the TSM node |
| tsm0.securityContext | object | `{}` | |
| tsm0.serviceAccount.annotations | object | `{}` | |
| tsm0.serviceAccount.automount | bool | `true` | |
| tsm0.serviceAccount.create | bool | `true` | |
| tsm0.serviceAccount.name | string | `""` | |
| tsm0.tolerations | list | `[]` | |
| tsm0.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. |
| tsm0.volumes | list | `[]` | Additional volumes on the output Deployment definition. |
| tsm1.affinity | object | `{}` | |
| tsm1.config.configFile | string | `""` | the TSM configuration file that will be mounted into the TSM node. MUTUALLY EXCLUSIVE with configSecretName |
| tsm1.config.configSecretName | string | `""` | The name of the secret containing the TSM configuration file. MUTUALLY EXCLUSIVE with configFile |
| tsm1.fullnameOverride | string | `""` | |
| tsm1.image.pullPolicy | string | `"IfNotPresent"` | |
| tsm1.image.repository | string | `""` | Image to use for deploying the TSM node |
| tsm1.image.tag | string | `""` | |
| tsm1.imagePullSecrets | list | `[]` | |
| tsm1.index | int | `1` | |
| tsm1.ingress.enabled | bool | `false` | |
| tsm1.mpcService | object | `{}` | Optional. Only used for flexibility to expose the mpc port outside of the cluster. |
| tsm1.nameOverride | string | `""` | |
| tsm1.nodeSelector | object | `{}` | |
| tsm1.podAnnotations | object | `{}` | |
| tsm1.podLabels | object | `{}` | |
| tsm1.podSecurityContext | object | `{}` | |
| tsm1.replicaCount | int | `1` | |
| tsm1.resources | object | `{}` | |
| tsm1.sdkService | object | `{"type":"ClusterIP"}` | The primary service definition for the TSM node |
| tsm1.securityContext | object | `{}` | |
| tsm1.serviceAccount.annotations | object | `{}` | |
| tsm1.serviceAccount.automount | bool | `true` | |
| tsm1.serviceAccount.create | bool | `true` | |
| tsm1.serviceAccount.name | string | `""` | |
| tsm1.tolerations | list | `[]` | |
| tsm1.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. |
| tsm1.volumes | list | `[]` | Additional volumes on the output Deployment definition. |
| tsm2.affinity | object | `{}` | |
| tsm2.config.configFile | string | `""` | the TSM configuration file that will be mounted into the TSM node. MUTUALLY EXCLUSIVE with configSecretName |
| tsm2.config.configSecretName | string | `""` | The name of the secret containing the TSM configuration file. MUTUALLY EXCLUSIVE with configFile |
| tsm2.fullnameOverride | string | `""` | |
| tsm2.image.pullPolicy | string | `"IfNotPresent"` | |
| tsm2.image.repository | string | `""` | Image to use for deploying the TSM node |
| tsm2.image.tag | string | `""` | |
| tsm2.imagePullSecrets | list | `[]` | |
| tsm2.index | int | `2` | |
| tsm2.ingress.enabled | bool | `false` | |
| tsm2.mpcService | object | `{}` | Optional. Only used for flexibility to expose the mpc port outside of the cluster. |
| tsm2.nameOverride | string | `""` | |
| tsm2.nodeSelector | object | `{}` | |
| tsm2.podAnnotations | object | `{}` | |
| tsm2.podLabels | object | `{}` | |
| tsm2.podSecurityContext | object | `{}` | |
| tsm2.replicaCount | int | `1` | |
| tsm2.resources | object | `{}` | |
| tsm2.sdkService | object | `{"type":"ClusterIP"}` | The primary service definition for the TSM node |
| tsm2.securityContext | object | `{}` | |
| tsm2.serviceAccount.annotations | object | `{}` | |
| tsm2.serviceAccount.automount | bool | `true` | |
| tsm2.serviceAccount.create | bool | `true` | |
| tsm2.serviceAccount.name | string | `""` | |
| tsm2.tolerations | list | `[]` | |
| tsm2.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. |
| tsm2.volumes | list | `[]` | Additional volumes on the output Deployment definition. |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0)
79 changes: 79 additions & 0 deletions charts/tsm-cluster/ci/configFile-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
ingress:
enabled: false

tsm0:
replicaCount: 1
index: 0

config:
configFile: |
[Player]
Index = 0
PrivateKey = "replace me"

[Database]
DriverName = "sqlite3"
DataSourceName = "/tmp/tsmdb"
EncryptorMasterPassword = "ENCRYPTION_KEY"

[SDKServer]
Port = 8080
image:
repository: <the name of the repository where tsm-node is stored>
pullPolicy: IfNotPresent
tag: "61.0.2"
sdkService:
type: NodePort
ports:
- port: 8080
name: sdk
targetPort: 8080
- port: 9000
name: mpc
targetPort: 9000

mpcService:
enabled: false

ingress:
enabled: false

tsm1:
replicaCount: 1
index: 0

config:
configFile: |
[Player]
Index = 0
PrivateKey = "replace me"

[Database]
DriverName = "sqlite3"
DataSourceName = "/tmp/tsmdb"
EncryptorMasterPassword = "ENCRYPTION_KEY"

[SDKServer]
Port = 8080
image:
repository: <the name of the repository where tsm-node is stored>
pullPolicy: IfNotPresent
tag: "61.0.2"
sdkService:
type: NodePort
ports:
- port: 8080
name: sdk
targetPort: 8080
- port: 9000
name: mpc
targetPort: 9000

mpcService:
enabled: false

ingress:
enabled: false

tsm2:
enabled: false
92 changes: 92 additions & 0 deletions charts/tsm-cluster/ci/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
ingress:
enabled: true
className: "nginx"
annotations: {}
hosts:
- host: tsm0-sdk.exmaple.com
paths:
- path: /
pathType: Prefix
serviceName: dev-tsm-tsm0
servicePort: 8080

- host: tsm1-sdk.example
paths:
- path: /
pathType: Prefix
serviceName: dev-tsm-tsm1
servicePort: 8080

tsm0:
replicaCount: 1
index: 0

config:
configFile: |
[Player]
Index = 0
PrivateKey = "replace me"

[Database]
DriverName = "sqlite3"
DataSourceName = "/tmp/tsmdb"
EncryptorMasterPassword = "ENCRYPTION_KEY"

[SDKServer]
Port = 8080
image:
repository: <the name of the repository where tsm-node is stored>
pullPolicy: IfNotPresent
tag: "61.0.2"
sdkService:
type: NodePort
ports:
- port: 8080
name: sdk
targetPort: 8080
- port: 9000
name: mpc
targetPort: 9000

mpcService:
enabled: false

ingress:
enabled: false

tsm1:
replicaCount: 1
index: 1

config:
configFile: |
[Player]
Index = 1
PrivateKey = "replace me"

[Database]
DriverName = "sqlite3"
DataSourceName = "/tmp/tsmdb"
EncryptorMasterPassword = "ENCRYPTION_KEY"

[SDKServer]
Port = 8080
image:
repository: <the name of the repository where tsm-node is stored>
pullPolicy: IfNotPresent
tag: "61.0.2"
sdkService:
type: NodePort
ports:
- port: 8080
name: sdk
targetPort: 8080
- port: 9000
name: mpc
targetPort: 9000

mpcService:
enabled: false

ingress:
enabled: false
8 changes: 8 additions & 0 deletions charts/tsm-cluster/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
1. The application can be found at the following URL(s):
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- end }}
Loading
Loading