Skip to content
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

add postgres securityContext at pod level #1947

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Conversation

dstraub
Copy link

@dstraub dstraub commented Aug 28, 2024

SUMMARY

The description for postgres_security_context_settings '...will be set under the pod-level securityContext field' is wrong, this settings are injected in container-level securityContext.
For setting on pod-level the field postgres_pod_security_context_settings is added

ISSUE TYPE
  • Bug
ADDITIONAL INFORMATION

For some CSI-Drivers (e.g. Longhorn) it's required to modify the securityContext on pod-level.
(see also https://longhorn.io/docs/1.7.0/nodes-and-volumes/volumes/pvc-ownership-and-permission).

The existing field postgres_security_context_settings is for container-level.
Maybe this field should renamed to postgres_container_security_context_settings.

    ...
        volumeMounts:
        - mountPath: /var/lib/pgsql/data
          name: postgres-15
          subPath: data
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext:
        fsGroup: 26
        fsGroupChangePolicy: Always
      terminationGracePeriodSeconds: 30
    ...

@Foxlik
Copy link

Foxlik commented Oct 24, 2024

This is much better approach than #1952 as there are different fields allowed in each. At last in our 1.26 clusters. And I think we need the same settings for every pods to actually make AWX work with pod-security.kubernetes.io/enforce=restricted.

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

Successfully merging this pull request may close these issues.

2 participants