Skip to content

Commit 4d978d4

Browse files
author
Jonathan Yu
authored
Update godoc for pod and container security context (#1279)
* chore: update godoc for pod and container security context Add detailed description of SecurityContext and PodSecurityContext fields. * make bundle * re-run make api-docs
1 parent ddc83f2 commit 4d978d4

File tree

5 files changed

+32
-17
lines changed

5 files changed

+32
-17
lines changed

apis/v1alpha1/opentelemetrycollector_types.go

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,25 @@ type OpenTelemetryCollectorSpec struct {
123123
//
124124
// +optional
125125
Autoscaler *AutoscalerSpec `json:"autoscaler,omitempty"`
126-
// SecurityContext will be set as the container security context.
126+
// SecurityContext configures the container security context for
127+
// the opentelemetry-collector container.
128+
//
129+
// In deployment, daemonset, or statefulset mode, this controls
130+
// the security context settings for the primary application
131+
// container.
132+
//
133+
// In sidecar mode, this controls the security context for the
134+
// injected sidecar container.
135+
//
127136
// +optional
128137
SecurityContext *v1.SecurityContext `json:"securityContext,omitempty"`
129-
138+
// PodSecurityContext configures the pod security context for the
139+
// opentelemetry-collector pod, when running as a deployment, daemonset,
140+
// or statefulset.
141+
//
142+
// In sidecar mode, the opentelemetry-operator will ignore this setting.
143+
//
144+
// +optional
130145
PodSecurityContext *v1.PodSecurityContext `json:"podSecurityContext,omitempty"`
131146
// PodAnnotations is the set of annotations that will be attached to
132147
// Collector and Target Allocator pods.

bundle/manifests/opentelemetry-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ metadata:
3131
categories: Logging & Tracing,Monitoring
3232
certified: "false"
3333
containerImage: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator
34-
createdAt: "2023-08-18T14:30:49Z"
34+
createdAt: "2023-08-28T17:54:06Z"
3535
description: Provides the OpenTelemetry components, including the Collector
3636
operators.operatorframework.io/builder: operator-sdk-v1.29.0
3737
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3

bundle/manifests/opentelemetry.io_opentelemetrycollectors.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3703,9 +3703,9 @@ spec:
37033703
attached to Collector and Target Allocator pods.
37043704
type: object
37053705
podSecurityContext:
3706-
description: PodSecurityContext holds pod-level security attributes
3707-
and common container settings. Some fields are also present in container.securityContext. Field
3708-
values of container.
3706+
description: PodSecurityContext configures the pod security context
3707+
for the opentelemetry-collector pod, when running as a deployment,
3708+
daemonset, or statefulset.
37093709
properties:
37103710
fsGroup:
37113711
description: "A special supplemental group that applies to all
@@ -3928,8 +3928,8 @@ spec:
39283928
type: object
39293929
type: object
39303930
securityContext:
3931-
description: SecurityContext will be set as the container security
3932-
context.
3931+
description: SecurityContext configures the container security context
3932+
for the opentelemetry-collector container.
39333933
properties:
39343934
allowPrivilegeEscalation:
39353935
description: AllowPrivilegeEscalation controls whether a process

config/crd/bases/opentelemetry.io_opentelemetrycollectors.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3700,9 +3700,9 @@ spec:
37003700
attached to Collector and Target Allocator pods.
37013701
type: object
37023702
podSecurityContext:
3703-
description: PodSecurityContext holds pod-level security attributes
3704-
and common container settings. Some fields are also present in container.securityContext. Field
3705-
values of container.
3703+
description: PodSecurityContext configures the pod security context
3704+
for the opentelemetry-collector pod, when running as a deployment,
3705+
daemonset, or statefulset.
37063706
properties:
37073707
fsGroup:
37083708
description: "A special supplemental group that applies to all
@@ -3925,8 +3925,8 @@ spec:
39253925
type: object
39263926
type: object
39273927
securityContext:
3928-
description: SecurityContext will be set as the container security
3929-
context.
3928+
description: SecurityContext configures the container security context
3929+
for the opentelemetry-collector container.
39303930
properties:
39313931
allowPrivilegeEscalation:
39323932
description: AllowPrivilegeEscalation controls whether a process

docs/api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3813,7 +3813,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
38133813
<td><b><a href="#opentelemetrycollectorspecpodsecuritycontext">podSecurityContext</a></b></td>
38143814
<td>object</td>
38153815
<td>
3816-
PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.<br/>
3816+
PodSecurityContext configures the pod security context for the opentelemetry-collector pod, when running as a deployment, daemonset, or statefulset.<br/>
38173817
</td>
38183818
<td>false</td>
38193819
</tr><tr>
@@ -3850,7 +3850,7 @@ OpenTelemetryCollectorSpec defines the desired state of OpenTelemetryCollector.
38503850
<td><b><a href="#opentelemetrycollectorspecsecuritycontext">securityContext</a></b></td>
38513851
<td>object</td>
38523852
<td>
3853-
SecurityContext will be set as the container security context.<br/>
3853+
SecurityContext configures the container security context for the opentelemetry-collector container.<br/>
38543854
</td>
38553855
<td>false</td>
38563856
</tr><tr>
@@ -11471,7 +11471,7 @@ Metrics defines the metrics configuration for operands.
1147111471

1147211472

1147311473

11474-
PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.
11474+
PodSecurityContext configures the pod security context for the opentelemetry-collector pod, when running as a deployment, daemonset, or statefulset.
1147511475

1147611476
<table>
1147711477
<thead>
@@ -11870,7 +11870,7 @@ ResourceClaim references one entry in PodSpec.ResourceClaims.
1187011870

1187111871

1187211872

11873-
SecurityContext will be set as the container security context.
11873+
SecurityContext configures the container security context for the opentelemetry-collector container.
1187411874

1187511875
<table>
1187611876
<thead>

0 commit comments

Comments
 (0)