mirror of
https://github.com/pgsty/minio.git
synced 2026-11-25 08:39:19 +03:00
2b96153a61
* Support releasing on “chart-<version>” tags, fixes #223 * Add commonLabels that are used on all resources * Support templated values in numerous locations * Add oidc.existingConfigMapName and oidc.existingConfigUrlKey * Add networkPolicy.allowFrom * support targetLabels on ServiceMonitor * Support Probe relabelingConfigs * Allow postJob default containerSecurityContext * Allow policies to be templated string * Set MINIO_BROWSER_REDIRECT_URL * Ensure job egress only enabled when networkPolicy.egress.enabled set Signed-off-by: Trey Dockendorf <tdockendorf@osc.edu>
75 lines
2.2 KiB
YAML
75 lines
2.2 KiB
YAML
{{- if and (.Values.networkPolicy.enabled) (eq .Values.networkPolicy.flavor "kubernetes") }}
|
|
kind: NetworkPolicy
|
|
apiVersion: {{ template "silo.networkPolicy.apiVersion" . }}
|
|
metadata:
|
|
name: {{ template "silo.fullname" . }}
|
|
labels:
|
|
app: {{ template "silo.name" . }}
|
|
chart: {{ template "silo.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
{{- with .Values.commonLabels }}
|
|
{{- tpl (toYaml .) $ | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: {{ template "silo.name" . }}
|
|
release: {{ .Release.Name }}
|
|
ingress:
|
|
- ports:
|
|
- port: {{ .Values.minioAPIPort }}
|
|
protocol: TCP
|
|
- port: {{ .Values.minioConsolePort }}
|
|
protocol: TCP
|
|
{{- if or (not .Values.networkPolicy.allowExternal) .Values.networkPolicy.allowFrom }}
|
|
from:
|
|
{{- if not .Values.networkPolicy.allowExternal }}
|
|
- podSelector:
|
|
matchLabels:
|
|
{{ template "silo.name" . }}-client: "true"
|
|
{{- end }}
|
|
{{- with .Values.networkPolicy.allowFrom }}
|
|
{{- tpl (toYaml .) $ | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.networkPolicy.egress.enabled }}
|
|
egress:
|
|
- ports:
|
|
{{ .Values.networkPolicy.egress.ports | toJson }}
|
|
{{- with .Values.networkPolicy.egress.to }}
|
|
to:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.networkPolicy.egress.enabled }}
|
|
---
|
|
kind: NetworkPolicy
|
|
apiVersion: {{ template "silo.networkPolicy.apiVersion" . }}
|
|
metadata:
|
|
name: {{ template "silo.fullname" . }}-post-job
|
|
labels:
|
|
app: {{ template "silo.name" . }}-post-job
|
|
chart: {{ template "silo.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: {{ template "silo.name" . }}-job
|
|
release: {{ .Release.Name }}
|
|
egress:
|
|
- ports:
|
|
- port: {{ .Values.minioAPIPort }}
|
|
protocol: TCP
|
|
- port: {{ .Values.minioConsolePort }}
|
|
protocol: TCP
|
|
- ports:
|
|
{{ .Values.networkPolicy.egress.ports | toJson }}
|
|
{{- with .Values.networkPolicy.egress.to }}
|
|
to:
|
|
{{- toYaml . | nindent 12 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|