forked from linode/cluster-api-provider-linode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduce E2E framework * Use Tilt for provisioning on CI * Allow oud.tilt.dev for e2e test GA * Allow storage.googleapis.com for build-test GA --------- Co-authored-by: Richard Kovacs <[email protected]>
- Loading branch information
Showing
14 changed files
with
146 additions
and
6 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 |
---|---|---|
|
@@ -30,6 +30,7 @@ jobs: | |
proxy.golang.org:443 | ||
sum.golang.org:443 | ||
objects.githubusercontent.com:443 | ||
storage.googleapis.com:443 | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -89,6 +90,64 @@ jobs: | |
- name: Nilcheck | ||
run: make nilcheck | ||
|
||
e2e-test: | ||
needs: [go-build-test, docker-build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@v2 | ||
with: | ||
disable-sudo: true | ||
egress-policy: block | ||
allowed-endpoints: > | ||
api.github.com:443 | ||
github.com:443 | ||
gcr.io:443 | ||
proxy.golang.org:443 | ||
sum.golang.org:443 | ||
*.githubusercontent.com:443 | ||
docker.io:443 | ||
registry-1.docker.io:443 | ||
auth.docker.io:443 | ||
production.cloudflare.docker.com:443 | ||
storage.googleapis.com:443 | ||
registry.k8s.io:443 | ||
*.pkg.dev:443 | ||
*.amazonaws.com:443 | ||
*.blob.core.windows.net:443 | ||
quay.io:443 | ||
*.quay.io:443 | ||
api.snapcraft.io:443 | ||
cloud.tilt.dev:443 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 'stable' | ||
|
||
- name: Docker cache | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('Makefile') }}} | ||
|
||
- name: E2E test | ||
run: make e2etest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.github_token }} | ||
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }} | ||
|
||
- name: Copy logs | ||
if: ${{ always() }} | ||
run: docker cp tilt-control-plane:/var/log .logs | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: ${{ always() }} | ||
with: | ||
name: logs | ||
path: .logs/* | ||
|
||
docker-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -114,7 +173,7 @@ jobs: | |
- name: Docker cache | ||
uses: ScribeMD/[email protected] | ||
with: | ||
key: docker-${{ runner.os }}-${{ hashFiles('Dockerfile') }} | ||
key: docker-${{ runner.os }}-${{ hashFiles('Makefile') }} | ||
|
||
- name: Build the Docker image | ||
run: make docker-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.DS_Store | ||
.idea | ||
bin/* | ||
kind-logs-* | ||
cover.out | ||
kubeconfig |
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
resources: | ||
- manager.yaml | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
images: | ||
- name: controller | ||
newName: controller | ||
newTag: latest |
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,12 @@ | ||
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha1 | ||
kind: LinodeVPC | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: linodevpc | ||
app.kubernetes.io/instance: linodevpc-sample | ||
app.kubernetes.io/part-of: cluster-api-provider-linode | ||
app.kubernetes.io/managed-by: kustomize | ||
app.kubernetes.io/created-by: cluster-api-provider-linode | ||
name: linodevpc-sample | ||
spec: | ||
region: us-east |
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
Empty file.
Empty file.
Empty file.
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,11 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
name: kuttl | ||
nodes: | ||
- role: control-plane | ||
image: kindest/node:v1.28.0 | ||
extraPortMappings: | ||
- containerPort: 8080 | ||
hostPort: 28080 | ||
- containerPort: 8081 | ||
hostPort: 28081 |
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,6 @@ | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestSuite | ||
testDirs: | ||
- e2e/basic | ||
kindConfig: e2e/kind-config.yaml | ||
timeout: 120 |