#@ load("@ytt:data", "data")
#@ load("lib/consts.star", "version", "deployment")

---
apiVersion: v1
kind: Service
metadata:
  labels:
    app.kubernetes.io/component: controller
    app.kubernetes.io/name: #@ data.values.app_name
    app.kubernetes.io/version: #@ version
  name: #@ "{}-service".format(data.values.app_name)
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/component: controller
    app.kubernetes.io/name: #@ data.values.app_name
  ports:
    - name: http
      port: 38080
      protocol: TCP
      targetPort: #@ deployment["containerPort"]
