File tree Expand file tree Collapse file tree 5 files changed +53
-0
lines changed
charts/prom-aggregation-gateway Expand file tree Collapse file tree 5 files changed +53
-0
lines changed Original file line number Diff line number Diff line change @@ -26,3 +26,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
26
26
app.kubernetes.io/name: { { include " prom-aggregation-gateway.name" . } }
27
27
app.kubernetes.io/instance: { { .Release.Name } }
28
28
{ {- end } }
29
+
30
+ { {/*
31
+ Return the appropriate apiVersion for networkpolicy.
32
+ */} }
33
+ { {- define " prom-aggregation-gateway.networkPolicy.apiVersion" -} }
34
+ { {- if semverCompare " >=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion } }
35
+ { {- print " extensions/v1beta1" } }
36
+ { {- else if semverCompare " ^1.7-0" .Capabilities.KubeVersion.GitVersion } }
37
+ { {- print " networking.k8s.io/v1" } }
38
+ { {- end } }
39
+ { {- end } }
Original file line number Diff line number Diff line change 60
60
{{- with .Values.controller.resources }}
61
61
resources : {{ . | toYaml | nindent 12 }}
62
62
{{- end }}
63
+ {{- with .Values.controller.priorityClassName }}
64
+ priorityClassName : {{ . | quote }}
65
+ {{- end }}
66
+ {{- with .Values.controller.imagePullSecrets }}
67
+ imagePullSecrets :
68
+ {{- toYaml . | nindent 8 }}
69
+ {{- end }}
63
70
{{- with .Values.controller.nodeSelector }}
64
71
nodeSelector :
65
72
{{- toYaml . | nindent 8 }}
Original file line number Diff line number Diff line change
1
+ {{- if .Values.networkPolicy }}
2
+ apiVersion : {{ include "prom-aggregation-gateway.networkPolicy.apiVersion" . }}
3
+ kind : NetworkPolicy
4
+ metadata :
5
+ labels :
6
+ {{- include "prom-aggregation-gateway.labels" . | nindent 4 }}
7
+ {{- if .Values.networkPolicy.customSelectors }}
8
+ name : ingress-allow-customselector-{{ template "prom-aggregation-gateway.name" . }}
9
+ {{- else if .Values.networkPolicy.allowAll }}
10
+ name : ingress-allow-all-{{ template "prom-aggregation-gateway.name" . }}
11
+ {{- else -}}
12
+ {{- fail "One of `allowAll` or `customSelectors` must be specified." }}
13
+ {{- end }}
14
+ spec :
15
+ podSelector :
16
+ matchLabels :
17
+ {{- include "prom-aggregation-gateway.selectorLabels" . | nindent 6 }}
18
+ ingress :
19
+ - ports :
20
+ - port : {{ .Values.controller.apiPort }}
21
+ - port : {{ .Values.controller.lifecyclePort }}
22
+ {{- with .Values.networkPolicy.customSelectors }}
23
+ from :
24
+ {{- toYaml . | nindent 8 }}
25
+ {{- end }}
26
+ {{- end }}
Original file line number Diff line number Diff line change 54
54
},
55
55
"tolerations" : {
56
56
"type" : " array"
57
+ },
58
+ "priorityClassName" : {
59
+ "type" : " string"
60
+ },
61
+ "imagePullSecrets" : {
62
+ "type" : " array"
57
63
}
58
64
},
59
65
"required" : [
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ controller:
17
17
18
18
nodeSelector : {}
19
19
20
+ # Optional pod imagePullSecrets
21
+ imagePullSecrets : []
22
+
20
23
podMonitor :
21
24
create : true
22
25
additionalLabels : {}
You can’t perform that action at this time.
0 commit comments