Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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