You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]AutomountServiceAccountToken is hard-coded to false, breaking in-cluster Kubernetes API access from sidecars even when a ServiceAccount is explicitly configured #758
Currently pod.Spec() hard-codes AutomountServiceAccountToken: false for every FE / BE / CN / FeProxy pod, regardless of whether the user has set spec.<role>.serviceAccount in the CR. This unconditionally prevents the ServiceAccount token from being projected to /var/run/secrets/kubernetes.io/serviceaccount/, so any in-cluster client (e.g. client-gorest.InClusterConfig()) running in the main container or a sidecar fails with:
Make the field conditional on whether a ServiceAccount was explicitly configured:
To Reproduce
Steps to reproduce the behavior:
in-cluster client (e.g. client-gorest.InClusterConfig()) running in the main container or a sidecar will fails
Expected behavior
The operator should respect the Kubernetes contract for automountServiceAccountToken:
User configuration
Expected automountServiceAccountToken on the pod
Rationale
spec..serviceAccount is empty / unset
Explicitly false
Preserve the intent of #184 — never auto-mount the namespace's default ServiceAccount token onto database pods.
spec..serviceAccount is explicitly set by the user
Leave it unset (nil), letting Kubernetes default to true
The user has opted in to a custom ServiceAccount and almost certainly wants its token projected to /var/run/secrets/kubernetes.io/serviceaccount/. Otherwise the field is useless.
Activity