apiMapping:
  Hub:
    outPath: "global.hub"
  Tag:
    outPath: "global.tag"
  K8SDefaults:
    outPath: "global.resources"
  DefaultNamespace:
    outPath: "global.istioNamespace"
  Values.Proxy:
    outPath: "global.proxy"
  ConfigManagement.Components.Namespace:
    outPath: "global.configNamespace"
  Policy.Components.Namespace:
    outPath: "global.policyNamespace"
  Telemetry.Components.Namespace:
    outPath: "global.telemetryNamespace"
  Security.Components.Namespace:
    outPath: "global.securityNamespace"
kubernetesMapping:
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.Affinity":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.affinity"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.Env":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.containers.[name:{{.ContainerName}}].env"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.HpaSpec":
    outPath: "[HorizontalPodAutoscaler:{{.ResourceName}}].spec"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.ImagePullPolicy":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.containers.[name:{{.ContainerName}}].imagePullPolicy"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.NodeSelector":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.nodeSelector"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.PodDisruptionBudget":
    outPath: "[PodDisruptionBudget:{{.ResourceName}}].spec"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.PodAnnotations":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.metadata.annotations"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.PriorityClassName":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.priorityClassName."
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.ReadinessProbe":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.containers.[name:{{.ContainerName}}].readinessProbe"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.ReplicaCount":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.replicas"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.Resources":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.containers.[name:{{.ContainerName}}].resources"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.Strategy":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.strategy"
  "{{.FeatureName}}.Components.{{.ComponentName}}.K8S.Tolerations":
    outPath: "[{{.ResourceType}}:{{.ResourceName}}].spec.template.spec.tolerations"
toFeature:
    crds:               Base
    Pilot:              TrafficManagement
    Galley:             ConfigManagement
    Injector:           AutoInjection
    Policy:             Policy
    Telemetry:          Telemetry
    Citadel:            Security
    CertManager:        Security
    NodeAgent:          Security
    IngressGateway:     Gateways
    EgressGateway:      Gateways
    Cni:                Cni
    Grafana:            ThirdParty
    Prometheus:         ThirdParty
    Tracing:            ThirdParty
    PrometheusOperator: ThirdParty
    Kiali:              ThirdParty
globalNamespaces:
  Pilot:      "istioNamespace"
  Galley:     "configNamespace"
  Telemetry:  "telemetryNamespace"
  Policy:     "policyNamespace"
  Prometheus: "prometheusNamespace"
  Citadel:    "securityNamespace"
featureMaps:
  Base:
    alwaysEnabled: true
    Components:
      - crds
  TrafficManagement:
    Components:
      - Pilot
  Policy:
    Components:
      - Policy
  Telemetry:
    Components:
      - Telemetry
  Security:
    Components:
      - Citadel
      - CertManager
      - NodeAgent
  ConfigManagement:
    Components:
      - Galley
  AutoInjection:
    Components:
      - Injector
  Gateways:
    Components:
      - IngressGateway
      - EgressGateway
  Cni:
    Components:
      - Cni
  ThirdParty:
    Components:
      - Grafana
      - Prometheus
      - Tracing
      - PrometheusOperator
      - Kiali

componentMaps:
  crds:
    ToHelmValuesTreeRoot: "global"
    HelmSubdir:           "crds"
    AlwaysEnabled:        true
  Pilot:
    ResourceType:         "Deployment"
    ResourceName:         "istio-pilot"
    ContainerName:        "discovery"
    HelmSubdir:           "istio-control/istio-discovery"
    ToHelmValuesTreeRoot: "pilot"
  Galley:
    ResourceType:         "Deployment"
    ResourceName:         "istio-galley"
    ContainerName:        "galley"
    HelmSubdir:           "istio-control/istio-config"
    ToHelmValuesTreeRoot: "galley"
  Injector:
    ResourceType:         "Deployment"
    ResourceName:         "istio-sidecar-injector"
    ContainerName:        "sidecar-injector-webhook"
    HelmSubdir:           "istio-control/istio-autoinject"
    ToHelmValuesTreeRoot: "sidecarInjectorWebhook"
  Policy:
    ResourceType:         "Deployment"
    ResourceName:         "istio-policy"
    ContainerName:        "mixer"
    HelmSubdir:           "istio-policy"
    ToHelmValuesTreeRoot: "mixer.policy"
  Telemetry:
    ResourceType:        "Deployment"
    ResourceName:         "istio-telemetry"
    ContainerName:        "mixer"
    HelmSubdir:           "istio-telemetry/mixer-telemetry"
    ToHelmValuesTreeRoot: "mixer.telemetry"
  Citadel:
    ResourceType:        "Deployment"
    ResourceName:         "istio-citadel"
    ContainerName:        "citadel"
    HelmSubdir:           "security/citadel"
    ToHelmValuesTreeRoot: "security"
  NodeAgent:
    ResourceType:         "DaemonSet"
    ResourceName:         "istio-nodeagent"
    ContainerName:        "nodeagent"
    HelmSubdir:           "security/nodeagent"
    ToHelmValuesTreeRoot: "nodeagent"
  CertManager:
    ResourceType:        "Deployment"
    ResourceName:         "certmanager"
    ContainerName:        "certmanager"
    HelmSubdir:           "security/certmanager"
    ToHelmValuesTreeRoot: "certmanager"
  IngressGateway:
    ResourceType:         "Deployment"
    ResourceName:         "istio-ingressgateway"
    ContainerName:        "istio-proxy"
    HelmSubdir:           "gateways/istio-ingress"
    ToHelmValuesTreeRoot: "gateways.istio-ingressgateway"
  EgressGateway:
    ResourceType:         "Deployment"
    ResourceName:         "istio-egressgateway"
    ContainerName:        "istio-proxy"
    HelmSubdir:           "gateways/istio-egress"
    ToHelmValuesTreeRoot: "gateways.istio-egressgateway"
  Cni:
    ResourceType:         "DaemonSet"
    ResourceName:         "istio-cni-node"
    ContainerName:        "install-cni"
    HelmSubdir:           "istio-cni"
    ToHelmValuesTreeRoot: "cni"
  Tracing:
    ResourceType:         "Deployment"
    ResourceName:         "istio-tracing"
    ContainerName:        "jaeger"
    HelmSubdir:           "istio-telemetry/tracing"
    ToHelmValuesTreeRoot: "tracing.jaeger"
  PrometheusOperator:
    ResourceType:         "Deployment"
    ResourceName:         "prometheus"
    ContainerName:        "prometheus"
    HelmSubdir:           "istio-telemetry/prometheusOperator"
    ToHelmValuesTreeRoot: "prometheus"
  Kiali:
    ResourceType:         "Deployment"
    ResourceName:         "kiali"
    ContainerName:        "kiali"
    HelmSubdir:           "istio-telemetry/kiali"
    ToHelmValuesTreeRoot: "kiali"
  Grafana:
    ResourceType:        "Deployment"
    ResourceName:         "grafana"
    ContainerName:        "grafana"
    HelmSubdir:           "istio-telemetry/grafana"
    ToHelmValuesTreeRoot: "grafana"
  Prometheus:
    ResourceType:         "Deployment"
    ResourceName:         "prometheus"
    ContainerName:        "prometheus"
    HelmSubdir:           "istio-telemetry/prometheus"
    ToHelmValuesTreeRoot: "prometheus"
