Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit auto-instrumentation volume size #2045

Merged
merged 3 commits into from
Aug 31, 2023
Merged
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
16 changes: 16 additions & 0 deletions .chloggen/limit-volume-inst.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. operator, target allocator, github action)
component: operator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Limit auto-instrumentation emptydir volume size

# One or more tracking issues related to the change
issues: [2044]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
29 changes: 29 additions & 0 deletions apis/v1alpha1/instrumentation_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down Expand Up @@ -119,6 +120,10 @@ type Java struct {
// +optional
Image string `json:"image,omitempty"`

// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
// The default size is 150Mi.
VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

// Env defines java specific env vars. There are four layers for env vars' definitions and
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
// If the former var had been defined, then the other vars would be ignored.
Expand All @@ -136,6 +141,10 @@ type NodeJS struct {
// +optional
Image string `json:"image,omitempty"`

// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
// The default size is 150Mi.
VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

// Env defines nodejs specific env vars. There are four layers for env vars' definitions and
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
// If the former var had been defined, then the other vars would be ignored.
Expand All @@ -153,6 +162,10 @@ type Python struct {
// +optional
Image string `json:"image,omitempty"`

// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
// The default size is 150Mi.
VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

// Env defines python specific env vars. There are four layers for env vars' definitions and
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
// If the former var had been defined, then the other vars would be ignored.
Expand All @@ -170,6 +183,10 @@ type DotNet struct {
// +optional
Image string `json:"image,omitempty"`

// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
// The default size is 150Mi.
VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

// Env defines DotNet specific env vars. There are four layers for env vars' definitions and
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
// If the former var had been defined, then the other vars would be ignored.
Expand All @@ -185,6 +202,10 @@ type Go struct {
// +optional
Image string `json:"image,omitempty"`

// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
// The default size is 150Mi.
VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

// Env defines Go specific env vars. There are four layers for env vars' definitions and
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
// If the former var had been defined, then the other vars would be ignored.
Expand All @@ -202,6 +223,10 @@ type ApacheHttpd struct {
// +optional
Image string `json:"image,omitempty"`

// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
// The default size is 150Mi.
VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

// Env defines Apache HTTPD specific env vars. There are four layers for env vars' definitions and
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
// If the former var had been defined, then the other vars would be ignored.
Expand Down Expand Up @@ -234,6 +259,10 @@ type Nginx struct {
// +optional
Image string `json:"image,omitempty"`

// VolumeSizeLimit defines size limit for volume used for auto-instrumentation.
// The default size is 150Mi.
VolumeSizeLimit *resource.Quantity `json:"volumeLimitSize,omitempty"`

// Env defines Nginx specific env vars. There are four layers for env vars' definitions and
// the precedence order is: `original container env vars` > `language specific env vars` > `common env vars` > `instrument spec configs' vars`.
// If the former var had been defined, then the other vars would be ignored.
Expand Down
35 changes: 35 additions & 0 deletions apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 56 additions & 0 deletions bundle/manifests/opentelemetry.io_instrumentations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ spec:
description: Apache HTTPD server version. One of 2.4 or 2.2. Default
is 2.4
type: string
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
dotnet:
description: DotNet defines configuration for DotNet auto-instrumentation.
Expand Down Expand Up @@ -487,6 +495,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
env:
description: Env defines common env vars.
Expand Down Expand Up @@ -756,6 +772,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
java:
description: Java defines configuration for java auto-instrumentation.
Expand Down Expand Up @@ -916,6 +940,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
nginx:
description: Nginx defines configuration for Nginx auto-instrumentation.
Expand Down Expand Up @@ -1188,6 +1220,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
nodejs:
description: NodeJS defines configuration for nodejs auto-instrumentation.
Expand Down Expand Up @@ -1347,6 +1387,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
propagators:
description: Propagators defines inter-process context propagation
Expand Down Expand Up @@ -1523,6 +1571,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
resource:
description: Resource defines the configuration for the resource attributes,
Expand Down
56 changes: 56 additions & 0 deletions config/crd/bases/opentelemetry.io_instrumentations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,14 @@ spec:
description: Apache HTTPD server version. One of 2.4 or 2.2. Default
is 2.4
type: string
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
dotnet:
description: DotNet defines configuration for DotNet auto-instrumentation.
Expand Down Expand Up @@ -485,6 +493,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
env:
description: Env defines common env vars.
Expand Down Expand Up @@ -754,6 +770,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
java:
description: Java defines configuration for java auto-instrumentation.
Expand Down Expand Up @@ -914,6 +938,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
nginx:
description: Nginx defines configuration for Nginx auto-instrumentation.
Expand Down Expand Up @@ -1186,6 +1218,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
nodejs:
description: NodeJS defines configuration for nodejs auto-instrumentation.
Expand Down Expand Up @@ -1345,6 +1385,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
propagators:
description: Propagators defines inter-process context propagation
Expand Down Expand Up @@ -1521,6 +1569,14 @@ spec:
resources required.
type: object
type: object
volumeLimitSize:
anyOf:
- type: integer
- type: string
description: VolumeSizeLimit defines size limit for volume used
for auto-instrumentation. The default size is 150Mi.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
type: object
resource:
description: Resource defines the configuration for the resource attributes,
Expand Down
Loading