Skip to content

Commit

Permalink
add Cilium network policy (#31)
Browse files Browse the repository at this point in the history
* add Cilium network policy

* flip network policy to enabled by default
  • Loading branch information
glitchcrab authored Dec 19, 2023
1 parent 5e37e59 commit 17beda8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Add `ciliumnetworkpolicy` (enabled by default).

### Changed

- Configure `gsoci.azurecr.io` as the default container image registry.
Expand Down
16 changes: 16 additions & 0 deletions helm/pss-operator/templates/cilium-network-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.ciliumNetworkPolicy.enabled }}
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: {{ include "resource.default.name" . }}
namespace: {{ include "resource.default.namespace" . }}
labels:
{{- include "labels.common" . | nindent 4 }}
spec:
egress:
- toEntities:
- kube-apiserver
endpointSelector:
matchLabels:
{{- include "labels.selector" . | nindent 6 }}
{{- end }}
3 changes: 3 additions & 0 deletions helm/pss-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ciliumNetworkPolicy:
enabled: true

registry:
domain: gsoci.azurecr.io

Expand Down

0 comments on commit 17beda8

Please sign in to comment.