This repository was archived by the owner on Oct 31, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +78
-13
lines changed
charts/opentelemetry-collector Expand file tree Collapse file tree 12 files changed +78
-13
lines changed Original file line number Diff line number Diff line change 36
36
37
37
- name : Run chart unittest
38
38
run : |
39
- helm plugin install https://github.com/quintush/helm-unittest
39
+ helm plugin install https://github.com/quintush/helm-unittest --version v0.2.11
40
40
for chart in $(ct list-changed)
41
41
do
42
42
helm unittest --helm3 $chart
Original file line number Diff line number Diff line change 1
1
apiVersion : v2
2
2
name : aspecto-io-opentelemetry-collector
3
- version : ' 1.4.10 '
3
+ version : ' 1.4.11 '
4
4
home : https://aspecto.io
5
5
type : application
6
6
description : helm chart of aspecto's opentelemetry tail sampling collector
Original file line number Diff line number Diff line change 33
33
config_sources :
34
34
aspecto :
35
35
token : ${token}
36
- interval : {{ .Values.global.aspecto.interval | default 10 }}
37
36
{{- if .Values.redis.enabled }}
38
37
redis :
39
38
address : {{ include "get-redis-endpoint" . }}
48
47
{{- include "collector.reciver.protocol.otlp" (dict "service" "http" "protocols" .Values.global.collector_services "localListenerIp" .Values.receiver.specs.network.localListenerIp ) | nindent 10 }}
49
48
{{- include "collector.reciver.protocol.metrics" (dict "service" "metrics" "protocols" .Values.global.collector_services "localListenerIp" .Values.collector.specs.network.localListenerIp) | indent 4}}
50
49
processors :
51
- tail_sampling : $aspecto:tail_sampling
50
+ tail_sampling : $aspecto:processor: tail_sampling
52
51
resource :
53
52
{{- include "collector.configMap.processors.resource" (dict "environment" .Values.global.aspecto.environment) | indent 6 }}
54
53
batch :
Original file line number Diff line number Diff line change 14
14
{{- $globalSubAnnotations := $globalMetadata.pod.annotations }}
15
15
{{- $localSubAnnotations := $localMetadata.pod.annotations -}}
16
16
{{- $localSubLabels := $localMetadata.pod.labels -}}
17
-
17
+ {{- $resources := .Values.collector.specs.resources -}}
18
+ {{- if .Values.global.ignoreCpuLimits }}{{ $_ := unset $resources.limits "cpu" }}{{- end }}
18
19
kind : Deployment
19
20
apiVersion : apps/v1
20
21
metadata :
55
56
{{- if .Values.collector.serviceAccount.enabled }}
56
57
{{ toYaml .Values.collector.serviceAccount.containerConfig | nindent 6}}
57
58
{{- end }}
59
+ {{- if .Values.collector.metadata.deployment.customConfig }}
60
+ {{ toYaml .Values.collector.metadata.deployment.customConfig | nindent 6 }}
61
+ {{- end }}
58
62
containers :
59
63
- name : " {{ .Values.global.name }}-{{ .Values.collector.metadata.name }}"
60
64
image : " {{ .Values.collector.image.repository | default .Values.global.image.repository }}/{{ .Values.collector.image.name | default .Values.global.image.name }}:{{ .Values.collector.image.version | default .Values.global.image.version }}"
@@ -117,4 +121,4 @@ spec:
117
121
{{ toYaml .Values.collector.specs.probe | trim | indent 10}}
118
122
{{- end }}
119
123
resources :
120
- {{ toYaml .Values.collector.specs. resources | trim | indent 12 }}
124
+ {{ toYaml $ resources | trim | indent 12 }}
Original file line number Diff line number Diff line change 10
10
{{- $localObjectLabels := $localMetadata.hpa.labels -}}
11
11
{{- $localListenerIp := .Values.collector.specs.network.localListenerIp -}}
12
12
{{- if .Values.collector.specs.autoscaling.enable }}
13
- apiVersion : autoscaling/v2beta2
13
+ apiVersion : {{ .Values.global.hpaApiVersion }}
14
14
kind : HorizontalPodAutoscaler
15
15
metadata :
16
16
name : {{ .Values.global.name }}-{{ $localMetadata.name }}-hpa
46
46
type : Utilization
47
47
averageUtilization : {{ . }}
48
48
{{- end }}
49
- {{- end }}
49
+ {{- end }}
Original file line number Diff line number Diff line change 14
14
{{- $globalSubAnnotations := $globalMetadata.pod.annotations }}
15
15
{{- $localSubAnnotations := $localMetadata.pod.annotations -}}
16
16
{{- $localSubLabels := $localMetadata.pod.labels -}}
17
+ {{- $resources := .Values.receiver.specs.resources -}}
18
+ {{- if .Values.global.ignoreCpuLimits }}{{ $_ := unset $resources.limits "cpu" }}{{- end }}
17
19
apiVersion : apps/v1
18
20
kind : Deployment
19
21
metadata :
54
56
{{- if .Values.receiver.serviceAccount.enabled }}
55
57
{{ toYaml .Values.receiver.serviceAccount.containerConfig | nindent 6 }}
56
58
{{- end }}
59
+ {{- if .Values.receiver.metadata.deployment.customConfig }}
60
+ {{ toYaml .Values.receiver.metadata.deployment.customConfig | nindent 6 }}
61
+ {{- end }}
57
62
containers :
58
63
- name : " {{ .Values.global.name }}-{{ .Values.receiver.metadata.name }}"
59
64
image : " {{ .Values.receiver.image.repository | default .Values.global.image.repository }}/{{ .Values.receiver.image.name | default .Values.global.image.name }}:{{ .Values.receiver.image.version | default .Values.global.image.version }}"
90
95
{{ toYaml .Values.receiver.specs.probe | trim | indent 10 }}
91
96
{{- end }}
92
97
resources :
93
- {{ toYaml .Values.receiver.specs. resources | trim | indent 12 }}
98
+ {{ toYaml $ resources | trim | indent 12 }}
Original file line number Diff line number Diff line change 9
9
{{- $localSharedLabels := $localMetadata.shared.labels -}}
10
10
{{- $localObjectLabels := $localMetadata.hpa.labels -}}
11
11
{{- if .Values.receiver.specs.autoscaling.enable }}
12
- apiVersion : autoscaling/v2beta2
12
+ apiVersion : {{ .Values.global.hpaApiVersion }}
13
13
kind : HorizontalPodAutoscaler
14
14
metadata :
15
15
name : {{ .Values.global.name }}-{{ $localMetadata.name }}-hpa
45
45
type : Utilization
46
46
averageUtilization : {{ . }}
47
47
{{- end }}
48
- {{- end }}
48
+ {{- end }}
Original file line number Diff line number Diff line change 9
9
{{- $localData := .Values.redis -}}
10
10
{{- $localDataSpec := .Values.redis.specs -}}
11
11
{{- $localMetadata := .Values.redis.metadata -}}
12
-
12
+ {{- $resources := $localDataSpec.resources -}}
13
+ {{- if .Values.global.ignoreCpuLimits }}{{ $_ := unset $resources.limits "cpu" }}{{- end }}
13
14
{{- if and ($localData.enabled) (eq $localData.config.type "local") }}
14
15
apiVersion : apps/v1
15
16
kind : Deployment
37
38
ports :
38
39
- containerPort : {{ $localDataSpec.port }}
39
40
resources :
40
- {{ toYaml $localDataSpec. resources | trim | indent 12 }}
41
+ {{ toYaml $resources | trim | indent 12 }}
41
42
{{- end }}
Original file line number Diff line number Diff line change @@ -76,3 +76,33 @@ tests:
76
76
asserts :
77
77
- isKind :
78
78
of : Gateway
79
+ - it : ignore-cpu-limits-test
80
+ template : collector/deployment.yaml
81
+ values :
82
+ - ../values.yaml
83
+ - tests_values.yaml
84
+ set :
85
+ global.ignoreCpuLimits : true
86
+ asserts :
87
+ - isNull :
88
+ path : spec.template.spec.containers[0].resources.limits.cpu
89
+ - it : hpa-api-version
90
+ template : collector/hpa.yaml
91
+ values :
92
+ - ../values.yaml
93
+ - tests_values.yaml
94
+ asserts :
95
+ - equal :
96
+ path : apiVersion
97
+ value : autoscaling/v2beta2
98
+ - it : hpa-api-version-override
99
+ template : collector/hpa.yaml
100
+ values :
101
+ - ../values.yaml
102
+ - tests_values.yaml
103
+ set :
104
+ global.hpaApiVersion : autoscaling/v2
105
+ asserts :
106
+ - equal :
107
+ path : apiVersion
108
+ value : autoscaling/v2
Original file line number Diff line number Diff line change @@ -88,3 +88,13 @@ tests:
88
88
asserts :
89
89
- isKind :
90
90
of : Gateway
91
+ - it : ignore-cpu-limits-test
92
+ template : receiver/deployment.yaml
93
+ values :
94
+ - ../values.yaml
95
+ - tests_values.yaml
96
+ set :
97
+ global.ignoreCpuLimits : true
98
+ asserts :
99
+ - isNull :
100
+ path : spec.template.spec.containers[0].resources.limits.cpu
You can’t perform that action at this time.
0 commit comments