What problem are you facing?
The current Workload Identity configuration requires a few unnecessary configurations.
Specifying the federatedTokenFile value in the azure-workload-identity-creds.yaml is unnecessary as this value can be retrieved using the AZURE_FEDERATED_TOKEN_FILE env var which is automatically injected into Pods when we enable Workload Identity.
Example Pod:
apiVersion: v1
kind: Pod
metadata:
labels:
azure.workload.identity/use: "true"
spec:
containers:
- env:
- name: AZURE_FEDERATED_TOKEN_FILE
value: /var/run/secrets/azure/tokens/azure-identity-token
Specifying the volume details in the DeploymentRuntimeConfig is also unnecessary as this automatically injected into Pods when we enable Workload Identity. The following config should be sufficient.
apiVersion: pkg.crossplane.io/v1beta1
kind: DeploymentRuntimeConfig
metadata:
name: function-msgraph
spec:
deploymentTemplate:
spec:
replicas: 1
selector: {}
template:
metadata:
labels:
azure.workload.identity/use: "true"
spec:
serviceAccountName: function-msgraph
containers:
- name: package-runtime
serviceAccountTemplate:
metadata:
annotations:
azure.workload.identity/client-id: "your-client-id"
name: function-msgraph
How could this Function help solve your problem?
The function should resolve this value from the env var instead of expecting users to provide it.
What problem are you facing?
The current Workload Identity configuration requires a few unnecessary configurations.
Specifying the
federatedTokenFilevalue in the azure-workload-identity-creds.yaml is unnecessary as this value can be retrieved using theAZURE_FEDERATED_TOKEN_FILEenv var which is automatically injected into Pods when we enable Workload Identity.Example Pod:
Specifying the volume details in the DeploymentRuntimeConfig is also unnecessary as this automatically injected into Pods when we enable Workload Identity. The following config should be sufficient.
How could this Function help solve your problem?
The function should resolve this value from the env var instead of expecting users to provide it.