mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
add helm ct install. First step, see https://github.com/kubernetes-sigs/descheduler/pull/895#issuecomment-1203608848
This commit is contained in:
1
.github/ci/ct.yaml
vendored
1
.github/ci/ct.yaml
vendored
@@ -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
|
||||
|
||||
22
.github/workflows/helm.yaml
vendored
22
.github/workflows/helm.yaml
vendored
@@ -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
|
||||
|
||||
3
Makefile
3
Makefile
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user