-
Notifications
You must be signed in to change notification settings - Fork 166
Extend options for setting security context #1647
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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. agent, clusterReceiver, gateway, operator, chart, other) | ||
component: clusterReceiver | ||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Add an option to set the security context for the container. | ||
# One or more tracking issues related to the change | ||
issues: [1647] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# 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. agent, clusterReceiver, gateway, operator, chart, other) | ||
component: gateway | ||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Add an option to set the security context for the container. | ||
# One or more tracking issues related to the change | ||
issues: [1647] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: deprecation | ||
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other) | ||
component: clusterReceiver | ||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Deprecate the `securityContext` field in favor of the `podSecurityContext`. | ||
# One or more tracking issues related to the change | ||
issues: [1647] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: deprecation | ||
# The name of the component, or a single word describing the area of concern, (e.g. agent, clusterReceiver, gateway, operator, chart, other) | ||
component: gateway | ||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Deprecate the `securityContext` field in favor of the `podSecurityContext`. | ||
# One or more tracking issues related to the change | ||
issues: [1647] |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -81,3 +81,9 @@ Splunk OpenTelemetry Collector is installed and configured to send data to Splun | |||||||||||||||||||||
- Status: Instrumentation language maturity varies. See `operator.instrumentation.spec` and documentation for utilized instrumentation details. | ||||||||||||||||||||||
- Splunk Support: We offer full support for Splunk distributions and best-effort support for native OpenTelemetry distributions of auto-instrumentation libraries. | ||||||||||||||||||||||
{{- end }} | ||||||||||||||||||||||
{{- if not (eq (toString .Values.gateway.securityContext) "<nil>") }} | ||||||||||||||||||||||
[WARNING] "gateway.securityContext" parameter is deprecated. Please use "gateway.podSecurityContext" instead. | ||||||||||||||||||||||
{{ end }} | ||||||||||||||||||||||
{{- if not (eq (toString .Values.clusterReceiver.securityContext) "<nil>") }} | ||||||||||||||||||||||
[WARNING] "clusterReceiver.securityContext" parameter is deprecated. Please use "clusterReceiver.podSecurityContext" instead. | ||||||||||||||||||||||
{{ end }} | ||||||||||||||||||||||
Comment on lines
+87
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
@jvoravong is this what you are suggesting? How does the PR you referenced relate to this one? Tmk this is a different ask |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -81,9 +81,10 @@ spec: | |||||
` }} | ||||||
{{- $clusterReceiver.affinity | mustMergeOverwrite (fromYaml $clusterReceiverPodAntiAffinity) | toYaml | nindent 8 }} | ||||||
{{- end }} | ||||||
{{- if $clusterReceiver.securityContext }} | ||||||
{{- $podSecurityContext := $clusterReceiver.podSecurityContext | default $clusterReceiver.securityContext }} | ||||||
{{- if $podSecurityContext }} | ||||||
securityContext: | ||||||
{{- include "splunk-otel-collector.securityContext" (dict "isWindows" .Values.isWindows "securityContext" $clusterReceiver.securityContext) | nindent 8 }} | ||||||
{{- include "splunk-otel-collector.securityContext" (dict "isWindows" .Values.isWindows "securityContext" $podSecurityContext) | nindent 8 }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
||||||
{{- end }} | ||||||
{{- if eq (include "splunk-otel-collector.distribution" .) "eks/fargate" }} | ||||||
initContainers: | ||||||
|
@@ -127,6 +128,10 @@ spec: | |||||
{{- if .Values.clusterReceiver.featureGates }} | ||||||
- --feature-gates={{ .Values.clusterReceiver.featureGates }} | ||||||
{{- end }} | ||||||
{{- with .Values.clusterReceiver.containerSecurityContext }} | ||||||
securityContext: | ||||||
{{- toYaml . | nindent 10 }} | ||||||
{{- end }} | ||||||
image: {{ template "splunk-otel-collector.image.otelcol" . }} | ||||||
imagePullPolicy: {{ .Values.image.otelcol.pullPolicy }} | ||||||
env: | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -61,9 +61,10 @@ spec: | |||||
affinity: | ||||||
{{- toYaml $gateway.affinity | nindent 8 }} | ||||||
{{- end }} | ||||||
{{- if $gateway.securityContext }} | ||||||
{{- $podSecurityContext := $gateway.podSecurityContext | default $gateway.securityContext }} | ||||||
{{- if $podSecurityContext }} | ||||||
securityContext: | ||||||
{{- include "splunk-otel-collector.securityContext" (dict "isWindows" .Values.isWindows "securityContext" $gateway.securityContext) | nindent 8 }} | ||||||
{{- include "splunk-otel-collector.securityContext" (dict "isWindows" .Values.isWindows "securityContext" $podSecurityContext) | nindent 8 }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? |
||||||
{{- end }} | ||||||
containers: | ||||||
- name: otel-collector | ||||||
|
@@ -80,6 +81,10 @@ spec: | |||||
{{- if .Values.gateway.featureGates }} | ||||||
- --feature-gates={{ .Values.gateway.featureGates }} | ||||||
{{- end }} | ||||||
{{- with .Values.gateway.containerSecurityContext }} | ||||||
securityContext: | ||||||
{{- toYaml . | nindent 10 }} | ||||||
{{- end }} | ||||||
image: {{ template "splunk-otel-collector.image.otelcol" . }} | ||||||
imagePullPolicy: {{ .Values.image.otelcol.pullPolicy }} | ||||||
env: | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can we throw a failure or print a warning if one of the following cases happens? I just want to avoid confusion about which of the two available values (securityContext vs podSecurityContext) will be used. Maybe just update the message to say
podSecurityContext
takes priority.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand your suggestion. Please submit a suggesting diff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on this. Need to state this PR relates to #1342