-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kimmo Lehto <[email protected]>
- Loading branch information
Showing
13 changed files
with
198 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,6 +127,29 @@ jobs: | |
- name: Run smoke tests | ||
run: make smoke-files | ||
|
||
smoke-dynamic: | ||
name: Basic dynamic config smoke | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- {"name":"Go modules cache","uses":"actions/cache@v2","with":{"path":"~/go/pkg/mod\n~/.cache/go-build\n~/Library/Caches/go-build\n%LocalAppData%\\go-build\n","key":"${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}","restore-keys":"${{ runner.os }}-go-\n"}} | ||
- {"name":"Compiled binary cache","uses":"actions/download-artifact@v2","with":{"name":"k0sctl","path":"."}} | ||
- {"name":"Make executable","run":"chmod +x k0sctl"} | ||
- {"name":"K0sctl cache","uses":"actions/cache@v2","with":{"path":"/var/cache/k0sctl\n~/.k0sctl/cache\n!*.log\n","key":"k0sctl-cache"}} | ||
- {"name":"Kubectl cache","uses":"actions/cache@v2","with":{"path":"smoke-test/kubectl\n","key":"kubectl-1.21.3"}} | ||
- {"name":"Go modules cache","uses":"actions/cache@v2","with":{"path":"~/go/pkg/mod\n~/.cache/go-build\n~/Library/Caches/go-build\n%LocalAppData%\\go-build\n","key":"${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}","restore-keys":"${{ runner.os }}-go-\n"}} | ||
- {"name":"Docker Layer Caching For Footloose","uses":"satackey/[email protected]","continue-on-error":true} | ||
|
||
- name: Run smoke tests | ||
run: make smoke-dynamic | ||
|
||
smoke-os-override: | ||
name: OS override smoke test | ||
needs: build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: k0sctl.k0sproject.io/v1beta1 | ||
kind: cluster | ||
spec: | ||
hosts: | ||
- role: controller | ||
uploadBinary: true | ||
ssh: | ||
address: "127.0.0.1" | ||
port: 9022 | ||
keyPath: ./id_rsa_k0s | ||
- role: worker | ||
uploadBinary: true | ||
os: "$OS_OVERRIDE" | ||
ssh: | ||
address: "127.0.0.1" | ||
port: 9023 | ||
keyPath: ./id_rsa_k0s | ||
k0s: | ||
version: "${K0S_VERSION}" | ||
dynamicConfig: true | ||
config: | ||
spec: | ||
telemetry: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
K0SCTL_CONFIG=${K0SCTL_CONFIG:-"k0sctl-dynamic.yaml"} | ||
|
||
set -e | ||
|
||
|
||
. ./smoke.common.sh | ||
trap cleanup EXIT | ||
|
||
deleteCluster | ||
createCluster | ||
|
||
echo "* Starting apply" | ||
../k0sctl apply --config "${K0SCTL_CONFIG}" --debug | ||
echo "* Apply OK" | ||
|
||
max_retry=5 | ||
counter=0 | ||
echo "* Verifying dynamic config reconciliation was a success" | ||
until ../k0sctl config status -o json --config "${K0SCTL_CONFIG}" | grep -q "SuccessfulReconcile" | ||
do | ||
[[ counter -eq $max_retry ]] && echo "Failed!" && exit 1 | ||
echo "* Waiting for a couple of seconds to retry" | ||
sleep 5 | ||
((counter++)) | ||
done | ||
|
||
echo "* OK" | ||
|
||
echo "* Dynamic config reconciliation status:" | ||
../k0sctl config status --config "${K0SCTL_CONFIG}" | ||
|
||
echo "* Done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters