Skip to content

Commit

Permalink
Simplify namespace creation for helm deployment (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
bosesuneha authored Aug 13, 2024
1 parent f3bc1a4 commit ab1a1a7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
13 changes: 0 additions & 13 deletions template/deployments/helm/charts/templates/namespace.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: Deploy application on private cluster
if : steps.isPrivate.outputs.PRIVATE_CLUSTER == 'true'
run: |
command_id=$(az aks command invoke --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.CLUSTER_NAME }} --command "helm upgrade --wait -i -f ${{ env.CHART_OVERRIDE_PATH }} --set ${{ env.CHART_OVERRIDES }} --set image.tag=${{ github.sha }} automated-deployment ${{ env.CHART_PATH }} --namespace ${{env.NAMESPACE}} --timeout 240s" --file . --query id -o tsv)
command_id=$(az aks command invoke --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.CLUSTER_NAME }} --command "helm upgrade --wait -i -f ${{ env.CHART_OVERRIDE_PATH }} --set ${{ env.CHART_OVERRIDES }} --set image.tag=${{ github.sha }} automated-deployment ${{ env.CHART_PATH }} --namespace ${{ env.NAMESPACE }} --create-namespace --timeout 240s" --file . --query id -o tsv)
result=$(az aks command result --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.CLUSTER_NAME }} --command-id $command_id)
echo "Helm upgrade result: $result"
exitCode=$(az aks command result --resource-group ${{ env.CLUSTER_RESOURCE_GROUP }} --name ${{ env.CLUSTER_NAME }} --command-id $command_id --query exitCode -o tsv)
Expand All @@ -131,5 +131,5 @@ jobs:
- name: Deploy application on public cluster
if : steps.isPrivate.outputs.PRIVATE_CLUSTER == ''
run: helm upgrade --wait -i -f ${{ env.CHART_OVERRIDE_PATH }} --set ${{ env.CHART_OVERRIDES }} --set image.tag=${{ github.sha }} automated-deployment ${{ env.CHART_PATH }} --namespace ${{ env.NAMESPACE }}
run: helm upgrade --wait -i -f ${{ env.CHART_OVERRIDE_PATH }} --set ${{ env.CHART_OVERRIDES }} --set image.tag=${{ github.sha }} automated-deployment ${{ env.CHART_PATH }} --namespace ${{ env.NAMESPACE }} --create-namespace
`}}
2 changes: 0 additions & 2 deletions test/check_windows_helm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ $filesExist=$filesExist -and (Test-Path -Path ./charts/templates/deployment.yaml
echo "$file exists: $filesExist"
$filesExist=$filesExist -and (Test-Path -Path ./charts/templates/service.yaml -PathType Leaf)
echo "$file exists: $filesExist"
$filesExist=$filesExist -and (Test-Path -Path ./charts/templates/namespace.yaml -PathType Leaf)
echo "$file exists: $filesExist"
$filesExist=$filesExist -and (Test-Path -Path ./charts/templates/_helpers.tpl -PathType Leaf)
echo "$file exists: $filesExist"
$filesExist=$filesExist -and (Test-Path -Path ./charts/values.yaml -PathType Leaf)
Expand Down

0 comments on commit ab1a1a7

Please sign in to comment.