Workload service account
This feature is only available for the following:
- Host Nodes
- Private Nodes
The workloadServiceAccount allows you to enforce the use of a specific ServiceAccount for all vCluster workload pods running in the host cluster. For example, you can attach a shared imagePullSecret to the ServiceAccount so that all synced pods use the same secret when pulling container images.
controlPlane:
advanced:
workloadServiceAccount:
enabled: true
name: image-pull-sa
imagePullSecrets:
- name: workload-service-account-image-pull-secret
The pod specification (spec) of the synced workloads should not define its own imagePullSecrets. This is because imagePullSecrets are only copied from the ServiceAccount to the pod when the pod specification does not already include them.
The referenced imagePullSecrets must also exist in the host namespace where the vClusterβs workload pods are synced.
An easy way to achieve this is by using Virtual Cluster Templates. In addition to allowing you to add arbitrary Kubernetes objects inside the virtual cluster, Virtual Cluster Templates also enable you to create arbitrary Kubernetes objects in the host cluster namespace where the vClusterβs StatefulSet is deployed.
If syncing ServiceAccount resources from the virtual cluster to the host cluster is enabled, the workloadServiceAccount setting is ignored.
Config referenceβ
workloadServiceAccount required object β
WorkloadServiceAccount specifies options for the service account that will be used for the workloads that run within the virtual cluster.
workloadServiceAccount required object βenabled required boolean true β
Enabled specifies if the service account for the workloads should get deployed.
enabled required boolean true βname required string β
Name specifies what name to use for the service account for the virtual cluster workloads.
name required string βimagePullSecrets required object[] β
ImagePullSecrets defines extra image pull secrets for the workload service account.
imagePullSecrets required object[] βname required string β
Name of the image pull secret to use.
name required string βannotations required object {} β
Annotations are extra annotations for this resource.
annotations required object {} βlabels required object {} β
Labels are extra labels for this resource.
labels required object {} β