Skip to content

Commit 0e7e025

Browse files
committed
use kube-cross to build kms plugin
1 parent a300925 commit 0e7e025

File tree

2 files changed

+7
-2
lines changed
  • staging/src/k8s.io/kms/internal/plugins/_mock
  • test/e2e/testing-manifests/auth/encrypt

2 files changed

+7
-2
lines changed

staging/src/k8s.io/kms/internal/plugins/_mock/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:1.24.0-bullseye AS builder
15+
# NOTE: this is just a default placeholder for convenience
16+
# To build this image properly, please invoke test/e2e/testing-manifests/auth/encrypt/run-e2e.sh
17+
ARG BUILDER_IMAGE=golang:latest
18+
FROM $BUILDER_IMAGE AS builder
1619

1720
WORKDIR /workspace
1821

test/e2e/testing-manifests/auth/encrypt/run-e2e.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set -o pipefail
2727

2828
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../../../../.. && pwd -P)"
2929
source "${KUBE_ROOT}/hack/lib/init.sh"
30+
source "${KUBE_ROOT}/build/common.sh"
3031

3132
readonly cluster_name="kms"
3233
readonly registry_name="kind-registry"
@@ -38,7 +39,8 @@ build_and_push_mock_plugin() {
3839
--no-cache \
3940
--platform linux/amd64 \
4041
--output=type=docker \
41-
--build-arg=GOTOOLCHAIN="${GOTOOLCHAIN}" \
42+
--build-arg=GOTOOLCHAIN="${GOTOOLCHAIN:?}" \
43+
--build-arg=BUILDER_IMAGE="${KUBE_CROSS_IMAGE:?}:${KUBE_CROSS_VERSION:?}" \
4244
-t localhost:5000/mock-kms-provider:e2e \
4345
-f staging/src/k8s.io/kms/internal/plugins/_mock/Dockerfile staging/src/k8s.io/ \
4446
--progress=plain;

0 commit comments

Comments
 (0)