Skip to content

Commit

Permalink
Adding in an assertion that the additional container equals input
Browse files Browse the repository at this point in the history
  • Loading branch information
nikore committed Aug 8, 2023
1 parent e9cc049 commit 960c0ca
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metadata:
categories: Logging & Tracing
certified: "false"
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
createdAt: "2023-08-04T20:52:54Z"
createdAt: "2023-08-08T21:23:14Z"
description: Provides the OpenTelemetry components, including the Collector
operators.operatorframework.io/builder: operator-sdk-v1.29.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ spec:
additionalContainers:
description: "AdditionalContainers allows injecting additional containers
into the Collector's pod definition. These sidecar containers can
be used to authentication proxies, logging shipping sidecars, agents
for shipping to metrics to their cloud, or in general sidecars that
be used for authentication proxies, logging shipping sidecars, agents
for shipping metrics to their cloud, or in general sidecars that
do not support automatic injection. This option only applies to
Deployment, DaemonSet, and StatefulSet deployments of the collector.
It does not apply to the sidecar method. More info: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ spec:
additionalContainers:
description: "AdditionalContainers allows injecting additional containers
into the Collector's pod definition. These sidecar containers can
be used to authentication proxies, logging shipping sidecars, agents
for shipping to metrics to their cloud, or in general sidecars that
be used for authentication proxies, logging shipping sidecars, agents
for shipping metrics to their cloud, or in general sidecars that
do not support automatic injection. This option only applies to
Deployment, DaemonSet, and StatefulSet deployments of the collector.
It does not apply to the sidecar method. More info: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -3615,7 +3615,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
<td><b><a href="#opentelemetrycollectorspecadditionalcontainersindex">additionalContainers</a></b></td>
<td>[]object</td>
<td>
AdditionalContainers allows injecting additional containers into the Collector's pod definition. These sidecar containers can be used to authentication proxies, logging shipping sidecars, agents for shipping to metrics to their cloud, or in general sidecars that do not support automatic injection. This option only applies to Deployment, DaemonSet, and StatefulSet deployments of the collector. It does not apply to the sidecar method. More info: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
AdditionalContainers allows injecting additional containers into the Collector's pod definition. These sidecar containers can be used for authentication proxies, logging shipping sidecars, agents for shipping metrics to their cloud, or in general sidecars that do not support automatic injection. This option only applies to Deployment, DaemonSet, and StatefulSet deployments of the collector. It does not apply to the sidecar method. More info: https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
Container names managed by the operator: * `otc-container`
Overriding containers managed by the operator is outside the scope of what the maintainers will support and by doing so, you wil accept the risk of it breaking things.<br/>
</td>
Expand Down
1 change: 1 addition & 0 deletions internal/manifests/collector/daemonset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,5 @@ func TestDaemonSetAdditionalContainer(t *testing.T) {
assert.Equal(t, "8888", d.Annotations["prometheus.io/port"])
assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"])
assert.Len(t, d.Spec.Template.Spec.Containers, 2)
assert.Equal(t, v1.Container{Name: "test"}, d.Spec.Template.Spec.Containers[0])
}
1 change: 1 addition & 0 deletions internal/manifests/collector/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,4 +443,5 @@ func TestDeploymentAdditionalContainers(t *testing.T) {
assert.Equal(t, "8888", d.Annotations["prometheus.io/port"])
assert.Equal(t, "/metrics", d.Annotations["prometheus.io/path"])
assert.Len(t, d.Spec.Template.Spec.Containers, 2)
assert.Equal(t, v1.Container{Name: "test"}, d.Spec.Template.Spec.Containers[0])
}
1 change: 1 addition & 0 deletions internal/manifests/collector/statefulset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,5 @@ func TestStatefulSetAdditionalContainers(t *testing.T) {
assert.Equal(t, "8888", s.Annotations["prometheus.io/port"])
assert.Equal(t, "/metrics", s.Annotations["prometheus.io/path"])
assert.Len(t, s.Spec.Template.Spec.Containers, 2)
assert.Equal(t, v1.Container{Name: "test"}, s.Spec.Template.Spec.Containers[0])
}

0 comments on commit 960c0ca

Please sign in to comment.