Skip to content

Commit

Permalink
add CiliumNetworkPolicy (disabled by default) (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
glitchcrab authored Dec 19, 2023
1 parent af0e3a2 commit fda7406
Show file tree
Hide file tree
Showing 4 changed files with 35 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` (disabled by default).

### Changed

- Configure `gsoci.azurecr.io` as the default container image registry.
Expand Down
20 changes: 20 additions & 0 deletions helm/teleport-operator/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
{{- if .Values.ciliumNetworkPolicy.enabled }}
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: {{ include "resource.networkPolicy.name" . }}
namespace: {{ include "resource.default.namespace" . }}
labels:
{{- include "labels.common" . | nindent 4 }}
spec:
egress:
- toEntities:
- kube-apiserver
ingress:
- toPorts:
- 8080/tcp
endpointSelector:
matchLabels:
{{- include "labels.selector" . | nindent 6 }}
{{- else }}
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
Expand All @@ -18,3 +37,4 @@ spec:
policyTypes:
- Egress
- Ingress
{{- end }}
8 changes: 8 additions & 0 deletions helm/teleport-operator/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
}
}
},
"ciliumNetworkPolicy": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"image": {
"type": "object",
"properties": {
Expand Down
3 changes: 3 additions & 0 deletions helm/teleport-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ global:
podSecurityStandards:
enforced: false

ciliumNetworkPolicy:
enabled: false

image:
name: "giantswarm/teleport-operator"
registry:
Expand Down

0 comments on commit fda7406

Please sign in to comment.