Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
aefc5ff
Disable hardcoded MaaS curtin scripts
kreeuwijk Aug 6, 2025
1d8283c
Add instructions for re-enabling custom curtin hooks
kreeuwijk Aug 10, 2025
60e9d7e
Add access_cfg_file and access_cfg_file_account for token auth
joekr Sep 24, 2025
226f697
call parent method to prevent infinite recursion
joshfrench Oct 20, 2025
62ff691
Update docs for image-builder v0.1.47
mboersma Oct 20, 2025
9ea1b4f
Merge pull request #1872 from mboersma/update-docs-0.1.47
k8s-ci-robot Oct 20, 2025
3a9f325
Merge pull request #1871 from joshfrench/ec2-kubernetes-datasource-re…
k8s-ci-robot Oct 21, 2025
410a45e
Remove trailing newline from Windows kubelet service definition
mboersma Oct 20, 2025
6946493
Merge pull request #1873 from mboersma/fix-windows-kubelet
k8s-ci-robot Oct 23, 2025
bb55893
feat: flatcar disable usb
Oct 16, 2025
7701754
Merge pull request #1868 from simonostendorf/feat/flatcar-disable-usb
k8s-ci-robot Oct 24, 2025
9bfb2b8
Merge pull request #1854 from joekr/add-access-cfg-file-to-oci
k8s-ci-robot Oct 24, 2025
9e85a5c
Remove --pod-infra-container-image default argument
mboersma Nov 3, 2025
9fecb19
Fix image build in Azure with existing vnet
aurel333 Nov 5, 2025
4829126
Skip OVA rockylinux-8 and photon-5 builds in CI
mboersma Nov 6, 2025
b396b37
Require promotion approval in Azure image pipeline
mboersma Nov 5, 2025
9a6bb76
Merge pull request #1882 from mboersma/skip-broken-ova-builds
k8s-ci-robot Nov 7, 2025
baca417
Expose network tags for GCE builder
anmazzotti Nov 10, 2025
27e050b
feat(outscale): update base image
pierreozoux Nov 11, 2025
98dfe0e
nutanix: pass ansible scp extra args to provisioner
su-mangale Nov 12, 2025
b63108f
Merge pull request #1884 from pierreozoux/patch-1
k8s-ci-robot Nov 12, 2025
081522f
feat(outscale): update ubuntu-2404 base image
jfbus Nov 13, 2025
d6c1d3a
Merge pull request #1887 from outscale/outscale_2404_baseimage
k8s-ci-robot Nov 17, 2025
5b55f64
Merge pull request #1876 from mboersma/fix-windows-kubelet-flag
k8s-ci-robot Nov 17, 2025
18da4f4
Merge pull request #1883 from mboersma/approve-promotion
k8s-ci-robot Nov 18, 2025
e1b4516
Merge pull request #1886 from su-mangale/fix-nutanix-ansible-scp-args
k8s-ci-robot Nov 19, 2025
0e3efca
fix(flatcar): use newer butane instead of ct
mgrzybek Nov 19, 2025
d3ad3bf
fix(flatcar): set butane version to v0.25.1
mgrzybek Nov 20, 2025
9125f76
Pin ansible community general before 12.0.0
mboersma Nov 20, 2025
ead4115
Merge pull request #1890 from mboersma/pin-ansible-community
k8s-ci-robot Nov 24, 2025
923f40d
Merge pull request #1877 from anmazzotti/gce_expose_tags
k8s-ci-robot Nov 24, 2025
c0fa79c
Merge pull request #1889 from mgrzybek/flatcar-butane
k8s-ci-robot Nov 25, 2025
a272d0c
test: 💍 Re-enable CI for photon-5 OVA builds
sriramandev Nov 25, 2025
452f98e
Fix: runc_version overwrite and bump containerd and runc (#1880)
arteonprifti Nov 26, 2025
c51869b
Merge pull request #1892 from sriramandev/topic/ssriraman/reenable-ph…
k8s-ci-robot Nov 30, 2025
e97add7
remove AWS_DEFAULT_REGION from example env file
stelucz Dec 1, 2025
d8f7a3c
Merge pull request #1893 from stelucz/aws-example
k8s-ci-robot Dec 1, 2025
82e9fcd
Update docs for image-builder v0.1.48
mboersma Dec 4, 2025
a2288e5
Fix MAAS Deploy "in memory"
vasartori Dec 5, 2025
910606b
Merge pull request #1895 from mboersma/update-docs-0.1.48
k8s-ci-robot Dec 5, 2025
c66fd00
Merge pull request #1896 from vasartori/feat/maas-in-memory-deploy
k8s-ci-robot Dec 10, 2025
f243232
Fix chrony configuration issues
bmuruga1 Dec 11, 2025
7f20765
Fix Ansible linter errors in Outscale provider tasks
crabearaignee Dec 11, 2025
12fee08
fix: environment path for tc
0nebody Dec 15, 2025
8e8ac00
rockylinux 9.6 iso
0nebody Dec 18, 2025
6492e91
fix: update rockylinux 9 repo urls
0nebody Dec 18, 2025
ed5e03a
cleanup: since 615ec65694 crictl_source_type is no longer used, so re…
johanot Dec 19, 2025
be3d5f0
Merge pull request #1902 from 0nebody/fix-ova-rocky-9
k8s-ci-robot Dec 22, 2025
b61f850
Merge pull request #1901 from 0nebody/etcd-tuning-path
k8s-ci-robot Dec 22, 2025
f419387
Merge pull request #1878 from aurel333/main
k8s-ci-robot Dec 22, 2025
62333fb
Merge pull request #1899 from crabearaignee/fix-outscale-linter-errors
k8s-ci-robot Dec 22, 2025
17f0fd3
Merge pull request #1904 from johanot/cleanup-crictl-source-type
k8s-ci-robot Dec 22, 2025
f53ecb4
Merge pull request #1898 from bmuruga1/fix-chrony-server-dir-and-path
k8s-ci-robot Dec 31, 2025
7208c7d
Merge pull request #1828 from kreeuwijk/patch-3
k8s-ci-robot Jan 5, 2026
0cac7c8
Remove bundled MaaS curtin hook scripts
vasartori Jan 5, 2026
1c54e02
Update CAPC OWNERS
vishesh92 Jan 6, 2026
97bc207
Merge pull request #1907 from vishesh92/update-capc-owners
k8s-ci-robot Jan 6, 2026
087dd7a
Merge pull request #1906 from vasartori/cleanup-maas-curtin
k8s-ci-robot Jan 6, 2026
ce0d0b8
fix: update Azure build VM size to a more modern v2 generation
abenn135 Jan 6, 2026
be8da68
add user specified kernel boot command line parameters to final image
ffais Jan 9, 2026
5ebc601
Merge pull request #1909 from ffais/support-kernel-params
k8s-ci-robot Jan 12, 2026
2561c79
Merge pull request #1908 from abenn135/abenn135/update-azure-vm
k8s-ci-robot Jan 12, 2026
a73e5ca
docs: Clarify no binary/application to install
mloskot Jan 17, 2026
f390cca
Merge pull request #1913 from mloskot/patch-1
k8s-ci-robot Jan 22, 2026
0191d3c
capg: add overwrite-1-34
damdo Jan 25, 2026
72e79b6
capg: add overwrite-1-35
damdo Jan 26, 2026
72d869a
create ctr symlink after installation
salasberryfin Jan 26, 2026
5aaa200
Merge pull request #1915 from damdo/capg-add-overwrite-1-34
k8s-ci-robot Jan 26, 2026
990737c
fix: handle missing secret-userdata.txt for MachinePool/ASG nodes
andrejbella Jan 29, 2026
de8cc09
outscale: update base images to v2026-01-12
jfbus Jan 29, 2026
ecf6160
Merge pull request #1920 from outscale/caposc-omi-2026
k8s-ci-robot Jan 29, 2026
e669ea0
Remove windows-2019 from default Azure e2e
mboersma Jan 29, 2026
f15600f
Fixed arch code for ppc64le
anshuman-agarwala Feb 2, 2026
be9992e
Merge pull request #1922 from anshuman-agarwala/power-fix
k8s-ci-robot Feb 2, 2026
2e2c0f3
Make py3_install more flexible
mboersma Jan 31, 2026
30ac30c
Bump ansible to v2.16.16
mboersma Feb 2, 2026
e7b1d42
Bump default k8s version to v1.34.3
mboersma Feb 2, 2026
6ebc186
Merge pull request #1919 from andrejbella/main
k8s-ci-robot Feb 2, 2026
b7ce84f
fix: move extra_kernel_boot_params default variable from setup to sys…
ffais Feb 4, 2026
56bf9dc
Merge pull request #1927 from ffais/fix-kernel-params
k8s-ci-robot Feb 4, 2026
8a70c7a
Merge pull request #1921 from mboersma/update-azure-e2e
k8s-ci-robot Feb 9, 2026
dc13b1d
Merge pull request #1923 from mboersma/bump-k89s
k8s-ci-robot Feb 9, 2026
d7f8aa3
Merge pull request #1916 from salasberryfin/symlink_ctr_after_install…
k8s-ci-robot Feb 10, 2026
0ed6c7c
Apply regkey for windows 2025
zylxjtu Feb 11, 2026
08f80d2
feat: add SHA256 checksum verification for Kubernetes binaries and im…
sivchari Feb 12, 2026
5de75e4
Merge pull request #1930 from zylxjtu/main
k8s-ci-robot Feb 12, 2026
5e8dd76
fix: validate only configured wasm shims in goss tests
sivchari Feb 13, 2026
8266824
increase azure disk size
sivchari Feb 13, 2026
34268ad
Upgrade CentOS 9 Stream base image on qemu to newer version.
hugoprudente Feb 13, 2026
8354613
fix: goss validation openstack flatcar
Import-Nihilism Feb 19, 2026
fc4c6dc
Merge pull request #1933 from sivchari/fix/azurelinux-3-default-disk-…
k8s-ci-robot Feb 23, 2026
2693334
Merge pull request #1932 from sivchari/fix/goss-wasm-shims-conditiona…
k8s-ci-robot Feb 23, 2026
02a50b3
Merge pull request #1934 from hugoprudente/upgrade-centos9s-iso
k8s-ci-robot Feb 23, 2026
32abe10
Merge pull request #1931 from sivchari/feat/add-kubernetes-binary-che…
k8s-ci-robot Feb 23, 2026
d7289b5
Merge pull request #1925 from mboersma/bump-ansible
k8s-ci-robot Feb 25, 2026
872b12c
Merge pull request #1937 from Import-Nihilism/fix/goss-validation-ope…
k8s-ci-robot Feb 25, 2026
3bfb49b
chore: adding overrides for cpu and machine type on qemu
drew-viles Feb 25, 2026
7ea3ea4
Merge pull request #1938 from drew-viles/qemu-tweaks
k8s-ci-robot Feb 25, 2026
03f7da0
Bump ansible-lint to 25.2.0
ffais Feb 26, 2026
cc3cebf
fix: 🐛 Update packer vsphere plugin location for ova
sriramandev Feb 27, 2026
0f71f9f
Merge pull request #1942 from sriramandev/topic/ssriraman/update-vsph…
k8s-ci-robot Feb 27, 2026
02c1f30
Update Ubuntu ISO images from 24.04.3 to 24.04.4
vasartori Mar 9, 2026
d12c744
Merge pull request #1948 from vasartori/bump-ubuntu
k8s-ci-robot Mar 10, 2026
b906c46
Merge pull request #1924 from mboersma/relax-python
k8s-ci-robot Mar 10, 2026
2ff67f1
Add AlmaLinux 9 OVA build (#1946)
aibarbetta Mar 10, 2026
23be419
Publish Azure SIG images via GitHub Action (#1944)
mboersma Mar 10, 2026
694f5fc
fix: skip IMDS crawl in DataSourceEc2KubernetesLocal init-local phase
damdo Mar 14, 2026
cf07d38
Install networkd-dispatcher package before enabling service in openst…
sivchari Mar 16, 2026
d761106
Update docs for image-builder v0.1.49
mboersma Mar 17, 2026
a7ad44c
Merge pull request #1955 from mboersma/update-docs-v0.1.49
k8s-ci-robot Mar 17, 2026
34a21d4
⚰️ Remove RHEL 8 and related unsupported OS support
Whisper40 Mar 17, 2026
5b2b0a3
Merge pull request #1954 from Whisper40/remove-all-rhel8-support
k8s-ci-robot Mar 17, 2026
e1a559a
Check powershell execution policy for Windows before trying to set a …
marosset Mar 17, 2026
b180495
Check if WindowsAzureTelemtryService is installed before checking ser…
marosset Mar 17, 2026
e507334
Merge pull request #1956 from marosset/windows-winrm-check-execution-…
k8s-ci-robot Mar 17, 2026
64373a4
Merge pull request #1951 from damdo/fix-skip-imds-crawl-init-local-phase
k8s-ci-robot Mar 18, 2026
681e3ad
Merge pull request #1952 from sivchari/ensure-networkd-dispatcher
k8s-ci-robot Mar 18, 2026
924a0f6
Fix Windows failure caused by WinRM connection reset
mboersma Mar 16, 2026
84a43cb
Add Packer debug logging to Azure GH workflow
mboersma Mar 18, 2026
6fe3d3b
delete unnecessary script
sivchari Mar 19, 2026
ed8e904
fix: use ubuntu repo vars in apt config for ubuntu 24 instead of hard…
arno-pons Mar 20, 2026
5250859
Merge pull request #1958 from kubernetes-sigs/winrm-async-restart-svc
k8s-ci-robot Mar 20, 2026
1ebb604
Authenticate with GITHUB_TOKEN to avoid rate limiting
mboersma Mar 23, 2026
0617aeb
Merge pull request #1959 from sivchari/delete-unnecessary-script
k8s-ci-robot Mar 24, 2026
d67174f
Pin Python path to survive tdnf upgrade
mboersma Mar 25, 2026
f5bfb95
scaleway: fix missing containerd_service_url variable
Tomy2e Mar 25, 2026
a5907b1
Merge pull request #1966 from Tomy2e/scw-fix-containerd-variable
k8s-ci-robot Mar 25, 2026
356da47
⬆️ Upgrade ContainerD (1.7 -> 2.2) & Runc Version (1.2 -> 1.3)
Whisper40 Mar 26, 2026
2a2b954
Merge pull request #1949 from Whisper40/containerd-runc-pre-upgrade-2…
k8s-ci-robot Mar 26, 2026
a257aa0
Merge pull request #1962 from mboersma/add-packer-gh-token
k8s-ci-robot Mar 30, 2026
38157df
Windows build fixes (#1963)
mboersma Mar 30, 2026
dd15055
Merge pull request #1965 from mboersma/fix-ova-photon-python
k8s-ci-robot Mar 30, 2026
562d8a5
Revert "fix: update Azure build VM size to a more modern v2 generation"
mboersma Feb 2, 2026
6ca73dc
Update Azure build regions
mboersma Mar 30, 2026
f5c4236
Merge pull request #1926 from mboersma/revert-update-azure-vm
k8s-ci-robot Mar 31, 2026
851caa2
Merge pull request #1939 from ffais/upgrade-ansible-lint
k8s-ci-robot Mar 31, 2026
126de55
Merge pull request #1961 from arno-pons/fix/ubuntu-24-aptconf
k8s-ci-robot Mar 31, 2026
01c5223
Update docs for image-builder v0.1.50
mboersma Apr 1, 2026
fd68cd5
Merge pull request #1971 from mboersma/release-docs-v0.1.50
k8s-ci-robot Apr 1, 2026
f60f2a5
Bump ansible to v2.16.18
mboersma Apr 1, 2026
c7ec99c
set default ubuntu repos for setup role
joshfrench Apr 6, 2026
f65b489
Merge pull request #1972 from mboersma/bump-ansible
k8s-ci-robot Apr 7, 2026
6aca20f
Refactor Azure GH workflow smoke test (#1969)
mboersma Apr 7, 2026
61997b7
Merge pull request #1975 from joshfrench/ubuntu-repo-defaults
k8s-ci-robot Apr 7, 2026
9918404
Bump ansible to v2.18.15 (#1974)
mboersma Apr 14, 2026
aa0c7ae
Fix some ansible lint warnings (#1979)
mboersma Apr 14, 2026
4172d7d
Fix more ansible lint violations (#1980)
mboersma Apr 16, 2026
33c517c
Add westus2 to default replicated regions for Azure SIG images
mboersma Apr 20, 2026
dcba16d
Merge pull request #1982 from mboersma/add-westus2-replicated-region
k8s-ci-robot Apr 21, 2026
acea2c3
Migrate bare ansible_* facts to ansible_facts[] dict form (#1981)
mboersma Apr 21, 2026
3cdeadc
Pin GitHub Actions to SHAs and add dependabot config
mboersma Apr 21, 2026
2c19df0
Merge pull request #1983 from mboersma/pin-github-actions-to-sha
k8s-ci-robot Apr 21, 2026
577469d
dependabot(deps): bump the all-github-actions group with 5 updates
dependabot[bot] Apr 21, 2026
18b0fcd
Merge pull request #1984 from kubernetes-sigs/dependabot/github_actio…
k8s-ci-robot Apr 21, 2026
2efcb57
Update pause image to support windows 2025
zylxjtu Apr 21, 2026
820139b
Merge pull request #1985 from zylxjtu/main
k8s-ci-robot Apr 22, 2026
e6ee1fe
fix: create /etc/sysctl.d directory for Flatcar
njuettner Apr 29, 2026
90cb9f6
fix: bump Flatcar AMI volume_size to 15 GB
njuettner Apr 29, 2026
936d424
Merge pull request #1992 from giantswarm/fix/flatcar-ami-volume-size
k8s-ci-robot Apr 29, 2026
7e36cad
Merge pull request #1991 from giantswarm/fix/flatcar-create-sysctl-dir
k8s-ci-robot May 5, 2026
6517d9e
feat(containerd): adding ability to override the default image_pull_p…
drew-viles May 5, 2026
c599ed7
Merge pull request #1994 from drew-viles/image-pull-timeout
k8s-ci-robot May 5, 2026
598fb62
chore(ci): updating the cloudbuild gcb-docker-gcloud image to the lat…
drew-viles May 6, 2026
3428a09
Merge pull request #1997 from drew-viles/update-gcb-cloudbuild
k8s-ci-robot May 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/actions/configure-k8s-version/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Configure Kubernetes version
description: Update kubernetes.json with the specified Kubernetes version

inputs:
kubernetes_version:
description: 'Kubernetes version (e.g., 1.31.1)'
required: true

runs:
using: composite
steps:
- name: Configure Kubernetes version
working-directory: images/capi/packer/config
shell: bash
env:
KUBERNETES_VERSION: ${{ inputs.kubernetes_version }}
run: |
set -euo pipefail
KUBERNETES_RELEASE=$(echo "${KUBERNETES_VERSION}" | cut -d "." -f -2)
sed -i "s/^ \"kubernetes_series\".*/ \"kubernetes_series\": \"v${KUBERNETES_RELEASE}\",/g" kubernetes.json
sed -i "s/^ \"kubernetes_semver\".*/ \"kubernetes_semver\": \"v${KUBERNETES_VERSION}\",/g" kubernetes.json
sed -i "s/^ \"kubernetes_rpm_version\".*/ \"kubernetes_rpm_version\": \"${KUBERNETES_VERSION}\",/g" kubernetes.json
sed -i "s/^ \"kubernetes_deb_version\".*/ \"kubernetes_deb_version\": \"${KUBERNETES_VERSION}-1.1\",/g" kubernetes.json
grep -q "v${KUBERNETES_VERSION}" kubernetes.json || { echo 'ERROR: kubernetes version not set in kubernetes.json'; exit 1; }
cat kubernetes.json
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Please see the documentation for all configuration options: https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

# github-actions
- directory: "/"
package-ecosystem: "github-actions"
open-pull-requests-limit: 5
schedule:
interval: "weekly"
time: "09:00"
# Use America/New_York Standard Time (UTC -05:00)
timezone: "America/New_York"
groups:
all-github-actions:
patterns: [ "*" ]
commit-message:
prefix: "dependabot"
include: scope
labels:
- "ok-to-test"
- "kind/cleanup"
- "release-note-none"
165 changes: 165 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# Azure SIG Image Builder - GitHub Actions Workflows

This directory contains GitHub Actions workflows for building and publishing Azure Shared Image Gallery (SIG) images using the image-builder project. These workflows are the GitHub Actions equivalent of the Azure DevOps pipelines in `images/capi/packer/azure/.pipelines/`.

## Workflow Overview

The entire pipeline is defined in a single workflow file, `build-azure-sig.yaml`, which contains all stages as separate jobs:

## Pipeline Stages

```
┌─────────┐ ┌──────────┐ ┌─────────────┐ ┌─────────┐
│ Build │───▶│ Test │───▶│ Promote │───▶│ Clean │
└─────────┘ └──────────┘ └─────────────┘ └─────────┘
(optional) (requires approval) (if build succeeded)
```

1. **Build**: Builds the Kubernetes node image using Packer and publishes it to a staging Azure Compute Gallery
2. **Test**: (Optional) Creates a test CAPI cluster using the built image to validate it works correctly
3. **Promote**: (Requires approval) Promotes the image from staging to the community gallery for public access
4. **Clean**: Cleans up staging resources (managed image and staging gallery version) — only runs if the build succeeded

## Usage

### Triggering the Workflow

1. Go to the **Actions** tab in the GitHub repository
2. Select **Build Azure SIG Image** from the workflows list
3. Click **Run workflow**
4. Fill in the required inputs:

| Input | Required | Description | Example |
|-------|----------|-------------|---------|
| `kubernetes_version` | Yes | Kubernetes version to build | `1.31.1` |
| `os` | Yes | Operating system | `Ubuntu`, `AzureLinux`, or `Windows` |
| `os_version` | Yes | OS version | `24.04`, `22.04`, `2022-containerd` |
| `resource_group` | No | Azure resource group | `cluster-api-gallery` |
| `staging_gallery_name` | No | Staging gallery name | `staging_gallery` |
| `gallery_name` | No | Community gallery name | `community_gallery` |
| `packer_flags` | No | Additional Packer flags | `--on-error=abort` |
| `tags` | No | Custom tags for the image | `env=prod team=infra` |
| `skip_test` | No | Skip the test stage | `true` (default) |
| `skip_promote` | No | Skip the promote stage | `false` |

### Supported OS and Version Combinations

| OS | Versions |
|----|----------|
| Ubuntu | `22.04`, `24.04` |
| AzureLinux | `3` |
| Windows | `2022-containerd`, `2025-containerd` |

## Setup Requirements

### 1. Azure OIDC Authentication

Configure Azure OIDC (OpenID Connect) authentication for passwordless authentication from GitHub Actions:

1. Create an Azure AD application and service principal
2. Configure federated credentials for the GitHub repository
3. Grant the service principal necessary permissions on your Azure subscription

Add the following secrets to your GitHub repository or organization:

| Secret | Description |
|--------|-------------|
| `AZURE_CLIENT_ID` | Azure AD application (client) ID |
| `AZURE_TENANT_ID` | Azure AD tenant ID |
| `AZURE_SUBSCRIPTION_ID` | Azure subscription ID |

For detailed instructions, see: [Azure Login with OIDC](https://github.com/azure/login#login-with-openid-connect-oidc-recommended)

### 2. GitHub Environment for Approvals

Create a GitHub Environment for the promotion approval gate:

1. Go to **Settings** → **Environments**
2. Create a new environment named `image-promotion-approval`
3. Enable **Required reviewers** and add the appropriate team members
4. Optionally configure deployment branches and wait timer

### 3. Repository/Organization Variables

Set the following variables in your repository or organization settings for the promotion stage:

| Variable | Description | Example |
|----------|-------------|---------|
| `EULA_LINK` | URL to the EULA for the image | `https://example.com/eula` |
| `PUBLISHER_EMAIL` | Email for the image publisher | `team@example.com` |
| `PUBLISHER_URI` | URI for the image publisher | `https://example.com` |
| `SIG_PUBLISHER` | Publisher name for image definitions | `MyOrganization` |

### 4. Azure Resources

Ensure the following Azure resources are set up:

- **Resource Group**: A resource group for the compute galleries (default: `cluster-api-gallery`)
- **Staging Gallery**: An Azure Compute Gallery for initial image publishing
- **Community Gallery**: An Azure Compute Gallery with community permissions for public access

The workflows will create these resources if they don't exist, provided the service principal has sufficient permissions.

### Required Azure RBAC Permissions

The service principal needs the following permissions:

- `Contributor` on the resource group (or subscription)
- `User Access Administrator` if creating new resource groups
- For community galleries: permissions to create and manage Shared Image Galleries

## Artifacts

The workflows produce the following artifacts:

| Artifact | Description | Retention |
|----------|-------------|-----------|
| `publishing-info` | JSON file with image metadata from the build stage | 7 days |
| `sig-publishing` | JSON file with community gallery publishing details | 30 days |

## Differences from Azure DevOps Pipelines

| Feature | Azure DevOps | GitHub Actions |
|---------|--------------|----------------|
| Authentication | Service Connection | Azure OIDC via `azure/login@v2` |
| Approvals | ADO Environments | GitHub Environments |
| Artifacts | Pipeline Artifacts | GitHub Actions Artifacts |
| Variables | Pipeline Variables | Workflow Inputs + Repository Variables |
| Templates | YAML Templates | Jobs within a single workflow |

## Troubleshooting

### Common Issues

1. **Authentication failures**
- Verify OIDC credentials are correctly configured
- Check that the federated credential matches the repository and branch

2. **Permission denied errors**
- Ensure the service principal has sufficient Azure RBAC permissions
- Verify the subscription ID is correct

3. **Packer build failures**
- Check the Packer output in the build logs
- Verify the OS/version combination is supported
- Ensure the Kubernetes version exists

4. **Test stage failures**
- The test stage requires the Azure CAPI CLI extension
- Ensure sufficient quota for VMs in the target region

### Debug Mode

To enable debug output, add `--on-error=abort` to the `packer_flags` input to preserve the Packer VM on failure for investigation.

> **Warning:** Do **not** use `--on-error=ask` — it will cause the workflow to hang indefinitely waiting for interactive input, consuming the entire job timeout.

For more verbose logging, you can enable GitHub Actions debug logging by setting the `ACTIONS_STEP_DEBUG` secret to `true`.

## Related Documentation

- [Image Builder Documentation](../../docs/book/src/capi/capi.md)
- [Azure Provider Documentation](../../images/capi/packer/azure/README.md)
- [Azure DevOps Pipelines](../../images/capi/packer/azure/.pipelines/)
- [GitHub Actions Documentation](https://docs.github.com/en/actions)
- [Azure Login Action](https://github.com/azure/login)
Loading