Skip to content

Commit

Permalink
Add HyperShift specific priorityClass
Browse files Browse the repository at this point in the history
HyperShift needs guest cluster control plane components with priority
"hypershift-control-plane", https://hypershift-docs.netlify.app/how-to/distribute-hosted-cluster-workloads/
  • Loading branch information
jsafrane committed Dec 1, 2022
1 parent 3bd0291 commit 6ad82ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/operator/starter.go
Expand Up @@ -56,6 +56,8 @@ const (
caBundleKey = "ca-bundle.pem"

infrastructureName = "cluster"

hypershiftPriorityClass = "hypershift-control-plane"
)

func RunOperator(ctx context.Context, controllerConfig *controllercmd.ControllerContext, guestKubeConfigString string) error {
Expand Down Expand Up @@ -518,6 +520,8 @@ func withHypershiftDeploymentHook(isHypershift bool, hypershiftImage string) dc.
return nil
}

deployment.Spec.Template.Spec.PriorityClassName = hypershiftPriorityClass

// Inject into the pod the volumes used by CSI and token minter sidecars.
podSpec := &deployment.Spec.Template.Spec
podSpec.Volumes = append(podSpec.Volumes,
Expand Down

0 comments on commit 6ad82ea

Please sign in to comment.