Skip to content

Commit

Permalink
hypershift: check for platform
Browse files Browse the repository at this point in the history
There are places where the deployer should behave the same
for OpenShift and HyperShift.
For example when it sets the selinux policy.
Hence, we want to add `platform.HyperShift` under the check.

Signed-off-by: Talor Itzhak <[email protected]>
  • Loading branch information
Tal-or committed Sep 22, 2024
1 parent 16e4670 commit 8dae24a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/manifests/rte/rte.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (mf Manifests) Clone() Manifests {
ConfigMap: mf.ConfigMap.DeepCopy(),
}

if mf.plat == platform.OpenShift {
if mf.plat == platform.OpenShift || mf.plat == platform.HyperShift {
// MachineConfig is obsolete starting from OCP v4.18
if mf.MachineConfig != nil {
ret.MachineConfig = mf.MachineConfig.DeepCopy()
Expand Down Expand Up @@ -111,7 +111,7 @@ func (mf Manifests) Render(opts options.UpdaterDaemon) (Manifests, error) {
}
rteupdate.DaemonSet(ret.DaemonSet, mf.plat, rteConfigMapName, opts.DaemonSet)

if mf.plat == platform.OpenShift {
if mf.plat == platform.OpenShift || mf.plat == platform.HyperShift {
selinuxType := selinuxassets.RTEContextType
if mf.MachineConfig != nil {
if opts.Name != "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/manifests/sched/sched.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (mf Manifests) Render(logger logr.Logger, opts options.Scheduler) (Manifest
schedupdate.ControllerDeployment(ret.DPController, opts.PullIfNotPresent, opts.CtrlPlaneAffinity)
if opts.Namespace != "" {
ret.Namespace.Name = opts.Namespace
} else if mf.plat == platform.OpenShift {
} else if mf.plat == platform.OpenShift || mf.plat == platform.HyperShift {
ret.Namespace.Name = NamespaceOpenShift
}

Expand Down

0 comments on commit 8dae24a

Please sign in to comment.