{{- if .Values.networkCosts }} {{- if .Values.networkCosts.enabled }} {{- if .Values.networkCosts.podSecurityPolicy }} {{- if .Values.networkCosts.podSecurityPolicy.enabled }} apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: kubecost-network-costs roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: kubecost-network-costs subjects: - kind: ServiceAccount name: {{ template "cost-analyzer.serviceAccountName" . }} namespace: {{ .Release.Namespace }} {{- end }} {{- end }} {{- end }} {{- end }}