Skip to content

Commit

Permalink
chore: use kubernetes 1.22.2 for test and update makefile (#702)
Browse files Browse the repository at this point in the history
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
  • Loading branch information
aramase committed Nov 1, 2021
1 parent b458c5c commit 31f6bdd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
8 changes: 4 additions & 4 deletions .pipelines/templates/e2e-test-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
kind_v1_21_2_helm:
KIND_K8S_VERSION: v1.21.2
IS_HELM_TEST: true
kind_v1_22_0_helm:
KIND_K8S_VERSION: v1.22.0
kind_v1_22_2_helm:
KIND_K8S_VERSION: v1.22.2
IS_HELM_TEST: true
kind_v1_19_11_deployment_manifest:
KIND_K8S_VERSION: v1.19.11
Expand All @@ -34,8 +34,8 @@ jobs:
kind_v1_21_2_deployment_manifest:
KIND_K8S_VERSION: v1.21.2
IS_HELM_TEST: false
kind_v1_22_0_deployment_manifest:
KIND_K8S_VERSION: v1.22.0
kind_v1_22_2_deployment_manifest:
KIND_K8S_VERSION: v1.22.2
IS_HELM_TEST: false

steps:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM gcr.io/distroless/static
ARG ARCH
COPY ./_output/${ARCH}/secrets-store-csi-driver-provider-azure /bin/
ARG TARGETARCH
COPY ./_output/${TARGETARCH}/secrets-store-csi-driver-provider-azure /bin/

LABEL maintainers="aramase"
LABEL description="Secrets Store CSI Driver Provider Azure"
Expand Down
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ ARCH ?= amd64
OSVERSION ?= 1809
# Output type of docker buildx build
OUTPUT_TYPE ?= registry
BUILDKIT_VERSION ?= v0.8.1
BUILDX_BUILDER_NAME ?= img-builder

# E2E test variables
KIND_VERSION ?= 0.11.0
KIND_K8S_VERSION ?= v1.21.2
KIND_K8S_VERSION ?= v1.22.2

$(TOOLS_DIR)/golangci-lint: $(TOOLS_MOD_DIR)/go.mod $(TOOLS_MOD_DIR)/go.sum $(TOOLS_MOD_DIR)/tools.go
cd $(TOOLS_MOD_DIR) && \
Expand Down Expand Up @@ -82,15 +82,14 @@ build-darwin:

.PHONY: container
container: build
docker build --no-cache --build-arg ARCH=$(ARCH) -t $(IMAGE_TAG) -f Dockerfile .
docker buildx build --platform="linux/$(ARCH)" --no-cache -t $(IMAGE_TAG) -f Dockerfile --progress=plain .

.PHONY: container-linux
container-linux: docker-buildx-builder
docker buildx build \
--no-cache \
--output=type=$(OUTPUT_TYPE) \
--platform="linux/$(ARCH)" \
--build-arg ARCH=$(ARCH) \
-t $(IMAGE_TAG)-linux-$(ARCH) -f Dockerfile .

.PHONY: container-windows
Expand All @@ -99,14 +98,14 @@ container-windows: docker-buildx-builder
--no-cache \
--output=type=$(OUTPUT_TYPE) \
--platform="windows/amd64" \
--build-arg ARCH=$(ARCH) \
--build-arg OSVERSION=$(OSVERSION) \
-t $(IMAGE_TAG)-windows-$(OSVERSION)-$(ARCH) -f windows.Dockerfile .

.PHONY: docker-buildx-builder
docker-buildx-builder:
@if ! DOCKER_CLI_EXPERIMENTAL=enabled docker buildx ls | grep -q container-builder; then\
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx create --name container-builder --use --driver-opt image=moby/buildkit:$(BUILDKIT_VERSION);\
@if ! docker buildx ls | grep $(BUILDX_BUILDER_NAME); then \
docker buildx create --name $(BUILDX_BUILDER_NAME) --use; \
docker buildx inspect $(BUILDX_BUILDER_NAME) --bootstrap; \
fi

.PHONY: container-all
Expand Down
4 changes: 2 additions & 2 deletions windows.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ FROM mcr.microsoft.com/windows/nanoserver:${OSVERSION}
LABEL maintainers="aramase"
LABEL description="Secrets Store CSI Driver Provider Azure"

ARG ARCH
ARG TARGETARCH

COPY ./_output/${ARCH}/secrets-store-csi-driver-provider-azure.exe /secrets-store-csi-driver-provider-azure.exe
COPY ./_output/${TARGETARCH}/secrets-store-csi-driver-provider-azure.exe /secrets-store-csi-driver-provider-azure.exe
COPY --from=core /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll
USER ContainerAdministrator

Expand Down

0 comments on commit 31f6bdd

Please sign in to comment.