Skip to content

Generated sk-driver pods cannot be configured to use Azure Workload Identity. #258

Description

@ghuang0

Describe the bug

Generated sk-driver pods cannot be configured to use Azure Workload Identity.

The Simulation driver configuration does not support selecting a Kubernetes service account or adding pod labels. Therefore, a driver pod cannot use an annotated service account or set the required azure.workload.identity/use: "true" label.

Steps to reproduce

  1. Create a service account configured for Azure Workload Identity:

    kubectl create serviceaccount sk-driver-sa -n simkube
    
    kubectl annotate serviceaccount sk-driver-sa \
      -n simkube \
      azure.workload.identity/client-id=<CLIENT_ID>
  2. Run a simulation using an Azure Blob trace:

    skctl run \
      --trace-path azure://<CONTAINER>/<TRACE_PATH> \
      --driver-namespace simkube
  3. Inspect the generated driver Job:

    kubectl get jobs -n simkube -o yaml
  4. Observe that there is no way to configure the generated pod with:

    spec:
      serviceAccountName: sk-driver-sa

    or:

    metadata:
      labels:
        azure.workload.identity/use: "true"

Expected behavior

The Simulation driver configuration should support a service account and pod labels:

spec:
  driver:
    serviceAccount: sk-driver-sa
    podLabels:
      azure.workload.identity/use: "true"

sk-ctrl should copy these values into the generated driver Job:

spec:
  template:
    metadata:
      labels:
        azure.workload.identity/use: "true"
    spec:
      serviceAccountName: sk-driver-sa

Logs or Metrics

The issue is visible in the generated Job manifest. No specific log line is required.

Additional Info

Kubernetes Version: Any
Environment: Kubernetes with Azure Workload Identity enabled
Affected components: sk-ctrl, sk-driver, skctl

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

azureIssues running on Azuresk-driverIssues with the Simulation runner

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions