File tree Expand file tree Collapse file tree 5 files changed +17
-8
lines changed
Expand file tree Collapse file tree 5 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 4141 rename-to : skaffold
4242 chmod : 0755
4343 - run : just k3d
44+ - uses : open-policy-agent/setup-opa@v2
45+ with :
46+ version : latest
4447 - run : pip install httpie
4548 - run : |
4649 just test-e2e-all
Original file line number Diff line number Diff line change @@ -206,8 +206,14 @@ allow {
206206* [ Go language toolchain] ( https://go.dev/doc/install ) .
207207* [ just] ( https://github.com/casey/just#just ) - generic command runner.
208208* [ skaffold] ( https://skaffold.dev/ ) - build and publish docker images and more, ` v2.x ` and above is required.
209- * [ helm] ( https://helm.sh/docs/intro/install/ ) - package manager for k8s.
209+ * [ helm] ( https://helm.sh/docs/intro/install/ ) - package manager for k8s.
210210* [ k3d] ( https://k3d.io/#installation ) - local k8s cluster with docker registry.
211+ * [ kubectl] ( https://kubernetes.io/docs/tasks/tools/ ) - Kubernetes CLI.
212+ * [ opa] ( https://www.openpolicyagent.org/docs#running-opa ) - Open Policy Agent CLI (for e2e tests).
213+ * [ staticcheck] ( https://staticcheck.io/docs/getting-started/ ) - Go static analysis tool (for linting).
214+ * [ httpie] ( https://httpie.io/docs/cli/installation ) - HTTP client (for e2e tests).
215+ * [ jq] ( https://jqlang.github.io/jq/download/ ) - JSON processor (for e2e tests).
216+ * [ crane] ( https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane.md ) - Container image tool (optional, for inspecting images).
211217
212218This project uses ` just ` for building, testing and running ` kube-mgmt ` locally.
213219It is configured from [ justfile] ( ./justfile ) in root directory.
Original file line number Diff line number Diff line change 88 @ just --list
99
1010@_ skaffold-ctx :
11- skaffold config set default-repo localhost:5000
11+ skaffold config set default-repo localhost:5001 --kube-context k3d-kube-mgmt
1212
1313# build and publish image to release regisry, create chart archive
1414build-release :
@@ -62,7 +62,7 @@ rebuild: && build
6262
6363# build and publish docker to local registry
6464build : _skaffold-ctx
65- skaffold build --file-output={{ skaffoldTags}} --platform=linux/ amd64
65+ skaffold build --file-output={{ skaffoldTags}} --platform=linux/ amd64 --kube-context=k3d-kube-mgmt
6666
6767# install into local k8s
6868up : _skaffold-ctx down
@@ -75,11 +75,11 @@ up: _skaffold-ctx down
7575 fi
7676
7777 kubectl delete cm -l kube-mgmt/ e2e=true || true
78- skaffold deploy --build-artifacts={{ skaffoldTags}}
78+ skaffold deploy --build-artifacts={{ skaffoldTags}} --kube-context=k3d-kube-mgmt
7979
8080# remove from local k8s
8181down :
82- skaffold delete || true
82+ skaffold delete --kube-context=k3d-kube-mgmt || true
8383
8484# run only e2e test script
8585test-e2e-sh :
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ registries:
88 create :
99 name : kube-mgmt-registry
1010 host : " 0.0.0.0"
11- hostPort : " 5000 "
11+ hostPort : " 5001 "
1212 config : |
1313 mirrors:
14- "localhost:5000 ":
14+ "localhost:5001 ":
1515 endpoint:
1616 - http://kube-mgmt-registry:5000
1717ports :
Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
22set -ex
33
4- go run github.com/open-policy-agent/ opa build -b $( dirname $0 ) /bundle -o $( dirname $0 ) /bundle.tar.gz
4+ opa build -b $( dirname $0 ) /bundle -o $( dirname $0 ) /bundle.tar.gz
55kubectl delete configmap bundle || true
66kubectl create configmap bundle --from-file $( dirname $0 ) /bundle.tar.gz
You can’t perform that action at this time.
0 commit comments