Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/cyclonus-netpol-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .pipelines/windows-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions docs/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
This way, operators can keep the minimum number of network policies and makes it easier for operators to troubleshoot.
6 changes: 3 additions & 3 deletions windows.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# example usage:
# powershell.exe -command "& { . .\windows.ps1; azure-npm-image <imagetag> }"
# Retry({azure-npm-image $(tag)-windows-amd64})
# powershell.exe -command "& { . .\windows.ps1; npm-image <imagetag> }"
# Retry({npm-image $(tag)-windows-amd64})

function Retry([Action]$action) {
$attempts = 3
Expand All @@ -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"
Expand Down