use kube-cross to build kms plugin

This commit is contained in:
Benjamin Elder
2025-03-05 15:38:06 -08:00
parent a3009258da
commit 0e7e025c59
2 changed files with 7 additions and 2 deletions

View File

@@ -12,7 +12,10 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM golang:1.24.0-bullseye AS builder # NOTE: this is just a default placeholder for convenience
# To build this image properly, please invoke test/e2e/testing-manifests/auth/encrypt/run-e2e.sh
ARG BUILDER_IMAGE=golang:latest
FROM $BUILDER_IMAGE AS builder
WORKDIR /workspace WORKDIR /workspace

View File

@@ -27,6 +27,7 @@ set -o pipefail
KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../../../../.. && pwd -P)" KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/../../../../.. && pwd -P)"
source "${KUBE_ROOT}/hack/lib/init.sh" source "${KUBE_ROOT}/hack/lib/init.sh"
source "${KUBE_ROOT}/build/common.sh"
readonly cluster_name="kms" readonly cluster_name="kms"
readonly registry_name="kind-registry" readonly registry_name="kind-registry"
@@ -38,7 +39,8 @@ build_and_push_mock_plugin() {
--no-cache \ --no-cache \
--platform linux/amd64 \ --platform linux/amd64 \
--output=type=docker \ --output=type=docker \
--build-arg=GOTOOLCHAIN="${GOTOOLCHAIN}" \ --build-arg=GOTOOLCHAIN="${GOTOOLCHAIN:?}" \
--build-arg=BUILDER_IMAGE="${KUBE_CROSS_IMAGE:?}:${KUBE_CROSS_VERSION:?}" \
-t localhost:5000/mock-kms-provider:e2e \ -t localhost:5000/mock-kms-provider:e2e \
-f staging/src/k8s.io/kms/internal/plugins/_mock/Dockerfile staging/src/k8s.io/ \ -f staging/src/k8s.io/kms/internal/plugins/_mock/Dockerfile staging/src/k8s.io/ \
--progress=plain; --progress=plain;