# SPDX-FileCopyrightText: 2021-present Open Networking Foundation <info@opennetworking.org>
#
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0

apiVersion: v1
kind: Service
metadata:
  name: {{ include "aether-roc-websocket.fullname" . }}
  labels:
    app: {{ template "aether-roc-websocket.fullname" . }}
    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    release: "{{ .Release.Name }}"
    heritage: "{{ .Release.Service }}"
    {{- include "aether-roc-websocket.labels" . | nindent 4 }}
spec:
  type: {{ .Values.service.type }}
  selector:
    name: {{ template "aether-roc-websocket.fullname" . }}
    app: aether
    type: ws
    resource: {{ template "aether-roc-websocket.fullname" . }}
    {{- include "aether-roc-websocket.selectorLabels" . | nindent 4 }}
  ports:
    - name: webhook
      port: 80
      targetPort: {{ .Values.port }}
