apiVersion: apps/v1
kind: Deployment
metadata:
  name: provider-aws
  labels:
    core.crossplane.io/name: "provider-aws"
spec:
  selector:
    matchLabels:
      core.crossplane.io/name: "provider-aws"
  replicas: 1
  template:
    metadata:
      name: "provider-aws-controller"
      labels:
        core.crossplane.io/name: "provider-aws"
    spec:
      securityContext:
        # TODO(hasheddan): this can be removed when there is no desire
        # to support pre-v1.19 Kubernetes clusters
        # https://github.com/kubernetes/enhancements/pull/1598
        # https://github.com/aws/amazon-eks-pod-identity-webhook/issues/8
        fsGroup: 65534
      containers:
      - name: "provider-aws-controller"
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
