apiVersion: maistra.io/v1
kind: ServiceMeshControlPlane
metadata:
  name: install-istio-system
spec:
  istio:
    global:
      hub: quay.io/maistra
      tag: latest-qe
      multitenant: true
      controlPlaneSecurityEnabled: false
      mtls:
        enabled: false
      imagePullSecrets:
        - maistra-kiali-pull-secret
      proxy:
        # constrain resources for use in smaller environments
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 500m
            memory: 128Mi
    
    istio_cni:
      enabled: true
  
    gateways:
      istio-egressgateway:
        # disable autoscaling for use in smaller environments
        autoscaleEnabled: false
      istio-ingressgateway:
        # disable autoscaling for use in smaller environments
        autoscaleEnabled: false
        type: ClusterIP
        ports:
        - port: 15020
          targetPort: 15020
          name: status-port
        - port: 80
          targetPort: 80
          name: http2
        - port: 443
          name: https
          # This is the port where sni routing happens
        - port: 15443
          targetPort: 15443
          name: tls
    mixer:
      policy:
        # disable autoscaling for use in smaller environments
        autoscaleEnabled: false

      telemetry:
        # disable autoscaling for use in smaller environments
        autoscaleEnabled: false
        # constrain resources for use in smaller environments
        resources:
          requests:
            cpu: 100m
            memory: 1G
          limits:
            cpu: 500m
            memory: 4G

    pilot:
      # disable autoscaling for use in smaller environments
      autoscaleEnabled: false
      # increase random sampling rate for development/testing
      traceSampling: 100.0

    kiali:
      # to disable kiali
      enabled: true
      hub: quay.io/kiali
      tag: v1.0.0
    
    # disable grafana
    grafana:
      enabled: true

     # to disable tracing (i.e. jaeger)
    tracing:
      enabled: true
      hub: docker.io/jaegertracing
      tag: 1.12.1
      jaeger:
        # simple, all-in-one strategy
        template: all-in-one

    threeScale:
      enabled: true
      hub: quay.io/3scale
      tag: 0.7.1