templateName: "github-workflow-kustomize"
description: "This template is used to create a GitHub workflow for building and deploying an app to AKS with Kustomize"
type: "workflow"
versions: ["0.0.1"]
defaultVersion: "0.0.1"
variables:
  - name: "WORKFLOWNAME"
    type: "string"
    kind: "workflowName"
    default:
      value: "Build and deploy an app to AKS with Kustomize"
    description: "the name of the workflow"
    versions: ">=0.0.1"
  - name: "BRANCHNAME"
    type: "string"
    kind: "repositoryBranch"
    description: "the Github branch to automatically deploy from"
    versions: ">=0.0.1"
  - name: "ACRRESOURCEGROUP"
    type: "string"
    kind: "azureResourceGroup"
    description: "the ACR resource group"
    versions: ">=0.0.1"
  - name: "AZURECONTAINERREGISTRY"
    type: "string"
    kind: "azureContainerRegistry"
    description: "the Azure container registry name"
    versions: ">=0.0.1"
  - name: "CONTAINERNAME"
    type: "string"
    kind: "containerImageName"
    description: "the container image name"
    versions: ">=0.0.1"
  - name: "CLUSTERRESOURCEGROUP"
    type: "string"
    kind: "azureResourceGroup"
    description: "the AKS cluster resource group"
    versions: ">=0.0.1"
  - name: "CLUSTERNAME"
    type: "string"
    kind: "azureManagedCluster"
    description: "the AKS cluster name"
    versions: ">=0.0.1"
  - name: "KUSTOMIZEPATH"
    type: "string"
    kind: "dirPath"
    default:
      disablePrompt: true
      value: "./overlays/production"
    description: "the path to the Kustomize directory"
    versions: ">=0.0.1"
  - name: "DOCKERFILE"
    type: "string"
    kind: "filePath"
    default:
      value: "./Dockerfile"
    description: "the path to the Dockerfile"
    versions: ">=0.0.1"
  - name: "BUILDCONTEXTPATH"
    type: "string"
    kind: "dirPath"
    default:
      value: "."
    description: "the path to the Docker build context"
    versions: ">=0.0.1"
  - name: "NAMESPACE"
    type: "string"
    kind: "kubernetesNamespace"
    default:
      value: "default"
    description: "the Kubernetes namespace"
    versions: ">=0.0.1"
  - name: "ENABLENAMESPACECREATION"
    type: "bool"
    kind: "flag"
    default:
      disablePrompt: true
      value: "false"
    description: "enable creation of target namespace if it does not exist"
    versions: ">=0.0.1"
  - name: "CLUSTERRESOURCETYPE" 
    type: "string"
    kind: "clusterResourceType"
    default:
      disablePrompt: true
      value: "Microsoft.ContainerService/managedClusters"
    description: "ARM resource type for cluster"
    versions: ">=0.0.1"
  - name: "AZURELOGINAUTHTYPE"
    type: "string"
    kind: "workflowAuthType"
    default:
      disablePrompt: true
      value: "SERVICE_PRINCIPAL"
    allowedValues:
      - "SERVICE_PRINCIPAL"
      - "IDENTITY"
    description: "the authentication type to use for the azure/login github workflow"
    versions: ">=0.0.1"
