# Source: troubleshoot/templates/pre-install.yaml
apiVersion: v1
kind: Secret
metadata:
  annotations:
    "helm.sh/hook": pre-install, pre-upgrade
    "helm.sh/hook-weight": "-6"
    "helm.sh/hook-delete-policy": before-hook-creation, hook-succeeded, hook-failed
  labels:
    app.kubernetes.io/managed-by: "Helm"
    app.kubernetes.io/instance: "release-name"
    app.kubernetes.io/version: 0.62.1
    helm.sh/chart: "troubleshoot-0.1.0"
    troubleshoot.sh/kind: preflight
  name: "release-name-preflight-config"
stringData:
  preflight.yaml: |    
    apiVersion: troubleshoot.sh/v1beta2
    kind: Preflight
    metadata:
      name: preflight-sample
    spec:
    
      analyzers:
        - nodeResources:
            checkName: Node Count Check
            outcomes:
              - fail:
                  when: 'count() > 3'
                  message: "The cluster has more than 3 nodes."
              - pass:
                  message: You have the correct number of nodes.
        - clusterVersion:
            outcomes:
              - fail:
                  when: "< 1.16.0"
                  message: The application requires at least Kubernetes 1.16.0, and recommends 1.18.0.
                  uri: https://kubernetes.io
              - warn:
                  when: "< 1.18.0"
                  message: Your cluster meets the minimum version of Kubernetes, but we recommend you update to 1.18.0 or later.
                  uri: https://kubernetes.io
              - pass:
                  message: Your cluster meets the recommended and required versions of Kubernetes.
