Skip to content

Commit 40fb9b4

Browse files
pratik705devx
authored andcommitted
fix: Fix NS labels and values
1 parent cbc99f0 commit 40fb9b4

File tree

3 files changed

+1952
-194
lines changed

3 files changed

+1952
-194
lines changed
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
1+
# Security configurations for OpenTelemetry Kube Stack
2+
# Version: 0.11.1
3+
4+
# Cluster name for identification
5+
clusterName: "openCenter-cluster"
6+
7+
# OpenTelemetry Operator configuration
8+
opentelemetry-operator:
9+
enabled: true
10+
manager:
11+
# Security context for operator manager
12+
securityContext:
13+
runAsNonRoot: true
14+
runAsUser: 65534
15+
seccompProfile:
16+
type: RuntimeDefault
17+
containerSecurityContext:
18+
allowPrivilegeEscalation: false
19+
capabilities:
20+
drop:
21+
- ALL
22+
readOnlyRootFilesystem: true
23+
# Resource limits for operator
24+
resources:
25+
requests:
26+
memory: "128Mi"
27+
cpu: "100m"
28+
limits:
29+
memory: "256Mi"
30+
cpu: "500m"
31+
# Admission webhooks configuration
32+
admissionWebhooks:
33+
failurePolicy: "Ignore"
34+
# Security context for webhooks
35+
securityContext:
36+
runAsNonRoot: true
37+
runAsUser: 65534
38+
seccompProfile:
39+
type: RuntimeDefault
40+
containerSecurityContext:
41+
allowPrivilegeEscalation: false
42+
capabilities:
43+
drop:
44+
- ALL
45+
readOnlyRootFilesystem: true
46+
47+
# Default collector configuration with security hardening
48+
defaultCRConfig:
49+
enabled: true
50+
mode: deployment
51+
replicas: 2
52+
53+
# Security contexts
54+
securityContext:
55+
runAsNonRoot: true
56+
runAsUser: 65534
57+
seccompProfile:
58+
type: RuntimeDefault
59+
60+
podSecurityContext:
61+
runAsNonRoot: true
62+
runAsUser: 65534
63+
fsGroup: 65534
64+
seccompProfile:
65+
type: RuntimeDefault
66+
67+
# Container security context
68+
containerSecurityContext:
69+
allowPrivilegeEscalation: false
70+
capabilities:
71+
drop:
72+
- ALL
73+
readOnlyRootFilesystem: true
74+
75+
# Resource limits
76+
resources:
77+
requests:
78+
memory: "128Mi"
79+
cpu: "100m"
80+
limits:
81+
memory: "512Mi"
82+
cpu: "500m"
83+
84+
# Node selector for Linux nodes
85+
nodeSelector:
86+
kubernetes.io/os: linux
87+
88+
# Basic OTLP configuration
89+
config:
90+
receivers:
91+
otlp:
92+
protocols:
93+
grpc:
94+
endpoint: ${env:MY_POD_IP}:4317
95+
http:
96+
endpoint: ${env:MY_POD_IP}:4318
97+
processors:
98+
batch:
99+
timeout: 1s
100+
send_batch_size: 1024
101+
memory_limiter:
102+
limit_mib: 400
103+
spike_limit_mib: 100
104+
check_interval: 5s
105+
exporters:
106+
logging:
107+
loglevel: info
108+
service:
109+
pipelines:
110+
traces:
111+
receivers: [otlp]
112+
processors: [memory_limiter, batch]
113+
exporters: [logging]
114+
metrics:
115+
receivers: [otlp]
116+
processors: [memory_limiter, batch]
117+
exporters: [logging]
118+
logs:
119+
receivers: [otlp]
120+
processors: [memory_limiter, batch]
121+
exporters: [logging]
122+
123+
# Kube State Metrics configuration
124+
kubeStateMetrics:
125+
enabled: true
126+
127+
kube-state-metrics:
128+
# Security context
129+
securityContext:
130+
runAsNonRoot: true
131+
runAsUser: 65534
132+
seccompProfile:
133+
type: RuntimeDefault
134+
containerSecurityContext:
135+
allowPrivilegeEscalation: false
136+
capabilities:
137+
drop:
138+
- ALL
139+
readOnlyRootFilesystem: true
140+
# Resource limits
141+
resources:
142+
requests:
143+
memory: "64Mi"
144+
cpu: "50m"
145+
limits:
146+
memory: "128Mi"
147+
cpu: "200m"
148+
# Node selector
149+
nodeSelector:
150+
kubernetes.io/os: linux
151+
# Prometheus monitoring
152+
prometheus:
153+
monitor:
154+
enabled: true
155+
honorLabels: true
156+
157+
# Node Exporter configuration
158+
nodeExporter:
159+
enabled: true
160+
161+
prometheus-node-exporter:
162+
# Security context
163+
securityContext:
164+
runAsNonRoot: true
165+
runAsUser: 65534
166+
seccompProfile:
167+
type: RuntimeDefault
168+
containerSecurityContext:
169+
allowPrivilegeEscalation: false
170+
capabilities:
171+
drop:
172+
- ALL
173+
readOnlyRootFilesystem: true
174+
# Resource limits
175+
resources:
176+
requests:
177+
memory: "64Mi"
178+
cpu: "50m"
179+
limits:
180+
memory: "128Mi"
181+
cpu: "200m"
182+
# Node selector
183+
nodeSelector:
184+
kubernetes.io/os: linux
185+
# Prometheus monitoring
186+
prometheus:
187+
monitor:
188+
enabled: true
189+
jobLabel: node-exporter
190+
191+
# Kubernetes service monitors (disabled to avoid conflicts with existing monitoring)
192+
kubernetesServiceMonitors:
193+
enabled: false
194+
195+
# Individual component monitors (disabled to avoid conflicts)
196+
kubeApiServer:
197+
enabled: false
198+
kubelet:
199+
enabled: false
200+
kubeControllerManager:
201+
enabled: false
202+
coreDns:
203+
enabled: false
204+
kubeEtcd:
205+
enabled: false
206+
kubeScheduler:
207+
enabled: false
208+
kubeProxy:
209+
enabled: false
210+
211+
# CRDs installation
212+
crds:
213+
installOtel: true
214+
installPrometheus: false # Disabled to avoid conflicts with existing Prometheus stack
215+
216+
# Cleanup job configuration
217+
cleanupJob:
218+
enabled: true
219+
image:
220+
repository: rancher/kubectl
221+
tag: v1.34.1
222+
# Security context for cleanup job
223+
securityContext:
224+
runAsNonRoot: true
225+
runAsUser: 65534
226+
seccompProfile:
227+
type: RuntimeDefault
228+
containerSecurityContext:
229+
allowPrivilegeEscalation: false
230+
capabilities:
231+
drop:
232+
- ALL
233+
readOnlyRootFilesystem: true

0 commit comments

Comments
 (0)