From 01bd62393d47dc24db8a03d88b1fbfeb73b88e62 Mon Sep 17 00:00:00 2001 From: Evan Baker Date: Wed, 16 Feb 2022 20:14:07 +0000 Subject: [PATCH] update cyclonus workflow Signed-off-by: Evan Baker --- .github/workflows/cyclonus-netpol-test.yaml | 2 +- .pipelines/windows-image.yaml | 2 +- Makefile | 2 +- docs/npm.md | 4 ++-- windows.ps1 | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cyclonus-netpol-test.yaml b/.github/workflows/cyclonus-netpol-test.yaml index b23769781f..61910829fc 100644 --- a/.github/workflows/cyclonus-netpol-test.yaml +++ b/.github/workflows/cyclonus-netpol-test.yaml @@ -42,7 +42,7 @@ jobs: - name: Make NPM image run: | - VERSION=cyclonus IMAGE_PLATFORM_ARCHES=linux/amd64 IMAGE_ACTION=load make azure-npm-image + VERSION=cyclonus PLATFORM=linux/amd64 make npm-image - name: Install Azure NPM # set the ConfigMap based on the build matrix diff --git a/.pipelines/windows-image.yaml b/.pipelines/windows-image.yaml index 13e7c5ee52..f7107747ed 100644 --- a/.pipelines/windows-image.yaml +++ b/.pipelines/windows-image.yaml @@ -13,7 +13,7 @@ stages: name: "$(BUILD_POOL_NAME_DEFAULT_WINDOWS)" steps: - powershell: | - powershell.exe -command "& { . .\windows.ps1; Retry({azure-npm-image windows-amd64-$(tag)}) }" + powershell.exe -command "& { . .\windows.ps1; Retry({npm-image windows-amd64-$(tag)}) }" name: "build_npm" displayName: "Build" diff --git a/Makefile b/Makefile index cc9609ed5e..5c80e200e4 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ all-binaries-platforms: ## Make all platform binaries # OS specific binaries/images ifeq ($(GOOS),linux) all-binaries: azure-cnm-plugin azure-cni-plugin azure-cns azure-npm -all-images: azure-npm-image azure-cns-image tools-images +all-images: npm-image cns-image cni-manager-image else all-binaries: azure-cnm-plugin azure-cni-plugin azure-cns azure-npm all-images: diff --git a/docs/npm.md b/docs/npm.md index 0326cb42f8..96d7d8ab62 100644 --- a/docs/npm.md +++ b/docs/npm.md @@ -21,7 +21,7 @@ Now you can secure your Kubernetes cluster with Azure-NPM by applying Kubernetes `azure-npm` can be built directly from the source code in this repository. ``` make azure-npm -make azure-npm-image +make npm-image make azure-npm-archive ``` The first command builds the `azure-npm` executable. @@ -41,4 +41,4 @@ Microsoft docs has a detailed step by step example on how to use Kubernetes netw `azure-npm` translates Kubernetes network policies into a set of `iptables` rules under the hood. When `azure-npm` isn't working as expected, try to **delete all networkpolicies and apply them again**. Also, a good practice is to merge all network policies targeting the same set of pods/labels into one yaml file. -This way, operators can keep the minimum number of network policies and makes it easier for operators to troubleshoot. \ No newline at end of file +This way, operators can keep the minimum number of network policies and makes it easier for operators to troubleshoot. diff --git a/windows.ps1 b/windows.ps1 index 39c051a902..54e242187f 100644 --- a/windows.ps1 +++ b/windows.ps1 @@ -1,6 +1,6 @@ # example usage: -# powershell.exe -command "& { . .\windows.ps1; azure-npm-image }" -# Retry({azure-npm-image $(tag)-windows-amd64}) +# powershell.exe -command "& { . .\windows.ps1; npm-image }" +# Retry({npm-image $(tag)-windows-amd64}) function Retry([Action]$action) { $attempts = 3 @@ -20,7 +20,7 @@ function Retry([Action]$action) { } while ($attempts -gt 0) } -function azure-npm-image { +function npm-image { $env:ACN_PACKAGE_PATH = "github.com/Azure/azure-container-networking" $env:NPM_AI_ID = "014c22bd-4107-459e-8475-67909e96edcb" $env:NPM_AI_PATH = "$env:ACN_PACKAGE_PATH/npm.aiMetadata"