apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: kiali
    chart: kiali
    heritage: Tiller
    release: istio
  name: kiali
  namespace: istio-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kiali
  template:
    metadata:
      annotations:
        prometheus.io/port: "9090"
        prometheus.io/scrape: "true"
        scheduler.alpha.kubernetes.io/critical-pod: ""
        sidecar.istio.io/inject: "false"
      labels:
        app: kiali
        chart: kiali
        heritage: Tiller
        release: istio
      name: kiali
    spec:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
            weight: 2
          - preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - ppc64le
            weight: 2
          - preference:
              matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - s390x
            weight: 2
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: beta.kubernetes.io/arch
                operator: In
                values:
                - amd64
                - ppc64le
                - s390x
      containers:
      - command:
        - /opt/kiali/kiali
        - -config
        - /kiali-configuration/config.yaml
        - -v
        - "4"
        env:
        - name: ACTIVE_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: PROMETHEUS_SERVICE_URL
          value: http://prometheus:9090
        - name: SERVER_WEB_ROOT
          value: /kiali
        image: docker.io/kiali/kiali:v0.16
        name: kiali
        resources:
          requests:
            cpu: 10m
        volumeMounts:
        - mountPath: /kiali-configuration
          name: kiali-configuration
        - mountPath: /kiali-secret
          name: kiali-secret
      serviceAccountName: kiali-service-account
      volumes:
      - configMap:
          name: kiali
        name: kiali-configuration
      - name: kiali-secret
        secret:
          optional: true
          secretName: kiali
