Skip to content

Commit

Permalink
new dashboard chart
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaguilar committed Oct 20, 2023
1 parent 2414a49 commit e80cfca
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 0 deletions.
5 changes: 5 additions & 0 deletions charts/terraform-operator-dashboard/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
appVersion: 1.0.0
description: A Helm chart to deploy the terraform-operator-dashboard
name: terraform-operator-dashboard
version: 1.0.0
27 changes: 27 additions & 0 deletions charts/terraform-operator-dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# terraform-operator-dashboard

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

A Helm chart to deploy the terraform-operator-dashboard

## TL;DR;

```console
$ helm repo add galleybytes https://galleybytes.github.io/helm-charts
$ helm install galleybytes/terraform-operator-dashboard --namespace tf-system
```

## Values

| Key | Description | Default |
|---|---|---|
| env | `list` Env defined like k8s EnvVar https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#envvar-v1-core. | `[{"name":"API_HOST","value":"http://terraform-operator-api"}]` |
| image.tag | `string` | `"1.0.0-alpha-20231020t083321"` |
| server.port | `int` The port the runtime exposes to connect to the webserver | `8080` |
| service.annotations | `object` Service annotations key/values for the service resource | `{}` |
| service.port | `int` the http or https port clients will use to access the `server.port` | `80` |
| service.type | `string` service type is one of ClusterIP | LoadBalancer | NodePort | `"ClusterIP"` |
| resources | `object` CPU/Memory request and limit configuration | `{}` |
| nodeSelector | `object` node labels for pod assignment | `{}` |
| tolerations | `list` List of node taints to tolerate | `[]` |
| affinity | `object` node/pod affinities | `{}` |
30 changes: 30 additions & 0 deletions charts/terraform-operator-dashboard/hack/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

## TL;DR;

```console
$ helm repo add galleybytes https://galleybytes.github.io/helm-charts
$ helm install galleybytes/terraform-operator-dashboard --namespace tf-system
```


{{ template "chart.homepageLine" . }}

{{ template "chart.maintainersSection" . }}

{{ template "chart.sourcesSection" . }}

{{ template "chart.requirementsSection" . }}

## Values

| Key | Description | Default |
|---|---|---|
{{- range .Values }}
| {{ .Key }} | `{{ .Type }}` {{ if .Description }}{{ .Description }}{{ else }}{{ .AutoDescription }}{{ end }} | {{ if .Default }}{{ .Default }}{{ else }}{{ .AutoDefault }}{{ end }} |
{{- end }}
55 changes: 55 additions & 0 deletions charts/terraform-operator-dashboard/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
spec:
selector:
matchLabels:
service: terraform-operator
component: dashboard
replicas: {{ .Values.replicaCount | default 1 }}
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
template:
metadata:
labels:
service: terraform-operator
component: dashboard
spec:
serviceAccount: {{ .Release.Name }}
containers:
- {{ with .Values.args -}}
args:
{{- toYaml . | nindent 8 }}
{{ end -}}
env:
{{- range .Values.env }}
- name: {{ .name }}
value: {{ .value }}
{{- end }}
image: ghcr.io/galleybytes/terraform-operator-dashboard:{{ .Values.image.tag }}
imagePullPolicy: IfNotPresent
name: dashboard
ports:
- containerPort: {{ .Values.server.port }}
protocol: TCP
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
restartPolicy: Always
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
22 changes: 22 additions & 0 deletions charts/terraform-operator-dashboard/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: v1
kind: Service
metadata:
annotations:
{{- range $key, $value := .Values.service.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
service: terraform-operator
component: dashboard
name: {{ .Release.Name }}
spec:
ports:
- name: http
port: {{ .Values.service.port }}
protocol: TCP
targetPort: {{ .Values.server.port }}

selector:
service: terraform-operator
component: dashboard
type: {{ .Values.service.type }}
34 changes: 34 additions & 0 deletions charts/terraform-operator-dashboard/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -- Env defined like k8s EnvVar https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#envvar-v1-core.
env:
- name: API_HOST
value: http://terraform-operator-api # When deployed in same namespace as tfo-api

image:
# The container image tag
tag: 1.0.0-alpha-20231020t083321

# - Options for the api-webserver
server:
# -- The port the runtime exposes to connect to the webserver
port: 8080

# - Service options to expose the API
service:
# -- Service annotations key/values for the service resource
annotations: {}
# -- the http or https port clients will use to access the `server.port`
port: 80
# -- service type is one of ClusterIP | LoadBalancer | NodePort
type: ClusterIP

# -- CPU/Memory request and limit configuration
resources: {}

# -- node labels for pod assignment
nodeSelector: {}

# -- List of node taints to tolerate
tolerations: []

# -- node/pod affinities
affinity: {}

0 comments on commit e80cfca

Please sign in to comment.