Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build standalone azure-ipam installer image #2339

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .pipelines/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ stages:
name: "$(BUILD_POOL_NAME_LINUX_AMD64)"
strategy:
matrix:
azure_ipam_linux_amd64:
arch: amd64
name: azure-ipam
os: linux
azure_ipam_windows2019_amd64:
arch: amd64
name: azure-ipam
os: windows
os_version: ltsc2019
azure_ipam_windows2022_amd64:
arch: amd64
name: azure-ipam
os: windows
os_version: ltsc2022
cni_linux_amd64:
arch: amd64
name: cni
Expand Down Expand Up @@ -239,6 +253,10 @@ stages:
name: "$(BUILD_POOL_NAME_LINUX_ARM64)"
strategy:
matrix:
azure_ipam_linux_arm64:
arch: arm64
name: azure-ipam
os: linux
cni_linux_arm64:
arch: arm64
name: cni
Expand Down Expand Up @@ -312,6 +330,10 @@ stages:
name: "$(BUILD_POOL_NAME_DEFAULT)"
strategy:
matrix:
azure_ipam:
name: azure-ipam
os_versions: ltsc2019 ltsc2022
platforms: linux/amd64 linux/arm64 windows/amd64
cni:
name: cni
os_versions: ltsc2019 ltsc2022
Expand Down
54 changes: 52 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ endif

## Image name definitions.
ACNCLI_IMAGE = acncli
AZURE_IPAM_IMAGE = azure-ipam
CNI_IMAGE = azure-cni
CNI_DROPGZ_IMAGE = cni-dropgz
CNI_DROPGZ_TEST_IMAGE = cni-dropgz-test
Expand All @@ -256,6 +257,8 @@ NPM_IMAGE = azure-npm

## Image platform tags.
ACNCLI_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(ACN_VERSION)
AZURE_IPAM_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(AZURE_IPAM_VERSION)
AZURE_IPAM_WINDOWS_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(AZURE_IPAM_VERSION)-$(OS_SKU_WIN)
CNI_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNI_VERSION)
CNI_WINDOWS_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNI_VERSION)-$(OS_SKU_WIN)
CNI_DROPGZ_PLATFORM_TAG ?= $(subst /,-,$(PLATFORM))$(if $(OS_VERSION),-$(OS_VERSION),)-$(CNI_DROPGZ_VERSION)
Expand Down Expand Up @@ -335,12 +338,42 @@ acncli-image-pull: ## pull cni-manager container image.
TAG=$(ACNCLI_PLATFORM_TAG)


# azure-ipam

azure-ipam-image-name: # util target to print the azure-ipam image name.
@echo $(AZURE_IPAM_IMAGE)

azure-ipam-image-name-and-tag: # util target to print the azure-ipam image name and tag.
@echo $(IMAGE_REGISTRY)/$(AZURE_IPAM_IMAGE):$(AZURE_IPAM_PLATFORM_TAG)

azure-ipam-image: ## build azure-ipam container image.
$(MAKE) container \
DOCKERFILE=azure-ipam/$(OS).Dockerfile \
IMAGE=$(AZURE_IPAM_IMAGE) \
EXTRA_BUILD_ARGS='--build-arg OS=$(OS) --build-arg ARCH=$(ARCH) --build-arg OS_VERSION=$(OS_VERSION)' \
PLATFORM=$(PLATFORM) \
TAG=$(AZURE_IPAM_PLATFORM_TAG) \
OS=$(OS) \
ARCH=$(ARCH) \
OS_VERSION=$(OS_VERSION)

azure-ipam-image-push: ## push azure-ipam container image.
$(MAKE) container-push \
IMAGE=$(AZURE_IPAM_IMAGE) \
TAG=$(AZURE_IPAM_PLATFORM_TAG)

azure-ipam-image-pull: ## pull azure-ipam container image.
$(MAKE) container-pull \
IMAGE=$(AZURE_IPAM_IMAGE) \
TAG=$(AZURE_IPAM_PLATFORM_TAG)


# cni

cni-image-name: # util target to print the CNI image name.
cni-image-name: # util target to print the cni image name.
@echo $(CNI_IMAGE)

cni-image-name-and-tag: # util target to print the CNI image name and tag.
cni-image-name-and-tag: # util target to print the cni image name and tag.
@echo $(IMAGE_REGISTRY)/$(CNI_IMAGE):$(CNI_PLATFORM_TAG)

cni-image: ## build cni container image.
Expand Down Expand Up @@ -554,6 +587,23 @@ acncli-skopeo-archive: ## export tar archive of acncli multiplat container manif
IMAGE=$(ACNCLI_IMAGE) \
TAG=$(ACN_VERSION)

azure-ipam-manifest-build: ## build azure-ipam multiplat container manifest.
$(MAKE) manifest-build \
PLATFORMS="$(PLATFORMS)" \
IMAGE=$(AZURE_IPAM_IMAGE) \
TAG=$(AZURE_IPAM_VERSION) \
OS_VERSIONS="$(OS_VERSIONS)"

azure-ipam-manifest-push: ## push azure-ipam multiplat container manifest
$(MAKE) manifest-push \
IMAGE=$(AZURE_IPAM_IMAGE) \
TAG=$(AZURE_IPAM_VERSION)

azure-ipam-skopeo-archive: ## export tar archive of azure-ipam multiplat container manifest.
$(MAKE) manifest-skopeo-archive \
IMAGE=$(AZURE_IPAM_IMAGE) \
TAG=$(AZURE_IPAM_VERSION)

cni-manifest-build: ## build cni multiplat container manifest.
$(MAKE) manifest-build \
PLATFORMS="$(PLATFORMS)" \
Expand Down
5 changes: 2 additions & 3 deletions azure-ipam/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ require (
github.com/billgraziano/dpapi v0.4.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/containerd v1.7.6 // indirect
github.com/coreos/go-iptables v0.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
Expand Down Expand Up @@ -77,8 +76,6 @@ require (
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect
google.golang.org/grpc v1.58.2 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand All @@ -94,3 +91,5 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.3.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/Microsoft/hcsshim => github.com/vakalapa/hcsshim v0.9.1-0.20211203205307-837d4d06df77
Loading