1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00
This commit is contained in:
Lucas Severo Alves
2022-08-08 21:11:20 +02:00
parent d109ea64d0
commit e9c23fe42f
5 changed files with 40 additions and 10 deletions

1
.github/ci/ct.yaml vendored
View File

@@ -2,4 +2,5 @@ chart-dirs:
- charts
helm-extra-args: "--timeout=5m"
check-version-increment: false
helm-extra-set-args: "--set=kind=Deployment --set=podSecurityPolicy.create=false"
target-branch: master

View File

@@ -7,9 +7,11 @@ on:
- release-*
paths:
- 'charts/**'
- '.github/workflows/helm.yaml'
pull_request:
paths:
- 'charts/**'
- '.github/workflows/helm.yaml'
jobs:
lint-and-test:
@@ -23,7 +25,7 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v2.1
with:
version: v3.4.2
version: v3.9.2
- uses: actions/setup-python@v3.1.2
with:
@@ -31,6 +33,8 @@ jobs:
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
with:
version: v3.7.0
- name: Run chart-testing (list-changed)
id: list-changed
@@ -42,3 +46,19 @@ jobs:
- name: Run chart-testing (lint)
run: ct lint --config=.github/ci/ct.yaml --validate-maintainers=false
# Need a multi node cluster so descheduler runs until evictions
- name: Create multi node Kind cluster
run: |
kind create cluster --name kind --config ./hack/kind_config.yaml --wait 2m
# helm-extra-set-args only available after ct 3.6.0
- name: Run chart-testing (install)
run: ct install --config=.github/ci/ct.yaml
- name: E2E after chart install
env:
KUBERNETES_VERSION: "v1.24.0"
KIND_E2E: true
SKIP_INSTALL: true
run: make test-e2e

View File

@@ -150,3 +150,6 @@ build-helm:
test-helm: ensure-helm-install
./test/run-helm-tests.sh
kind-multi-node:
kind create cluster --name kind --config ./hack/kind_config.yaml --wait 2m

View File

@@ -31,7 +31,7 @@ View all CLI options.
## Run Tests
```
GOOS=linux make dev-image
kind create cluster --config hack/kind_config.yaml
make kind-multi-node
kind load docker-image <image name>
kind get kubeconfig > /tmp/admin.conf
export KUBECONFIG=/tmp/admin.conf

View File

@@ -18,8 +18,13 @@ set -x
set -o errexit
set -o nounset
# Set to empty if unbound/empty
SKIP_INSTALL=${SKIP_INSTALL:-}
# This just runs e2e tests.
if [ -n "$KIND_E2E" ]; then
# If we did not set SKIP_INSTALL
if [ -z "$SKIP_INSTALL" ]; then
K8S_VERSION=${KUBERNETES_VERSION:-v1.24.0}
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl && chmod +x kubectl && mv kubectl /usr/local/bin/
wget https://github.com/kubernetes-sigs/kind/releases/download/v0.13.0/kind-linux-amd64
@@ -27,6 +32,7 @@ if [ -n "$KIND_E2E" ]; then
mv kind-linux-amd64 kind
export PATH=$PATH:$PWD
kind create cluster --image kindest/node:${K8S_VERSION} --config=./hack/kind_config.yaml
fi
docker pull kubernetes/pause
kind load docker-image kubernetes/pause
kind get kubeconfig > /tmp/admin.conf