# Copyright 2021-2023 H2020 TeraFlow (https://www.teraflow-h2020.eu/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: Service
metadata:
  name: remote-teraflow
spec:
  type: ExternalName
  externalName: interdomainservice.oeccpsc22-1.svc.cluster.local
  ports:
  - name: grpc
    protocol: TCP
    port: 10010
---
apiVersion: v1
kind: Service
metadata:
  name: contextservice-public
  labels:
    app: contextservice
spec:
  type: NodePort
  selector:
    app: contextservice
  ports:
  - name: grpc
    protocol: TCP
    port: 1010
    targetPort: 1010
    nodePort: 30112
  - name: rest
    protocol: TCP
    port: 8080
    targetPort: 8080
    nodePort: 30002
  - name: redis
    protocol: TCP
    port: 6379
    targetPort: 6379
    nodePort: 30632
---
apiVersion: v1
kind: Service
metadata:
  name: deviceservice-public
  labels:
    app: deviceservice
spec:
  type: NodePort
  selector:
    app: deviceservice
  ports:
  - name: grpc
    protocol: TCP
    port: 2020
    targetPort: 2020
    nodePort: 30222
---
apiVersion: v1
kind: Service
metadata:
  name: computeservice-public
spec:
  type: NodePort
  selector:
    app: computeservice
  ports:
  - name: http
    protocol: TCP
    port: 8080
    targetPort: 8080
    nodePort: 30882
---
apiVersion: v1
kind: Service
metadata:
  name: webuiservice-public
  labels:
    app: webuiservice
spec:
  type: NodePort
  selector:
    app: webuiservice
  ports:
  - name: http
    protocol: TCP
    port: 8004
    targetPort: 8004
    nodePort: 30802
  - name: grafana
    protocol: TCP
    port: 3000
    targetPort: 3000
    nodePort: 30302
