Skip to content

Commit

Permalink
az capi readme and minor updates (#342)
Browse files Browse the repository at this point in the history
* az capi readme and minor updates

Signed-off-by: Mark Rossetti <[email protected]>

* Update capz/run-capz-e2e.sh

Co-authored-by: James Sturtevant <[email protected]>

Signed-off-by: Mark Rossetti <[email protected]>
Co-authored-by: James Sturtevant <[email protected]>
  • Loading branch information
marosset and jsturtevant authored Oct 10, 2022
1 parent 96d3e35 commit 663e19b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
7 changes: 6 additions & 1 deletion capz/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
These scripts and templates are used with [cluster-api-provider-azure](https://github.com/kubernetes-sigs/cluster-api-provider-azure) and [azure cli extension](https://github.com/Azure/azure-capi-cli-extension).

## Running the scripts

To run these scripts locally, clone [CAPZ](https://github.com/kubernetes-sigs/cluster-api-provider-azure) and set the following environment variables (use Linux, macos, or WSL2):

```bash
Expand All @@ -13,6 +14,7 @@ export AZURE_TENANT_ID=<tenantid>
export CAPZ_DIR="$HOME/<path-to-capz>/cluster-api-provider-azure
# optional for ability to use your own ssh key (otherwise it generates one)
# NOTE: Azure does not support ed25519 encrypted SSH keys!
export AZURE_SSH_PUBLIC_KEY_FILE="$HOME/.ssh/id_rsa.pub"
```
Expand All @@ -22,7 +24,10 @@ export AZURE_SSH_PUBLIC_KEY_FILE="$HOME/.ssh/id_rsa.pub"
| ------------- | ------------ |
| `SKIP_CREATE` | Don't create a cluster. Must set `CLUSTER_NAME` and have current a workload cluster kubeconfig file with name `./"${CLUSTER_NAME}".kubeconfig` |
| `SKIP_TEST` | Only creates the cluster, will not run tests |
| `KUBERNETES_VERSION` | valid values are `latest` (default) and `latest-1.x` where x is valid kubernetes minor version such as `latest-1.24` |
| `SKIP_CLEANUP` | Don't delete the cluster / resource group deletion |
| `RUN_SERIAL_TESTS` | If set to `true` then serial slow tests will be run with default ginkgo settings |
| `KUBERNETES_VERSION` | Valid values are `latest` (default) and `latest-1.x` where x is valid kubernetes minor version such as `latest-1.24` |
| `AZURE_LOCATION` | The azure region to deploy resources into |
## GMSA support
Expand Down
16 changes: 11 additions & 5 deletions capz/run-capz-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")
export CAPZ_DIR="${CAPZ_DIR:-"${GOPATH}/src/sigs.k8s.io/cluster-api-provider-azure"}"
: "${CAPZ_DIR:?Environment variable empty or not defined.}"
if [[ ! -d $CAPZ_DIR ]]; then
log "Must have capz repo present"
echo "Must have capz repo present"
fi

main() {
Expand All @@ -17,7 +17,7 @@ main() {
export CONTROL_PLANE_MACHINE_COUNT="${AZURE_CONTROL_PLANE_MACHINE_COUNT:-"1"}"
export WINDOWS_WORKER_MACHINE_COUNT="${WINDOWS_WORKER_MACHINE_COUNT:-"2"}"
export WINDOWS_SERVER_VERSION="${WINDOWS_SERVER_VERSION:-"windows-2019"}"
export WINDOWS_CONTAINERD_URL="${WINDOWS_CONTAINERD_URL:-"https://github.com/containerd/containerd/releases/download/v1.6.4/containerd-1.6.4-windows-amd64.tar.gz"}"
export WINDOWS_CONTAINERD_URL="${WINDOWS_CONTAINERD_URL:-"https://github.com/containerd/containerd/releases/download/v1.6.8/containerd-1.6.8-windows-amd64.tar.gz"}"
export GMSA="${GMSA:-""}"

# other config
Expand Down Expand Up @@ -136,9 +136,15 @@ run_e2e_test() {
curl -L -o /tmp/kubernetes-test-linux-amd64.tar.gz https://storage.googleapis.com/k8s-release-dev/ci/"${CI_VERSION}"/kubernetes-test-linux-amd64.tar.gz
tar -xzvf /tmp/kubernetes-test-linux-amd64.tar.gz

export GINKGO_FOCUS=${GINKGO_FOCUS:-"\[Conformance\]|\[NodeConformance\]|\[sig-windows\]|\[sig-apps\].CronJob|\[sig-api-machinery\].ResourceQuota|\[sig-scheduling\].SchedulerPreemption"}
export GINKGO_SKIP=${GINKGO_SKIP:-"\[LinuxOnly\]|\[Serial\]|\[Slow\]|\[Excluded:WindowsDocker\]|Networking.Granular.Checks(.*)node-pod.communication|Guestbook.application.should.create.and.stop.a.working.application|device.plugin.for.Windows|Container.Lifecycle.Hook.when.create.a.pod.with.lifecycle.hook.should.execute(.*)http.hook.properly|\[sig-api-machinery\].Garbage.collector"}
export GINKGO_NODES="${GINKGO_NODES:-"4"}"
if [[ ! "${RUN_SERIAL_TESTS:-}" == "true" ]]; then
export GINKGO_FOCUS=${GINKGO_FOCUS:-"\[Conformance\]|\[NodeConformance\]|\[sig-windows\]|\[sig-apps\].CronJob|\[sig-api-machinery\].ResourceQuota|\[sig-scheduling\].SchedulerPreemption"}
export GINKGO_SKIP=${GINKGO_SKIP:-"\[LinuxOnly\]|\[Serial\]|\[Slow\]|\[Excluded:WindowsDocker\]|Networking.Granular.Checks(.*)node-pod.communication|Guestbook.application.should.create.and.stop.a.working.application|device.plugin.for.Windows|Container.Lifecycle.Hook.when.create.a.pod.with.lifecycle.hook.should.execute(.*)http.hook.properly|\[sig-api-machinery\].Garbage.collector"}
export GINKGO_NODES="${GINKGO_NODES:-"4"}"
else
export GINKGO_FOCUS=${GINKGO_FOCUS:-"(\[sig-windows\]|\[sig-scheduling\].SchedulerPreemption|\[sig-autoscaling\].\[Feature:HPA\]|\[sig-apps\].CronJob).*(\[Serial\]|\[Slow\])|(\[Serial\]|\[Slow\]).*(\[Conformance\]|\[NodeConformance\])|\[sig-api-machinery\].Garbage.collector"}
export GINKGO_SKIP=${GINKGO_SKIP:-"\[LinuxOnly\]|\[Excluded:WindowsDocker\]|device.plugin.for.Windows"}
export GINKGO_NODES="${GINKGO_NODES:-"1"}"
fi

ADDITIONAL_E2E_ARGS=()
if [[ "$CI" == "true" ]]; then
Expand Down

0 comments on commit 663e19b

Please sign in to comment.