-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes Issue #21 Signed-off-by: Donald Sebastian Leung <[email protected]> * Refine Helm chart configuration to maintain backwards compatibility Signed-off-by: Donald Sebastian Leung <[email protected]> * Version bump Signed-off-by: Matt Ray <[email protected]> --------- Signed-off-by: Donald Sebastian Leung <[email protected]> Signed-off-by: Matt Ray <[email protected]> Co-authored-by: Donald Sebastian Leung <[email protected]>
- Loading branch information
1 parent
9cf22e4
commit b27ed05
Showing
5 changed files
with
84 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{{- $apiVersion := (include "networkingAPIVersion" .) }} | ||
{{- if .Values.networkPolicies.enabled -}} | ||
{{- if .Values.opencost.prometheus.internal.enabled }} | ||
--- | ||
{{ $apiVersion }} | ||
kind: NetworkPolicy | ||
metadata: | ||
name: {{ .Release.Name }}-opencost | ||
namespace: {{ .Release.Namespace }} | ||
spec: | ||
podSelector: | ||
matchLabels: | ||
app.kubernetes.io/name: opencost | ||
policyTypes: | ||
- Ingress | ||
- Egress | ||
ingress: | ||
- from: | ||
- podSelector: | ||
matchLabels: | ||
{{- range $key, $val := .Values.networkPolicies.prometheus.labels }} | ||
{{ $key }}: {{ $val }} | ||
{{- end }} | ||
{{- if ne .Values.networkPolicies.prometheus.namespace .Release.Namespace }} | ||
namespaceSelector: | ||
matchLabels: | ||
name: {{ .Values.networkPolicies.prometheus.namespace }} | ||
{{- end }} | ||
ports: | ||
- port: 9003 | ||
egress: | ||
- to: | ||
- podSelector: | ||
matchLabels: | ||
{{- range $key, $val := .Values.networkPolicies.prometheus.labels }} | ||
{{ $key }}: {{ $val }} | ||
{{- end }} | ||
{{- if ne .Values.networkPolicies.prometheus.namespace .Release.Namespace }} | ||
namespaceSelector: | ||
matchLabels: | ||
name: {{ .Values.networkPolicies.prometheus.namespace }} | ||
{{- end }} | ||
ports: | ||
- port: {{ .Values.networkPolicies.prometheus.port }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters