Add support for hostpath volumes
This commit is contained in:
parent
03a5ce89e9
commit
1766eb1aaf
|
@ -157,3 +157,32 @@
|
||||||
type: ipaddr
|
type: ipaddr
|
||||||
cidr: false
|
cidr: false
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
# Storage Options
|
||||||
|
# Host path based volumes
|
||||||
|
- variable: hostPathVolumes
|
||||||
|
label: "Host Path Volumes"
|
||||||
|
schema:
|
||||||
|
type: list
|
||||||
|
items:
|
||||||
|
- variable: hostPathConfiguration
|
||||||
|
label: "Host Path Configuration"
|
||||||
|
schema:
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: hostPath
|
||||||
|
label: "Host Path"
|
||||||
|
schema:
|
||||||
|
type: hostpath
|
||||||
|
required: true
|
||||||
|
- variable: mountPath
|
||||||
|
label: "Mount Path"
|
||||||
|
description: "Path where host path will be mounted inside the pod"
|
||||||
|
schema:
|
||||||
|
type: path
|
||||||
|
required: true
|
||||||
|
- variable: readOnly
|
||||||
|
label: "Read Only"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
|
@ -14,12 +14,20 @@ spec:
|
||||||
{{- include "ix-chart.selectorLabels" . | nindent 8 }}
|
{{- include "ix-chart.selectorLabels" . | nindent 8 }}
|
||||||
annotations:
|
annotations:
|
||||||
rollme: {{ randAlphaNum 5 | quote }}
|
rollme: {{ randAlphaNum 5 | quote }}
|
||||||
{{- if .Values.externalInterfacesConfigurationNames }}
|
{{- if .Values.ixExternalInterfacesConfigurationNames }}
|
||||||
k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.externalInterfacesConfigurationNames }}
|
k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.ixExternalInterfacesConfigurationNames }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Chart.Name }}
|
- name: {{ .Chart.Name }}
|
||||||
|
{{- if .Values.hostPathVolumes }}
|
||||||
|
volumeMounts:
|
||||||
|
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
||||||
|
- mountPath: {{ $hostPathConfiguration.mountPath }}
|
||||||
|
name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
||||||
|
readOnly: {{ $hostPathConfiguration.readOnly }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
|
||||||
|
@ -43,3 +51,11 @@ spec:
|
||||||
value: {{ .value | quote }}
|
value: {{ .value | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if .Values.hostPathVolumes }}
|
||||||
|
volumes:
|
||||||
|
{{- range $index, $hostPathConfiguration := .Values.hostPathVolumes }}
|
||||||
|
- name: ix-host-path-{{ $.Release.Name }}-{{ $index }}
|
||||||
|
hostPath:
|
||||||
|
path: {{ $hostPathConfiguration.hostPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{- range $index, $iface := .Values.externalInterfacesConfiguration }}
|
{{- range $index, $iface := .Values.ixExternalInterfacesConfiguration }}
|
||||||
---
|
---
|
||||||
apiVersion: "k8s.cni.cncf.io/v1"
|
apiVersion: "k8s.cni.cncf.io/v1"
|
||||||
kind: NetworkAttachmentDefinition
|
kind: NetworkAttachmentDefinition
|
|
@ -13,3 +13,6 @@ containerEnvironmentVariables: []
|
||||||
|
|
||||||
# Network related configuration
|
# Network related configuration
|
||||||
externalInterfaces: []
|
externalInterfaces: []
|
||||||
|
|
||||||
|
# Storage related configuration
|
||||||
|
hostPathVolumes: []
|
||||||
|
|
Loading…
Reference in New Issue