Skip to content

feat: Helm chart v1.10.0 #36

feat: Helm chart v1.10.0

feat: Helm chart v1.10.0 #36

Workflow file for this run

name: Helm Chart CI (PR)
on:
pull_request:
branches:
- 'main'
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
lint-helm:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Helm install
uses: Azure/setup-helm@v1
- name: Lint 'azure-api-management-gateway' Helm chart (Gateway Token)
# We are using dummy gateway parameters here just to show how you can pass them as they are required
run: helm lint helm-charts/azure-api-management-gateway --set gateway.configuration.uri="xyz.configuration.azure-api.net" --set gateway.auth.key="GatewayKey xyz"
- name: Lint 'azure-api-management-gateway' Helm chart (Azure AD App)
# We are using dummy gateway parameters here just to show how you can pass them as they are required
run: helm lint helm-charts/azure-api-management-gateway --set gateway.configuration.uri="xyz.configuration.azure-api.net" --set gateway.auth.type="AzureAdApp" --set gateway.name=gateway-name --set gateway.auth.azureAd.tenant.id=ci-tenant-id --set gateway.auth.azureAd.app.id=ci-app-id --set gateway.auth.azureAd.app.secret=xyz
deploy-helm:
runs-on: ubuntu-latest
needs: lint-helm
strategy:
fail-fast: false
matrix:
enableHighAvailability: [false, true]
kubernetesVersion: [v1.27, v1.26, v1.25, v1.24]
include:
# Images are defined on every Kind release
# See https://github.com/kubernetes-sigs/kind/releases for an overview of the images
- kubernetesVersion: v1.27
kindImage: kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
- kubernetesVersion: v1.26
kindImage: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
- kubernetesVersion: v1.25
kindImage: kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
- kubernetesVersion: v1.24
kindImage: kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab
name: Deploy to Kubernetes ${{ matrix.kubernetesVersion }} (${{ (matrix.enableHighAvailability == true && 'With HA') || 'Without HA' }})
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Helm install
uses: Azure/setup-helm@v1
- name: Create k8s ${{ matrix.kubernetesVersion }} Kind Cluster
uses: helm/kind-action@v1.2.0
with:
version: v0.13.0
node_image: ${{ matrix.kindImage }}
config: ./testing/kind-cluster.yml
- name: Show Kubernetes version
run: |
kubectl version
- name: Show Kubernetes nodes
run: |
kubectl get nodes -o wide
- name: Describe Control-Plane Node
run: |
kubectl describe nodes/chart-testing-control-plane
- name: Describe Worker Node
run: |
kubectl describe nodes/chart-testing-worker
- name: Show Kubernetes nodes
run: |
kubectl get nodes -o wide
- name: Show Helm version
run: |
helm version
- name: Create Kubernetes namespace
run: kubectl create ns apim-gateway
- name: Template Helm chart
run: helm install azure-api-management-gateway ./helm-charts/azure-api-management-gateway --namespace apim-gateway --set gateway.configuration.uri="xyz.configuration.azure-api.net" --set gateway.auth.key="xyz" --set highAvailability.enabled=${{ matrix.enableHighAvailability }} --set gateway.deployment.strategy.type=Recreate --values ./testing/test-config.yml --dry-run
- name: Install Helm chart
run: helm install azure-api-management-gateway ./helm-charts/azure-api-management-gateway --namespace apim-gateway --set gateway.configuration.uri="xyz.configuration.azure-api.net" --set gateway.auth.key="xyz" --set highAvailability.enabled=${{ matrix.enableHighAvailability }} --set gateway.deployment.strategy.type=Recreate --values ./testing/test-config.yml --wait --timeout 10m0s
- name: Show Kubernetes resources
run: kubectl get all --namespace apim-gateway
if: always()
- name: Show Logs for Self-Hosted Gateway
run: kubectl logs -l app.kubernetes.io/name=azure-api-management-gateway --namespace apim-gateway
if: always()