Files
spring-ai/cloud-providers/deploy/aks-workload-identity.yaml

36 lines
1.1 KiB
YAML

# NOT APPLIED to a real cluster. Client id and names are examples. AKS workload identity: DefaultAzureCredential picks
# the federated token up from the environment the webhook injects. Use the azure-default profile, or the azure
# profile with a managed identity if the pod runs on a host that has one assigned.
apiVersion: v1
kind: ServiceAccount
metadata:
name: spring-ai
namespace: ai
annotations:
azure.workload.identity/client-id: 00000000-0000-0000-0000-000000000000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: spring-ai
namespace: ai
spec:
replicas: 2
selector:
matchLabels: { app: spring-ai }
template:
metadata:
labels:
app: spring-ai
azure.workload.identity/use: "true"
spec:
serviceAccountName: spring-ai
containers:
- name: app
image: registry.example.com/spring-ai-cloud-providers:1.0.0
env:
- name: SPRING_PROFILES_ACTIVE
value: azure-default
- name: AZURE_OPENAI_ENDPOINT
value: https://my-openai-resource.openai.azure.com/openai/v1