From 9bdcaf19df74add9275d6958c2cac15143e76ba2 Mon Sep 17 00:00:00 2001 From: "xiayu.lyt" Date: Wed, 8 May 2024 11:01:32 +0800 Subject: [PATCH] deploy(helm): fix agent daemonset & config Signed-off-by: xiayu.lyt --- deploy/helm/Chart.yaml | 4 +- .../{configMap.yaml => configmap.yaml} | 3 +- deploy/helm/templates/daemonset.yaml | 101 ++++++++++-------- deploy/helm/values.yaml | 10 +- 4 files changed, 63 insertions(+), 55 deletions(-) rename deploy/helm/templates/{configMap.yaml => configmap.yaml} (80%) diff --git a/deploy/helm/Chart.yaml b/deploy/helm/Chart.yaml index 7be39715..8fd7df8d 100644 --- a/deploy/helm/Chart.yaml +++ b/deploy/helm/Chart.yaml @@ -5,8 +5,8 @@ type: application annotations: category: Analytics licenses: Apache-2.0 -version: 1.0.1 -appVersion: 1.0.0 +version: 1.0.2 +appVersion: 1.0.0-rc.1 icon: https://img.shields.io/github/v/tag/alibaba/kubeskoop keywords: - kubeskoop diff --git a/deploy/helm/templates/configMap.yaml b/deploy/helm/templates/configmap.yaml similarity index 80% rename from deploy/helm/templates/configMap.yaml rename to deploy/helm/templates/configmap.yaml index e728c375..dca77dff 100644 --- a/deploy/helm/templates/configMap.yaml +++ b/deploy/helm/templates/configmap.yaml @@ -6,7 +6,8 @@ metadata: data: config.yaml: |- debugmode: {{ .Values.agent.debug }} - port: {{ .Values.agent.port }} + port: {{ .Values.agent.config.port }} + enableController: {{ .Values.controller.enabled }} metrics: probes: {{- toYaml .Values.config.metricProbes | nindent 6 }} diff --git a/deploy/helm/templates/daemonset.yaml b/deploy/helm/templates/daemonset.yaml index a0673ce2..31ad2909 100644 --- a/deploy/helm/templates/daemonset.yaml +++ b/deploy/helm/templates/daemonset.yaml @@ -30,7 +30,7 @@ spec: image: "{{ .btfhack.repository }}:{{ .btfhack.tag }}" imagePullPolicy: {{ .btfhack.imagePullPolicy }} volumeMounts: - - name: bpfdir + - name: btf-rawdata mountPath: /etc/net-exporter/btf - mountPath: /boot/ name: boot @@ -41,40 +41,44 @@ spec: - /etc/net-exporter/btf/ {{- end }} containers: - - name: inspector - image: "{{ .image.repository }}:{{ .image.tag }}" - imagePullPolicy: {{ .image.imagePullPolicy }} - env: - - name: INSPECTOR_NODENAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - volumeMounts: - - name: configvolume - mountPath: /etc/config/ - - name: bpfdir - mountPath: /etc/net-exporter/btf - - name: procfs - mountPath: /proc - - mountPath: /run/containerd/containerd.sock - name: runtimeendpoint - - mountPath: /var/run/ - name: rundir - - mountPath: /sys/fs/bpf - name: bpfmap - mountPropagation: HostToContainer - - mountPath: /sys/kernel/debug - name: bpfdebugfs - mountPropagation: HostToContainer - - mountPath: /etc/node-hostname - name: hostname - command: - - /bin/inspector - - server - securityContext: - privileged: true - resources: - {{- toYaml .resources | nindent 12 }} + - name: inspector + image: "{{ .image.repository }}:{{ .image.tag }}" + imagePullPolicy: {{ .image.imagePullPolicy }} + env: + - name: INSPECTOR_NODENAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + volumeMounts: + - name: config-volume + mountPath: /etc/config/ + - name: btf-rawdata + mountPath: /etc/net-exporter/btf + - name: proc + mountPath: /proc + - mountPath: /run/containerd/ + name: containerd + - mountPath: /var/run/ + name: dockershim + - mountPath: /sys/fs/bpf + name: bpf-maps + mountPropagation: HostToContainer + - mountPath: /sys/fs/cgroup + name: cgroup + mountPropagation: HostToContainer + - mountPath: /sys/kernel/debug + name: bpf-events + mountPropagation: HostToContainer + - mountPath: /etc/node-hostname + name: hostname + command: + - /bin/inspector + - server + - -d + securityContext: + privileged: true + resources: + {{- toYaml .resources | nindent 12 }} {{- with .nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -84,32 +88,37 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} volumes: - - name: procfs + - name: proc hostPath: path: /proc - - name: runtimeendpoint - hostPath: - path: {{ .config.runtimeEndpoint }} - - name: boot + - name: containerd hostPath: - path: /boot/ - - name: rundir + path: /run/containerd/ + - name: dockershim hostPath: path: /var/run/ - hostPath: path: /sys/fs/bpf type: DirectoryOrCreate - name: bpfmap + name: bpf-maps + - name: boot + hostPath: + path: /boot + type: DirectoryOrCreate + - hostPath: + path: /sys/fs/cgroup + type: DirectoryOrCreate + name: cgroup - hostPath: path: /sys/kernel/debug - name: bpfdebugfs + name: bpf-events - name: hostname hostPath: path: /etc/hostname type: FileOrCreate - - name: configvolume + - name: config-volume configMap: name: kubeskoop-config - - name: bpfdir + - name: btf-rawdata emptyDir: {} {{- end }} diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index 35977af4..a5a2d4ca 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -9,7 +9,6 @@ config: - name: tcp - name: tcpext - name: udp - - name: kernellatency - name: packetloss - name: flow args: @@ -28,10 +27,9 @@ agent: config: debug: false port: 9102 - runtimeEndpoint: /run/containerd/containerd.sock image: repository: kubeskoop/agent - tag: v1.0.0 + tag: v1.0.0-rc.1 imagePullPolicy: IfNotPresent resources: limits: @@ -43,7 +41,7 @@ agent: btfhack: enabled: true repository: kubeskoop/agent - tag: v1.0.0 + tag: v1.0.0-rc.1 imagePullPolicy: IfNotPresent nodeSelector: {} tolerations: {} @@ -56,7 +54,7 @@ controller: lokiEndpoint: http://loki-service:3100 image: repository: kubeskoop/controller - tag: v1.0.0 + tag: v1.0.0-rc.1 imagePullPolicy: IfNotPresent resources: limits: @@ -85,7 +83,7 @@ webconsole: password: kubeskoop image: repository: kubeskoop/controller - tag: v1.0.0 + tag: v1.0.0-rc.1 imagePullPolicy: IfNotPresent resources: limits: