Skip to content

Commit 93f95d9

Browse files
committed
Add support to set image pull policy for agent images
1 parent 0734347 commit 93f95d9

24 files changed

+229
-25
lines changed
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
2+
change_type: 'enhancement'
3+
4+
# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
5+
component: auto-instrumentation
6+
7+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
8+
note: Add support to set image pull policy for agent images
9+
10+
# One or more tracking issues related to the change
11+
issues: [3575]
12+
13+
# (Optional) One or more lines of additional information to render under the primary note.
14+
# These lines will be padded with 2 spaces and then inserted directly into the document.
15+
# Use pipe (|) for multiline entries.
16+
subtext:

apis/v1alpha1/instrumentation_types.go

+48
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ type InstrumentationSpec struct {
7979
// Nginx defines configuration for Nginx auto-instrumentation.
8080
// +optional
8181
Nginx Nginx `json:"nginx,omitempty"`
82+
83+
// ImagePullPolicy
84+
// One of Always, Never, IfNotPresent.
85+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
86+
// +optional
87+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
8288
}
8389

8490
// Resource defines the configuration for the resource attributes, as defined by the OpenTelemetry specification.
@@ -183,6 +189,12 @@ type Java struct {
183189
// All extensions are copied to a single directory; if a JAR with the same name exists, it will be overwritten.
184190
// +optional
185191
Extensions []Extensions `json:"extensions,omitempty"`
192+
193+
// ImagePullPolicy
194+
// One of Always, Never, IfNotPresent.
195+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
196+
// +optional
197+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
186198
}
187199

188200
type Extensions struct {
@@ -216,6 +228,12 @@ type NodeJS struct {
216228
// Resources describes the compute resource requirements.
217229
// +optional
218230
Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
231+
232+
// ImagePullPolicy
233+
// One of Always, Never, IfNotPresent.
234+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
235+
// +optional
236+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
219237
}
220238

221239
// Python defines Python SDK and instrumentation configuration.
@@ -241,6 +259,12 @@ type Python struct {
241259
// Resources describes the compute resource requirements.
242260
// +optional
243261
Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
262+
263+
// ImagePullPolicy
264+
// One of Always, Never, IfNotPresent.
265+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
266+
// +optional
267+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
244268
}
245269

246270
// DotNet defines DotNet SDK and instrumentation configuration.
@@ -265,6 +289,12 @@ type DotNet struct {
265289
// Resources describes the compute resource requirements.
266290
// +optional
267291
Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
292+
293+
// ImagePullPolicy
294+
// One of Always, Never, IfNotPresent.
295+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
296+
// +optional
297+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
268298
}
269299

270300
type Go struct {
@@ -289,6 +319,12 @@ type Go struct {
289319
// Resources describes the compute resource requirements.
290320
// +optional
291321
Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
322+
323+
// ImagePullPolicy
324+
// One of Always, Never, IfNotPresent.
325+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
326+
// +optional
327+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
292328
}
293329

294330
// ApacheHttpd defines Apache SDK and instrumentation configuration.
@@ -329,6 +365,12 @@ type ApacheHttpd struct {
329365
// Resources describes the compute resource requirements.
330366
// +optional
331367
Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
368+
369+
// ImagePullPolicy
370+
// One of Always, Never, IfNotPresent.
371+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
372+
// +optional
373+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
332374
}
333375

334376
// Nginx defines Nginx SDK and instrumentation configuration.
@@ -365,6 +407,12 @@ type Nginx struct {
365407
// Resources describes the compute resource requirements.
366408
// +optional
367409
Resources corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
410+
411+
// ImagePullPolicy
412+
// One of Always, Never, IfNotPresent.
413+
// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
414+
// +optional
415+
ImagePullPolicy corev1.PullPolicy `json:"imagePullPolicy,omitempty"`
368416
}
369417

370418
// InstrumentationStatus defines status of the instrumentation.

bundle/community/manifests/opentelemetry-operator.clusterserviceversion.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ metadata:
9999
categories: Logging & Tracing,Monitoring
100100
certified: "false"
101101
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
102-
createdAt: "2025-01-24T11:36:07Z"
102+
createdAt: "2025-01-27T13:19:16Z"
103103
description: Provides the OpenTelemetry components, including the Collector
104104
operators.operatorframework.io/builder: operator-sdk-v1.29.0
105105
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3

bundle/community/manifests/opentelemetry.io_instrumentations.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ spec:
182182
type: array
183183
image:
184184
type: string
185+
imagePullPolicy:
186+
type: string
185187
resourceRequirements:
186188
properties:
187189
claims:
@@ -411,6 +413,8 @@ spec:
411413
type: array
412414
image:
413415
type: string
416+
imagePullPolicy:
417+
type: string
414418
resourceRequirements:
415419
properties:
416420
claims:
@@ -717,6 +721,8 @@ spec:
717721
type: array
718722
image:
719723
type: string
724+
imagePullPolicy:
725+
type: string
720726
resourceRequirements:
721727
properties:
722728
claims:
@@ -869,6 +875,8 @@ spec:
869875
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
870876
x-kubernetes-int-or-string: true
871877
type: object
878+
imagePullPolicy:
879+
type: string
872880
java:
873881
properties:
874882
env:
@@ -951,6 +959,8 @@ spec:
951959
type: array
952960
image:
953961
type: string
962+
imagePullPolicy:
963+
type: string
954964
resources:
955965
properties:
956966
claims:
@@ -1241,6 +1251,8 @@ spec:
12411251
type: array
12421252
image:
12431253
type: string
1254+
imagePullPolicy:
1255+
type: string
12441256
resourceRequirements:
12451257
properties:
12461258
claims:
@@ -1463,6 +1475,8 @@ spec:
14631475
type: array
14641476
image:
14651477
type: string
1478+
imagePullPolicy:
1479+
type: string
14661480
resourceRequirements:
14671481
properties:
14681482
claims:
@@ -1698,6 +1712,8 @@ spec:
16981712
type: array
16991713
image:
17001714
type: string
1715+
imagePullPolicy:
1716+
type: string
17011717
resourceRequirements:
17021718
properties:
17031719
claims:

bundle/openshift/manifests/opentelemetry-operator.clusterserviceversion.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ metadata:
9999
categories: Logging & Tracing,Monitoring
100100
certified: "false"
101101
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
102-
createdAt: "2025-01-24T11:36:07Z"
102+
createdAt: "2025-01-27T13:19:16Z"
103103
description: Provides the OpenTelemetry components, including the Collector
104104
operators.operatorframework.io/builder: operator-sdk-v1.29.0
105105
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3

bundle/openshift/manifests/opentelemetry.io_instrumentations.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ spec:
182182
type: array
183183
image:
184184
type: string
185+
imagePullPolicy:
186+
type: string
185187
resourceRequirements:
186188
properties:
187189
claims:
@@ -411,6 +413,8 @@ spec:
411413
type: array
412414
image:
413415
type: string
416+
imagePullPolicy:
417+
type: string
414418
resourceRequirements:
415419
properties:
416420
claims:
@@ -717,6 +721,8 @@ spec:
717721
type: array
718722
image:
719723
type: string
724+
imagePullPolicy:
725+
type: string
720726
resourceRequirements:
721727
properties:
722728
claims:
@@ -869,6 +875,8 @@ spec:
869875
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
870876
x-kubernetes-int-or-string: true
871877
type: object
878+
imagePullPolicy:
879+
type: string
872880
java:
873881
properties:
874882
env:
@@ -951,6 +959,8 @@ spec:
951959
type: array
952960
image:
953961
type: string
962+
imagePullPolicy:
963+
type: string
954964
resources:
955965
properties:
956966
claims:
@@ -1241,6 +1251,8 @@ spec:
12411251
type: array
12421252
image:
12431253
type: string
1254+
imagePullPolicy:
1255+
type: string
12441256
resourceRequirements:
12451257
properties:
12461258
claims:
@@ -1463,6 +1475,8 @@ spec:
14631475
type: array
14641476
image:
14651477
type: string
1478+
imagePullPolicy:
1479+
type: string
14661480
resourceRequirements:
14671481
properties:
14681482
claims:
@@ -1698,6 +1712,8 @@ spec:
16981712
type: array
16991713
image:
17001714
type: string
1715+
imagePullPolicy:
1716+
type: string
17011717
resourceRequirements:
17021718
properties:
17031719
claims:

config/crd/bases/opentelemetry.io_instrumentations.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ spec:
180180
type: array
181181
image:
182182
type: string
183+
imagePullPolicy:
184+
type: string
183185
resourceRequirements:
184186
properties:
185187
claims:
@@ -409,6 +411,8 @@ spec:
409411
type: array
410412
image:
411413
type: string
414+
imagePullPolicy:
415+
type: string
412416
resourceRequirements:
413417
properties:
414418
claims:
@@ -715,6 +719,8 @@ spec:
715719
type: array
716720
image:
717721
type: string
722+
imagePullPolicy:
723+
type: string
718724
resourceRequirements:
719725
properties:
720726
claims:
@@ -867,6 +873,8 @@ spec:
867873
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
868874
x-kubernetes-int-or-string: true
869875
type: object
876+
imagePullPolicy:
877+
type: string
870878
java:
871879
properties:
872880
env:
@@ -949,6 +957,8 @@ spec:
949957
type: array
950958
image:
951959
type: string
960+
imagePullPolicy:
961+
type: string
952962
resources:
953963
properties:
954964
claims:
@@ -1239,6 +1249,8 @@ spec:
12391249
type: array
12401250
image:
12411251
type: string
1252+
imagePullPolicy:
1253+
type: string
12421254
resourceRequirements:
12431255
properties:
12441256
claims:
@@ -1461,6 +1473,8 @@ spec:
14611473
type: array
14621474
image:
14631475
type: string
1476+
imagePullPolicy:
1477+
type: string
14641478
resourceRequirements:
14651479
properties:
14661480
claims:
@@ -1696,6 +1710,8 @@ spec:
16961710
type: array
16971711
image:
16981712
type: string
1713+
imagePullPolicy:
1714+
type: string
16991715
resourceRequirements:
17001716
properties:
17011717
claims:

0 commit comments

Comments
 (0)