apiVersion: v1
kind: Service
metadata:
  {{- if not .Values.certificateSecretName }}
  annotations:
    service.alpha.openshift.io/serving-cert-secret-name: {{ .Values.plugin.tls.certs.secretName }}
  {{- end }}
  name: {{ include "openshift-console-plugin.fullname" . }}
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "openshift-console-plugin.labels" . | nindent 4 }}
spec:
  ports:
    - name: {{ .Values.plugin.port }}-tcp
      protocol: TCP
      port: {{ .Values.service.port }}
      targetPort: {{ .Values.plugin.port }}
  selector:
    {{- include "openshift-console-plugin.selectorLabels" . | nindent 4 }}
  type: {{ .Values.service.type }}
  sessionAffinity: None
