Skip to content

Commit

Permalink
add CiliumNetworkPolicy (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchcrab authored Jan 23, 2024
1 parent 57ecd63 commit ea0ca82
Show file tree
Hide file tree
Showing 4 changed files with 31 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's packages adheres to [Semantic Versioning](http://semver.org/s

## [Unreleased]

### Added

- Add `CiliumNetworkPolicy`.

## [1.2.1] - 2023-06-27

### Fixed
Expand Down
16 changes: 16 additions & 0 deletions helm/sloth/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:
labels:
{{- include "sloth.labels" . | nindent 4 }}
name: {{ include "sloth.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
endpointSelector:
matchLabels:
{{- include "sloth.selectorLabels" . | nindent 6 }}
egress:
- toEntities:
- kube-apiserver
{{- end -}}
8 changes: 8 additions & 0 deletions helm/sloth/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"ciliumNetworkPolicy": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"commonPlugins": {
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions helm/sloth/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ image:
repository: giantswarm/sloth
tag: v0.11.0

ciliumNetworkPolicy:
enabled: true

# -- Container resources: requests and limits for CPU, Memory
resources:
limits:
Expand Down

0 comments on commit ea0ca82

Please sign in to comment.