Skip to content

Commit 0a9f683

Browse files
committed
misc fast run
Signed-off-by: John Howard <[email protected]>
1 parent 0a3fc59 commit 0a9f683

File tree

5 files changed

+26
-46
lines changed

5 files changed

+26
-46
lines changed

.github/actions/prep-go-runner/action.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ runs:
2424
2525
# https://github.com/actions/runner-images/discussions/3242 github runners are bad at cleanup
2626
echo "Removing large packages"
27-
time sudo apt-get remove -y '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*' '^mysql-.*' azure-cli google-chrome-stable \
28-
firefox powershell mono-devel libgl1-mesa-dri || true
29-
time sudo apt-get autoremove -y || true
30-
time sudo apt-get clean -y || true
31-
echo "Done removing large packages"
27+
#time sudo apt-get remove -y '^dotnet-.*' '^llvm-.*' 'php.*' '^mongodb-.*' '^mysql-.*' azure-cli google-chrome-stable \
28+
# firefox powershell mono-devel libgl1-mesa-dri || true
29+
#time sudo apt-get autoremove -y || true
30+
#time sudo apt-get clean -y || true
31+
#echo "Done removing large packages"
3232
df -h
3333
3434
# Clean up pre-installed tools
@@ -85,4 +85,4 @@ runs:
8585
- name: Install Dependencies
8686
if: steps.cache.outputs.cache-hit != 'true'
8787
shell: bash
88-
run: make mod-download
88+
run: time make mod-download

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,8 +704,8 @@ kind-reload-%: kind-build-and-load-% kind-set-image-% ; ## Use to build specifie
704704

705705
.PHONY: kind-build-and-load ## Use to build all images and load them into kind
706706
kind-build-and-load: kind-build-and-load-kgateway
707-
kind-build-and-load: kind-build-and-load-envoy-wrapper
708-
kind-build-and-load: kind-build-and-load-sds
707+
#kind-build-and-load: kind-build-and-load-envoy-wrapper
708+
#kind-build-and-load: kind-build-and-load-sds
709709

710710
.PHONY: kind-load ## Use to load all images into kind
711711
kind-load: kind-load-kgateway

cmd/kgateway/Dockerfile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
ARG ENVOY_IMAGE
2-
3-
FROM $ENVOY_IMAGE
1+
FROM cgr.dev/chainguard/static@sha256:b2e1c3d3627093e54f6805823e73edd17ab93d6c7202e672988080c863e0412b AS distroless_source
42

53
ARG GOARCH=amd64
6-
# eventually may matter for now https://unix.stackexchange.com/a/701288
7-
# means its not too useful
8-
ENV DEBIAN_FRONTEND=noninteractive
9-
10-
# Update our deps to make cve toil lower
11-
#install wget for our default probes
12-
RUN apt-get update \
13-
&& apt-get upgrade -y \
14-
&& apt-get install --no-install-recommends -y ca-certificates \
15-
&& apt-get install wget -y \
16-
&& rm -rf /var/log/*log /var/lib/apt/lists/* /var/log/apt/* /var/lib/dpkg/*-old /var/cache/debconf/*-old
174

185
COPY kgateway-linux-$GOARCH /usr/local/bin/kgateway
196

hack/kind/setup-kind.sh

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,22 @@ function create_kind_cluster_or_skip() {
5656
fi
5757
}
5858

59+
function create_and_setup() {
60+
create_kind_cluster_or_skip
61+
62+
# 5. Apply the Kubernetes Gateway API CRDs
63+
kubectl apply --server-side -f "https://github.com/kubernetes-sigs/gateway-api/releases/download/$CONFORMANCE_VERSION/$CONFORMANCE_CHANNEL-install.yaml"
64+
65+
# 6. Apply the Kubernetes Gateway API Inference Extension CRDs
66+
kubectl apply --kustomize "https://github.com/kubernetes-sigs/gateway-api-inference-extension/config/crd?ref=$GIE_CRD_VERSION"
67+
68+
. $SCRIPT_DIR/setup-metalllb-on-kind.sh
69+
}
70+
5971
# 1. Create a kind cluster (or skip creation if a cluster with name=CLUSTER_NAME already exists)
6072
# This config is roughly based on: https://kind.sigs.k8s.io/docs/user/ingress/
61-
create_kind_cluster_or_skip
73+
create_and_setup &
74+
KIND_PID=$!
6275

6376
if [[ $SKIP_DOCKER == 'true' ]]; then
6477
# TODO(tim): refactor the Makefile & CI scripts so we're loading local
@@ -73,19 +86,9 @@ else
7386

7487
fi
7588

76-
# 5. Apply the Kubernetes Gateway API CRDs
77-
kubectl apply --server-side -f "https://github.com/kubernetes-sigs/gateway-api/releases/download/$CONFORMANCE_VERSION/$CONFORMANCE_CHANNEL-install.yaml"
78-
79-
# 6. Apply the Kubernetes Gateway API Inference Extension CRDs
80-
kubectl apply --kustomize "https://github.com/kubernetes-sigs/gateway-api-inference-extension/config/crd?ref=$GIE_CRD_VERSION"
81-
82-
# 7. Conformance test setup
83-
if [[ $CONFORMANCE == "true" ]]; then
84-
echo "Running conformance test setup"
85-
. $SCRIPT_DIR/setup-metalllb-on-kind.sh
86-
fi
89+
wait "$KIND_PID"
8790

88-
# 9. Setup localstack
91+
# 7. Setup localstack
8992
if [[ $LOCALSTACK == "true" ]]; then
9093
echo "Setting up localstack"
9194
. $SCRIPT_DIR/setup-localstack.sh

test/e2e/testutils/helper/install.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"helm.sh/helm/v3/pkg/repo"
1010

1111
"github.com/kgateway-dev/kgateway/v2/pkg/logging"
12-
"github.com/kgateway-dev/kgateway/v2/pkg/utils/fsutils"
1312
"github.com/kgateway-dev/kgateway/v2/test/testutils"
1413
)
1514

@@ -30,16 +29,7 @@ func GetLocalChartPath(chartName string, assetDir string) (string, error) {
3029
dir = defaultTestAssetDir
3130
}
3231
rootDir := testutils.GitRootDirectory()
33-
testAssetDir := filepath.Join(rootDir, dir)
34-
if !fsutils.IsDirectory(testAssetDir) {
35-
return "", fmt.Errorf("%s does not exist or is not a directory", testAssetDir)
36-
}
37-
38-
version, err := getChartVersion(testAssetDir, chartName)
39-
if err != nil {
40-
return "", fmt.Errorf("getting Helm chart version: %w", err)
41-
}
42-
return filepath.Join(testAssetDir, fmt.Sprintf("%s-%s.tgz", chartName, version)), nil
32+
return filepath.Join(rootDir, "install/helm", chartName), nil
4333
}
4434

4535
// Parses the Helm index file and returns the version of the chart.

0 commit comments

Comments
 (0)