Skip to content

Commit fa42db0

Browse files
committed
changed resource type to cluster resource type
1 parent 2e36c50 commit fa42db0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

template/workflows/manifests/.github/workflows/azure-kubernetes-service.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
# - ACR_RESOURCE_GROUP (resource group of your ACR)
2020
# - AZURE_CONTAINER_REGISTRY (name of your container registry / ACR)
2121
# - CLUSTER_RESOURCE_GROUP (where your cluster is deployed)
22+
# - CLUSTER_RESOURCE_TYPE (type of resource to deploy to, either 'Microsoft.ContainerService/fleets' or 'Microsoft.ContainerService/managedCluster')
2223
# - CONTAINER_NAME (name of the container image you would like to push up to your ACR)
2324
# - DEPLOYMENT_MANIFEST_PATH (path to the manifest yaml for your deployment)
2425
# - DOCKER_FILE (path to your Dockerfile)
2526
# - BUILD_CONTEXT_PATH (path to the context of your Dockerfile)
2627
# - NAMESPACE (namespace to deploy your application)
27-
# - RESOURCE_TYPE (type of resource to deploy to, either 'fleet' or 'managed cluster')
2828
# - RESOURCE_NAME (name of the resource to deploy to - fleet name or managed cluster name)
2929
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
3030
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
@@ -42,11 +42,11 @@ env:
4242
AZURE_CONTAINER_REGISTRY: {{ .Config.GetVariableValue "AZURECONTAINERREGISTRY" }}
4343
CONTAINER_NAME: {{ .Config.GetVariableValue "CONTAINERNAME" }}
4444
CLUSTER_RESOURCE_GROUP: {{ .Config.GetVariableValue "CLUSTERRESOURCEGROUP" }}
45+
CLUSTER_RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "RESOURCETYPE" }}
4546
DEPLOYMENT_MANIFEST_PATH: {{ .Config.GetVariableValue "DEPLOYMENTMANIFESTPATH" }}
4647
DOCKER_FILE: {{ .Config.GetVariableValue "DOCKERFILE" }}
4748
BUILD_CONTEXT_PATH: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
4849
NAMESPACE: {{ .Config.GetVariableValue "NAMESPACE" }}
49-
RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "RESOURCETYPE" }}
5050
RESOURCE_NAME: {{ .Config.GetVariableValue "RESOURCENAME" }}
5151

5252
{{`
@@ -105,11 +105,11 @@ jobs:
105105
cluster-name: ${{ env.RESOURCE_NAME }}
106106
admin: 'false'
107107
use-kubelogin: 'true'
108-
resource-type: ${{ env.RESOURCE_TYPE }}
108+
resource-type: ${{ env.CLUSTER_RESOURCE_TYPE }}
109109

110110
# Checks if the AKS cluster is private
111111
- name: Is private cluster
112-
if: ${{ env.RESOURCE_TYPE != 'Microsoft.ContainerService/fleets' }}
112+
if: ${{ env.CLUSTER_RESOURCE_TYPE != 'Microsoft.ContainerService/fleets' }}
113113
id: isPrivate
114114
run: |
115115
result=$(az aks show --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.RESOURCE_NAME }} --query "apiServerAccessProfile.enablePrivateCluster")
@@ -127,5 +127,5 @@ jobs:
127127
name: ${{ env.RESOURCE_NAME }}
128128
private-cluster: ${{ steps.isPrivate.outputs.PRIVATE_CLUSTER == 'true' }}
129129
namespace: ${{ env.NAMESPACE }}
130-
resource-type: ${{ env.RESOURCE_TYPE }}
130+
resource-type: ${{ env.CLUSTER_RESOURCE_TYPE }}
131131
`}}

0 commit comments

Comments
 (0)