Skip to content

fix: update securityContext configuration to allow running in restric…#196

Open
98jan wants to merge 3 commits into
chatwoot:mainfrom
98jan:main
Open

fix: update securityContext configuration to allow running in restric…#196
98jan wants to merge 3 commits into
chatwoot:mainfrom
98jan:main

Conversation

@98jan

@98jan 98jan commented Mar 12, 2026

Copy link
Copy Markdown

…ted environments

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fd271de0f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

done;
echo "Database ready to accept connections." ;
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Nest migrations securityContext values under the key

When .Values.securityContext is set, this template renders securityContext: and then emits the map at the same indentation (nindent 8), so fields like runAsUser become sibling container keys instead of children of securityContext. In Kubernetes, that yields invalid container specs (unknown top-level fields) and causes the migrations Job to fail to create. The same indentation pattern is repeated for the other two container-level securityContext insertions in this file.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected, the intendation, was really to small.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 846c547eb9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 26 to +28
args: ['{{ include "chatwoot.fullname" . }}:{{ .Values.services.targetPort }}']
{{- if .Values.securityContext }}
securityContext: {{ .Values.securityContext | toYaml | nindent 8 }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use non-writing wget mode in connection test pod

This hook pod now inherits .Values.securityContext, but the command still runs plain wget <url>, which performs a download/write by default (wget --help exposes --spider as the no-download mode). In hardened setups (for example runAsNonRoot and/or readOnlyRootFilesystem from chart security settings), that can make helm test fail due to filesystem write restrictions even when the service is reachable. Switching the probe command to a non-writing mode avoids false-negative test failures.

Useful? React with 👍 / 👎.

@mreho

mreho commented May 4, 2026

Copy link
Copy Markdown

Hi @vishnu-narayanan, any news about this PR ? Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants