Skip to content

Commit

Permalink
Merge pull request #274 from komodorio/add-node-enricher-to-chart
Browse files Browse the repository at this point in the history
Add node-enricher to komodor-agent chart
  • Loading branch information
rannyeli authored Dec 6, 2023
2 parents 909f2de + c27a8b9 commit 29f9259
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
5 changes: 5 additions & 0 deletions charts/komodor-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ The command removes all the Kubernetes components associated with the chart and
| capabilities | object | See sub-values | Configure the agent capabilities |
| capabilities.metrics | bool | `true` | Fetch workload metrics and send them to komodor backend |
| capabilities.networkMapper | bool | `true` | Enable network mapping capabilities by the komodor agent |
| capabilities.nodeEnricher | bool | `false` | Enable node enricher capabilities by the komodor agent |
| capabilities.actions | bool | `true` | Allow users to perform actions on the cluster, granular access control is defined in the application<boolean> |
| capabilities.helm | bool | `true` | Enable helm capabilities by the komodor agent |
| capabilities.events | object | See sub-values | Configure the agent events capabilities |
Expand Down Expand Up @@ -168,6 +169,10 @@ The command removes all the Kubernetes components associated with the chart and
| components.komodorDaemon.networkSniffer | object | See sub-values | Configure the komodor daemon network sniffer components |
| components.komodorDaemon.networkSniffer.image | object | `{"name":"network-mapper-sniffer","tag":"v1.0.3"}` | Override the komodor agent network sniffer image name or tag. |
| components.komodorDaemon.networkSniffer.resources | object | `{}` | Set custom resources to the komodor agent network sniffer container |
| components.komodorDaemon.nodeEnricher | object | See sub-values | Configure the komodor daemon node enricher components |
| components.komodorDaemon.nodeEnricher.image | object | `{"name":"node_enricher","tag":null}` | Override the komodor agent node enricher image name or tag. |
| components.komodorDaemon.nodeEnricher.resources | object | `{}` | Set custom resources to the komodor agent node enricher container |
| components.komodorDaemon.nodeEnricher.extraEnvVars | list | `[]` | List of additional environment variables, Each entry is a key-value pair |
| allowedResources.event | bool | `true` | Enables watching `event` |
| allowedResources.deployment | bool | `true` | Enables watching `deployments` |
| allowedResources.replicationController | bool | `true` | Enables watching `replicationControllers` |
Expand Down
1 change: 1 addition & 0 deletions charts/komodor-agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ spec:
containers:
{{- include "metrics.daemonset.container" . | nindent 8 }}
{{- include "network_mapper.daemonset.container" . | nindent 8 }}
{{- include "node_enricher.daemonset.container" . | nindent 8 }}
volumes:
{{- include "metrics.daemonset.volumes" . | nindent 8 }}
{{- include "network_mapper.daemonset.volumes" . | nindent 8 }}
Expand Down
21 changes: 21 additions & 0 deletions charts/komodor-agent/templates/node-enricher/_containers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- define "node_enricher.daemonset.container" }}
{{- if .Values.capabilities.nodeEnricher }}
- name: node-enricher
image: {{ .Values.imageRepo }}/{{ .Values.components.komodorDaemon.nodeEnricher.image.name}}:{{ .Values.components.komodorDaemon.nodeEnricher.image.tag | default .Chart.AppVersion }}
imagePullPolicy: {{ .Values.pullPolicy }}
resources:
{{ toYaml .Values.components.komodorDaemon.nodeEnricher.resources | trim | nindent 4 }}
volumeMounts:
- name: configuration
mountPath: /etc/komodor
env:
{{- include "komodorAgent.proxy-conf" . | indent 2 }}
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- if gt (len .Values.components.komodorDaemon.nodeEnricher.extraEnvVars) 0 }}
{{ toYaml .Values.components.komodorDaemon.nodeEnricher.extraEnvVars | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
17 changes: 15 additions & 2 deletions charts/komodor-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ capabilities:
metrics: true
# capabilities.networkMapper -- (bool) Enable network mapping capabilities by the komodor agent
networkMapper: true
# capabilities.nodeEnricher -- (bool) Enable node enricher capabilities by the komodor agent
nodeEnricher: false
# capabilities.actions -- (bool) Allow users to perform actions on the cluster, granular access control is defined in the application<boolean>
actions: true
# capabilities.helm -- Enable helm capabilities by the komodor agent
Expand Down Expand Up @@ -94,7 +96,6 @@ capabilities:
# capabilities.telemetry.collectApiServerMetrics -- Collect metrics from the api server (Should only be used for debugging purposes)
collectApiServerMetrics: false


# components -- Configure the agent components
# @default -- See sub-values
components:
Expand Down Expand Up @@ -218,6 +219,18 @@ components:
# components.komodorDaemon.networkSniffer.resources -- Set custom resources to the komodor agent network sniffer container
resources: {}

# components.komodorDaemon.nodeEnricher -- Configure the komodor daemon node enricher components
# @default -- See sub-values
nodeEnricher:
# components.komodorDaemon.nodeEnricher.image -- Override the komodor agent node enricher image name or tag.
image:
name: node_enricher
tag:
# components.komodorDaemon.nodeEnricher.resources -- Set custom resources to the komodor agent node enricher container
resources: {}
# components.komodorDaemon.nodeEnricher.extraEnvVars -- List of additional environment variables, Each entry is a key-value pair
extraEnvVars: []

allowedResources:
# allowedResources.event -- Enables watching `event`
event: true
Expand Down Expand Up @@ -334,4 +347,4 @@ communications:
serverHost: &serverHost https://app.komodor.com
wsHost: wss://app.komodor.com
tasksServerHost: *serverHost
telemetryServerHost: https://telemetry.komodor.com
telemetryServerHost: https://telemetry.komodor.com

0 comments on commit 29f9259

Please sign in to comment.