{{- if .Values.osccost.service.enable }} {{ $root := . }} {{- with .Values.osccost.service }} apiVersion: v1 kind: Service metadata: name: "{{ template "osccost.service" $root }}" namespace: {{ $root.Release.Namespace }} labels: helm.sh/charts: "{{ $root.Chart.Name }}-{{ $root.Chart.Version }}" app.kubernetes.io/name: "{{ $root.Release.Name }}" app.kubernetes.io/instance: "{{ template "osccost.fullname" $root }}" app.kubernetes.io/version: "{{ $root.Chart.Version }}" app.kubernetes.io/managed-by: Helm spec: type: ClusterIP ports: - port: 8080 targetPort: http-metrics protocol: TCP selector: app.kubernetes.io/name: "{{ $root.Release.Name }}" app.kubernetes.io/instance: "{{ template "osccost.fullname" $root }}" {{- end }} {{- end }}