Skip to content

Commit

Permalink
Fix documentation for creating a new release (#4137)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthchr authored Jun 26, 2024
1 parent 0e79650 commit 51edbbe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 27 deletions.
24 changes: 23 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
40 changes: 14 additions & 26 deletions docs/hugo/content/contributing/create-a-new-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<NEW_RELEASE_TAG>` 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
Expand Down

0 comments on commit 51edbbe

Please sign in to comment.