apiVersion: xl/v2
kind: Blueprint
metadata:
  name: XL OP
  description: |
    This blueprint deploys Digital.ai Deploy operator, Digital.ai Release operator, and XL-k8s-foundation into an existing Kubernetes installation (local single-node Kubernetes, on-premises multi-node Kubernetes cluster, or Amazon EKS cluster).
  author: Digital.ai
  version: 1.0
spec:
  parameters:
    - name: ImageRegistryType
      type: Select
      prompt: "Select the type of Image Registry:"
      options:
        - label: Default (Uses various default public image registries for the images)
          value: default
        - label: Custom Public Registry (Overrides defaults to use a specific custom public registry)
          value: public
        - label: Custom Private Registry - Password protected (Overrides defaults to use a specific custom private registry)
          value: private
      promptIf: !expr "ProcessType == 'install' || ProcessType == 'upgrade'"
      ignoreIfSkipped: true
      saveInXlvals: true
      default: default
      description: Select the type of the Image Registry to use for pulling all images required for the installation.
    - name: IsCustomImageRegistry
      type: Confirm
      saveInXlvals: true
      ignoreIfSkipped: true
      value: !expr "ImageRegistryType == 'public' || ImageRegistryType == 'private' ? true : false"
      description: Is Custom Image Repository
      default: false
    - name: CustomImageRegistryName
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "IsCustomImageRegistry && (ProcessType == 'install' || ProcessType == 'upgrade')"
      prompt: "Enter the custom docker image registry name:"
      description: Enter the custom image registry name for pulling all the images required for this installation
    - name: CustomPrivateImageRegistrySecret
      type: Select
      options:
        - !expr k8sResources(Namespace, 'secrets')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide the custom docker image registry secret:"
      promptIf: !expr "(ImageRegistryType == 'private') && (ProcessType == 'install' || ProcessType == 'upgrade')"
      description: Provide the imagePullSecrets name for the custom image registry
    - name: RepositoryName
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ProcessType == 'install' || ProcessType == 'upgrade'"
      prompt: !expr "IsCustomImageRegistry ? 'Enter the repository name (eg: <repositoryName> from <imageRegistryName>/<repositoryName>/<imageName>:<tagName>):' : 'Enter the repository name (eg: <repositoryName> from <repositoryName>/<imageName>:<tagName>):'"
      default: xebialabsunsupported
      description: Enter the repository name to use
    - name: ImageNameDeploy
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr ServerType == 'dai-deploy' && (ProcessType == 'install' || ProcessType == 'upgrade')
      prompt: "Enter the deploy server image name (eg: <imageName> from <repositoryName>/<imageName>:<tagName>):"
      default: xl-deploy
      description: Enter the deploy server image name to use
    - name: ImageNameRelease
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      prompt: "Enter the image name (eg: <imageName> from <repositoryName>/<imageName>:<tagName>):"
      default: xl-release
      description: Enter the image name to use
    - name: ImageTag
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ProcessType == 'install' || ProcessType == 'upgrade'"
      prompt: "Enter the image tag (eg: <tagName> from <repositoryName>/<imageName>:<tagName>):"
      default: 22.3.17
      description: Enter the image tag to use
    - name: ImageNameDeployTaskEngine
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-deploy' && !regex('^10.*$', ImageTag) && (ProcessType == 'install' || ProcessType == 'upgrade')"
      prompt: "Enter the deploy task engine image name for version 22 and above (eg: <imageName> from <repositoryName>/<imageName>:<tagName>):"
      default: deploy-task-engine
      description: Enter the deploy task engine image name to use
    - name: ImageNameCc
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-deploy' && !regex('^10.*$', ImageTag) && (ProcessType == 'install' || ProcessType == 'upgrade')"
      prompt: "Enter the central configuration image name for version 22 and above (eg: <imageName> from <repositoryName>/<imageName>:<tagName>):"
      default: central-configuration
      description: Enter the central configuration image name to use
    - name: XldMasterCount
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install'"
      prompt: "Enter the deploy master server replica count:"
      default: 3
      description: Enter the deploy master server replica count
      validate: !expr "regex('^([0-9])+$', XldMasterCount)"
    - name: PvcSizeDeploy
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install'"
      prompt: "Enter PVC size for Deploy master (Gi):"
      default: 10
      description: "Enter PVC size for Deploy master"
      validate: !expr "regex('^([0-9])+(\\.)?([0-9])*$', PvcSizeDeploy)"
    - name: AccessModeDeploy
      type: Select
      prompt: "Select between supported Access Modes:"
      options:
        - label: ReadWriteOnce
          value: ReadWriteOnce
        - label: ReadWriteMany
          value: ReadWriteMany
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install'"
      ignoreIfSkipped: true
      saveInXlvals: true
      default: ReadWriteOnce
      description: Select between supported Access Modes to define if the volume can be mounted as read-write by a single node (ReadWriteOnce) or by many nodes (ReadWriteMany).
    - name: XldWorkerCount
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install'"
      prompt: "Enter the deploy worker replica count:"
      default: 3
      description: Enter the deploy worker replica count
      validate: !expr "regex('^([0-9])+$', XldWorkerCount)"
    - name: PvcSizeDeployTaskEngine
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install'"
      prompt: "Enter PVC size for Deploy worker (Gi):"
      default: 10
      description: "Enter PVC size for Deploy worker"
      validate: !expr "regex('^([0-9])+(\\.)?([0-9])*$', PvcSizeDeployTaskEngine)"
    - name: PvcSizeCc
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install'"
      prompt: "Enter PVC size for Central Configuration (Gi):"
      default: 0.5
      description: "Enter PVC size for Central Configuration"
      validate: !expr "regex('^([0-9])+(\\.)?([0-9])*$', PvcSizeCc)"
    - name: XlrReplicaCount
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr "ServerType == 'dai-release' && ProcessType == 'install'"
      prompt: "Enter the release server replica count:"
      default: 3
      description: Enter the release server replica count
      validate: !expr "regex('^([0-9])+$', XlrReplicaCount)"
    - name: PvcSizeRelease
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr ServerType == 'dai-release' && ProcessType == 'install'
      prompt: "Enter PVC size for Release (Gi):"
      default: 8
      description: Enter PVC size for Release
      validate: !expr "regex('^([0-9])+(\\.)?([0-9])*$', PvcSizeRelease)"
    - name: AccessModeRelease
      type: Select
      prompt: "Select between supported Access Modes:"
      options:
        - label: ReadWriteOnce
          value: ReadWriteOnce
        - label: ReadWriteMany
          value: ReadWriteMany
      promptIf: !expr "ServerType == 'dai-release' && ProcessType == 'install'"
      saveInXlvals: true
      ignoreIfSkipped: true
      default: ReadWriteMany
      description: Select between supported Access Modes to define if the volume can be mounted as read-write by a single node (ReadWriteOnce) or by many nodes (ReadWriteMany).
    - name: IngressType
      type: Select
      prompt: "Select between supported ingress types:"
      options:
        - label: NGINX
          value: nginx
        - label: HAProxy
          value: haproxy
        - label: External - IngressClass resource should already exist
          value: external
        - label: None - Ingress will not be set up during installation
          value: none
      promptIf: !expr ProcessType == "install" && K8sSetup != 'Openshift'
      saveInXlvals: true
      default: nginx
      description: Select between supported ingress types. If None is selected, the application will not be exposed and therefore will not be accessible from the browser.
      validate: !expr "regex('.*external.*', IngressType) ? length(k8sResources(Namespace, 'ingressclasses')) > '0' : true"
    - name: ExternalIngressClass
      type: Select
      options:
        - !expr k8sResources(Namespace, 'ingressclasses')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide external ingress class:"
      promptIf: !expr ProcessType == "install" && K8sSetup != 'Openshift' && IngressType == "external"
      description: External ingress class
    - name: EnableIngressTls
      type: Confirm
      default: false
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Do you want to enable an TLS/SSL configuration (if yes, requires existing TLS secret in the namespace):"
      promptIf: !expr ProcessType == "install" && K8sSetup != 'Openshift' && IngressType != "none"
      description: "Enable TLS/SSL in the Ingress configuration if you already have the TLS secret with the key and certificate created in the working namespace."
      validate: !expr "EnableIngressTls ? length(k8sResources(Namespace, 'secrets')) > '0' : true"
    - name: IngressHost
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide DNS name for accessing UI of the server:"
      promptIf: !expr ProcessType == "install" && (IngressType != "none" || ServerType == 'dai-release')
      description: "Provide DNS name for accessing UI of the server. For OpenShift, this is used with Routing, while for other providers this is set up only when Ingress is used."
      validate: !expr "regex('^[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}$', IngressHost)"
    - name: HttpsProtocol
      type: Confirm
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "The access will be secured with HTTPS protocol:"
      promptIf: !expr ServerType == 'dai-release' && ProcessType == "install" && IngressType == "none"
      description: "Select true if the HTTPS protocol will be used, the serverl URL will start with https"
    - name: IngressTlsSecretName
      type: Select
      options:
        - !expr k8sResources(Namespace, 'secrets')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide the TLS secret name with the key and certificate:"
      promptIf: !expr EnableIngressTls && ProcessType == "install" && K8sSetup != 'Openshift' && IngressType != "none"
      description: Provide the TLS secret name with the key and certificate
    - name: AdminPassword
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide administrator password:"
      promptIf: !expr ProcessType == "install"
      description: Administrator password
      default: !expr "randPassword()"
    - name: OidcConfigTypeInstall
      type: Select
      options:
        - label: External OIDC Configuration
          value: external
        - label: Identity Service Configuration
          value: identity-service
        - label: Embedded Keycloak Configuration
          value: embedded
        - label: No OIDC Configuration
          value: no-oidc
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Type of the OIDC configuration:"
      promptIf: !expr ProcessType == "install"
      description: Provide the type of the OIDC configuration
      default: no-oidc
    - name: OidcConfigTypeUpgrade
      type: Select
      options:
        - label: Existing OIDC Configuration
          value: existing
        - label: External OIDC Configuration
          value: external
        - label: Identity Service Configuration
          value: identity-service
        - label: Embedded Keycloak Configuration
          value: embedded
        - label: No OIDC Configuration
          value: no-oidc
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Type of the OIDC configuration:"
      promptIf: !expr ProcessType == "upgrade"
      description: Provide the type of the OIDC configuration
      default: existing
    - name: OidcConfigType
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      value: !expr "ProcessType == 'install' ? OidcConfigTypeInstall : OidcConfigTypeUpgrade"
      description: The type of the OIDC configuration
    - name: UseKeycloakWithEmbeddedDB
      type: Confirm
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr OidcConfigType == 'embedded' && (ProcessType == 'install' || ProcessType == 'upgrade')
      prompt: "Use embedded DB for keycloak:"
      default: !expr OidcConfigTypeUpgrade == 'embedded'
      description: "If true, keycloak will be installed in kubernetes cluster with embedded DB. If false, we need to use the custom zip options and update cr yaml file with external DB for keycloak"
    - name: KeycloakHost
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      promptIf: !expr OidcConfigType == 'embedded' && (ProcessType == 'install' || ProcessType == 'upgrade')
      prompt: "Enter Keycloak public URL:"
      description: Enter Keycloak public URL that will be used for keycloak installation.
      validate: !expr "regex('^[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}$', KeycloakHost)"
    - name: ExternalOidcConfGenericDeploy
      type: Editor
      prompt: "Configure external oidc setup:"
      promptIf: !expr ServerType == 'dai-deploy' && OidcConfigType == 'external' && (ProcessType == 'install' || ProcessType == 'upgrade')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      default: |-
        external: true
        accessTokenUri: ""
        clientId: ""
        clientSecret: ""
        emailClaim: ""
        issuer: ""
        keyRetrievalUri: ""
        logoutUri: ""
        postLogoutRedirectUri: ""
        redirectUri: ""
        rolesClaimName: ""
        userAuthorizationUri: ""
        userNameClaimName: ""
        fullNameClaim: ""
        scopes: '["openid"]'
    - name: ExternalOidcConfGenericRelease
      type: Editor
      prompt: "Configure external oidc setup:"
      promptIf: !expr ServerType == 'dai-release' && OidcConfigType == 'external' && (ProcessType == 'install' || ProcessType == 'upgrade')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      default: |-
        external: true
        accessTokenUri: ""
        clientId: ""
        clientSecret: ""
        emailClaim: ""
        fullNameClaim: ""
        issuer: ""
        keyRetrievalUri: ""
        logoutUri: ""
        postLogoutRedirectUri: ""
        redirectUri: ""
        rolesClaim: ""
        userAuthorizationUri: ""
        userNameClaim: ""
        scopes: '["openid"]'
    - name: ExternalOidcConfGeneric
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      value: !expr "OidcConfigType == 'external' ? (ServerType == 'dai-deploy' ? ExternalOidcConfGenericDeploy : ExternalOidcConfGenericRelease) : ''"
      description: The type of the OIDC configuration
    - name: IdentityServiceConfDeploy
      type: Editor
      prompt: "Configure Identity Service setup:"
      promptIf: !expr ServerType == 'dai-deploy' && OidcConfigType == 'identity-service' && (ProcessType == 'install' || ProcessType == 'upgrade')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      default: |-
        external: true
        clientId: ""
        clientSecret: ""
        issuer: ""
        redirectUri: ""
        postLogoutRedirectUri: ""
        rolesClaimName: ""
        userNameClaimName: "preferred_username"
        scopes: ["openid"]
    - name: IdentityServiceConfRelease
      type: Editor
      prompt: "Configure Identity Service setup:"
      promptIf: !expr ServerType == 'dai-release' && OidcConfigType == 'identity-service' && (ProcessType == 'install' || ProcessType == 'upgrade')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      default: |-
        external: true
        clientId: ""
        clientSecret: ""
        issuer: ""
        redirectUri: ""
        postLogoutRedirectUri: ""
        rolesClaim: ""
        userNameClaim: "preferred_username"
        scopes: ["openid"]
    - name: IdentityServiceConf
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      value: !expr "OidcConfigType == 'identity-service' ? (ServerType == 'dai-deploy' ? IdentityServiceConfDeploy : IdentityServiceConfRelease) : ''"
      description: The type of the OIDC configuration
    - name: ExternalOidcConf
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      value: !expr "OidcConfigType == 'identity-service' ? IdentityServiceConf : (OidcConfigType == 'external' ? ExternalOidcConfGeneric : 'external: false')"
      description: The external OIDC configuration based on OIDC type. Default OIDC configuration for embedded keycloak and No OIDC Configuration will have disabled external OIDC setup
    - name: OperatorImageDeployGeneric
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: !expr "IsCustomImageRegistry ? 'Enter the operator image to use (eg: <imageRegistryName>/<repositoryName>/<imageName>:<tagName>):' : 'Enter the operator image to use (eg: <repositoryName>/<imageName>:<tagName>):'"
      promptIf: !expr ServerType == 'dai-deploy' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      default: xebialabsunsupported/deploy-operator:22.3.17
      description: Enter the operator image to use
    - name: OperatorImageDeployOpenshift
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: !expr "IsCustomImageRegistry ? 'Enter the operator image to use (eg: <imageRegistryName>/<repositoryName>/<imageName>:<tagName>):' : 'Enter the operator image to use (eg: <repositoryName>/<imageName>:<tagName>):'"
      promptIf: !expr ServerType == 'dai-deploy' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      default: xebialabsunsupported/deploy-operator:22.3.17-openshift
      description: Enter the operator image to use
    - name: OperatorImageReleaseGeneric
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: !expr "IsCustomImageRegistry ? 'Enter the operator image to use (eg: <imageRegistryName>/<repositoryName>/<imageName>:<tagName>):' : 'Enter the operator image to use (eg: <repositoryName>/<imageName>:<tagName>):'"
      promptIf: !expr ServerType == 'dai-release' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      default: xebialabsunsupported/release-operator:22.3.17
      description: Enter the operator image to use
    - name: OperatorImageReleaseOpenshift
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: !expr "IsCustomImageRegistry ? 'Enter the operator image to use (eg: <imageRegistryName>/<repositoryName>/<imageName>:<tagName>):' : 'Enter the operator image to use (eg: <repositoryName>/<imageName>:<tagName>):'"
      promptIf: !expr ServerType == 'dai-release' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      default: xebialabsunsupported/release-operator:22.3.17-openshift
      description: Enter the operator image to use
    - name: LicenseSource
      type: Select
      options:
        - label: Path to the license file (the file can be in clean text or base64 encoded)
          value: file
        - label: Copy/Paste the license to editor (the text can be in clean text or base64 encoded)
          value: editor
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Select source of the license:"
      promptIf: !expr ProcessType == "install"
      description: "Provide source of the license file"
      default: file
    - name: LicenseEditor
      type: Editor
      saveInXlvals: true
      ignoreIfSkipped: true
      prompt: "Provide license for the server:"
      promptIf: !expr ProcessType == "install" && LicenseSource == "editor"
      description: "Provide license file for the server"
      default: ""
    - name: LicenseFile
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide license file for the server:"
      promptIf: !expr ProcessType == "install" && LicenseSource == "file"
      description: "Provide license file for the server"
      validate: !expr "isFile(LicenseFile)"
      default: ""
    - name: License
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      description: Provide license file for the server
      value: !expr "LicenseSource == 'editor' ? ifBase64(LicenseEditor) : ifBase64(ifFileReadBytes(LicenseFile))"
    - name: RepositoryKeystoreSource
      type: Select
      options:
        - label: Generate the repository keystore during installation (you need to have keytool utility installed in your path)
          value: generate
        - label: Path to the repository keystore file (the file can be in the raw format or base64 encoded)
          value: file
        - label: Copy/Paste the repository keystore to editor (the content needs to be base64 encoded)
          value: editor
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Select source of the repository keystore:"
      promptIf: !expr ProcessType == "install"
      description: "Provide source of the license file"
      default: generate
    - name: RepositoryKeystoreEditor
      type: Editor
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide repository keystore for the server:"
      promptIf: !expr "ProcessType == 'install' && RepositoryKeystoreSource == 'editor'"
      description: "Provide repository keystore for the server, generated with: `keytool -genseckey -alias deployit-passsword-key -keyalg aes -keysize 128 -keypass deployit -keystore repository-keystore.jceks -storetype jceks -storepass <KeystorePassphrase>`"
      default: ""
    - name: RepositoryKeystoreFile
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide repository keystore for the server:"
      promptIf: !expr "ProcessType == 'install' && RepositoryKeystoreSource == 'file'"
      description: "Provide repository keystore for the server, generated with: `keytool -genseckey -alias deployit-passsword-key -keyalg aes -keysize 128 -keypass deployit -keystore repository-keystore.jceks -storetype jceks -storepass <KeystorePassphrase>`"
      validate: !expr "isFile(RepositoryKeystoreFile)"
      default: ""
    - name: RepositoryKeystore
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      description: Provide repository keystore for the server
      value: !expr "RepositoryKeystoreSource == 'editor' ? ifBase64(RepositoryKeystoreEditor) : ifBase64(ifFileReadBytes(RepositoryKeystoreFile))"
    - name: KeystorePassphrase
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide keystore passphrase:"
      promptIf: !expr ProcessType == "install"
      description: Keystore passphrase for the server
      default: !expr "RepositoryKeystoreSource == 'generate' ? randPassword() : ''"
    - name: StorageClass
      type: Select
      options:
        - !expr k8sResources(Namespace, 'storageclasses')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide storage class for the server:"
      promptIf: !expr ProcessType == "install"
      description: Provide storage class for the server
    - name: EnablePostgresql
      type: Confirm
      default: true
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Do you want to install a new PostgreSQL on the cluster:"
      promptIf: !expr ProcessType == "install"
      description: "Enable PostgreSQL."
    - name: PostgresqlStorageClass
      type: Select
      options:
        - !expr k8sResources(Namespace, 'storageclasses')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide Storage Class to be defined for PostgreSQL:"
      promptIf: !expr ProcessType == "install" && EnablePostgresql
      description: Provide Storage Class to be defined for PostgreSQL
    - name: PostgresqlPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide PVC size for PostgreSQL (Gi):"
      promptIf: !expr ProcessType == "install" && EnablePostgresql
      default: 8
      description: Provide PVC size for PostgreSQL
      validate: !expr "regex('^([0-9])+(\\.)?([0-9])*$', PostgresqlPvcSize)"
    - name: PostgresqlExternalConfigRelease
      type: Editor
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Edit database external setup:"
      promptIf: !expr "ServerType == 'dai-release' && ProcessType == 'install' && EnablePostgresql == false"
      description: Setup the PostgreSQL external parameters (JDBC URL, username, password)
      default: |-
        XLR_DB_URL: jdbc:postgresql://<xlr-db-host>:5432/<xlr-database-name>
        XLR_DB_USER: <xlr-username>
        XLR_DB_PASS: <xlr-password>
        XLR_REPORT_DB_URL: jdbc:postgresql://<xlr-report-db-host>:5432/<xlr-report-database-name>
        XLR_REPORT_DB_USER: <xlr-report-username>
        XLR_REPORT_DB_PASS: <xlr-report-password>
    - name: PostgresqlExternalConfigDeploy
      type: Editor
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Edit database external setup:"
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install' && EnablePostgresql == false"
      description: Setup the PostgreSQL external parameters (JDBC URL, username, password)
      default: |-
        XL_DB_URL: jdbc:postgresql://<xld-db-host>:5432/<xlr-database-name>
        XL_DB_USERNAME: <xld-username>
        XL_DB_PASSWORD: <xld-password>
        XL_REPORT_DB_URL: jdbc:postgresql://<xld-report-db-host>:5432/<xld-report-database-name>
        XL_REPORT_DB_USER: <xld-report-username>
        XL_REPORT_DB_PASS: <xld-report-username>
    - name: EnableRabbitmq
      type: Confirm
      default: true
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Do you want to install a new RabbitMQ on the cluster:"
      promptIf: !expr ProcessType == "install"
      description: "Enable RabbitMQ."
    - name: RabbitmqReplicaCount
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Replica count to be defined for RabbitMQ:"
      default: 3
      promptIf: !expr "ProcessType == 'install' && EnableRabbitmq"
      description: Replica count to be defined for RabbitMQ
      validate: !expr "regex('^([0-9])+$', RabbitmqReplicaCount)"
    - name: RabbitmqStorageClass
      type: Select
      options:
        - !expr k8sResources(Namespace, 'storageclasses')
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Storage Class to be defined for RabbitMQ:"
      default: !expr StorageClass
      promptIf: !expr "ProcessType == 'install' && EnableRabbitmq"
      description: Storage Class to be defined for RabbitMQ
    - name: RabbitmqPvcSize
      type: Input
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Provide PVC size for RabbitMQ (Gi):"
      default: 8
      promptIf: !expr "ProcessType == 'install' && EnableRabbitmq"
      description: Provide PVC size for RabbitMQ
      validate: !expr "regex('^([0-9])+(\\.)?([0-9])*$', RabbitmqPvcSize)"
    - name: RabbitmqExternalConfigRelease
      type: Editor
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Edit RabbitMQ external setup:"
      promptIf: !expr "ServerType == 'dai-release' && ProcessType == 'install' && EnableRabbitmq == false"
      description: Setup the RabbitMQ external parameters
      default: |-
        XLR_TASK_QUEUE_USERNAME: <username>
        XLR_TASK_QUEUE_PASSWORD: <password>
        XLR_TASK_QUEUE_NAME: <queue-name>
        XLR_TASK_QUEUE_URL: <queue-url>
    - name: RabbitmqExternalConfigDeploy
      type: Editor
      saveInXlvals: true
      ignoreIfSkipped: true
      overrideDefault: true
      prompt: "Edit RabbitMQ external setup:"
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'install' && EnableRabbitmq == false"
      description: Setup the RabbitMQ external parameters
      default: |-
        XLD_TASK_QUEUE_DRIVER_CLASS_NAME: <driver-class-name>
        XLD_TASK_QUEUE_PASSWORD: <password>
        XLD_TASK_QUEUE_URL: <queue-url>
        XLD_TASK_QUEUE_USERNAME: <username>
    - name: CrdName
      type: Select
      options:
        - !expr k8sResources(Namespace, 'crd')
      saveInXlvals: true
      promptIf: !expr "((CleanBefore || ProcessType == 'clean') && length(k8sResources(Namespace, 'crd', '', ShortServerName)) != '0') || (ProcessType == 'upgrade' && UpgradeType == 'operatorToOperator' && CrdName == '')"
      prompt: "Enter the name of custom resource definition you want to reuse or replace:"
      ignoreIfSkipped: true
      overrideDefault: true
      description: The name of custom resource definition that you want to reuse or replace (delete).
      default: !expr "CleanBefore || ProcessType == 'clean' || (ProcessType == 'upgrade' && UpgradeType == 'operatorToOperator') ? k8sResource(Namespace, 'crd', ShortServerName) : ''"
    - name: IsCrdReused
      type: Confirm
      saveInXlvals: true
      promptIf: !expr "(CleanBefore || ProcessType == 'clean' || ProcessType == 'upgrade') && CrdName != ''"
      prompt: !expr "'Should CRD be reused, if No we will delete the CRD ' + CrdName + ', and all related CRs will be deleted with it:'"
      ignoreIfSkipped: true
      overrideDefault: true
      description: !expr "'Should CRD be reused? If Yes it will not be deleted, if No we will delete the CRD ' + CrdName + ', and all related CRs will be deleted with it. Put Yes if you have on the same cluster multiple installation of the ' + ServerType"
      default: !expr "ProcessType == 'upgrade' && UpgradeType == 'operatorToOperator'"
    - name: CrName
      type: Select
      options:
        - !expr k8sResources(Namespace, CrdName)
      saveInXlvals: true
      promptIf: !expr "(CrdName != '' && (CleanBefore || ProcessType == 'clean') && length(k8sResources(Namespace, CrdName)) != '0') || (ProcessType == 'upgrade' && UpgradeType == 'operatorToOperator' && CrName == '')"
      prompt: "Enter the name of custom resource:"
      ignoreIfSkipped: true
      overrideDefault: true
      description: The name of your custom resource
      default: !expr "(CrdName != '' && (CleanBefore || ProcessType == 'clean')) || (ProcessType == 'upgrade' && UpgradeType == 'operatorToOperator') ? k8sResource(Namespace, CrdName, ShortServerName) : ''"
    - name: PreserveCrValuesDeploy
      type: Editor
      prompt: "Edit list of custom resource keys that will migrate to the new Deploy CR:"
      promptIf: !expr "ServerType == 'dai-deploy' && ProcessType == 'upgrade'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: "For all matched expressions in the cluster CR, the values will be migrated to the upgraded Deploy CR"
      default: |-
        .metadata.name
        .spec.AdminPassword
        .spec.appProtocol
        .spec.appHostname
        .spec.XldMasterCount
        .spec.XldWorkerCount
        .spec.UseExistingDB
        .spec.UseExistingMQ
        .spec.ingress
        .spec.KeystorePassphrase
        .spec.Persistence.StorageClass
        .spec.Persistence.AccessMode
        .spec.Persistence.XldMasterPvcSize
        .spec.Persistence.XldWorkerPvcSize
        .spec.RepositoryKeystore
        .spec.postgresql.persistence.size
        .spec.postgresql.persistence.storageClass
        .spec.postgresql.postgresqlMaxConnections
        .spec.haproxy-ingress.install
        .spec.nginx-ingress-controller.install
        .spec.postgresql.install
        .spec.rabbitmq.install
        .spec.oidc
        .spec.keycloak.install
        .spec.keycloak.route
        .spec.keycloak.postgresql.persistence.size
        .spec.keycloak.postgresql.postgresqlMaxConnections
        .spec.keycloak.ingress.console.rules
        .spec.keycloak.ingress.rules
        .spec.rabbitmq.persistence.storageClass
        .spec.rabbitmq.persistence.size
        .spec.rabbitmq.replicaCount
        .spec.rabbitmq.persistence.replicaCount
        .spec.route.hosts
        .spec.xldLicense
        .spec.centralConfiguration.image.repository
        .spec.centralConfiguration.persistence.pvcSize
        .spec.centralConfiguration.migrateFromEmbedded
        .spec.deploy.configurationManagement"
    - name: PreserveCrValuesRelease
      type: Editor
      prompt: "Edit list of custom resource keys that will migrate to the new Release CR:"
      promptIf: !expr "ServerType == 'dai-release' && ProcessType == 'upgrade'"
      saveInXlvals: true
      ignoreIfSkipped: true
      description: For all matched expressions in the cluster CR, the values will be migrated to the upgraded Release CR
      default: |-
        .metadata.name
        .spec.AdminPassword
        .spec.appProtocol
        .spec.appHostname
        .spec.replicaCount
        .spec.UseExistingDB
        .spec.UseExistingMQ
        .spec.ingress
        .spec.KeystorePassphrase
        .spec.Persistence.Size
        .spec.Persistence.StorageClass
        .spec.RepositoryKeystore
        .spec.postgresql.persistence.size
        .spec.postgresql.persistence.storageClass
        .spec.Persistence.AccessMode
        .spec.postgresql.postgresqlMaxConnections
        .spec.haproxy-ingress.install
        .spec.nginx-ingress-controller.install
        .spec.postgresql.install
        .spec.rabbitmq.install
        .spec.oidc
        .spec.keycloak.install
        .spec.keycloak.route
        .spec.keycloak.postgresql.persistence.size
        .spec.keycloak.postgresql.postgresqlMaxConnections
        .spec.keycloak.ingress.console.rules
        .spec.keycloak.ingress.rules
        .spec.rabbitmq.persistence.storageClass
        .spec.rabbitmq.persistence.size
        .spec.rabbitmq.replicaCount
        .spec.rabbitmq.persistence.replicaCount
        .spec.route.hosts
        .spec.xlrLicense
        .spec.release.configurationManagement
    - name: PreservePvc
      type: Confirm
      saveInXlvals: true
      promptIf: !expr "ProcessType == 'clean' || CleanBefore"
      prompt: "Should we preserve persisted volume claims? If not all volume data will be lost:"
      ignoreIfSkipped: true
      overrideDefault: true
      description: If yes the PVC will remain and not deleted
      default: !expr "ProcessType == 'upgrade'"
    - name: ReleaseName
      type: Input
      saveInXlvals: true
      promptIf: !expr UpgradeType == 'helmToOperator' && ProcessType == 'upgrade'
      prompt: "Enter the helm release name:"
      ignoreIfSkipped: true
      overrideDefault: true
      description: The name of your custom resource definition.
  files:
    # Generic
    - path: digitalai/generated_answers.yaml.tmpl
      renameTo: !expr "'digitalai/generated_answers_' + ServerType + '_' +  Namespace + '_' + ProcessType + '-' + GenerationDateTime + '.yaml.tmpl'"
    # Deploy
    - path: digitalai/dai-deploy/kubernetes-generic/template/cluster-role-digital-proxy-role.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-digital-proxy-role.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/cluster-role-manager-role.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-manager-role.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/cluster-role-metrics-reader.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-metrics-reader.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/controller-manager-metrics-service.yaml
      writeIf: !expr ServerType == 'dai-deploy'  && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/controller-manager-metrics-service.yaml'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/custom-resource-definition.yaml
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup != 'Openshift'  && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/custom-resource-definition.yaml'"
    - path: digitalai/dai-deploy/kubernetes-generic/dai-deploy_cr_default.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup != 'Openshift'  && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/dai-deploy_cr_default.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/leader-election-role.yaml
      writeIf: !expr ServerType == 'dai-deploy' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/leader-election-role.yaml'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/leader-election-rolebinding.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/leader-election-rolebinding.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/manager-rolebinding.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/manager-rolebinding.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/proxy-rolebinding.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/proxy-rolebinding.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/deployment.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/deployment.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/create-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && OidcConfigType == 'embedded' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/create-keycloak-db.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-generic/template/postgresql-init-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && OidcConfigType == 'embedded' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/postgresql-init-keycloak-db.yaml.tmpl'"
    # Deploy OpenShift
    - path: digitalai/dai-deploy/kubernetes-openshift/template/cluster-role-manager-role.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-manager-role.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-openshift/template/custom-resource-definition.yaml
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/custom-resource-definition.yaml'"
    - path: digitalai/dai-deploy/kubernetes-openshift/dai-deploy_cr_default.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/dai-deploy_cr_default.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-openshift/template/deployment.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/deployment.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-openshift/template/create-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && OidcConfigType == 'embedded' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/create-keycloak-db.yaml.tmpl'"
    - path: digitalai/dai-deploy/kubernetes-openshift/template/postgresql-init-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-deploy' && OidcConfigType == 'embedded' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-deploy/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/postgresql-init-keycloak-db.yaml.tmpl'"
    # Release
    - path: digitalai/dai-release/kubernetes-generic/template/cluster-role-digital-proxy-role.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-digital-proxy-role.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/cluster-role-manager-role.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-manager-role.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/cluster-role-metrics-reader.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-metrics-reader.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/controller-manager-metrics-service.yaml
      writeIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/controller-manager-metrics-service.yaml'"
    - path: digitalai/dai-release/kubernetes-generic/template/custom-resource-definition.yaml
      writeIf: !expr ServerType == 'dai-release' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/custom-resource-definition.yaml'"
    - path: digitalai/dai-release/kubernetes-generic/dai-release_cr_default.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/dai-release_cr_default.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/leader-election-role.yaml
      writeIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/leader-election-role.yaml'"
    - path: digitalai/dai-release/kubernetes-generic/template/leader-election-rolebinding.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/leader-election-rolebinding.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/manager-rolebinding.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/manager-rolebinding.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/proxy-rolebinding.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/proxy-rolebinding.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/deployment.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/deployment.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/create-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && OidcConfigType == 'embedded' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/create-keycloak-db.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-generic/template/postgresql-init-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && OidcConfigType == 'embedded' && K8sSetup != 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/postgresql-init-keycloak-db.yaml.tmpl'"
    # Release OpenShift
    - path: digitalai/dai-release/kubernetes-openshift/template/cluster-role-manager-role.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/cluster-role-manager-role.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-openshift/template/custom-resource-definition.yaml
      writeIf: !expr ServerType == 'dai-release' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/custom-resource-definition.yaml'"
    - path: digitalai/dai-release/kubernetes-openshift/dai-release_cr_default.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/dai-release_cr_default.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-openshift/template/deployment.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/deployment.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-openshift/template/create-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && OidcConfigType == 'embedded' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/create-keycloak-db.yaml.tmpl'"
    - path: digitalai/dai-release/kubernetes-openshift/template/postgresql-init-keycloak-db.yaml.tmpl
      writeIf: !expr ServerType == 'dai-release' && OidcConfigType == 'embedded' && K8sSetup == 'Openshift' && (ProcessType == 'install' || ProcessType == 'upgrade')
      renameTo: !expr "'digitalai/dai-release/' + Namespace + '/' + GenerationDateTime + '/kubernetes/template/postgresql-init-keycloak-db.yaml.tmpl'"
