116 lines
3 KiB
YAML
116 lines
3 KiB
YAML
apiVersion: operator.victoriametrics.com/v1beta1
|
|
kind: VMPodScrape
|
|
metadata:
|
|
name: cnpg
|
|
namespace: victoriametrics
|
|
labels:
|
|
observability.quorate.internal/scrape: 'true'
|
|
spec:
|
|
namespaceSelector:
|
|
matchNames:
|
|
- postgres
|
|
selector:
|
|
matchLabels:
|
|
cnpg.io/cluster: main
|
|
podMetricsEndpoints:
|
|
- port: metrics
|
|
path: /metrics
|
|
interval: 30s
|
|
scrapeTimeout: 10s
|
|
metricRelabelConfigs:
|
|
- action: labeldrop
|
|
regex: (?i)(.*password.*|.*passwd.*|.*secret.*|.*token.*|.*auth.*|.*bearer.*|.*cookie.*|.*dsn.*|.*uri.*|.*url.*|.*cmdline.*|.*command.*|.*args.*|.*env.*)
|
|
---
|
|
apiVersion: cilium.io/v2
|
|
kind: CiliumNetworkPolicy
|
|
metadata:
|
|
name: cnpg-metrics
|
|
namespace: postgres
|
|
spec:
|
|
endpointSelector:
|
|
matchLabels:
|
|
cnpg.io/cluster: main
|
|
ingress:
|
|
- fromEndpoints:
|
|
- matchLabels:
|
|
k8s:io.kubernetes.pod.namespace: victoriametrics
|
|
app.kubernetes.io/name: vmagent
|
|
app.kubernetes.io/instance: main
|
|
toPorts:
|
|
- ports:
|
|
- port: '9187'
|
|
protocol: TCP
|
|
---
|
|
apiVersion: operator.victoriametrics.com/v1beta1
|
|
kind: VMPodScrape
|
|
metadata:
|
|
name: cnpg-operator
|
|
namespace: victoriametrics
|
|
labels:
|
|
observability.quorate.internal/scrape: 'true'
|
|
spec:
|
|
namespaceSelector:
|
|
matchNames:
|
|
- postgres
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: cloudnative-pg
|
|
app.kubernetes.io/instance: cnpg
|
|
podMetricsEndpoints:
|
|
- port: metrics
|
|
path: /metrics
|
|
interval: 30s
|
|
scrapeTimeout: 10s
|
|
metricRelabelConfigs:
|
|
- action: labeldrop
|
|
regex: (?i)(.*password.*|.*passwd.*|.*secret.*|.*token.*|.*auth.*|.*bearer.*|.*cookie.*|.*dsn.*|.*uri.*|.*url.*|.*cmdline.*|.*command.*|.*args.*|.*env.*)
|
|
---
|
|
apiVersion: cilium.io/v2
|
|
kind: CiliumNetworkPolicy
|
|
metadata:
|
|
name: cnpg-operator-metrics
|
|
namespace: postgres
|
|
spec:
|
|
endpointSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: cloudnative-pg
|
|
app.kubernetes.io/instance: cnpg
|
|
ingress:
|
|
- fromEndpoints:
|
|
- matchLabels:
|
|
k8s:io.kubernetes.pod.namespace: victoriametrics
|
|
app.kubernetes.io/name: vmagent
|
|
app.kubernetes.io/instance: main
|
|
toPorts:
|
|
- ports:
|
|
- port: '8080'
|
|
protocol: TCP
|
|
---
|
|
apiVersion: cilium.io/v2
|
|
kind: CiliumNetworkPolicy
|
|
metadata:
|
|
name: vmagent-cnpg
|
|
namespace: victoriametrics
|
|
spec:
|
|
endpointSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: vmagent
|
|
app.kubernetes.io/instance: main
|
|
egress:
|
|
- toEndpoints:
|
|
- matchLabels:
|
|
k8s:io.kubernetes.pod.namespace: postgres
|
|
cnpg.io/cluster: main
|
|
toPorts:
|
|
- ports:
|
|
- port: '9187'
|
|
protocol: TCP
|
|
- toEndpoints:
|
|
- matchLabels:
|
|
k8s:io.kubernetes.pod.namespace: postgres
|
|
app.kubernetes.io/name: cloudnative-pg
|
|
app.kubernetes.io/instance: cnpg
|
|
toPorts:
|
|
- ports:
|
|
- port: '8080'
|
|
protocol: TCP
|