There are 2 ways to get the permission to AWS services
1. using AccessKey & Secret Key
2. Using K8S ServiceAccountName example below
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
type: air-byte-app
name: air-byte-app
namespace: prod-airbyte
spec:
replicas: 2
selector:
matchLabels:
type: air-byte-app
strategy:
rollingUpdate:
maxSurge: 100%
maxUnavailable: 0
template:
metadata:
labels:
type: air-byte-app
spec:
serviceAccountName: air-byte-app-sa
containers:
- command:
- java
- -javaagent:/opt/dd-java-agent.jar
- -Ddd.service=prod-reward-engine
- -jar
- /opt/reward-engine-api-1.0.0-SNAPSHOT.jar
env:
- name: USERNAME
value: "airbyte"
....
When we are using this this serviceAccountName is not propagating to Check, Discovery & WorkerPod yamls which was generated by java.
Is there any mechanism where we can copy that to child pods.