Skip to content

IDP-2209 Bump default replicas to 2 #90

IDP-2209 Bump default replicas to 2

IDP-2209 Bump default replicas to 2 #90

Workflow file for this run

name: ASP.NET Core chart CI
on:
pull_request:
branches: [main]
paths:
- "charts/aspnetcore/**"
- ".github/workflows/ci-aspnetcore.yml"
jobs:
lint:
name: Lint Helm chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Lint aspnetcore Helm chart
run: helm lint --strict ./charts/aspnetcore/
- name: Validate HELM chart
run: |
helm plugin install https://github.com/melmorabity/helm-kubeconform --version 0.6.7.1
helm kubeconform ./charts/aspnetcore/ --values ./charts/aspnetcore/values.yaml --strict
# Inspired from https://github.com/kedacore/charts/blob/v2.9.4/.github/workflows/ci-core.yml
deploy:
name: Deploy to Kubernetes ${{ matrix.kubernetesVersion }}
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
# Images are defined on every Kind release, see: https://github.com/kubernetes-sigs/kind/releases
kubernetesVersion: [v1.27, v1.28, v1.29, v1.30]
include:
- kubernetesVersion: v1.27
kindImage: kindest/node:v1.27.0@sha256:c6b22e613523b1af67d4bc8a0c38a4c3ea3a2b8fbc5b367ae36345c9cb844518
- kubernetesVersion: v1.28
kindImage: kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31
- kubernetesVersion: v1.29
kindImage: kindest/node:v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570
- kubernetesVersion: v1.30
kindImage: kindest/node:v1.30.0@sha256:446bf1e60d4365b8b37ef832e99a8377cd41178889d86275880667e8034c89d9
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Kubernetes ${{ matrix.kubernetesVersion }} Kind cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1
with:
node_image: ${{ matrix.kindImage }}
- name: Show Kubernetes version
run: kubectl version
- name: Show Kubernetes nodes
run: kubectl get nodes -o wide
- name: Show Helm version
run: helm version
- name: Generate test values
run: |
cat <<EOF > test-values.yaml
environment: Staging
readinessProbe:
httpGet:
path: "/"
port: http
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3
livenessProbe:
httpGet:
path: "/"
port: http
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
failureThreshold: 3
extraVolumes:
- name: configuration
emptyDir: {}
extraVolumeMounts:
- name: configuration
mountPath: /app/config
EOF
- name: Create test namespace
run: kubectl create namespace test
- name: Template Helm chart
run: helm template aspnetcore ./charts/aspnetcore/ --namespace test --values test-values.yaml --debug
- name: Install Helm chart
run: helm install aspnetcore ./charts/aspnetcore/ --namespace test --values test-values.yaml --debug --wait
- name: Show Kubernetes resources
run: kubectl get all --namespace test
if: always()
- name: Describe test pod
run: kubectl describe pods --namespace test
if: always()