Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions charts/nr-ebpf-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,51 @@ Pass environment variables to the agent container if tracing a specific protocol
{{- end }}
{{- end -}}

{{/*
Returns the pull policy for kernel header installer, respecting global.images.pullPolicy
*/}}
{{- define "nr-ebpf-agent.kernelHeaderInstaller.imagePullPolicy" -}}
{{- $globalPullPolicy := .Values.global.images.pullPolicy | default "" -}}
{{- $chartPullPolicy := .Values.ebpfAgent.kernelHeaderInstaller.pullPolicy | default "" -}}
{{- if $globalPullPolicy -}}
{{- $globalPullPolicy -}}
{{- else if $chartPullPolicy -}}
{{- $chartPullPolicy -}}
{{- else -}}
IfNotPresent
{{- end -}}
{{- end -}}

{{/*
Returns the pull policy for eBPF agent, respecting global.images.pullPolicy
*/}}
{{- define "nr-ebpf-agent.ebpfAgent.imagePullPolicy" -}}
{{- $globalPullPolicy := .Values.global.images.pullPolicy | default "" -}}
{{- $chartPullPolicy := .Values.ebpfAgent.image.pullPolicy | default "" -}}
{{- if $globalPullPolicy -}}
{{- $globalPullPolicy -}}
{{- else if $chartPullPolicy -}}
{{- $chartPullPolicy -}}
{{- else -}}
IfNotPresent
{{- end -}}
{{- end -}}

{{/*
Returns the pull policy for OTel collector, respecting global.images.pullPolicy
*/}}
{{- define "nr-ebpf-agent.otelCollector.imagePullPolicy" -}}
{{- $globalPullPolicy := .Values.global.images.pullPolicy | default "" -}}
{{- $chartPullPolicy := .Values.otelCollector.image.pullPolicy | default "" -}}
{{- if $globalPullPolicy -}}
{{- $globalPullPolicy -}}
{{- else if $chartPullPolicy -}}
{{- $chartPullPolicy -}}
{{- else -}}
IfNotPresent
{{- end -}}
{{- end -}}

{{/*
Generate environment variables for disabling protocols and setting sampling latency.
*/}}
Expand Down
4 changes: 2 additions & 2 deletions charts/nr-ebpf-agent/templates/nr-ebpf-agent-daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
initContainers:
- name: kernel-header-installer
image: docker.io/newrelic/newrelic-ebpf-agent:agent-base-image-latest
imagePullPolicy: IfNotPresent
imagePullPolicy: {{ include "nr-ebpf-agent.kernelHeaderInstaller.imagePullPolicy" . }}
command:
- "/bin/bash"
- "-c"
Expand Down Expand Up @@ -72,7 +72,7 @@ spec:
containers:
- name: nr-ebpf-agent
image: {{ .Values.ebpfAgent.image.repository }}:{{ include "nr-ebpf-agent.imageTag" . }}
imagePullPolicy: {{ .Values.ebpfAgent.image.pullPolicy }}
imagePullPolicy: {{ include "nr-ebpf-agent.ebpfAgent.imagePullPolicy" . }}
resources: {{ .Values.ebpfAgent.resources | toYaml | nindent 10 }}
env:
- name: VIZIER_PORT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
{{ else -}}
{{ .Values.otelCollector.image.repository }}:nr-ebpf-otel-collector_0.0.1
{{ end -}}
imagePullPolicy: {{ .Values.otelCollector.image.pullPolicy }}
imagePullPolicy: {{ include "nr-ebpf-agent.otelCollector.imagePullPolicy" . }}
resources: {{- toYaml .Values.otelCollector.resources | nindent 10}}
ports:
- name: otlp
Expand Down
13 changes: 9 additions & 4 deletions charts/nr-ebpf-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,17 @@ protocols:
# Configuration to apply on the eBPF agent daemonset.
ebpfAgent:
image:
# -- eBPF agent image to be deployed.
repository: docker.io/newrelic/newrelic-ebpf-agent
# -- eBPF agent image to be deployed. Defaults to newrelic/newrelic-ebpf-agent. If global.images.registry is set, it will be used instead.
repository: newrelic/newrelic-ebpf-agent
# -- The pull policy is defaulted to IfNotPresent, which skips pulling an image if it already exists. If pullPolicy is defined without a specific value, it is also set to Always.
pullPolicy: IfNotPresent
# -- The tag of the eBPF agent image to be deployed.
tag: ""
# -- Image for the kernel header installer init container. Defaults to newrelic/newrelic-ebpf-agent:agent-base-image-latest. If global.images.registry is set, it will be used instead.
kernelHeaderInstaller:
repository: newrelic/newrelic-ebpf-agent
tag: agent-base-image-latest
pullPolicy: IfNotPresent
resources:
limits:
# -- Max memory allocated to the container.
Expand Down Expand Up @@ -139,8 +144,8 @@ ebpfAgent:
# Configuration to apply on the OpenTelemetry collector daemonset.
otelCollector:
image:
# -- OpenTelemetry collector image to be deployed.
repository: docker.io/newrelic/newrelic-ebpf-agent
# -- OpenTelemetry collector image to be deployed. Defaults to newrelic/newrelic-ebpf-agent. If global.images.registry is set, it will be used instead.
repository: newrelic/newrelic-ebpf-agent
# -- The pull policy is defaulted to IfNotPresent, which skips pulling an image if it already exists. If pullPolicy is defined without a specific value, it is set to Always.
pullPolicy: IfNotPresent
# -- The tag of the OpenTelemetry collector image to be deployed.
Expand Down