Skip to content

Commit

Permalink
add serviceAccountName field
Browse files Browse the repository at this point in the history
  • Loading branch information
cicdteam committed Sep 6, 2023
1 parent 455c0b7 commit e655aeb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
11 changes: 6 additions & 5 deletions neonvm/apis/neonvm/v1/virtualmachine_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,12 @@ type VirtualMachineSpec struct {
// +optional
TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds"`

NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
SchedulerName string `json:"schedulerName,omitempty"`
PodResources corev1.ResourceRequirements `json:"podResources,omitempty"`
NodeSelector map[string]string `json:"nodeSelector,omitempty"`
Affinity *corev1.Affinity `json:"affinity,omitempty"`
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
SchedulerName string `json:"schedulerName,omitempty"`
ServiceAccountName string `json:"serviceAccountName,omitempty"`
PodResources corev1.ResourceRequirements `json:"podResources,omitempty"`

// +kubebuilder:default:=Always
// +optional
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions neonvm/controllers/virtualmachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ func podSpec(virtualmachine *vmv1.VirtualMachine) (*corev1.Pod, error) {
NodeSelector: virtualmachine.Spec.NodeSelector,
ImagePullSecrets: virtualmachine.Spec.ImagePullSecrets,
Tolerations: virtualmachine.Spec.Tolerations,
ServiceAccountName: virtualmachine.Spec.ServiceAccountName,
SchedulerName: virtualmachine.Spec.SchedulerName,
Affinity: affinity,
InitContainers: []corev1.Container{
Expand Down

0 comments on commit e655aeb

Please sign in to comment.