Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(otel-collector): deploy collector by default on all nodes #3348

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/3348.fixed.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix(otel-collector): deploy collector by default on all nodes
4 changes: 3 additions & 1 deletion deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,9 @@ otellogs:
- CAP_CHOWN

nodeSelector: {}
tolerations: []
tolerations:
- effect: NoSchedule
operator: Exists
affinity: {}

## Extra Environment Values - allows yaml definitions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Source: sumologic/templates/logs/collector/otelcol/daemonset.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
Expand Down Expand Up @@ -33,6 +34,9 @@ spec:
operator: NotIn
values:
- linux
tolerations:
- effect: NoSchedule
operator: Exists
securityContext:
fsGroup: 0
runAsGroup: 0
Expand All @@ -41,7 +45,7 @@ spec:
containers:
- args:
- --config=/etc/otelcol/config.yaml
image: public.ecr.aws/sumologic/sumologic-otel-collector:0.87.0-sumo-0
image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.87.0-sumo-0"
imagePullPolicy: IfNotPresent
name: otelcol
livenessProbe:
Expand Down Expand Up @@ -96,149 +100,15 @@ spec:
protocol: TCP
initContainers: # ensure the host path is owned by the otel user group
- name: changeowner
# yamllint disable-line rule:line-length
image: public.ecr.aws/docker/library/busybox:1.36.0
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
drop:
- ALL
add:
- CAP_CHOWN
command:
- "sh"
- "-c"
- |
chown -R \
0:0 \
/var/lib/storage/otc
volumeMounts:
- mountPath: /var/lib/storage/otc
name: file-storage
volumes:
- configMap:
defaultMode: 420
items:
- key: config.yaml
path: config.yaml
name: RELEASE-NAME-sumologic-otelcol-logs-collector
name: otelcol-config
- hostPath:
path: /var/log/pods
type: ""
name: varlogpods
- hostPath:
path: /var/lib/docker/containers
type: ""
name: varlibdockercontainers
- hostPath:
path: /var/lib/otc
type: DirectoryOrCreate
name: file-storage
- hostPath:
path: /var/log/journal/
type: ""
name: varlogjournal
serviceAccountName: RELEASE-NAME-sumologic-otelcol-logs-collector

---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: RELEASE-NAME-sumologic-otelcol-logs-collector-linux
namespace: sumologic
labels:
app: RELEASE-NAME-sumologic-otelcol-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
spec:
selector:
matchLabels:
app.kubernetes.io/name: RELEASE-NAME-sumologic-otelcol-logs-collector-linux
template:
metadata:
annotations:
checksum/config: "%CONFIG_CHECKSUM%"
labels:
app.kubernetes.io/name: RELEASE-NAME-sumologic-otelcol-logs-collector-linux
app.kubernetes.io/app-name: RELEASE-NAME-sumologic-otelcol-logs-collector
chart: "sumologic-%CURRENT_CHART_VERSION%"
release: "RELEASE-NAME"
heritage: "Helm"
spec:
nodeSelector:
kubernetes.io/os: linux
securityContext:
fsGroup: 0
runAsGroup: 0
runAsUser: 0
priorityClassName: "RELEASE-NAME-sumologic-priorityclass"
containers:
- args:
- --config=/etc/otelcol/config.yaml
image: public.ecr.aws/sumologic/sumologic-otel-collector:0.87.0-sumo-0
imagePullPolicy: IfNotPresent
name: otelcol
livenessProbe:
httpGet:
path: /
port: 13133 # Health Check extension default port.
readinessProbe:
httpGet:
path: /
port: 13133 # Health Check extension default port.
resources:
limits:
cpu: 6
memory: 1Gi
requests:
cpu: 2
memory: 32Mi
volumeMounts:
- mountPath: /etc/otelcol
name: otelcol-config
- mountPath: /var/log/pods
name: varlogpods
readOnly: true
- mountPath: /var/lib/docker/containers
name: varlibdockercontainers
readOnly: true
- mountPath: /var/lib/storage/otc
name: file-storage
- mountPath: /var/log/journal
name: varlogjournal
readOnly: true
env:
- name: LOGS_METADATA_SVC
valueFrom:
configMapKeyRef:
name: sumologic-configmap
key: metadataLogs
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
securityContext:
capabilities:
drop:
- ALL
ports:
- name: pprof
containerPort: 1777
protocol: TCP
- name: metrics
containerPort: 8888
protocol: TCP
initContainers: # ensure the host path is owned by the otel user group
- name: changeowner
image: public.ecr.aws/docker/library/busybox:1.36.0
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
drop:
- ALL
add:
- CAP_CHOWN
command:
- "sh"
- "-c"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ spec:
release: "RELEASE-NAME"
heritage: "Helm"
spec:
tolerations:
- effect: NoSchedule
operator: Exists
securityContext:
fsGroup: 0
runAsGroup: 0
Expand All @@ -33,7 +36,7 @@ spec:
containers:
- args:
- --config=/etc/otelcol/config.yaml
image: public.ecr.aws/sumologic/sumologic-otel-collector:0.87.0-sumo-0
image: "public.ecr.aws/sumologic/sumologic-otel-collector:0.87.0-sumo-0"
imagePullPolicy: IfNotPresent
name: otelcol
livenessProbe:
Expand Down Expand Up @@ -88,14 +91,15 @@ spec:
protocol: TCP
initContainers: # ensure the host path is owned by the otel user group
- name: changeowner
# yamllint disable-line rule:line-length
image: public.ecr.aws/docker/library/busybox:1.36.0
imagePullPolicy: IfNotPresent
securityContext:
capabilities:
drop:
- ALL
add:
- CAP_CHOWN
drop:
- ALL
command:
- "sh"
- "-c"
Expand Down