Skip to content

Commit 7f62fa3

Browse files
committed
modified cluster resource name param
1 parent fd6e837 commit 7f62fa3

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# - ACR_RESOURCE_GROUP (resource group of your ACR)
2121
# - AZURE_CONTAINER_REGISTRY (name of your container registry / ACR)
2222
# - CONTAINER_NAME (name of the container image you would like to push up to your ACR)
23+
# - CLUSTER_NAME (name of the resource to deploy to - fleet name or managed cluster name)
2324
# - CLUSTER_RESOURCE_GROUP (where your cluster is deployed)
2425
# - CLUSTER_RESOURCE_TYPE (type of resource to deploy to, either 'Microsoft.ContainerService/fleets' or 'Microsoft.ContainerService/managedCluster')
2526
# - DOCKER_FILE (path to your Dockerfile)
@@ -28,7 +29,6 @@
2829
# - CHART_OVERRIDE_PATH (path to your helm chart with override values)
2930
# - CHART_OVERRIDES (override values for your helm chart)
3031
# - NAMESPACE (namespace to deploy your application)
31-
# - RESOURCE_NAME (name of your AKS resource)
3232
#
3333
# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions
3434
# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples
@@ -45,15 +45,15 @@ env:
4545
ACR_RESOURCE_GROUP: {{ .Config.GetVariableValue "ACRRESOURCEGROUP" }}
4646
AZURE_CONTAINER_REGISTRY: {{ .Config.GetVariableValue "AZURECONTAINERREGISTRY" }}
4747
CONTAINER_NAME: {{ .Config.GetVariableValue "CONTAINERNAME" }}
48+
CLUSTER_NAME: {{ .Config.GetVariableValue "CLUSTERNAME" }}
4849
CLUSTER_RESOURCE_GROUP: {{ .Config.GetVariableValue "CLUSTERRESOURCEGROUP" }}
49-
CLUSTER_RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "RESOURCETYPE" }}
50+
CLUSTER_RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "CLUSTERRESOURCETYPE" }}
5051
DOCKER_FILE: {{ .Config.GetVariableValue "DOCKERFILE" }}
5152
BUILD_CONTEXT_PATH: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
5253
CHART_PATH: {{ .Config.GetVariableValue "CHARTPATH" }}
5354
CHART_OVERRIDE_PATH: {{ .Config.GetVariableValue "CHARTOVERRIDEPATH" }}
5455
CHART_OVERRIDES: {{ .Config.GetVariableValue "CHARTOVERRIDES" }}
5556
NAMESPACE: {{ .Config.GetVariableValue "NAMESPACE" }}
56-
RESOURCE_NAME: {{ .Config.GetVariableValue "CLUSTERNAME" }}
5757
{{`
5858
jobs:
5959
buildImage:
@@ -107,7 +107,7 @@ jobs:
107107
uses: azure/[email protected]
108108
with:
109109
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
110-
cluster-name: ${{ env.RESOURCE_NAME }}
110+
cluster-name: ${{ env.CLUSTER_NAME }}
111111
resource-type: ${{ env.CLUSTER_RESOURCE_TYPE }}
112112
admin: "false"
113113
use-kubelogin: "true"

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
# - ACR_RESOURCE_GROUP (resource group of your ACR)
2121
# - AZURE_CONTAINER_REGISTRY (name of your container registry / ACR)
2222
# - CONTAINER_NAME (name of the container image you would like to push up to your ACR)
23+
# - CLUSTER_NAME (name of the resource to deploy to - fleet name or managed cluster name)
2324
# - CLUSTER_RESOURCE_GROUP (where your cluster is deployed)
2425
# - CLUSTER_RESOURCE_TYPE (type of resource to deploy to, either 'Microsoft.ContainerService/fleets' or 'Microsoft.ContainerService/managedCluster')
2526
# - DOCKER_FILE (path to your Dockerfile)
2627
# - BUILD_CONTEXT_PATH (path to the context of your Dockerfile)
2728
# - NAMESPACE (namespace to deploy your application)
28-
# - RESOURCE_NAME (name of your AKS resource)
2929
#
3030
# 3. Choose the appropriate render engine for the bake step https://github.com/Azure/k8s-bake. The config below assumes Kustomize.
3131
# Set your kustomizationPath and kubectl-version to suit your configuration.
@@ -46,13 +46,13 @@ env:
4646
ACR_RESOURCE_GROUP: {{ .Config.GetVariableValue "ACRRESOURCEGROUP" }}
4747
AZURE_CONTAINER_REGISTRY: {{ .Config.GetVariableValue "AZURECONTAINERREGISTRY" }}
4848
CONTAINER_NAME: {{ .Config.GetVariableValue "CONTAINERNAME" }}
49+
CLUSTER_NAME: {{ .Config.GetVariableValue "CLUSTERNAME" }}
4950
CLUSTER_RESOURCE_GROUP: {{ .Config.GetVariableValue "CLUSTERRESOURCEGROUP" }}
50-
CLUSTER_RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "RESOURCETYPE" }}
51+
CLUSTER_RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "CLUSTERRESOURCETYPE" }}
5152
KUSTOMIZE_PATH: {{ .Config.GetVariableValue "KUSTOMIZEPATH" }}
5253
DOCKER_FILE: {{ .Config.GetVariableValue "DOCKERFILE" }}
5354
BUILD_CONTEXT_PATH: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
5455
NAMESPACE: {{ .Config.GetVariableValue "NAMESPACE" }}
55-
RESOURCE_NAME: {{ .Config.GetVariableValue "CLUSTERNAME" }}
5656
{{`
5757
jobs:
5858
buildImage:
@@ -106,7 +106,7 @@ jobs:
106106
uses: azure/[email protected]
107107
with:
108108
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
109-
cluster-name: ${{ env.RESOURCE_NAME }}
109+
cluster-name: ${{ env.CLUSTER_NAME }}
110110
admin: 'false'
111111
use-kubelogin: 'true'
112112
resource-type: ${{ env.CLUSTER_RESOURCE_TYPE }}
@@ -124,7 +124,7 @@ jobs:
124124
if: ${{ env.CLUSTER_RESOURCE_TYPE != 'Microsoft.ContainerService/fleets' }}
125125
id: isPrivate
126126
run: |
127-
result=$(az aks show --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.RESOURCE_NAME }} --query "apiServerAccessProfile.enablePrivateCluster")
127+
result=$(az aks show --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.CLUSTER_NAME }} --query "apiServerAccessProfile.enablePrivateCluster")
128128
echo "PRIVATE_CLUSTER=$result" >> "$GITHUB_OUTPUT"
129129
130130
# Deploys application based on manifest files from previous step
@@ -136,7 +136,7 @@ jobs:
136136
images: |
137137
${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }}
138138
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
139-
name: ${{ env.RESOURCE_NAME }}
139+
name: ${{ env.CLUSTER_NAME }}
140140
private-cluster: ${{ steps.isPrivate.outputs.PRIVATE_CLUSTER == 'true' }}
141141
namespace: ${{ env.NAMESPACE }}
142142
resource-type: ${{ env.CLUSTER_RESOURCE_TYPE }}

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
# 2. Set the following environment variables (or replace the values below):
1919
# - ACR_RESOURCE_GROUP (resource group of your ACR)
2020
# - AZURE_CONTAINER_REGISTRY (name of your container registry / ACR)
21+
# - CLUSTER_NAME (name of the resource to deploy to - fleet name or managed cluster name)
2122
# - CLUSTER_RESOURCE_GROUP (where your cluster is deployed)
2223
# - CLUSTER_RESOURCE_TYPE (type of resource to deploy to, either 'Microsoft.ContainerService/fleets' or 'Microsoft.ContainerService/managedCluster')
2324
# - CONTAINER_NAME (name of the container image you would like to push up to your ACR)
2425
# - DEPLOYMENT_MANIFEST_PATH (path to the manifest yaml for your deployment)
2526
# - DOCKER_FILE (path to your Dockerfile)
2627
# - BUILD_CONTEXT_PATH (path to the context of your Dockerfile)
2728
# - NAMESPACE (namespace to deploy your application)
28-
# - 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
3131
# For more options with the actions used below please refer to https://github.com/Azure/login
@@ -41,13 +41,13 @@ env:
4141
ACR_RESOURCE_GROUP: {{ .Config.GetVariableValue "ACRRESOURCEGROUP" }}
4242
AZURE_CONTAINER_REGISTRY: {{ .Config.GetVariableValue "AZURECONTAINERREGISTRY" }}
4343
CONTAINER_NAME: {{ .Config.GetVariableValue "CONTAINERNAME" }}
44+
CLUSTER_NAME: {{ .Config.GetVariableValue "CLUSTERNAME" }}
4445
CLUSTER_RESOURCE_GROUP: {{ .Config.GetVariableValue "CLUSTERRESOURCEGROUP" }}
45-
CLUSTER_RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "RESOURCETYPE" }}
46+
CLUSTER_RESOURCE_TYPE: Microsoft.ContainerService/{{ .Config.GetVariableValue "CLUSTERRESOURCETYPE" }}
4647
DEPLOYMENT_MANIFEST_PATH: {{ .Config.GetVariableValue "DEPLOYMENTMANIFESTPATH" }}
4748
DOCKER_FILE: {{ .Config.GetVariableValue "DOCKERFILE" }}
4849
BUILD_CONTEXT_PATH: {{ .Config.GetVariableValue "BUILDCONTEXTPATH" }}
4950
NAMESPACE: {{ .Config.GetVariableValue "NAMESPACE" }}
50-
RESOURCE_NAME: {{ .Config.GetVariableValue "RESOURCENAME" }}
5151
{{`
5252
jobs:
5353
buildImage:
@@ -101,7 +101,7 @@ jobs:
101101
uses: azure/[email protected]
102102
with:
103103
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
104-
cluster-name: ${{ env.RESOURCE_NAME }}
104+
cluster-name: ${{ env.CLUSTER_NAME }}
105105
admin: 'false'
106106
use-kubelogin: 'true'
107107
resource-type: ${{ env.CLUSTER_RESOURCE_TYPE }}
@@ -111,7 +111,7 @@ jobs:
111111
if: ${{ env.CLUSTER_RESOURCE_TYPE != 'Microsoft.ContainerService/fleets' }}
112112
id: isPrivate
113113
run: |
114-
result=$(az aks show --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.RESOURCE_NAME }} --query "apiServerAccessProfile.enablePrivateCluster")
114+
result=$(az aks show --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.CLUSTER_NAME }} --query "apiServerAccessProfile.enablePrivateCluster")
115115
echo "PRIVATE_CLUSTER=$result" >> "$GITHUB_OUTPUT"
116116
117117
# Deploys application based on given manifest file
@@ -123,7 +123,7 @@ jobs:
123123
images: |
124124
${{ env.AZURE_CONTAINER_REGISTRY }}.azurecr.io/${{ env.CONTAINER_NAME }}:${{ github.sha }}
125125
resource-group: ${{ env.CLUSTER_RESOURCE_GROUP }}
126-
name: ${{ env.RESOURCE_NAME }}
126+
name: ${{ env.CLUSTER_NAME }}
127127
private-cluster: ${{ steps.isPrivate.outputs.PRIVATE_CLUSTER == 'true' }}
128128
namespace: ${{ env.NAMESPACE }}
129129
resource-type: ${{ env.CLUSTER_RESOURCE_TYPE }}

0 commit comments

Comments
 (0)