Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions api/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,16 +199,21 @@ type ContainerConfig struct {
// +optional
Resources corev1.ResourceRequirements `json:"resources,omitempty"`

// RunAsUser sets the UID for the container process. When unset, Kubernetes
// and the container runtime apply the image's default user.
// Images that declare USER by name may need this set to a numeric UID when
// RunAsNonRoot enforcement is required.
// RunAsUser sets the UID for the container process. For Postgres and
// Multipooler, leaving this unset does not fall back to the image's own
// user: the operator applies its own default numeric UID (shared between
// the two so both can reach PGDATA), because pgctld declares USER
// postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
// numeric UID. A custom image that runs as a different user must set
// this explicitly - including when reusing a PersistentVolume whose data
// is already owned by another UID, since a mismatch there fails the pod
// at startup rather than at scheduling.
// +optional
// +kubebuilder:validation:Minimum=1
RunAsUser *int64 `json:"runAsUser,omitempty"`

// RunAsGroup sets the primary GID for the container process. When unset,
// Kubernetes and the container runtime apply their default group handling.
// RunAsGroup sets the primary GID for the container process. Same
// operator-supplied default and same caveats as RunAsUser.
// +optional
// +kubebuilder:validation:Minimum=0
RunAsGroup *int64 `json:"runAsGroup,omitempty"`
Expand Down
68 changes: 44 additions & 24 deletions config/crd/bases/multigres.com_multigresclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5418,17 +5418,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down Expand Up @@ -5499,17 +5504,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down Expand Up @@ -7913,17 +7923,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down Expand Up @@ -7994,17 +8009,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down
34 changes: 22 additions & 12 deletions config/crd/bases/multigres.com_shards.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2552,17 +2552,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down Expand Up @@ -2632,17 +2637,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down
34 changes: 22 additions & 12 deletions config/crd/bases/multigres.com_shardtemplates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2137,17 +2137,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down Expand Up @@ -2217,17 +2222,22 @@ spec:
type: object
runAsGroup:
description: |-
RunAsGroup sets the primary GID for the container process. When unset,
Kubernetes and the container runtime apply their default group handling.
RunAsGroup sets the primary GID for the container process. Same
operator-supplied default and same caveats as RunAsUser.
format: int64
minimum: 0
type: integer
runAsUser:
description: |-
RunAsUser sets the UID for the container process. When unset, Kubernetes
and the container runtime apply the image's default user.
Images that declare USER by name may need this set to a numeric UID when
RunAsNonRoot enforcement is required.
RunAsUser sets the UID for the container process. For Postgres and
Multipooler, leaving this unset does not fall back to the image's own
user: the operator applies its own default numeric UID (shared between
the two so both can reach PGDATA), because pgctld declares USER
postgres by name and Kubernetes cannot enforce RunAsNonRoot without a
numeric UID. A custom image that runs as a different user must set
this explicitly - including when reusing a PersistentVolume whose data
is already owned by another UID, since a mismatch there fails the pod
at startup rather than at scheduling.
format: int64
minimum: 1
type: integer
Expand Down
Loading
Loading