Skip to content

Commit

Permalink
Reorder dasmonset, support annotations for serviceaccount (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
nydr authored Jul 31, 2024
1 parent 02968ce commit e2761dc
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 59 deletions.
2 changes: 1 addition & 1 deletion charts/observability/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: https://avatars.githubusercontent.com/u/474424?s=200&v=4

type: application

version: 0.1.5
version: 0.1.6

appVersion: ""
dependencies:
Expand Down
116 changes: 58 additions & 58 deletions charts/observability/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: {{ include "observability.fullname" . }}
name: {{ include "observability.fullname" . }}-vector
annotations:
checksum/vector-config: {{ include (print $.Template.BasePath "/vector-configmap.yaml") . | sha256sum }}
labels:
Expand All @@ -26,63 +26,6 @@ spec:
automountServiceAccountToken: true
serviceAccountName: {{ include "observability.serviceAccountName" . }}
containers:
- name: node-exporter
image: quay.io/prometheus/node-exporter:v1.7.0
imagePullPolicy: IfNotPresent
securityContext:
fsGroup: 65534
runAsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
args:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
- --path.udev.data=/host/root/run/udev/data
- --web.listen-address=[$(HOST_IP)]:9100
securityContext:
readOnlyRootFilesystem: true
env:
- name: HOST_IP
# value: 127.0.0.1
value: 0.0.0.0
ports:
- name: metrics
containerPort: 9100
protocol: TCP
livenessProbe:
failureThreshold: 3
httpGet:
httpHeaders:
path: /
port: 9100
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
httpHeaders:
path: /
port: 9100
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
volumeMounts:
- name: procfs
mountPath: /host/proc
readOnly: true
- name: sysfs
mountPath: /host/sys
readOnly: true
- name: root
mountPath: /host/root
mountPropagation: HostToContainer
readOnly: true
- name: vector
image: "timberio/vector:0.35.1-distroless-libc"
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -141,6 +84,63 @@ spec:
- mountPath: /host/sys
name: sysfs
readOnly: true
- name: node-exporter
image: quay.io/prometheus/node-exporter:v1.7.0
imagePullPolicy: IfNotPresent
securityContext:
fsGroup: 65534
runAsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
args:
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
- --path.udev.data=/host/root/run/udev/data
- --web.listen-address=[$(HOST_IP)]:9100
securityContext:
readOnlyRootFilesystem: true
env:
- name: HOST_IP
# value: 127.0.0.1
value: 0.0.0.0
ports:
- name: metrics
containerPort: 9100
protocol: TCP
livenessProbe:
failureThreshold: 3
httpGet:
httpHeaders:
path: /
port: 9100
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
readinessProbe:
failureThreshold: 3
httpGet:
httpHeaders:
path: /
port: 9100
scheme: HTTP
initialDelaySeconds: 0
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
volumeMounts:
- name: procfs
mountPath: /host/proc
readOnly: true
- name: sysfs
mountPath: /host/sys
readOnly: true
- name: root
mountPath: /host/root
mountPropagation: HostToContainer
readOnly: true
hostNetwork: false
hostPID: true
nodeSelector:
Expand Down
2 changes: 2 additions & 0 deletions charts/observability/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ metadata:
name: {{ include "observability.serviceAccountName" . }}
labels:
{{- include "observability.labels" . | nindent 4 }}
annotations:
{{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
automountServiceAccountToken: true
1 change: 1 addition & 0 deletions charts/observability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ fullnameOverride: ""

serviceAccount:
create: true
annotations: {}
name: ""


Expand Down

0 comments on commit e2761dc

Please sign in to comment.