Skip to content

Commit

Permalink
Merge pull request #48 from Hobbit44/main
Browse files Browse the repository at this point in the history
Added existingSecret and extraObjects options to helm chart
  • Loading branch information
alperencelik authored Feb 3, 2025
2 parents 0d45892 + dc3c75e commit f1107e6
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 18 deletions.
32 changes: 15 additions & 17 deletions charts/kubemox/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,37 +52,35 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- with .Values.proxmox }}
- name: PROXMOX_ENDPOINT
value: {{ .Values.proxmox.endpoint }}
value: {{ .endpoint }}
- name: PROXMOX_INSECURE_SKIP_TLS_VERIFY
value: {{ .Values.proxmox.insecureSkipTLSVerify | quote }}
{{- if .Values.proxmox.tokenID }}
value: {{ .insecureSkipTLSVerify | quote }}
- name: PROXMOX_TOKEN_ID
valueFrom:
secretKeyRef:
name: proxmox-credentials
key: tokenID
{{- end }}
{{- if .Values.proxmox.secret }}
name: {{ .existingSecret | default "proxmox-credentials" }}
key: {{ .tokenIdKey | default "tokenID" }}
optional: true
- name: PROXMOX_SECRET
valueFrom:
secretKeyRef:
name: proxmox-credentials
key: secret
{{- end }}
{{- if .Values.proxmox.username }}
name: {{ .existingSecret | default "proxmox-credentials" }}
key: {{ .secretKey | default "secret" }}
optional: true
- name: PROXMOX_USERNAME
valueFrom:
secretKeyRef:
name: proxmox-credentials
key: username
{{- end }}
{{- if .Values.proxmox.password }}
name: {{ .existingSecret | default "proxmox-credentials" }}
key: {{ .usernameKey | default "username" }}
optional: true
- name: PROXMOX_PASSWORD
valueFrom:
secretKeyRef:
name: proxmox-credentials
key: password
name: {{ .existingSecret | default "proxmox-credentials" }}
key: {{ .passwordKey | default "password" }}
optional: true
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
4 changes: 4 additions & 0 deletions charts/kubemox/templates/extra-manifests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ range .Values.extraObjects }}
---
{{ tpl (toYaml .) $ }}
{{ end }}
4 changes: 3 additions & 1 deletion charts/kubemox/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if not .Values.proxmox.existingSecret }}
apiVersion: v1
data:
{{- if .Values.proxmox.secret }}
Expand All @@ -14,4 +15,5 @@ data:
{{- end }}
kind: Secret
metadata:
name: proxmox-credentials
name: proxmox-credentials
{{- end }}
25 changes: 25 additions & 0 deletions charts/kubemox/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ proxmox:
# -- Proxmox VE password
password: "PROXMOX_PASSWORD"

# # Existing secret containing credentials
# existingSecret:
# # Key in the secret containing the Proxmox token id
# tokenIdKey: tokenID
# # Key in the secret containing the Proxmox token secret
# secretKey: secret
# # Key in the secret containing the Proxmox username
# usernameKey: username
# # Key in the secret containing the Proxmox password
# passwordKey: password

image:
# -- Kubemox image repository
repository: alperencelik/kubemox
Expand Down Expand Up @@ -121,3 +132,17 @@ nodeSelector: {}
tolerations: []

affinity: {}

# Any additional manifests:
extraObjects: []
# - apiVersion: "external-secrets.io/v1beta1"
# kind: ExternalSecret
# metadata:
# name: kubemox-secrets
# spec:
# secretStoreRef: secret-store
# target:
# name: kubemox-secrets
# dataFrom:
# - extract:
# key: /prod/kubemox

0 comments on commit f1107e6

Please sign in to comment.