270 lines
8.5 KiB
YAML
270 lines
8.5 KiB
YAML
---
|
|
apiVersion: instana.io/v1
|
|
kind: InstanaAgent
|
|
metadata:
|
|
name: instana-agent
|
|
namespace: instana-agent
|
|
spec:
|
|
zone:
|
|
name: {{ .Values.zone.name }}
|
|
{{- if .Values.zones }}
|
|
{{- toYaml $.Values.zones | nindent 4 }}
|
|
{{- end }}
|
|
cluster:
|
|
name: {{ .Values.cluster.name }}
|
|
agent:
|
|
{{- if .Values.agent.mode }}
|
|
mode: {{ .Values.agent.mode }}
|
|
{{- end }}
|
|
{{- if .Values.agent.key }}
|
|
key: {{ .Values.agent.key }}
|
|
{{- end }}
|
|
{{- if .Values.agent.downloadKey }}
|
|
downloadKey: {{ .Values.agent.downloadKey }}
|
|
{{- end }}
|
|
{{- if .Values.agent.keysSecret }}
|
|
keysSecret: {{ .Values.agent.keysSecret }}
|
|
{{- end }}
|
|
{{- if .Values.agent.listenAddress }}
|
|
listenAddress: {{ .Values.agent.listenAddress }}
|
|
{{- end }}
|
|
endpointHost: {{ .Values.agent.endpointHost }}
|
|
{{- if eq (typeOf .Values.agent.endpointPort) "string" }}
|
|
endpointPort: {{ .Values.agent.endpointPort }}
|
|
{{- else }}
|
|
endpointPort: {{ .Values.agent.endpointPort | quote }}
|
|
{{- end }}
|
|
{{- if .Values.agent.additionalBackends }}
|
|
additionalBackends:
|
|
{{- range $.Values.agent.additionalBackends }}
|
|
- endpointHost: {{ .endpointHost }}
|
|
{{- if eq (typeOf .endpointPort) "string" }}
|
|
endpointPort: {{ .endpointPort }}
|
|
{{- else }}
|
|
endpointPort: {{ .endpointPort | quote }}
|
|
{{- end }}
|
|
{{- if .key }}
|
|
key: {{ .key }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.agent.tls }}
|
|
{{- if or .Values.agent.tls.secretName (and .Values.agent.tls.certificate .Values.agent.tls.key) }}
|
|
tls:
|
|
{{- if .Values.agent.tls.secretName }}
|
|
secretName: {{ .Values.agent.tls.secretName }}
|
|
{{- end }}
|
|
{{- if .Values.agent.tls.certificate }}
|
|
certificate: {{ .Values.agent.tls.certificate }}
|
|
{{- end }}
|
|
{{- if .Values.agent.tls.key }}
|
|
key: {{ .Values.agent.tls.key }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.agent.image }}
|
|
{{- if or .Values.agent.image.name .Values.agent.image.digest .Values.agent.image.tag .Values.agent.image.pullPolicy .Values.agent.image.pullSecrets }}
|
|
image:
|
|
{{- if .Values.agent.image.name }}
|
|
name: {{ .Values.agent.image.name }}
|
|
{{- end }}
|
|
{{- if .Values.agent.image.digest }}
|
|
digest: {{ .Values.agent.image.digest }}
|
|
{{- end }}
|
|
{{- if .Values.agent.image.tag }}
|
|
tag: {{ .Values.agent.image.tag }}
|
|
{{- end }}
|
|
{{- if .Values.agent.image.pullPolicy }}
|
|
pullPolicy: {{ .Values.agent.image.pullPolicy }}
|
|
{{- end }}
|
|
{{- if .Values.agent.image.pullSecrets }}
|
|
pullSecrets:
|
|
{{- toYaml $.Values.agent.image.pullSecrets | nindent 6 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.agent.minReadySeconds }}
|
|
minReadySeconds: {{ .Values.agent.minReadySeconds }}
|
|
{{- end }}
|
|
{{- if .Values.agent.updateStrategy }}
|
|
updateStrategy:
|
|
{{- if .Values.agent.updateStrategy.type }}
|
|
type: {{ .Values.agent.updateStrategy.type }}
|
|
{{- end }}
|
|
{{- if .Values.agent.updateStrategy.rollingUpdate }}
|
|
{{- if .Values.agent.updateStrategy.rollingUpdate.maxUnavailable }}
|
|
rollingUpdate:
|
|
maxUnavailable: {{ .Values.agent.updateStrategy.maxUnavailable }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod }}
|
|
{{- if or .Values.agent.pod.annotations .Values.agent.pod.labels .Values.agent.pod.tolerations .Values.agent.pod.affinity .Values.agent.pod.priorityClassName .Values.agent.pod.requests .Values.agent.pod.limits .Values.agent.pod.nodeSelector }}
|
|
pod:
|
|
{{- if .Values.agent.pod.annotations }}
|
|
annotations:
|
|
{{- toYaml $.Values.agent.pod.annotations | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.labels }}
|
|
labels:
|
|
{{- toYaml $.Values.agent.pod.labels | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.tolerations }}
|
|
tolerations:
|
|
{{- toYaml $.Values.agent.pod.tolerations | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.affinity }}
|
|
affinity:
|
|
{{- toYaml $.Values.agent.pod.affinity | nindent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.priorityClassName }}
|
|
priorityClassName: {{ .Values.agent.pod.priorityClassName }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.requests }}
|
|
{{- if or .Values.agent.pod.requests.memory .Values.agent.pod.requests.cpu }}
|
|
requests:
|
|
{{- if .Values.agent.pod.requests.memory }}
|
|
memory: {{ .Values.agent.pod.requests.memory }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.requests.cpu }}
|
|
cpu: {{ .Values.agent.pod.requests.cpu | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.limits }}
|
|
{{- if or .Values.agent.pod.limits.memory .Values.agent.pod.limits.cpu }}
|
|
limits:
|
|
{{- if .Values.agent.pod.limits.memory }}
|
|
memory: {{ .Values.agent.pod.limits.memory }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.limits.cpu }}
|
|
cpu: {{ .Values.agent.pod.limits.cpu | quote }}
|
|
{{- end }}
|
|
{{- if .Values.agent.pod.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml $.Values.agent.pod.nodeSelector | nindent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.agent.proxyHost }}
|
|
proxyHost: {{ .Values.agent.proxyHost }}
|
|
{{- end }}
|
|
{{- if .Values.agent.proxyPort }}
|
|
proxyPort: {{ .Values.agent.proxyPort }}
|
|
{{- end }}
|
|
{{- if .Values.agent.proxyProtocol }}
|
|
proxyProtocol: {{ .Values.agent.proxyProtocol }}
|
|
{{- end }}
|
|
{{- if .Values.agent.proxyUser }}
|
|
proxyUser: {{ .Values.agent.proxyUser }}
|
|
{{- end }}
|
|
{{- if .Values.agent.proxyPassword }}
|
|
proxyPassword: {{ .Values.agent.proxyPassword }}
|
|
{{- end }}
|
|
{{- if .Values.agent.proxyUseDNS }}
|
|
proxyUseDNS: {{ .Values.agent.proxyUseDNS }}
|
|
{{- end }}
|
|
{{- if .Values.agent.env }}
|
|
env:
|
|
{{- range $key, $value := .Values.agent.env }}
|
|
{{- if eq (typeOf $value) "string" }}
|
|
{{ $key }}: {{ $value }}
|
|
{{- else }}
|
|
{{ $key }}: {{ $value | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.agent.configuration_yaml }}
|
|
{{ $configuration_yaml_string := .Values.agent.configuration_yaml }}
|
|
configuration_yaml: |-
|
|
{{ $configuration_yaml_string | indent 6}}
|
|
{{- end }}
|
|
{{- if and .Values.agent.host .Values.agent.host.repository }}
|
|
host:
|
|
repository: {{ .Values.agent.host.repository }}
|
|
{{- end }}
|
|
{{- if .Values.agent.serviceMesh}}
|
|
{{- if .Values.agent.serviceMesh.enabled }}
|
|
serviceMesh:
|
|
enabled: {{ .Values.agent.serviceMesh.enabled }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.opentelemetry }}
|
|
{{- if or .Values.opentelemetry.grpc .Values.opentelemetry.http }}
|
|
opentelemetry:
|
|
{{- if .Values.opentelemetry.grpc.enabled }}
|
|
grpc:
|
|
enabled: {{ .Values.opentelemetry.grpc.enabled }}
|
|
{{- end }}
|
|
{{- if .Values.opentelemetry.http.enabled }}
|
|
http:
|
|
enabled: {{ .Values.opentelemetry.http.enabled }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.prometheus }}
|
|
{{- if .Values.prometheus.remoteWrite }}
|
|
{{- if .Values.prometheus.remoteWrite.enabled }}
|
|
prometheus:
|
|
remoteWrite:
|
|
enabled: {{ .Values.prometheus.remoteWrite.enabled }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.serviceAccount }}
|
|
{{- if or .Values.serviceAccount.create .Values.serviceAccount.annotations }}
|
|
serviceAccount:
|
|
{{- if .Values.serviceAccount.create }}
|
|
create: {{ .Values.serviceAccount.create }}
|
|
{{- end }}
|
|
{{- if .Values.serviceAccount.name }}
|
|
name: {{ .Values.serviceAccount.name }}
|
|
{{- end }}
|
|
{{- if .Values.serviceAccount.annotations }}
|
|
annotations: {{ .Values.serviceAccount.annotations }}
|
|
{{- toYaml $.Values.serviceAccount.annotations | nindent 6 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.podSecurityPolicy }}
|
|
{{- if or .Values.podSecurityPolicy.enable .Values.podSecurityPolicy.name }}
|
|
podSecurityPolicy:
|
|
{{- if .Values.podSecurityPolicy.enable }}
|
|
enable: {{ .Values.podSecurityPolicy.enable }}
|
|
{{- end }}
|
|
{{- if .Values.podSecurityPolicy.name }}
|
|
name: {{ .Values.podSecurityPolicy.name }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if .Values.k8s_sensor }}
|
|
{{- if or .Values.k8s_sensor.image .Values.k8s_sensor.deployment .Values.k8s_sensor.podDisruptionBudget }}
|
|
k8s_sensor:
|
|
{{- if .Values.k8s_sensor.image }}
|
|
image:
|
|
{{- if .Values.k8s_sensor.image.name }}
|
|
name: {{ .Values.k8s_sensor.image.name }}
|
|
{{- end }}
|
|
{{- if .Values.k8s_sensor.image.digest }}
|
|
digest: {{ .Values.k8s_sensor.image.digest }}
|
|
{{- end }}
|
|
{{- if .Values.k8s_sensor.image.tag }}
|
|
tag: {{ .Values.k8s_sensor.image.tag }}
|
|
{{- end }}
|
|
{{- if .Values.k8s_sensor.image.pullPolicy }}
|
|
pullPolicy: {{ .Values.k8s_sensor.image.pullPolicy }}
|
|
{{- end }}
|
|
{{- if .Values.k8s_sensor.deployment }}
|
|
deployment:
|
|
{{- toYaml $.Values.k8s_sensor.deployment | nindent 6 }}
|
|
{{- end }}
|
|
{{- if .Values.k8s_sensor.podDisruptionBudget }}
|
|
podDisruptionBudget:
|
|
{{- toYaml $.Values.k8s_sensor.podDisruptionBudget | nindent 6 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|