apiVersion: apps/v1
kind: Deployment
metadata:
  name: kiali
spec:
  replicas: 1
  selector:
    matchLabels:
      app: kiali
  template:
    metadata:
      annotations:
        kiali.io/runtimes: go,kiali
      labels:
        app: kiali
        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
          args:
            - "-config"
            - "/kiali-configuration/config.yaml"
          env:
            - name: ACTIVE_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          image: quay.io/kiali/kiali:v1.33.1
          imagePullPolicy: IfNotPresent
          livenessProbe:
            httpGet:
              path: /kiali/healthz
              port: 20001
              scheme: HTTP
            initialDelaySeconds: 5
            periodSeconds: 30
          name: kiali
          readinessProbe:
            httpGet:
              path: /kiali/healthz
              port: 20001
              scheme: HTTP
            initialDelaySeconds: 5
            periodSeconds: 30
          resources:
            requests:
              cpu: 10m
          volumeMounts:
            - mountPath: /kiali-configuration
              name: kiali-configuration
            - mountPath: /kiali-cert
              name: kiali-cert
            - mountPath: /kiali-secret
              name: kiali-secret
      serviceAccountName: kiali
      volumes:
        - configMap:
            name: kiali
          name: kiali-configuration
        - name: kiali-cert
          secret:
            optional: true
            secretName: istio.kiali
        - name: kiali-secret
          secret:
            optional: true
            secretName: kiali
