diff --git a/apis/v1alpha1/opentelemetrycollector_types.go b/apis/v1alpha1/opentelemetrycollector_types.go
index 6db0579bc9..0aac34ca75 100644
--- a/apis/v1alpha1/opentelemetrycollector_types.go
+++ b/apis/v1alpha1/opentelemetrycollector_types.go
@@ -41,6 +41,12 @@ type Ingress struct {
// TLS configuration.
// +optional
TLS []networkingv1.IngressTLS `json:"tls,omitempty"`
+
+ // IngressClassName is the name of an IngressClass cluster resource. Ingress
+ // controller implementations use this field to know whether they should be
+ // serving this Ingress resource.
+ // +optional
+ IngressClassName *string `json:"ingressClassName,omitempty"`
}
// OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go
index 1038386010..65bd3901d8 100644
--- a/apis/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/v1alpha1/zz_generated.deepcopy.go
@@ -105,6 +105,11 @@ func (in *Ingress) DeepCopyInto(out *Ingress) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.IngressClassName != nil {
+ in, out := &in.IngressClassName, &out.IngressClassName
+ *out = new(string)
+ **out = **in
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress.
diff --git a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml
index 21d8168cab..41d2e014ae 100644
--- a/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml
+++ b/bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml
@@ -1196,6 +1196,11 @@ spec:
hostname:
description: Hostname by which the ingress proxy can be reached.
type: string
+ ingressClassName:
+ description: IngressClassName is the name of an IngressClass cluster
+ resource. Ingress controller implementations use this field
+ to know whether they should be serving this Ingress resource.
+ type: string
tls:
description: TLS configuration.
items:
diff --git a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml
index 30ed3d3fa0..068df5d1ad 100644
--- a/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml
+++ b/config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml
@@ -1194,6 +1194,11 @@ spec:
hostname:
description: Hostname by which the ingress proxy can be reached.
type: string
+ ingressClassName:
+ description: IngressClassName is the name of an IngressClass cluster
+ resource. Ingress controller implementations use this field
+ to know whether they should be serving this Ingress resource.
+ type: string
tls:
description: TLS configuration.
items:
diff --git a/docs/api.md b/docs/api.md
index 2bbc23e0af..87358baaf8 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -3827,6 +3827,13 @@ Ingress is used to specify how OpenTelemetry Collector is exposed. This function
Hostname by which the ingress proxy can be reached.