Skip to content

Commit

Permalink
Add CNP for PMO (#1528)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuentinBisson authored Feb 14, 2024
1 parent da81b1c commit 5b9e6fb
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 34 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 CNP for prometheus-meta-operator to be able to talk to the api-server in locked-down clusters.

## [4.67.3] - 2024-02-13

### Added
Expand Down
36 changes: 36 additions & 0 deletions helm/prometheus-meta-operator/templates/cilium-network-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{{- if .Values.ciliumNetworkPolicy.enabled -}}
{{- if .Capabilities.APIVersions.Has "cilium.io/v2" -}}
apiVersion: "cilium.io/v2"
kind: CiliumNetworkPolicy
metadata:
name: {{ include "resource.default.name" . }}
namespace: {{ include "resource.default.namespace" . }}
labels:
{{- include "labels.common" . | nindent 4 }}
spec:
endpointSelector:
matchLabels:
{{- include "labels.selector" . | nindent 6 }}
egress:
- toEntities:
## Needed to create anything in the MCs.
- kube-apiserver
## Needed to set remote write informations.
- cluster
## Needed to access opsgenie and create heartbeats.
- world
ingress:
- fromEntities:
- cluster
toPorts:
- ports:
- port: "8000"
protocol: "TCP"
rules:
http:
- method: "GET"
path: "/metrics"
- method: "GET"
path: "/healthz"
{{ end }}
{{ end }}

This file was deleted.

0 comments on commit 5b9e6fb

Please sign in to comment.