apiVersion: apps/v1
kind: Deployment
metadata:
  name: front-envoy
spec:
  selector:
    matchLabels:
      app: front-envoy
      version: v1
  replicas: 1
  template:
    metadata:
      labels:
        app: front-envoy
        version: v1
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: edgenode
                operator: In
                values:
                - "true"
      hostNetwork: true
      tolerations:
      - operator: Exists
        effect: NoSchedule
      dnsPolicy: ClusterFirstWithHostNet
      restartPolicy: Always
      containers:
      - name: front-envoy
        image: registry.cn-shanghai.aliyuncs.com/istio-lab/envoy:v1
        ports:
        - containerPort: 80
        - containerPort: 443
        - containerPort: 1883
        - containerPort: 15672
        - containerPort: 15675
        - containerPort: 5672
        volumeMounts:
        - name: front-envoy
          mountPath: /etc/front-envoy.yaml
          subPath: front-envoy.yaml
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
          limits:
            cpu: 200m
            memory: 200Mi
      volumes:
        - name: front-envoy
          configMap:
            name: front-envoy
