Skip to content

Commit

Permalink
Add environment variable support (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hoeft authored Feb 23, 2024
1 parent 8700729 commit 0f77c0f
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/tsm-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ maintainers:
- name: Blockdaemon
email: [email protected]
type: application
version: 0.1.3
version: 0.1.4
appVersion: "61.0.2"
3 changes: 2 additions & 1 deletion charts/tsm-node/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tsm-node

![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-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)
![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-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 Blockdaemon TSM node to kubernetes

Expand All @@ -17,6 +17,7 @@ A Helm chart to deploy a Blockdaemon TSM node to kubernetes
| affinity | object | `{}` | |
| config.configFile | string | `""` | the TSM configuration file that will be mounted into the TSM node. MUTUALLY EXCLUSIVE with configSecretName |
| config.configSecretName | string | `""` | The name of the secret containing the TSM configuration file. MUTUALLY EXCLUSIVE with configFile |
| env | object | `{}` | Environment variables to be passed to the TSM node deployment |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `""` | Image to use for deploying the TSM node |
Expand Down
38 changes: 38 additions & 0 deletions charts/tsm-node/ci/envvars-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
replicaCount: 1
index: 0

env:
tsm: node

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
7 changes: 7 additions & 0 deletions charts/tsm-node/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ spec:
name: {{ .name }}
protocol: TCP
{{- end }}
{{- if .Values.env }}
env:
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
livenessProbe:
httpGet:
path: /ping
Expand Down
3 changes: 3 additions & 0 deletions charts/tsm-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
replicaCount: 1
index: 0

# -- Environment variables to be passed to the TSM node deployment
env: {}

config:
# -- the TSM configuration file that will be mounted into the TSM node. MUTUALLY EXCLUSIVE with configSecretName
configFile: ""
Expand Down

0 comments on commit 0f77c0f

Please sign in to comment.