Skip to content

Commit b83e6f3

Browse files
Revert "feat: allow scaling telemetry-proxy (#153)"
This reverts commit b801f2b.
1 parent 37b5617 commit b83e6f3

14 files changed

+244
-806
lines changed

.github/workflows/build-test-release.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ jobs:
138138
--set "controllerManager.manager.image.tag=${{ github.run_id }}" \
139139
--set "controllerManager.telemetryProxy.image.repository=${PROXY_IMG}" \
140140
--set "controllerManager.telemetryProxy.image.tag=${{ github.run_id }}" \
141-
--set "telemetryProxy.image.repository=${PROXY_IMG}" \
142-
--set "telemetryProxy.image.tag=${{ github.run_id }}" \
143141
--set "watchdog.image.repository=${WATCHDOG_IMG}" \
144142
--set "watchdog.image.tag=${{ github.run_id }}" \
145143
--set "watchdog.enabled=true" \
@@ -151,18 +149,15 @@ jobs:
151149
--set "controllerManager.manager.image.tag=${{ github.run_id }}" \
152150
--set "controllerManager.telemetryProxy.image.repository=${PROXY_IMG}" \
153151
--set "controllerManager.telemetryProxy.image.tag=${{ github.run_id }}" \
154-
--set "telemetryProxy.image.repository=${PROXY_IMG}" \
155-
--set "telemetryProxy.image.tag=${{ github.run_id }}" \
156152
--set "watchdog.image.repository=${WATCHDOG_IMG}" \
157153
--set "watchdog.image.tag=${{ github.run_id }}" \
158154
--set "watchdog.enabled=true" \
159155
--debug --wait --timeout 4m; then
160156
161157
kubectl describe all -n lumigo-system
162158
kubectl logs -l control-plane=controller-manager -n lumigo-system -c manager
163-
kubectl logs -l control-plane=controller-manager -n lumigo-system -c events-scraper
164-
kubectl logs -l control-plane=watchdog -n lumigo-system -c watchdog
165-
kubectl logs -l control-plane=telemetry-proxy -n lumigo-system -c telemetry-proxy
159+
kubectl logs -l control-plane=controller-manager -n lumigo-system -c telemetry-proxy
160+
kubectl logs -l control-plane=controller-manager -n lumigo-system -c watchdog
166161
exit 1
167162
fi
168163
- name: Run end-to-end tests
@@ -293,7 +288,6 @@ jobs:
293288
kubectl logs -l control-plane=controller-manager -n lumigo-system -c manager
294289
kubectl logs -l control-plane=controller-manager -n lumigo-system -c telemetry-proxy
295290
kubectl logs -l control-plane=watchdog -n lumigo-system -c watchdog
296-
kubectl logs -l control-plane=telemetry-proxy -n lumigo-system -c telemtry-proxy
297291
exit 1
298292
fi
299293
@@ -738,8 +732,6 @@ jobs:
738732
yq e -i ".controllerManager.manager.image.repository = \"${{ matrix.ecr-registry }}/lumigo/lumigo-kubernetes-operator\"" charts/lumigo-operator/values.yaml
739733
yq e -i ".controllerManager.manager.image.tag = \"${{ needs.validate-release-increment.outputs.version }}\"" charts/lumigo-operator/values.yaml
740734
yq e -i ".controllerManager.telemetryProxy.image.repository = \"${{ matrix.ecr-registry }}/lumigo/lumigo-kubernetes-telemetry-proxy\"" charts/lumigo-operator/values.yaml
741-
yq e -i ".telemetryProxy.image.tag = \"${{ needs.validate-release-increment.outputs.version }}\"" charts/lumigo-operator/values.yaml
742-
yq e -i ".telemetryProxy.image.repository = \"${{ matrix.ecr-registry }}/lumigo/lumigo-kubernetes-telemetry-proxy\"" charts/lumigo-operator/values.yaml
743735
yq e -i ".controllerManager.telemetryProxy.image.tag = \"${{ needs.validate-release-increment.outputs.version }}\"" charts/lumigo-operator/values.yaml
744736
yq e -i ".controllerManager.kubeRbacProxy.image.repository = \"${{ matrix.ecr-registry }}/lumigo/lumigo-kubernetes-rbac-proxy\"" charts/lumigo-operator/values.yaml
745737
yq e -i ".controllerManager.kubeRbacProxy.image.tag = \"${{ needs.validate-release-increment.outputs.version }}\"" charts/lumigo-operator/values.yaml

charts/lumigo-operator/templates/controller-deployment-and-webhooks.yaml

Lines changed: 30 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ metadata:
136136
control-plane: controller-manager
137137
lumigo.auto-trace: 'false' # We do not need the operator to inject itself
138138
spec:
139-
# this must be 1, as the events-scraper is not meant run in multiple replicas
140-
# as this will result in duplicate events being scraped
141-
replicas: 1
139+
replicas: {{ .Values.controllerManager.replicas }}
142140
selector:
143141
matchLabels:
144142
control-plane: controller-manager
@@ -231,25 +229,23 @@ spec:
231229
- name: namespace-configurations
232230
mountPath: /lumigo/etc/namespaces/
233231
readOnly: false
234-
- name: events-scraper
232+
- name: telemetry-proxy
235233
image: {{ .Values.controllerManager.telemetryProxy.image.repository }}:{{ .Values.controllerManager.telemetryProxy.image.tag | default .Chart.AppVersion }}
236234
env:
237-
{{- if and .Values.cluster .Values.cluster.name }}
235+
{{- if .Values.cluster }}
236+
{{- if .Values.cluster.name }}
238237
- name: KUBERNETES_CLUSTER_NAME
239238
value: "{{ .Values.cluster.name }}"
239+
{{- end }}
240240
{{- end }}
241241
- name: LUMIGO_DEBUG
242242
value: "{{ .Values.debug.enabled | default false }}"
243+
- name: LUMIGO_ENDPOINT
244+
value: "{{ .Values.endpoint.otlp.url }}"
243245
- name: LUMIGO_LOGS_ENDPOINT
244246
value: "{{ .Values.endpoint.otlp.logs_url }}"
245-
- name: "LUMIGO_WATCHDOG_ENABLED"
246-
value: "{{ .Values.watchdog.enabled }}"
247-
{{ if .Values.watchdog.enabled }}
248247
- name: LUMIGO_METRICS_ENDPOINT
249248
value: "{{ .Values.endpoint.otlp.metrics_url }}"
250-
- name: "LUMIGO_OTELCOL_METRICS_SCRAPING_FREQUENCY"
251-
value: "{{ .Values.watchdog.otelCollector.internalMetricsFrequency }}"
252-
{{ end }}
253249
{{- if .Values.lumigoToken }}
254250
- name: LUMIGO_INFRA_METRICS_TOKEN
255251
valueFrom:
@@ -258,6 +254,28 @@ spec:
258254
key: {{ .Values.lumigoToken.secretKey }}
259255
optional: true
260256
{{- end }}
257+
- name: LUMIGO_INFRA_METRICS_ENABLED
258+
value: "{{ .Values.clusterCollection.metrics.enabled }}"
259+
{{- if .Values.clusterCollection.metrics.enabled }}
260+
- name: LUMIGO_INFRA_METRICS_SCRAPING_FREQUENCY
261+
value: "{{ .Values.clusterCollection.metrics.frequency }}"
262+
- name: LUMIGO_CLUSTER_AGENT_SERVICE
263+
value: "{{ include "helm.fullname" . }}-cluster-agent-service.{{ .Release.Namespace }}.svc.cluster.local"
264+
- name: LUMIGO_PROM_NODE_EXPORTER_PORT
265+
value: "{{ .Values.prometheusNodeExporter.service.nodePort }}"
266+
- name: LUMIGO_KUBE_STATE_METRICS_SERVICE
267+
value: "{{ .Release.Name }}-kube-state-metrics.{{ .Release.Namespace }}.svc.cluster.local"
268+
- name: LUMIGO_KUBE_STATE_METRICS_PORT
269+
value: "{{ index .Values "kube-state-metrics" "service" "port" }}"
270+
- name: LUMIGO_EXPORT_ESSENTIAL_METRICS_ONLY
271+
value: "{{ .Values.clusterCollection.metrics.essentialOnly }}"
272+
{{- end }}
273+
- name: "LUMIGO_WATCHDOG_ENABLED"
274+
value: "{{ .Values.watchdog.enabled }}"
275+
{{ if .Values.watchdog.enabled }}
276+
- name: "LUMIGO_OTELCOL_METRICS_SCRAPING_FREQUENCY"
277+
value: "{{ .Values.watchdog.otelCollector.internalMetricsFrequency }}"
278+
{{ end }}
261279
- name: LUMIGO_OPERATOR_VERSION
262280
value: "{{ $lumigoOperatorVersion }}"
263281
- name: LUMIGO_OPERATOR_DEPLOYMENT_METHOD
@@ -266,8 +284,6 @@ spec:
266284
valueFrom:
267285
fieldRef:
268286
fieldPath: spec.nodeName
269-
- name: OTELCOL_CONFIG_TEMPLATE_FILE_PATH
270-
value: /lumigo/etc/otelcol-events-config.yaml.tpl
271287
ports:
272288
- containerPort: 4318
273289
name: otlphttp
@@ -278,6 +294,7 @@ spec:
278294
capabilities:
279295
drop:
280296
- ALL
297+
# readOnlyRootFilesystem: true
281298
runAsNonRoot: true
282299
runAsUser: 1234
283300
volumeMounts:
@@ -311,19 +328,6 @@ spec:
311328
- ALL
312329
readOnlyRootFilesystem: true
313330
runAsNonRoot: true
314-
- name: namespace-config-server
315-
image: busybox:1.35
316-
command: ["httpd", "-f", "-p", "8077", "-h", "/namespaces"]
317-
volumeMounts:
318-
- name: namespace-configurations
319-
mountPath: /namespaces
320-
securityContext:
321-
allowPrivilegeEscalation: false
322-
capabilities:
323-
drop:
324-
- ALL
325-
readOnlyRootFilesystem: false
326-
runAsNonRoot: false
327331
securityContext:
328332
runAsNonRoot: true
329333
fsGroup: 1234
@@ -334,136 +338,6 @@ spec:
334338
secret:
335339
defaultMode: 420
336340
secretName: '{{ include "helm.fullname" . }}-lumigo-injector-webhook-certs'
337-
- name: namespace-configurations
338-
emptyDir: {}
339-
- name: telemetry-proxy-configurations
340-
emptyDir: {}
341-
---
342-
apiVersion: apps/v1
343-
kind: Deployment
344-
metadata:
345-
name: {{ include "helm.fullname" . }}-telemetry-proxy
346-
labels:
347-
{{- include "helm.labels" . | nindent 4 }}
348-
app.kubernetes.io/component: telemetry-proxy
349-
app.kubernetes.io/created-by: lumigo
350-
app.kubernetes.io/part-of: lumigo
351-
control-plane: telemetry-proxy
352-
lumigo.auto-trace: 'false' # We do not need the operator to inject itself
353-
spec:
354-
replicas: {{ .Values.telemetryProxy.replicas }}
355-
selector:
356-
matchLabels:
357-
control-plane: telemetry-proxy
358-
{{- include "helm.selectorLabels" . | nindent 6 }}
359-
template:
360-
metadata:
361-
labels:
362-
{{- include "helm.selectorLabels" . | nindent 8 }}
363-
control-plane: telemetry-proxy
364-
lumigo.auto-trace: 'false' # We do not need the operator to inject itself
365-
lumigo.cert-digest: {{ print $certFingerprint }}
366-
lumigo.metrics-scraper: 'true' # so it will be assigned with scraping targets by the target-allocator
367-
annotations:
368-
kubectl.kubernetes.io/default-container: telemetry-proxy
369-
spec:
370-
affinity:
371-
nodeAffinity:
372-
requiredDuringSchedulingIgnoredDuringExecution:
373-
nodeSelectorTerms:
374-
- matchExpressions:
375-
- key: kubernetes.io/arch
376-
operator: In
377-
values:
378-
- amd64
379-
- arm64
380-
- key: kubernetes.io/os
381-
operator: In
382-
values:
383-
- linux
384-
containers:
385-
- name: telemetry-proxy
386-
image: {{ .Values.telemetryProxy.image.repository }}:{{ .Values.telemetryProxy.image.tag | default .Chart.AppVersion }}
387-
env:
388-
{{- if and .Values.cluster .Values.cluster.name }}
389-
- name: KUBERNETES_CLUSTER_NAME
390-
value: "{{ .Values.cluster.name }}"
391-
{{- end }}
392-
- name: LUMIGO_DEBUG
393-
value: "{{ .Values.debug.enabled | default false }}"
394-
- name: LUMIGO_ENDPOINT
395-
value: "{{ .Values.endpoint.otlp.url }}"
396-
- name: LUMIGO_LOGS_ENDPOINT
397-
value: "{{ .Values.endpoint.otlp.logs_url }}"
398-
- name: LUMIGO_METRICS_ENDPOINT
399-
value: "{{ .Values.endpoint.otlp.metrics_url }}"
400-
{{- if .Values.lumigoToken }}
401-
- name: LUMIGO_INFRA_METRICS_TOKEN
402-
valueFrom:
403-
secretKeyRef:
404-
name: {{ .Values.lumigoToken.secretName }}
405-
key: {{ .Values.lumigoToken.secretKey }}
406-
optional: true
407-
{{- end }}
408-
- name: LUMIGO_INFRA_METRICS_ENABLED
409-
value: "{{ .Values.clusterCollection.metrics.enabled }}"
410-
{{- if .Values.clusterCollection.metrics.enabled }}
411-
- name: LUMIGO_TARGET_ALLOCATOR_ENDPOINT
412-
value: "http://{{ include "helm.fullname" . }}-target-allocator.{{ .Release.Namespace }}.svc.cluster.local"
413-
- name: LUMIGO_INFRA_METRICS_SCRAPING_FREQUENCY
414-
value: "{{ .Values.clusterCollection.metrics.frequency }}"
415-
- name: LUMIGO_CLUSTER_AGENT_SERVICE
416-
value: "{{ include "helm.fullname" . }}-cluster-agent-service.{{ .Release.Namespace }}.svc.cluster.local"
417-
- name: LUMIGO_PROM_NODE_EXPORTER_PORT
418-
value: "{{ .Values.prometheusNodeExporter.service.nodePort }}"
419-
- name: LUMIGO_KUBE_STATE_METRICS_SERVICE
420-
value: "{{ include "helm.fullname" . }}-kube-state-metrics.{{ .Release.Namespace }}.svc.cluster.local"
421-
- name: LUMIGO_KUBE_STATE_METRICS_PORT
422-
value: "{{ index .Values "kube-state-metrics" "service" "port" }}"
423-
- name: LUMIGO_EXPORT_ESSENTIAL_METRICS_ONLY
424-
value: "{{ .Values.clusterCollection.metrics.essentialOnly }}"
425-
{{- end }}
426-
- name: "LUMIGO_WATCHDOG_ENABLED"
427-
value: "{{ .Values.watchdog.enabled }}"
428-
{{ if .Values.watchdog.enabled }}
429-
- name: "LUMIGO_OTELCOL_METRICS_SCRAPING_FREQUENCY"
430-
value: "{{ .Values.watchdog.otelCollector.internalMetricsFrequency }}"
431-
{{ end }}
432-
- name: LUMIGO_OPERATOR_VERSION
433-
value: "{{ $lumigoOperatorVersion }}"
434-
- name: LUMIGO_OPERATOR_DEPLOYMENT_METHOD
435-
value: "Helm-{{ .Capabilities.HelmVersion.Version }}"
436-
- name: LUMIGO_OPERATOR_NODE_NAME
437-
valueFrom:
438-
fieldRef:
439-
fieldPath: spec.nodeName
440-
- name: LUMIGO_OPERATOR_NAMESPACE_LIST_URL
441-
value: "http://{{ include "helm.fullname" . }}-webhooks-service.{{ .Release.Namespace }}.svc.cluster.local:8077/namespaces_to_monitor.json"
442-
ports:
443-
- containerPort: 4318
444-
name: otlphttp
445-
protocol: TCP
446-
resources: {{- toYaml .Values.telemetryProxy.resources | nindent 10 }}
447-
securityContext:
448-
allowPrivilegeEscalation: false
449-
capabilities:
450-
drop:
451-
- ALL
452-
runAsNonRoot: true
453-
runAsUser: 1234
454-
volumeMounts:
455-
- name: telemetry-proxy-configurations
456-
mountPath: /lumigo/etc/otelcol/
457-
readOnly: false
458-
- name: namespace-configurations
459-
mountPath: /lumigo/etc/namespaces/
460-
readOnly: false
461-
securityContext:
462-
runAsNonRoot: true
463-
fsGroup: 1234
464-
serviceAccountName: lumigo-kubernetes-operator
465-
terminationGracePeriodSeconds: 10
466-
volumes:
467341
- name: namespace-configurations
468342
emptyDir: {}
469343
- name: telemetry-proxy-configurations

0 commit comments

Comments
 (0)