Add server.hostNetwork option (#775)
This commit is contained in:
parent
c15d83e397
commit
7e21a09ebd
4 changed files with 32 additions and 1 deletions
|
@ -49,6 +49,10 @@ spec:
|
||||||
shareProcessNamespace: true
|
shareProcessNamespace: true
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{- template "server.statefulSet.securityContext.pod" . }}
|
{{- template "server.statefulSet.securityContext.pod" . }}
|
||||||
|
{{- if not .Values.global.openshift }}
|
||||||
|
hostNetwork: {{ .Values.server.hostNetwork }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
{{ template "vault.volumes" . }}
|
{{ template "vault.volumes" . }}
|
||||||
- name: home
|
- name: home
|
||||||
|
|
|
@ -1784,3 +1784,25 @@ load _helpers
|
||||||
yq -r '.spec.template.spec.containers[0].securityContext.foo' | tee /dev/stderr)
|
yq -r '.spec.template.spec.containers[0].securityContext.foo' | tee /dev/stderr)
|
||||||
[ "${actual}" = "bar" ]
|
[ "${actual}" = "bar" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#--------------------------------------------------------------------
|
||||||
|
# hostNetwork
|
||||||
|
|
||||||
|
@test "server/StatefulSet: server.hostNetwork not set" {
|
||||||
|
cd `chart_dir`
|
||||||
|
local actual=$(helm template \
|
||||||
|
--show-only templates/server-statefulset.yaml \
|
||||||
|
. | tee /dev/stderr |
|
||||||
|
yq -r '.spec.template.spec.hostNetwork' | tee /dev/stderr)
|
||||||
|
[ "${actual}" = "false" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
@test "server/StatefulSet: server.hostNetwork is set" {
|
||||||
|
cd `chart_dir`
|
||||||
|
local actual=$(helm template \
|
||||||
|
--show-only templates/server-statefulset.yaml \
|
||||||
|
--set 'server.hostNetwork=true' \
|
||||||
|
. | tee /dev/stderr |
|
||||||
|
yq -r '.spec.template.spec.hostNetwork' | tee /dev/stderr)
|
||||||
|
[ "${actual}" = "true" ]
|
||||||
|
}
|
||||||
|
|
|
@ -979,6 +979,9 @@
|
||||||
"null",
|
"null",
|
||||||
"array"
|
"array"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"hostNetwork": {
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -876,6 +876,8 @@ server:
|
||||||
pod: {}
|
pod: {}
|
||||||
container: {}
|
container: {}
|
||||||
|
|
||||||
|
# Should the server pods run on the host network
|
||||||
|
hostNetwork: false
|
||||||
|
|
||||||
# Vault UI
|
# Vault UI
|
||||||
ui:
|
ui:
|
||||||
|
|
Loading…
Reference in a new issue