From 51edbbe2e40f88f5dee65131c2937c447c94f9a9 Mon Sep 17 00:00:00 2001 From: Matthew Christopher Date: Tue, 25 Jun 2024 19:27:38 -0700 Subject: [PATCH] Fix documentation for creating a new release (#4137) --- Taskfile.yml | 24 ++++++++++- .../contributing/create-a-new-release.md | 40 +++++++------------ 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 3bb897d826c..ec0193bb414 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -760,12 +760,21 @@ tasks: --set azureTenantID=$AZURE_TENANT_ID \ --set azureClientID={{.AZURE_MI_CLIENT_ID}} \ --set useWorkloadIdentityAuth=true \ - --set image.repository={{.IMAGE_REPOSITORY}} \ + {{.IMAGE_REPOSITORY_CMD}} \ --set crdPattern=* \ aso2 -n {{.ASO_NAMESPACE}} --create-namespace ./charts/azure-service-operator/" - task: controller:wait-for-operator-ready vars: IMAGE_REPOSITORY: "{{default .LOCAL_REGISTRY_CONTROLLER_DOCKER_IMAGE .IMAGE_REPOSITORY}}" + OVERRIDE_IMAGE_REPOSITORY: "{{default true .OVERRIDE_IMAGE_REPOSITORY}}" + IMAGE_REPOSITORY_CMD_DEFAULT: "--set image.repository={{.IMAGE_REPOSITORY}}" + IMAGE_REPOSITORY_CMD: + sh: | + if [ "{{.OVERRIDE_IMAGE_REPOSITORY}}" = true ]; then + echo "--set image.repository={{.IMAGE_REPOSITORY}}" + else + echo "" + fi controller:install-helm-single-tenant: desc: Generate and install helm chart on cluster using workload identity @@ -1059,6 +1068,19 @@ tasks: AZURE_MI_CLIENT_ID: sh: "cat {{.KIND_WORKLOAD_IDENTITY_PATH}}/azure/miclientid.txt" + controller:kind-create-workloadidentity-local-helm: + desc: Creates a local kind cluster with Workload identity installed alongside the local ASO helm chart. Does NOT build the Helm chart, it expects that it has already been built. Does NOT swap the image for a local copy. + cmds: + - task: controller:kind-create-wi + - task: controller:create-mi-for-workload-identity + - task: controller:install-cert-manager + - "cmctl check api --wait=2m" + - task: controller:install-helm-wi + vars: + OVERRIDE_IMAGE_REPOSITORY: "false" + AZURE_MI_CLIENT_ID: + sh: "cat {{.KIND_WORKLOAD_IDENTITY_PATH}}/azure/miclientid.txt" + # Stub retained until migration of workflows complete controller:gen-crd-docs: cmds: diff --git a/docs/hugo/content/contributing/create-a-new-release.md b/docs/hugo/content/contributing/create-a-new-release.md index 98a52f197e6..96e7d2a22b5 100644 --- a/docs/hugo/content/contributing/create-a-new-release.md +++ b/docs/hugo/content/contributing/create-a-new-release.md @@ -110,39 +110,27 @@ A PR that does this should be automatically generated when a new release is publ These steps are documented here in case that process fails. {{% /alert %}} +### Update the chart + 1. Create a new branch from `` HEAD 2. Generate helm manifest for new release: `task controller:package-helm-manifest` 3. Check the version in `/v2/charts/azure-service-operator/Chart.yaml` if matches with the latest release tag. -4. Create a kind cluster - ``` bash - task controller:kind-create-wi - ``` -5. Enable workload identity on that cluster: - ``` - task: controller:create-mi-for-workload-identity - ``` -6. Install cert-manager + +### Test the updated chart + +1. Create a kind cluster with the chart installed ``` bash - task controller:install-cert-manager + task controller:kind-create-workloadidentity-local-helm ``` -7. Install helm chart: +2. Wait for it all to start: `k get all -n azureserviceoperator-system` +3. Create a resource group and a vnet in it (the vnet is to check that conversion webhooks are working, since there aren't any for RGs): ``` - helm install --set azureSubscriptionID=$AZURE_SUBSCRIPTION_ID \ - --set azureTenantID=$AZURE_TENANT_ID \ - --set azureClientID=$AZURE_CLIENT_ID \ - --set useWorkloadIdentityAuth=true \ - asov2 -n azureserviceoperator-system --create-namespace ./v2/charts/azure-service-operator/. + k apply -f v2/samples/resources/v1api/v1api20200601_resourcegroup.yaml + k apply -f v2/samples/network/v1api20201101/v1api20201101_virtualnetwork.yaml ``` -8. Wait for the chart installation. -9. Wait for it to start: `k get all -n azureserviceoperator-system` -10. Create a resource group and a vnet in it (the vnet is to check that conversion webhooks are working, since there aren't any for RGs): - ``` - k apply -f v2/samples/resources/v1beta/v1beta20200601_resourcegroup.yaml - k apply -f v2/samples/network/v1beta/v1beta20201101_virtualnetwork.yaml - ``` -11. Make sure they deploy successfully - check in the portal as well. -12. If installed successfully, commit the files under `v2/charts/azure-service-operator`. -13. Send a PR. +4. Make sure they deploy successfully - check in the portal as well. +5. If installed successfully, commit the files under `v2/charts/azure-service-operator`. +6. Send a PR. ## Update Resource Documentation