apiVersion: xl/v2
kind: Blueprint
metadata:
  name: XL UP
  description: |
    This blueprint deploys XL Deploy, XL Release, and XL-k8s-foundation into an existing Kubernetes installation (local single-node Kubernetes, on-premises multi-node Kubernetes cluster, or Amazon EKS cluster).
  author: XebiaLabs
  version: 1.0
spec:
  parameters:
    - name: UseCustomRegistry
      type: Confirm
      prompt: "Do you want to use custom Docker Registry and custom images?"
      default: false
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "When running in a segregated network setup you may have downloaded the official Xebialabs docker containers and pushed them into your private docker registry. Another use case is when you have created a custom Xebialabs docker container for having additional plugins, extensions or java libraries, like jdbc drivers to connect to external databases, and pushed these custom container to your custom docker registry. It might be necessary to specify a custom internal Docker registry to pull the XebiaLabs Devops Platform images from."

    - name: RegistryURL
      type: Input
      prompt: "Enter your Docker registry URL and organization:"
      promptIf: !expr "UseCustomRegistry"
      default: "docker.io/xebialabs"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "When using a custom Docker registry, enter the URL of that registry here. If the the docker registry you are using is Dockerhub then your registry url will look like: docker.io/MY_COMPANY. If you have an internal docker registry then it may look like: xl-docker.xebialabs.com"
      validate: !expr "regex('[a-zA-Z0-9][a-zA-Z0-9-._/]*', RegistryURL)"

    - name: DockerUser
      type: Input
      prompt: "Enter your Docker Registry username:"
      promptIf: !expr "UseCustomRegistry"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      allowEmpty: true
      description: "When using a custom Docker registry that requires authentication, pass that username in here"

    - name: DockerPass
      type: SecretInput
      prompt: "Enter your Docker Registry password:"
      promptIf: !expr "UseCustomRegistry"
      saveInXlvals: true
      ignoreIfSkipped: true
      replaceAsIs: true
      overrideDefault: true
      allowEmpty: true
      description: "When using a custom Docker registry that requires authentication, pass that password in here"

    - name: UseExistingStorageClasses
      type: Confirm
      prompt: "Do you want to use existing storage classes from your kubernetes cluster?"
      default: false
      promptIf: !expr "K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "xl up will create storage classes into your kubernetes cluster. Type yes in this question if yoiu want to use storage classes that already exist in your kuberenetes cluster."

    - name: StorageClassName
      type: Input
      prompt: "Please enter the name of the storage class that can be used for non-shared storage"
      promptIf: !expr "UseExistingStorageClasses"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "Enter the name of the storage class that can be used for volumes with ReadWriteOnce accessMode"

    - name: SharedStorageClassName
      type: Input
      prompt: "Please enter the name of the storage class to be used for storage shared between pods"
      promptIf: !expr "UseExistingStorageClasses"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "Enter the name of the storage class that can be used for volumes with ReadWriteMany accessMode. This storage class can be used also for ReadWriteOnce accessMode but may impact performance in some cases"

    - name: UseCustomRegistryForAllImages
      type: Confirm
      prompt: "Do you want to use the provided custom Docker Registry for all docker images used by xl-up?"
      promptIf: !expr "UseCustomRegistry"
      default: false
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "When running in a segregated network setup you may have downloaded the docker containers and pushed them into your private docker registry. If this is the case the image name and tag needs to be the same as ours which you will find documented on docs.xebialabs.com."

    - name: IsHybridCluster
      type: Confirm
      prompt: "Is this a hybrid cluster?"
      promptIf: !expr "K8sSetup == 'AwsEKS' || K8sSetup == 'GoogleGKE' || K8sSetup == 'AzureAKS'"
      default: true
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "If the target cluster contains both linux and windows nodes"

    - name: UseExternalIngress
      type: Confirm
      prompt: "Do you want to use existing ingress controller from your kubernetes cluster?"
      promptIf: !expr "K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: false
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "Use an existing ingress controllers that already present in your Kubernetes cluster. XL Up will not deploy any ingress controllers, load balancer or ingress rules. This resources has to be created by the user. Follow the documentation for more information"

    - name: UseInternalLoadBalancer
      type: Confirm
      prompt: "Do you want to use an internal load balancer"
      promptIf: !expr "(K8sSetup == 'AwsEKS' || K8sSetup == 'GoogleGKE' || K8sSetup == 'AzureAKS') && !UseExternalIngress"
      default: true
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "Use an internal (private) load balancer instead of a external (public) load balancer to access the services built by up"

    - name: InstallXLD
      type: Confirm
      prompt: "Would you like to install XL Deploy?"
      default: true
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "Whether or not you would like to install XL Deploy"

    - name: XldDeploymentTimeout
      type: Input
      allowEmpty: true
      value: !expr "InstallXLD ? '120' : ''"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "Timeout interval of XL Deploy masters and workers deployment. The value of this parameter is the number of retries until readiness probe check passes and not the number of seconds. The interval between each try is 5 seconds"

    - name: XldOfficialVersion
      type: Select
      prompt: "Choose the version of the XL Deploy:"
      promptIf: !expr "!UseCustomRegistry && InstallXLD"
      options:
        - !expr "version('_showapplicableversions', 'xld')"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The version of both XL Deploy you would like to install"

    - name: XldVersion
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter your custom XL Deploy image and tag:"
      promptIf: !expr "UseCustomRegistry && InstallXLD"
      validate: !expr "version('checkversion', 'xld', XldVersion)"
      overrideDefault: true
      description: "This will be the XL Deploy docker image and tag that lives in your private docker registry. For example xl-deploy:9.0.3 . When using custom xebialabs docker images from your own private docker registry make sure that the tag follows Semantic Versioning (https://semver.org/)"

      # This question will not be asked but used to extract the tag information which will be used as version
    - name: XldTag
      type: Input
      value: !expr "(UseCustomRegistry && InstallXLD) ? version('getversionfromtag', XldVersion) : ''"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "Enter the XLD custom image:"

    - name: InstallXLR
      type: Confirm
      prompt: "Would you like to install XL Release?"
      default: true
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "Whether or not you would like to install XL Release"

    - name: XlrDeploymentTimeout
      type: Input
      allowEmpty: true
      value: !expr "InstallXLR ? '120' : ''"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "Timeout interval of XL Release nodes deployment. The value of this parameter is the number of retries until readiness probe check passes and not the number of seconds. The interval between each try is 5 seconds "

    - name: XlrOfficialVersion
      type: Select
      prompt: "Choose the version of the XL Release:"
      promptIf: !expr "!UseCustomRegistry && InstallXLR"
      options:
        - !expr "version('_showapplicableversions', 'xlr')"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The version of both XL Release you would like to install"

    - name: XlrVersion
      type: Input
      prompt: "Enter your custom XL Release image and tag:"
      promptIf: !expr "UseCustomRegistry && InstallXLR"
      validate: !expr "version('checkversion', 'xlr', XlrVersion)"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "This will be the XL Release docker image and tag that lives in your private docker registry. For example xl-release:9.0.3 . When using custom xebialabs docker images from your own private docker registry make sure that the tag follows Semantic Versioning (https://semver.org/)"

      # This question will not be asked but used to extract the tag information which will be used as version
    - name: XlrTag
      type: Input
      value: !expr "(UseCustomRegistry && InstallXLR) ? version('getversionfromtag', XlrVersion) : ''"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "Enter the XLR custom image:"

    - name: ExternalDatabase
      type: Confirm
      prompt: "Would you like to use an external database?"
      default: false
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "xl up will deploy by default a Postgresql instance within your Kubernetes installation save the data of XL Deploy or XL Release. If you want to use your own existing Database then type yes in this question. Make sure that your Database is reachable within the Kubernetes cluster. If you want to use Oracle or DB2 then you must also provide custom docker images for XL Deploy and XL Release with appropriate jdbc driver included."

    - name: XldAdminPass
      type: SecretInput
      prompt: "Enter the password that you want to use for the XL Deploy admin user:"
      promptIf: !expr "InstallXLD"
      default: !expr "randPassword()"
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      replaceAsIs: true
      description: "The password that you would like to use for the XL Deploy admin user"

    - name: XldMasterCount
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the number of XL Deploy masters to spin up"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: 2
      description: "XL Deploy can be started up in an active-active setup. This means there can be many 'masters' to coordinate tasks across an arbitrary amount of 'workers'. This setting defines the preferred number of masters to spin up"
      validate: !expr "regex('[0-9]+', XldMasterCount)"

    - name: XldMasterRAMRequest
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired RAM requests for the XL Deploy Master pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "1600Mi"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XldMasterRAMRequest)"
      description: "This field sets the amount of RAM you would like the XL Deploy Master pods to have requested in the Kubernetes cluster"

    - name: XldMasterRAMLimit
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired RAM limit for the XL Deploy Master pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "6Gi"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XldMasterRAMLimit)"
      description: "This field sets the amount of RAM you would like the XL Deploy Master pods to be limited to in the Kubernetes cluster"

    - name: XldMasterCPURequest
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired CPU requests for the XL Deploy Master pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "0.7"
      validate: !expr "regex('\\\\d*\\\\.?\\\\d+m?', XldMasterCPURequest)"
      description: "This field sets the amount of CPU you would like the XL Deploy Master pods to have requested in the Kubernetes cluster"

    - name: XldMasterCPULimit
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired CPU limit for the XL Deploy Master pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "3"
      validate: !expr "regex('\\\\d*\\\\.?\\\\d+m?', XldMasterCPULimit)"
      description: "This field sets the amount of CPU you would like the XL Deploy Master pods to be limited to in the Kubernetes cluster"

    - name: XldWorkerCount
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the number of XL Deploy workers to spin up"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: 2
      description: "XL Deploy can be started up in an active-active setup. This means there can be many 'workers' to execute deployment tasks. This setting defines the preferred number of workers to spin up"
      validate: !expr "regex('[0-9]+', XldWorkerCount)"

    - name: XldWorkerRAMRequest
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired RAM requests for the XL Deploy Worker pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "1600Mi"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XldWorkerRAMRequest)"
      description: "This field sets the amount of RAM you would like the XL Deploy Worker pods to have requested in the Kubernetes cluster"

    - name: XldWorkerRAMLimit
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired RAM limit for the XL Deploy Worker pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "6Gi"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XldWorkerRAMLimit)"
      description: "This field sets the amount of RAM you would like the XL Deploy Worker pods to be limited to in the Kubernetes cluster"

    - name: XldWorkerCPURequest
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired CPU requests for the XL Deploy Worker pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "0.7"
      validate: !expr "regex('\\\\d*\\\\.?\\\\d+m?', XldWorkerCPURequest)"
      description: "This field sets the amount of CPU you would like the XL Deploy Worker pods to have requested in the Kubernetes cluster"

    - name: XldWorkerCPULimit
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired CPU limit for the XL Deploy Worker pods"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "3"
      validate: !expr "regex('\\\\d*\\\\.?\\\\d+m?', XldWorkerCPULimit)"
      description: "This field sets the amount of CPU you would like the XL Deploy Worker pods to be limited to in the Kubernetes cluster"

    - name: XldExportPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter the desired persistent volume size for XL Deploy export directory"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "10Gi"
      description: "This field sets the  persistent volume size for XL Deploy export directory. The export directory is the place where XL Deploy temporarily will save files needed for CI export and reports."
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XldExportPvcSize)"

    - name: XldWorkPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter the desired persistent volume size for XL Deploy work directory"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "5Gi"
      description: "This field sets the  persistent volume size for XL Deploy work directory. The work directory is used to temporarily store data that cannot be kept in memory."
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XldWorkPvcSize)"

    - name: XldLic
      type: SecretFile
      prompt: "Enter the full path to the XL Deploy license file:"
      promptIf: !expr "InstallXLD"
      replaceAsIs: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "The local path to an XL Deploy license file"

    - name: XldDbUrl
      type: Input
      prompt: "Enter the JDBC url of the database where XL Deploy will save its repository data:"
      promptIf: !expr "ExternalDatabase && InstallXLD"
      default: jdbc:postgresql://postgresql:5432/xl-deploy
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "The JDBC url for your external database. Note that it should include also the db name which you have already created in your Database instance for XL Deploy. For example in case you have an external Postgresql instance  this parameter should look like: jdbc:postgresql://DB_HOSTNAME_OR_IP:PORT/XL_DEPLOY_DB_NAME"
      validate: !expr "regex('jdbc:\\\\w+:\\\\/\\\\/\\\\S+(:\\\\d+)?\\\\/?\\\\S*', XldDbUrl)"

    - name: XldDbName
      type: Input
      prompt: "Enter your XL Deploy database name:"
      promptIf: !expr "!ExternalDatabase && InstallXLD"
      default: xl-deploy
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "This will be the XL Deploy database name that xl up will create in the  Postgresql instance that will be provisioned in your Kubernetes cluster"

    - name: XldDbUser
      type: Input
      prompt: "Enter your XL Deploy database username:"
      promptIf: !expr "InstallXLD"
      default: sa
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: !expr "ExternalDatabase"
      description: "The database username you want to use when using an external database, or the user to create when choosing to use an in-cluster Posgresql database, that will be associated with XL Deploy"

    - name: XldDbPass
      type: SecretInput
      prompt: "Enter your XL Deploy database password:"
      promptIf: !expr "InstallXLD"
      default: !expr "randPassword()"
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      replaceAsIs: true
      overrideDefault: !expr "ExternalDatabase"
      description: "The database password you want to use when using an external database, or the user to create when choosing to use an in-cluster Posgresql database, that will be associated with XL Deploy"

    - name: RabbitMQExternal
      type: Confirm
      prompt: Would you like to use an existing RabbitMQ/ActiveMQ server for XL Deploy?
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: false
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "If you already have an existing RabbitMQ or ActiveMQ server, it is recommended to set this to TRUE and provide a connection string for that server. Otherwise, you can choose to have xl up create a RabbitMQ instance for you"

    - name: RabbitMQUrl
      type: Input
      prompt: "Specify the URL of your RabbitMQ/ActiveMQ instance"
      promptIf: !expr "RabbitMQExternal && InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: 'The connection URL of your pre-existing RabbitMQ or ActiveMQ instance, including the prefix "amqp://"'
      validate: !expr "regex('amqp:\\\\/\\\\/\\\\S+(:\\\\d+)?\\\\/?\\\\S*', RabbitMQUrl)"

    - name: RabbitMQDriver
      type: Select
      options:
        - label: RabbitMQ
          value: com.rabbitmq.jms.admin.RMQConnectionFactory
        - label: ActiveMQ
          value: org.apache.activemq.ActiveMQConnectionFactory
      prompt: "Select the type of driver you need to use to connect to your external MQ instance"
      promptIf: !expr "RabbitMQExternal && InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "com.rabbitmq.jms.admin.RMQConnectionFactory"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "This options selects the driver that XL Deploy will use to connect to your external MQ instance"

    - name: RabbitMQUsername
      type: Input
      prompt: "Specify the username for the default RabbitMQ user"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "guest"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: !expr "RabbitMQExternal"
      description: "The username to use for the main administrator user for this RabbitMQ instance"

    - name: RabbitMQPassword
      type: SecretInput
      prompt: "Specify the password for the default RabbitMQ user"
      default: !expr "randPassword()"
      promptIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      replaceAsIs: true
      overrideDefault: !expr "RabbitMQExternal"
      description: "The password to use for the main administrator user for this RabbitMQ instance"

    - name: XlrAdminPass
      type: SecretInput
      prompt: "Enter the password that you want to use for the XL Release admin user:"
      promptIf: !expr "InstallXLR"
      default: !expr "randPassword()"
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      replaceAsIs: true
      description: "The password that you would like to use for the  XL Release admin user"

    - name: XlrLic
      type: SecretFile
      prompt: "Enter the full path to the XL Release license file:"
      promptIf: !expr "InstallXLR"
      replaceAsIs: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "The local path to an XL Release license file"

    - name: XlrDbUrl
      type: Input
      prompt: "Enter the JDBC url of the database where XL Release will save its repository data:"
      promptIf: !expr "ExternalDatabase && InstallXLR"
      default: jdbc:postgresql://postgresql:5432/xl-release
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "The JDBC url for your external database. Note that it should include also the db name which you have already created in your Database instance for XL Release repository. For example in case you have an external Postgresql instance  this parameter should look like: jdbc:postgresql://DB_HOSTNAME_OR_IP:PORT/XL_RELEASE_DB_NAME"
      validate: !expr "regex('jdbc:\\\\w+:\\\\/\\\\/\\\\S+(:\\\\d+)?\\\\/?\\\\S*', XlrDbUrl)"

    - name: XlrDbName
      type: Input
      prompt: "Enter your XL Release database name:"
      promptIf: !expr "!ExternalDatabase && InstallXLR"
      default: xl-release
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "This will be the XL Release repository database name that xl up will create in the  Postgresql instance that will be provisioned in your Kubernetes cluster"

    - name: XlrDbUser
      type: Input
      prompt: "Enter your XL Release database username:"
      promptIf: !expr "InstallXLR"
      default: xl-release
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: !expr "ExternalDatabase"
      description: "The database username you want to use when using an external database, or the user to create when choosing to use an in-cluster database, that will be associated with XL Release"

    - name: XlrDbPass
      type: SecretInput
      prompt: "Enter your XL Release database password:"
      promptIf: !expr "InstallXLR"
      default: !expr "randPassword()"
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      replaceAsIs: true
      overrideDefault: !expr "ExternalDatabase"
      description: "The database password you want to use when using an external database, or the user to create when choosing to use an in-cluster database, that will be associated with XL Release"

    - name: XlrReportDbUrl
      type: Input
      prompt: "Enter the JDBC url of the database where XL Release will save its reporting data:"
      promptIf: !expr "ExternalDatabase && InstallXLR"
      default: jdbc:postgresql://postgresql:5432/xl-release-report
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "The JDBC url for your external database. Note that it should include also the db name which you have already created in your Database instance for XL Release reporting . For example in case you have an external Postgresql instance  this parameter should look like: jdbc:postgresql://DB_HOSTNAME_OR_IP:PORT/XL_RELEASE_REPORTING_DB_NAME"
      validate: !expr "regex('jdbc:\\\\w+:\\\\/\\\\/\\\\S+(:\\\\d+)?\\\\/?\\\\S*', XlrReportDbUrl)"

    - name: XlrReportDbName
      type: Input
      prompt: "Enter your XL Release report database name:"
      promptIf: !expr "!ExternalDatabase && InstallXLR"
      default: xl-release-report
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "This will be the XL Release reporting database name that xl up will create in the  Postgresql instance that will be provisioned in your Kubernetes cluster"

    - name: XlrReportDbUser
      type: Input
      prompt: "Enter your XL Release report database username:"
      promptIf: !expr "InstallXLR"
      default: xl-release-report
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: !expr "ExternalDatabase"
      description: "The database username you want to use when using an external database, or the user to create when choosing to use an in-cluster database, that will be associated with XL Release's Reporting Database"

    - name: XlrReportDbPass
      type: SecretInput
      prompt: "Enter your XL Release report database password:"
      promptIf: !expr "InstallXLR"
      default: !expr "randPassword()"
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      replaceAsIs: true
      overrideDefault: !expr "ExternalDatabase"
      description: "The database password you want to use when using an external database, or the user to create when choosing to use an in-cluster database, that will be associated with XL Release's Reporting Database"

    - name: XlrRAMRequest
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired RAM request for the XL Release pods"
      promptIf: !expr "InstallXLR && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "1700Mi"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XlrRAMRequest)"
      description: "This field sets the amount of RAM you would like the XL Release pods to be requested  in the Kubernetes cluster"

    - name: XlrRAMLimit
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired RAM limit for the XL Release pods"
      promptIf: !expr "InstallXLR && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "6Gi"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XlrRAMLimit)"
      description: "This field sets the amount of RAM you would like the XL Release pods to be limited to in the Kubernetes cluster"

    - name: XlrCPURequest
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired CPU requests for the XL Release pods"
      promptIf: !expr "InstallXLR && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "0.7"
      validate: !expr "regex('\\\\d*\\\\.?\\\\d+m?', XlrCPURequest)"
      description: "This field sets the amount of CPU you would like the XL Release pods to have requested in the Kubernetes cluster"

    - name: XlrCPULimit
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Enter the desired CPU limit for the XL Release pods"
      promptIf: !expr "InstallXLR && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "3"
      validate: !expr "regex('\\\\d*\\\\.?\\\\d+m?', XlrCPULimit)"
      description: "This field sets the amount of CPU you would like the XL Release pods to have limited to in the Kubernetes cluster"

    - name: XlrReportsPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter the desired persistent volume size for XL Release reports directory"
      promptIf: !expr "InstallXLR && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: "5Gi"
      description: "This field sets the  persistent volume size for XL Release reports directory. The reports directory is used to  store data for the Release audit report feature."
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', XlrReportsPvcSize)"

    - name: XlKeyStore
      type: SecretFile
      prompt: "Enter the full path to your XebiaLabs keystore:"
      replaceAsIs: true
      ignoreIfSkipped: true
      description: "The local path to a JCEKS keystore to use in the XebiaLabs Devops Platform. This facilitates encryption of passwords and secrets in XL Deploy or XL Release. You can use keytool to generate a keystore, for example: keytool -genseckey -alias deployit-passsword-key -keyalg aes -keysize 128 -keypass deployit -keystore /tmp/repository-keystore.jceks -storetype jceks -storepass test123"

    - name: XlKeyStorePass
      type: SecretInput
      prompt: "Enter your XebiaLabs keystore password:"
      saveInXlvals: true
      ignoreIfSkipped: true
      replaceAsIs: true
      description: "The password of the provided keystore"

    - name: EfsId
      type: Input
      prompt: "Enter your Amazon EFS ID:"
      promptIf: !expr "K8sSetup == 'AwsEKS' && !UseExistingStorageClasses"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The ID of the AWS EFS instance which will be used for creating Kubernetes volumes for the shared folders of XL Deploy (work and export directories) or XL Release (export folder). Make sure that the your AWS EFS instance can be mounted in the nodes of your AWS EKS cluster"

    - name: EfsRegion
      type: Input
      prompt: "Enter your Amazon EFS region:"
      promptIf: !expr "K8sSetup == 'AwsEKS' && !UseExistingStorageClasses"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The region where your AWS EFS instance is created, for example 'eu-west-1'"

    - name: NfsServerHost
      type: Input
      prompt: "Enter your NFS server name or IP address:"
      promptIf: !expr "(K8sSetup == 'PlainK8SCluster' || K8sSetup == 'GoogleGKE') && !UseExistingStorageClasses"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The IP address of the NFS server which will be used for creating Kubernetes volumes for the shared folders of XL Deploy (work and export directories) or XL Release (export folder). Make sure that the your NFS instance can be reached from nodes of your Kubernetes cluster"
      validate: !expr "regex('(([2]([0-4][0-9]|[5][0-5])|[0-1]?[0-9]?[0-9])[.]){3}(([2]([0-4][0-9]|[5][0-5])|[0-1]?[0-9]?[0-9]))', NfsServerHost)"


    - name: NfsSharePath
      type: Input
      prompt: "Enter your NFS share path:"
      promptIf: !expr "(K8sSetup == 'PlainK8SCluster' || K8sSetup == 'GoogleGKE') && !UseExistingStorageClasses"
      saveInXlvals: true
      ignoreIfSkipped: true
      validate: !expr "isValidAbsPath(NfsSharePath)"
      description: "The share path on the NFS instance that which will be used for creating Kubernetes volumes for the shared folders of XL Deploy (work and export directories) or XL Release (export folder). For example: /xebialabs-share , make sure you type in the forward slash"

    - name: MonitoringInstall
      type: Confirm
      prompt: "Do you want to install monitoring?"
      promptIf: !expr "K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: !expr "K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      description: "Whether or not to install monitoring utilities (ElasticSearch, Kibana, Grafana, FluentD, Kube State Metric server and Prometheus) in your cluster"

    - name: MonitoringGrafanaDashboardsPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter the desired persistent volume size for Grafana dashboards"
      promptIf: !expr "MonitoringInstall"
      default: "5Gi"
      description: "This field sets the  persistent volume size for Grafana. This is the persistent volume where Grafana will persist the data for the dashboards"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', MonitoringGrafanaDashboardsPvcSize)"


    - name: MonitoringPrometheusDataPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter the desired persistent volume size for Prometheus"
      promptIf: !expr "MonitoringInstall"
      default: "20Gi"
      description: "This field sets the  persistent volume size for Prometheus. This is the persistent volume where Prometheus will persist the data"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', MonitoringPrometheusDataPvcSize)"


    - name: MonitoringElasticsearchDataPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter the desired persistent volume size for Elasticsearch"
      promptIf: !expr "MonitoringInstall"
      default: "50Gi"
      description: "This field sets the  persistent volume size for Elasticsearch. This is the persistent volume where Elasticsearch will persist the data"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', MonitoringElasticsearchDataPvcSize)"

    - name: MonitoringDataRetention
      type: Input
      prompt: "How many days do you want to keep the monitoring data?"
      promptIf: !expr "MonitoringInstall"
      default: 7
      ignoreIfSkipped: true
      description: "How long to retain monitoring data for"
      validate: !expr "regex('[0-9]+', MonitoringDataRetention)"

    - name: MonitoringUser
      type: Input
      prompt: "What is the username for the monitoring user?"
      promptIf: !expr "MonitoringInstall && !UseExternalIngress"
      default: admin
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The username to use for accessing Grafana and Kibana"

    - name: MonitoringUserPass
      type: SecretInput
      prompt: "What is the password for the monitoring user?"
      promptIf: !expr "MonitoringInstall && !UseExternalIngress"
      default: !expr "randPassword()"
      replaceAsIs: true
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      description: "The password to use for accessing Grafana and Kibana"

    - name: GrafanaUser
      type: Input
      prompt: "What is the username for the Grafana user?"
      promptIf: !expr "MonitoringInstall && UseExternalIngress"
      default: admin
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The username to use for accessing Grafana"

    - name: GrafanaUserPass
      type: SecretInput
      prompt: "What is the password for the Grafana user?"
      promptIf: !expr "MonitoringInstall && UseExternalIngress"
      default: !expr "randPassword()"
      replaceAsIs: true
      saveInXlvals: true
      ignoreIfSkipped: true
      revealOnSummary: true
      description: "The password to use for accessing Grafana"

    - name: PostgresqlDataPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Enter the desired persistent volume size for Postgresql database"
      promptIf: !expr "!ExternalDatabase && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
      default: !expr "ExternalDatabase ? '' :  '50Gi'"
      description: "This field sets the  persistent volume size for Postgresql database. This is the persistent volume where Postgresql will persist the data"
      validate: !expr "regex('\\\\d+\\\\.?\\\\d*[G|M]i', PostgresqlDataPvcSize)"

    - name: PostgresMaxConn
      type: Input
      prompt: "Specify the max_connections parameter for PostgreSQL:"
      promptIf: !expr "!ExternalDatabase"
      default: !expr "ExternalDatabase ? '' :  '512'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The maximum number of connections to allow on the installed PostgreSQL instance. This should always be above 50"
      validate: !expr "regex('[0-9]{2,}', PostgresMaxConn) && PostgresMaxConn > 50"

    - name: PostgresSharedBuff
      type: Input
      prompt: "Specify the shared_buffers parameter for PostgreSQL:"
      promptIf: !expr "!ExternalDatabase"
      default: !expr "ExternalDatabase ? '' :  '512MB'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The amount of system buffer space to allocate to the PostgreSQL instance"
      validate: !expr "regex('\\\\d+[G|M]B', PostgresSharedBuff)"

    - name: PostgresEffectCacheSize
      type: Input
      prompt: "Specify the effective_cache_size parameter for PostgreSQL:"
      promptIf: !expr "!ExternalDatabase"
      default: !expr "ExternalDatabase ? '' :  '1GB'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The amount of cache space to allocate to the PostgreSQL instance"
      validate: !expr "regex('\\\\d+[G|M]B', PostgresEffectCacheSize)"

    - name: PostgresSyncCommit
      type: Input
      prompt: "Specify the synchronous_commit parameter for PostgreSQL:"
      promptIf: !expr "!ExternalDatabase"
      default: !expr "ExternalDatabase ? '' :  'off'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "Turn on if you want synchronous commits in PostgreSQL"

    - name: PostgresMaxWallSize
      type: Input
      prompt: "Specify the max_wal_size parameter for PostgreSQL:"
      promptIf: !expr "!ExternalDatabase"
      default: !expr "ExternalDatabase ? '' :  '256MB'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "The maximum size the WAL can reach before being flushed"
      validate: !expr "regex('\\\\d+[G|M]B', PostgresMaxWallSize)"

    - name: AnswersConfigmapHash
      value: !expr "md5HashOfAnswersNotIncluding('XldAdminPass', 'XlrAdminPass', 'MonitoringUserPass', RabbitMQExternal ? '' : 'RabbitMQPassword', ExternalDatabase ? '' : 'XldDbPass', ExternalDatabase ? '' : 'XlrDbPass', ExternalDatabase ? '' : 'XlrReportDbPass', UseExternalIngress ? '' : 'GrafanaUserPass', UseExternalIngress ? '' : 'GrafanaUserPass', 'UseCustomRegistryForAllImages', 'RegistryURL', 'DockerUser', 'DockerPass')"
      description: "A unique hash based on the answers to ensure config map is deployed on update"
      ignoreIfSkipped: true

    - name: XLDVersionHash
      value: !expr "md5HashOfAnswersIncluding('UseCustomRegistry', 'RegistryURL', 'XldTag', 'XldOfficialVersion', 'XldVersion', 'XldMasterCount', 'XldMasterRAMRequest', 'XldMasterRAMLimit', 'XldMasterCPURequest', 'XldMasterCPULimit', 'XldWorkerCount','XldWorkerRAMRequest', 'XldWorkerRAMLimit', 'XldWorkerCPURequest', 'XldWorkerCPULimit', 'XldLic', 'XldDbUrl', 'XldDbUser', 'XldDbPass',
      'RabbitMQUrl', 'RabbitMQDriver', 'RabbitMQUsername', 'RabbitMQPassword')"
      description: "A unique hash based on the answers to ensure XLD is deployed on update"
      ignoreIfSkipped: true

    - name: XLRVersionHash
      value: !expr "md5HashOfAnswersIncluding('UseCustomRegistry', 'RegistryURL', 'XlrTag', 'XlrOfficialVersion', 'XlrVersion', 'XlrLic', 'XlrDbUrl', 'XlrDbUser', 'XlrDbPass', 'XlrReportDbUrl', 'XlrReportDbUser', 'XlrReportDbPass', 'XlrRAMRequest', 'XlrRAMLimit', 'XlrCPURequest', 'XlrCPULimit')"
      description: "A unique hash based on the answers to ensure XLR is deployed on update"
      ignoreIfSkipped: true

  files:
    #xl-k8s-foundation
    - path: xebialabs/xl-k8s-foundation.yaml.tmpl
    - path: xebialabs/kubernetes/xl-k8s-foundation/ha-proxy-ingress-controller/ingress-controller.yaml.tmpl
      writeIf: !expr "!UseExternalIngress"
    - path: xebialabs/kubernetes/xl-k8s-foundation/ha-proxy-ingress-controller/service-l7.yaml.tmpl
      writeIf: !expr "(K8sSetup == 'AwsEKS' || K8sSetup == 'GoogleGKE' || K8sSetup == 'AzureAKS') && !UseExternalIngress"
    - path: xebialabs/kubernetes/xl-k8s-foundation/ha-proxy-ingress-controller/default-backend.yaml.tmpl
      writeIf: !expr "!UseExternalIngress"
    - path: xebialabs/kubernetes/xl-k8s-foundation/xebialabs-service-internal.yaml.tmpl
      writeIf: !expr "!UseExternalIngress"
    - path: xebialabs/kubernetes/xl-k8s-foundation/aws-gp2-storageclass.yaml.tmpl
      writeIf: !expr "K8sSetup == 'AwsEKS' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/gcp-pd-retain-storageclass.yaml.tmpl
      writeIf: !expr "K8sSetup == 'GoogleGKE' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/azurefile-storageclass.yaml.tmpl
      writeIf: !expr "K8sSetup == 'AzureAKS' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/azuredisk-retain-storage.yaml.tmpl
      writeIf: !expr "K8sSetup == 'AzureAKS' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/dockercred.yaml.tmpl
      writeIf: !expr "UseCustomRegistry"
    - path: xebialabs/kubernetes/xl-k8s-foundation/postgresql/xl-postgresql.yaml.tmpl
      writeIf: !expr "!ExternalDatabase"
    - path: xebialabs/kubernetes/xl-k8s-foundation/nfs-client-provisioner/rbac.yaml.tmpl
      writeIf: !expr "(K8sSetup == 'PlainK8SCluster' || K8sSetup == 'GoogleGKE') && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/nfs-client-provisioner/deployment.yaml.tmpl
      writeIf: !expr "(K8sSetup == 'PlainK8SCluster' || K8sSetup == 'GoogleGKE') && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/nfs-client-provisioner/storageclass.yaml.tmpl
      writeIf: !expr "(K8sSetup == 'PlainK8SCluster' || K8sSetup == 'GoogleGKE') && !UseExistingStorageClasses"
    #xl-deploy
    - path: xebialabs/xl-deploy.yaml.tmpl
      writeIf: !expr InstallXLD
    - path: xebialabs/kubernetes/xl-deploy/local-db/xld-deployment-single-node.yaml.tmpl
      writeIf: !expr "InstallXLD && (K8sSetup == 'DockerDesktopK8s' || K8sSetup == 'MinikubeK8s')"
    - path: xebialabs/kubernetes/xl-k8s-foundation/aws-efs/aws-efs-storageclass.yaml.tmpl
      writeIf: !expr "K8sSetup == 'AwsEKS' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/aws-efs/aws-efs-rbac.yaml.tmpl
      writeIf: !expr "K8sSetup == 'AwsEKS' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/aws-efs/aws-efs-deployment.yaml.tmpl
      writeIf: !expr "K8sSetup == 'AwsEKS' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-k8s-foundation/aws-efs/aws-efs-conf.yaml.tmpl
      writeIf: !expr "K8sSetup == 'AwsEKS' && !UseExistingStorageClasses"
    - path: xebialabs/kubernetes/xl-deploy/external-db/active-active/xld-deployment-master.yaml.tmpl
      writeIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    - path: xebialabs/kubernetes/xl-deploy/external-db/active-active/xld-deployment-worker.yaml.tmpl
      writeIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    - path: xebialabs/kubernetes/xl-k8s-foundation/xl-pvc/pvc-xld-export.yaml.tmpl
      writeIf: !expr "InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    #xl-release
    - path: xebialabs/xl-release.yaml.tmpl
      writeIf: !expr InstallXLR
    - path: xebialabs/kubernetes/xl-release/external-db/active-active/xlr-deployment-active.yaml.tmpl
      writeIf: !expr "InstallXLR && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    - path: xebialabs/kubernetes/xl-release/local-db/xlr-deployment-single-node.yaml.tmpl
      writeIf: !expr "InstallXLR && (K8sSetup == 'DockerDesktopK8s' || K8sSetup == 'MinikubeK8s')"
    - path: xebialabs/kubernetes/xl-k8s-foundation/xl-pvc/pvc-xlr-reports.yaml.tmpl
      writeIf: !expr "InstallXLR && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    #efk
    - path: xebialabs/kubernetes/efk-stack/elasticsearch/rbac.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/elasticsearch/deployment.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/es-curator/cronjob.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/es-curator/configmap.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/fluentd/rbac.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/fluentd/configmap.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/fluentd/daemonset.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/kibana/deployment.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/efk-stack/kibana/ingress.yaml.tmpl
      writeIf: !expr "MonitoringInstall && !UseExternalIngress"
    - path: xebialabs/kubernetes/efk-stack/kibana/dashboard-job.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    #pg-stack
    - path: xebialabs/kubernetes/pg-stack/prometheus/rbac.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/prometheus/configmap.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/prometheus/deployment.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/grafana/configmap.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/grafana/secret.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/grafana/pvc.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/grafana/deployment.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/grafana/ingress.yaml.tmpl
      writeIf: !expr "MonitoringInstall && !UseExternalIngress"
    - path: xebialabs/kubernetes/pg-stack/grafana/importer-job.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/kube-state-metrics/kube-state-metrics-cluster-role.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/kube-state-metrics/kube-state-metrics-cluster-role-binding.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/kube-state-metrics/kube-state-metrics-deployment.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/kube-state-metrics/kube-state-metrics-role.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/kube-state-metrics/kube-state-metrics-role-binding.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/kube-state-metrics/kube-state-metrics-service.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    - path: xebialabs/kubernetes/pg-stack/kube-state-metrics/kube-state-metrics-service-account.yaml.tmpl
      writeIf: !expr "MonitoringInstall"
    #rabbitmq
    - path: xebialabs/kubernetes/xl-k8s-foundation/rabbitmq/xl-rabbitmq.yaml.tmpl
      writeIf: !expr "!RabbitMQExternal && InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    - path: xebialabs/kubernetes/xl-k8s-foundation/rabbitmq/ingress.yaml.tmpl
      writeIf: !expr "(!RabbitMQExternal && InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s') && !UseExternalIngress"
    - path: xebialabs/kubernetes/xl-k8s-foundation/rabbitmq/rbac.yaml.tmpl
      writeIf: !expr "!RabbitMQExternal && InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    - path: xebialabs/kubernetes/xl-k8s-foundation/rabbitmq/configmap.yaml.tmpl
      writeIf: !expr "!RabbitMQExternal && InstallXLD && K8sSetup != 'DockerDesktopK8s' && K8sSetup != 'MinikubeK8s'"
    #xebialabs files
    - path: generated_answers.yaml.tmpl
    - path: xebialabs.yaml.tmpl
    - path: xebialabs/common.yaml.tmpl
    - path: xebialabs/deployments.yaml.tmpl
    - path: xebialabs/answers.yaml.tmpl
