Skip to content

Commit

Permalink
add nodeSelector kubernetes.io/os: linux to virt-operator csv
Browse files Browse the repository at this point in the history
this PR adds kubernetes.io/os: linux nodeSelector to virt-operator.
All other components already have this nodeSelector and virt-operator
was missing it

Signed-off-by: Karel Šimon <[email protected]>
  • Loading branch information
ksimon1 committed Jul 14, 2022
1 parent 912acbe commit bfac9df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/generated/operator-csv.yaml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,8 @@ spec:
readOnly: true
- mountPath: /profile-data
name: profile-data
nodeSelector:
kubernetes.io/os: linux
priorityClassName: kubevirt-cluster-critical
securityContext:
runAsNonRoot: true
Expand Down
4 changes: 4 additions & 0 deletions pkg/virt-operator/resource/generate/components/deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ func NewOperatorDeployment(namespace string, repository string, imagePrefix stri
kubeVirtVersionEnv string, virtApiShaEnv string, virtControllerShaEnv string,
virtHandlerShaEnv string, virtLauncherShaEnv string, gsShaEnv string) (*appsv1.Deployment, error) {

const kubernetesOSLinux = "linux"
podAntiAffinity := newPodAntiAffinity(kubevirtLabelKey, kubernetesHostnameTopologyKey, metav1.LabelSelectorOpIn, []string{VirtOperatorName})
version = AddVersionSeparatorPrefix(version)
image := fmt.Sprintf("%s/%s%s%s", repository, imagePrefix, VirtOperatorName, version)
Expand Down Expand Up @@ -464,6 +465,9 @@ func NewOperatorDeployment(namespace string, repository string, imagePrefix stri
Tolerations: criticalAddonsToleration(),
Affinity: podAntiAffinity,
ServiceAccountName: "kubevirt-operator",
NodeSelector: map[string]string{
corev1.LabelOSStable: kubernetesOSLinux,
},
Containers: []corev1.Container{
{
Name: VirtOperatorName,
Expand Down

0 comments on commit bfac9df

Please sign in to comment.