apiVersion: apps/v1
kind: Deployment
metadata:
  name: pvs-fe-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pvs-fe
  template:
    metadata:
      labels:
        app: pvs-fe
        azure.workload.identity/use: "true"
    spec:
      serviceAccountName: workload-identity-sa
      containers: 
      - name: pvs-fe
        image: omsapvsregistry.azurecr.io/pvs-is-fe:v42
        ports:
        - containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
  name: pvs-fe-service
spec:
  selector:
    app: pvs-fe
  ports:
  - name: http
    port: 80
    targetPort: 3000
  type: ClusterIP
---
apiVersion: v1
kind: ServiceAccount
metadata:
  annotations:
    azure.workload.identity/client-id: 8552dd26-64ae-4516-9158-4155cbdae449
  labels:
    azure.workload.identity/use: "true"
  name: workload-identity-sa
  namespace: pvs-uat
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: pvs-is-fe
spec:
  ingressClassName: nginx
  rules:
  - host: pvs-uat.woah.org
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: pvs-fe-service
            port:
              number: 80