mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
use kube-cross to build kms plugin
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user