Jsonpatch operation fails if automountServiceAccountToken is false and no volumes are defined #17
Labels
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Extra attention is needed
What happened:
A ServiceAccount with
automountServiceAccountToken: false
and the EKS IAM Annotation failed to spawn a Pod from a Job definition that did not define Volumes on the Pod with the following Errorhttps://github.com/aws/amazon-eks-pod-identity-webhook/blob/master/pkg/handler/handler.go#L158-L177 probably needs to check if
/spec/volumes
already exists. IfautomountServiceAccountToken
on the ServiceAccount is true, there is always a volume present on the Pod, if set to false this is no longer the case though.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
aws eks describe-cluster --name <name> --query cluster.platformVersion
): eks.1aws eks describe-cluster --name <name> --query cluster.version
): 1.14The text was updated successfully, but these errors were encountered: