---
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: emmental-platform
  name: frontend
spec:
  replicas: 1
  selector:
    matchLabels:
      app: emmental
      tier: frontend
      track: stable
  template:
    metadata:
      labels:
        app: emmental
        tier: frontend
        track: stable
    spec:
      containers:
        - name: front
          image: front
          imagePullPolicy: Never
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  namespace: emmental-platform
  name: front
spec:
  selector:
    app: emmental
    tier: frontend
  ports:
    - protocol: TCP
      port: 8080
      targetPort: 80
  type: ClusterIP
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  namespace: emmental-platform
  name: front-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  backend:
    serviceName: front
    servicePort: 8080
