Skip to content

feat(ack-factory): cleanup Kubernetes labels (#709) #816

feat(ack-factory): cleanup Kubernetes labels (#709)

feat(ack-factory): cleanup Kubernetes labels (#709) #816

Workflow file for this run

# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
name: Charts / Lint and Test
on:
push:
branches:
- master
paths:
- "charts/**"
- "charts/**/*.yaml"
- "charts/**/templates/*.yaml"
- "charts/**/dashboards/*.json"
pull_request:
branches:
- master
paths:
- "charts/**"
- "charts/**/*.yaml"
- "charts/**/templates/*.yaml"
- "charts/**/dashboards/*.json"
permissions:
contents: read
jobs:
# Reference https://github.com/marketplace/actions/helm-chart-testing
lint-chart:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Fetch history
run: git fetch --prune --unshallow
- name: Setup chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: List changed
run: |
changed=$(ct list-changed --config .github/ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Lint
run: |
ct lint --config .github/ct.yaml
# lint-docs:
# runs-on: ubuntu-latest
# needs: lint-chart
# steps:
# - name: Checkout
# uses: actions/checkout@v3.0.2
# - name: Run helm-docs
# run: .github/helm-docs.sh
# kubeval-chart:
# runs-on: ubuntu-latest
# needs:
# - lint-chart
# - lint-docs
# strategy:
# matrix:
# k8s:
# # from https://github.com/instrumenta/kubernetes-json-schema
# - v1.14.10
# - v1.15.7
# - v1.16.4
# - v1.17.4
# - v1.18.1
# steps:
# - name: Checkout
# uses: actions/checkout@v2.3.4
# with:
# fetch-depth: 0
# - name: Run kubeval
# env:
# KUBERNETES_VERSION: ${{ matrix.k8s }}
# run: .github/kubeval.sh
install-chart:
name: install-chart
runs-on: ubuntu-latest
needs:
- lint-chart
# - lint-docs
# - kubeval-chart
strategy:
matrix:
k8s:
# from https://hub.docker.com/r/kindest/node/tags
- v1.28.0
- v1.27.0
- v1.26.0
- v1.25.0
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Setup chart-testing
uses: helm/chart-testing-action@v2.6.1
# with:
# version: v3.3.0
- name: Create kind ${{ matrix.k8s }} cluster
uses: helm/kind-action@v1.9.0
with:
node_image: kindest/node:${{ matrix.k8s }}
wait: 120s
- name: Install Helm dependencies
run: |
# Prometheus Operator CRDs
# datasource=github-tags depName=prometheus-operator/prometheus-operator
PROM_OPERATOR_VERSION=v0.61.0
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
kubectl apply --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/${PROM_OPERATOR_VERSION}/example/prometheus-operator-crd/monitoring.coreos.com_thanosrulers.yaml
# Kyverno
helm repo add kyverno https://kyverno.github.io/kyverno/
helm repo update
helm install my-kyverno kyverno/kyverno --namespace kyverno --create-namespace
sleep 10
kubectl get crds
# Crossplane
helm repo add crossplane-stable https://charts.crossplane.io/stable
helm repo update
helm install crossplane --namespace crossplane-system crossplane-stable/crossplane --create-namespace
sleep 10
# ACK
export ACK_SYSTEM_NAMESPACE=ack-system
# datasource=github-tags depName=aws-controllers-k8s/ec2-controller
export ACK_EC2_VERSION=v0.1.0
# datasource=github-tags depName=aws-controllers-k8s/ecr-controller
export ACK_ECR_VERSION=v0.1.8
# datasource=github-tags depName=aws-controllers-k8s/eks-controller
export ACK_EKS_VERSION=v0.1.7
# datasource=github-tags depName=aws-controllers-k8s/iam-controller
export ACK_IAM_VERSION=v0.1.1
# datasource=github-tags depName=aws-controllers-k8s/s3-controller
export ACK_S3_VERSION=v0.1.6
helm upgrade --install --create-namespace --namespace ${ACK_SYSTEM_NAMESPACE} ack-ec2-controller \
oci://public.ecr.aws/aws-controllers-k8s/ec2-chart --version=${ACK_EC2_VERSION}
helm upgrade --install --create-namespace --namespace ${ACK_SYSTEM_NAMESPACE} ack-ecr-controller \
oci://public.ecr.aws/aws-controllers-k8s/ecr-chart --version=${ACK_ECR_VERSION}
helm upgrade --install --create-namespace --namespace ${ACK_SYSTEM_NAMESPACE} ack-eks-controller \
oci://public.ecr.aws/aws-controllers-k8s/eks-chart --version=${ACK_EKS_VERSION}
helm upgrade --install --create-namespace --namespace ${ACK_SYSTEM_NAMESPACE} ack-iam-controller \
oci://public.ecr.aws/aws-controllers-k8s/iam-chart --version=${ACK_IAM_VERSION}
helm upgrade --install --create-namespace --namespace ${ACK_SYSTEM_NAMESPACE} ack-s3-controller \
oci://public.ecr.aws/aws-controllers-k8s/s3-chart --version=${ACK_S3_VERSION}
sleep 10
- name: Run chart-testing (install)
run: |
ct install --config .github/ct.yaml