Skip to content

Commit

Permalink
Merge pull request openshift#3174 from shiftstack/unicast-openstack
Browse files Browse the repository at this point in the history
Remove `onPremPlatformKeepalivedEnableUnicast` function
  • Loading branch information
openshift-merge-robot authored Aug 19, 2022
2 parents fc3e4a4 + d438c8b commit 62b1e70
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
14 changes: 0 additions & 14 deletions pkg/controller/template/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ func renderTemplate(config RenderConfig, path string, b []byte) ([]byte, error)
funcs["onPremPlatformAPIServerInternalIP"] = onPremPlatformAPIServerInternalIP
funcs["onPremPlatformIngressIP"] = onPremPlatformIngressIP
funcs["onPremPlatformShortName"] = onPremPlatformShortName
funcs["onPremPlatformKeepalivedEnableUnicast"] = onPremPlatformKeepalivedEnableUnicast
funcs["urlHost"] = urlHost
funcs["urlPort"] = urlPort
tmpl, err := template.New(path).Funcs(funcs).Parse(string(b))
Expand Down Expand Up @@ -424,19 +423,6 @@ func onPremPlatformShortName(cfg RenderConfig) interface{} {
}
}

func onPremPlatformKeepalivedEnableUnicast(cfg RenderConfig) (interface{}, error) {
if cfg.Infra.Status.PlatformStatus != nil {
switch cfg.Infra.Status.PlatformStatus.Type {
case configv1.BareMetalPlatformType:
return "yes", nil
default:
return "no", nil
}
} else {
return "no", nil
}
}

//nolint:dupl
func onPremPlatformIngressIP(cfg RenderConfig) (interface{}, error) {
if cfg.Infra.Status.PlatformStatus != nil {
Expand Down
14 changes: 0 additions & 14 deletions pkg/operator/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func (a *assetRenderer) addTemplateFuncs() {
funcs["onPremPlatformAPIServerInternalIP"] = onPremPlatformAPIServerInternalIP
funcs["onPremPlatformIngressIP"] = onPremPlatformIngressIP
funcs["onPremPlatformShortName"] = onPremPlatformShortName
funcs["onPremPlatformKeepalivedEnableUnicast"] = onPremPlatformKeepalivedEnableUnicast

a.tmpl = a.tmpl.Funcs(funcs)
}
Expand Down Expand Up @@ -242,19 +241,6 @@ func onPremPlatformShortName(cfg mcfgv1.ControllerConfigSpec) interface{} {
}
}

func onPremPlatformKeepalivedEnableUnicast(cfg mcfgv1.ControllerConfigSpec) (interface{}, error) {
if cfg.Infra.Status.PlatformStatus != nil {
switch cfg.Infra.Status.PlatformStatus.Type {
case configv1.BareMetalPlatformType:
return "yes", nil
default:
return "no", nil
}
} else {
return "no", nil
}
}

//nolint:dupl
func onPremPlatformIngressIP(cfg mcfgv1.ControllerConfigSpec) (interface{}, error) {
if cfg.Infra.Status.PlatformStatus != nil {
Expand Down

0 comments on commit 62b1e70

Please sign in to comment.