Skip to content

Commit

Permalink
TEMP: NO MERGE :effort:
Browse files Browse the repository at this point in the history
  • Loading branch information
BenTheElder authored and Antonio Ojea committed Dec 30, 2020
1 parent 5b0b03a commit 1bdc594
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ jobs:
run: make verify

- name: Install kind
run: sudo make install INSTALL_DIR=/usr/local/bin
run: |
sudo make install INSTALL_DIR=/usr/local/bin
/usr/local/bin/kind version
- name: Install kubectl
run: |
Expand All @@ -45,7 +47,7 @@ jobs:
- name: Create single node cluster
if: ${{ matrix.deployment == 'singleNode' }}
run: |
cat <<EOF | kind create cluster -v7 --wait 1m --retain --config=-
cat <<EOF | /usr/local/bin/kind create cluster -v7 --wait 1m --retain --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
Expand All @@ -55,7 +57,7 @@ jobs:
- name: Create multi node cluster
if: ${{ matrix.deployment == 'multiNode' }}
run: |
cat <<EOF | sudo kind create cluster -v7 --wait 1m --retain --config=-
cat <<EOF | sudo /usr/local/bin/kind create cluster -v7 --wait 1m --retain --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
Expand All @@ -74,14 +76,14 @@ jobs:
sudo kubectl get pods -A
- name: Load docker image
run: kind load docker-image busybox:2
run: /usr/local/bin/kind load docker-image busybox:2
continue-on-error: true

- name: Export logs
if: always()
run: |
mkdir -p /tmp/kind/logs
sudo kind export logs /tmp/kind/logs
sudo /usr/local/bin/kind export logs /tmp/kind/logs
sudo chown -R $USER:$USER /tmp/kind/logs
- name: Upload logs
Expand All @@ -92,4 +94,4 @@ jobs:
path: /tmp/kind/logs

- name: Delete cluster
run: kind delete cluster
run: /usr/local/bin/kind delete cluster
98 changes: 98 additions & 0 deletions .github/workflows/temp-delete-me.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Compatibility

on:
workflow_dispatch:
pull_request:
branches:
- master

jobs:
images:
name: Node Images
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Verify
run: make verify

- name: Install kind from current repository
run: |
sudo make install INSTALL_DIR=/usr/local/bin
/usr/local/bin/kind version
- name: Checkout Kubernetes
uses: actions/checkout@v2
with:
path: src/k8s.io/kubernetes
repository: kubernetes/kubernetes
ref: v1.20.0

- name: Install kubectl
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
- name: Build kind base image from current repository
run: |
cd images/base
docker build -t base:test .
cd -
- name: Build kind node image from current repository
run: |
KUBE_PATH="${{ github.workspace }}/src/k8s.io/kubernetes"
/usr/local/bin/kind build node-image --kube-root ${KUBE_PATH} --base-image base:test --image node:test -v7
- name: Create cluster from current repository
run: |
/usr/local/bin/kind create cluster --name kind-pr --wait 1m --image node:test -v7 --retain
- name: Create cluster with last stable version
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64
chmod +x ./kind
cat <<EOF | ./kind create cluster -v7 --wait 1m --image node:test --retain --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
"v": "4"
EOF
- name: Get Cluster status
run: |
# wait network is ready
kubectl wait --for=condition=ready pods --namespace=kube-system -l k8s-app=kube-dns
kubectl get nodes -o wide
kubectl get pods -A
- name: Load docker image
run: |
docker pull busybox
./kind load docker-image busybox
- name: Export logs
if: ${{ always() }}
run: |
mkdir -p /tmp/kind/logs/kind
mkdir -p /tmp/kind/logs/kind-pr
sudo /usr/local/bin/kind export logs --name=kind-pr /tmp/kind/logs/kind-pr
sudo ./kind export logs /tmp/kind/logs/kind
sudo chown -R $USER:$USER /tmp/kind/logs
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: kind-logs-${{ github.run_id }}
path: /tmp/kind/logs

- name: Delete cluster
run: kind delete cluster

0 comments on commit 1bdc594

Please sign in to comment.