Skip to content

Commit

Permalink
allow args in helm vars
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaguilar committed Sep 8, 2023
1 parent 90cb28a commit d569aa0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/terraform-operator-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: 0.5.0
description: A Helm chart to deploy the terraform-operator-api
name: terraform-operator-api
version: 1.0.9
version: 1.0.10
3 changes: 2 additions & 1 deletion charts/terraform-operator-api/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# terraform-operator-api

![Version: 1.0.9](https://img.shields.io/badge/Version-1.0.9-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)
![Version: 1.0.10](https://img.shields.io/badge/Version-1.0.10-informational?style=flat-square) ![AppVersion: 0.5.0](https://img.shields.io/badge/AppVersion-0.5.0-informational?style=flat-square)

A Helm chart to deploy the terraform-operator-api

Expand All @@ -15,6 +15,7 @@ $ helm install galleybytes/terraform-operator-api --namespace tf-system

| Key | Description | Default |
|---|---|---|
| args | `list` Optional args to include for the command | `["use-service-host"]` |
| env | `list` Env defined like k8s EnvVar https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#envvar-v1-core. | `[]` |
| image.tag | `string` | `"0.5.0"` |
| server.port | `int` The port the runtime exposes to connect to the webserver | `5555` |
Expand Down
8 changes: 7 additions & 1 deletion charts/terraform-operator-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ spec:
spec:
serviceAccount: {{ .Release.Name }}
containers:
- env:
- {{ with .Values.args -}}
args:
{{- toYaml . | nindent 8 }}
{{ end -}}
env:
- name: SERVICE_NAME
value: {{ .Release.Name }}
{{- if .Values.postgres.enabled }}
- name: DB_URL
value: postgres://{{ .Values.postgres.user.username }}:{{ .Values.postgres.user.password }}@{{ .Values.postgres.name }}.{{ .Release.Namespace }}.svc:5432/{{ .Values.postgres.database.name }}
Expand Down
4 changes: 4 additions & 0 deletions charts/terraform-operator-api/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# -- Optional args to include for the command
args:
- use-service-host

# -- Env defined like k8s EnvVar https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#envvar-v1-core.
env: []
# - name: JWT_SIGNING_KEY
Expand Down

0 comments on commit d569aa0

Please sign in to comment.