Skip to content

Commit

Permalink
PR review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mneverov committed Oct 25, 2024
1 parent 0e7bde6 commit 19a6e24
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,45 @@ Implementation of Kubernetes Network Policies:

## Install

### Manual Installation

There are two manifest in the current repository:

1. For "traditional" Kubernetes Network policies just do:

```
```sh
kubectl apply -f install.yaml
```

2. For the Admin Network Policies and Baseline Admin Network Policies the CRDs has to be installed first:
```

```sh
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/v0.1.5/config/crd/experimental/policy.networking.k8s.io_adminnetworkpolicies.yaml

kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/network-policy-api/v0.1.5/config/crd/experimental/policy.networking.k8s.io_baselineadminnetworkpolicies.yaml
```

and then install the daemonset enabling the features with the corresponding flags:

```
```sh
kubectl apply -f install-anp.yaml
```

### Helm

To install kube-network-policies via Helm run:

```sh
helm install kube-network-policies -n kube-system charts/kube-network-policies
```

Admin Network Policies and Baseline Admin Network Policies features are controlled by `Values.adminNetworkPolicy` and
they are enabled by default. Disable them if needed in values.yaml or use `--set adminNetworkPolicy=false` when running
`helm install` command.

NOTE: the corresponding CRDs must be installed first.


## Metrics

Prometheus metrics are exposed on the address defined by the flag
Expand Down
2 changes: 1 addition & 1 deletion charts/kube-network-policies/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
- /bin/netpol
- --hostname-override=$(MY_NODE_NAME)
- --v=2
{{- if .Values.baselineAdminNetworkPolicy }}
{{- if .Values.adminNetworkPolicy }}
- --nfqueue-id=99
- --admin-network-policy=true
- --baseline-admin-network-policy=true
Expand Down
2 changes: 1 addition & 1 deletion charts/kube-network-policies/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image:
nameOverride: ""
fullnameOverride: ""

baselineAdminNetworkPolicy: true
adminNetworkPolicy: true

serviceAccount:
annotations: {}
Expand Down

0 comments on commit 19a6e24

Please sign in to comment.