kind: Service
apiVersion: v1
metadata:
  name: {{ template "opa.fullname" . }}
  labels:
{{ include "opa.labels.standard" . | indent 4 }}
spec:
  selector:
    app: {{ template "opa.fullname" . }}
  ports:
  - name: https
    protocol: TCP
    port: 443
    targetPort: {{ .Values.port }}
{{- if .Values.prometheus.enabled }}
  - name: http
    port: {{ .Values.mgmt.port }}
{{- end }}
{{- if .Values.extraPorts }}
{{ toYaml .Values.extraPorts | indent 2}}
{{- end }}
