Skip to content

Commit

Permalink
add configmap of custom vcluster/cluster manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
isaaguilar committed Jun 22, 2023
1 parent b118cbe commit 57126b4
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/terraform-operator-remote-controller/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: 1.1.0
description: A Helm chart to deploy the terraform-operator-remote-controller
name: terraform-operator-remote-controller
version: 1.0.3
version: 1.0.4
6 changes: 5 additions & 1 deletion charts/terraform-operator-remote-controller/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# terraform-operator-remote-controller

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

A Helm chart to deploy the terraform-operator-remote-controller

Expand All @@ -21,3 +21,7 @@ $ helm install terraform-operator-remote-controller galleybytes/terraform-operat
| nodeSelector | `object` node labels for pod assignment | `{}` |
| tolerations | `list` List of node taints to tolerate | `[]` |
| affinity | `object` node/pod affinities | `{}` |
| data.vcluster | `object` A preset options to render a volume/volumeMount and environment variable used to | `{"enabled":false,"manifest":"","prerender":false}` |
| data.vcluster.enabled | `bool` Enable configuring the vcluster | `false` |
| data.vcluster.prerender | `bool` Run the manifest thru a helm-template before applying | `false` |
| data.vcluster.manifest | `string` The fully defined vCluster configuration | `""` |
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}
labels:
app.kubernetes.io/name: terraform-operator-remote-controller
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Values.image.tag }}
app.kubernetes.io/component: controller
app.kubernetes.io/part-of: terraform-operator
app.kubernetes.io/managed-by: helm
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
data:
{{ if .Values.data.vcluster.enabled }}
vcluster.tpl.yaml: |-
{{- if .Values.data.vcluster.prerender }}
{{- tpl .Values.data.vcluster.manifest . | nindent 4 }}
{{- else }}
{{- .Values.data.vcluster.manifest | nindent 4 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,25 @@ spec:
{{- if .Values.env }}
{{- .Values.env | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.data.vcluster.enabled }}
- name: TFO_API_VCLUSTER_MANIFEST
value: /data/vcluster/vcluster.tpl.yaml
{{- end }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}
volumeMounts:
{{- if .Values.data.vcluster.enabled }}
- name: vcluster
mountPath: /data/vcluster
{{- end }}
volumes:
{{- if .Values.data.vcluster.enabled }}
- name: vcluster
configMap:
name: {{ .Release.Name }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
13 changes: 12 additions & 1 deletion charts/terraform-operator-remote-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,15 @@ nodeSelector: {}
tolerations: []

# -- node/pod affinities
affinity: {}
affinity: {}

# - ConfigMap data used to mount as a volume
data:
# -- A preset options to render a volume/volumeMount and environment variable used to
vcluster:
# -- Enable configuring the vcluster
enabled: false
# -- Run the manifest thru a helm-template before applying
prerender: false
# -- The fully defined vCluster configuration
manifest: ""

0 comments on commit 57126b4

Please sign in to comment.