containers-roadmap icon indicating copy to clipboard operation
containers-roadmap copied to clipboard

[AWS Batch on EKS] [request]: For Batch on EKS, how to use/inject/ref Kubernetes secrets for Batch EKS Jobs?

Open dushyant8858 opened this issue 2 years ago • 3 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request For Batch on EKS, how to use/inject/ref Kubernetes secrets for Batch EKS Jobs?

Which service(s) is this request for? AWS Batch EKS

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? For Batch on EKS, how to use/inject/ref Kubernetes secrets for Batch EKS Jobs?

spec:
  containers:
    - envFrom:
        - secretRef:
            name: 

Currently, EKS Batch only supports these parameter https://docs.aws.amazon.com/batch/latest/APIReference/API_EksContainer.html i.e I see an option to specify secret volume into the container https://docs.aws.amazon.com/batch/latest/APIReference/API_EksSecret.html but does not see an option to specify Kubernetes secret as an Env into the Batch EKS Jobs.

Are you currently working around this issue? I could not find any work around to specify Kubernetes secret as an Env into the Batch EKS Jobs

dushyant8858 avatar Jun 14 '23 15:06 dushyant8858

I have a similar issue with valueFrom inside of env. In a k8s YAML pod configuration I can simply inject a secret into an environment variable. The only way to inject secrets in an EKS job definition is with volumeMounts, which is inconvenient. EksPodProperties is too restrictive. It should accept all standard k8s options and apply them to the pod as is.

nboisnea avatar Nov 13 '23 14:11 nboisnea

Yes, would be nice if this would not be restricted to secrets, I would like to set an env variable to something like

valueFrom:
  fieldRef:
    fieldPath: status.hostIP

se-meiser avatar Jun 26 '24 13:06 se-meiser

Is anyone working on this issue?

Paulius0112 avatar Aug 07 '24 07:08 Paulius0112