Skip to content
Closed
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
8 changes: 8 additions & 0 deletions OWNERS_ALIASES
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ aliases:
- Prashanth684
- clnperez
- mkumatag
nutanix-approvers:
- thunderboltsid
- yannickstruyf3
- yanhua121
nutanix-reviewers:
- thunderboltsid
- yannickstruyf3
- yanhua121
1,987 changes: 1,068 additions & 919 deletions manifests/controllerconfig.crd.yaml

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions pkg/controller/template/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func platformStringFromControllerConfigSpec(ic *mcfgv1.ControllerConfigSpec) (st
return "", fmt.Errorf("cannot generate MachineConfigs when no platformStatus.type is set")
case platformBase:
return "", fmt.Errorf("platform _base unsupported")
case configv1.AWSPlatformType, configv1.AlibabaCloudPlatformType, configv1.AzurePlatformType, configv1.BareMetalPlatformType, configv1.GCPPlatformType, configv1.OpenStackPlatformType, configv1.LibvirtPlatformType, configv1.OvirtPlatformType, configv1.VSpherePlatformType, configv1.KubevirtPlatformType, configv1.PowerVSPlatformType, configv1.NonePlatformType:
case configv1.AWSPlatformType, configv1.AlibabaCloudPlatformType, configv1.AzurePlatformType, configv1.BareMetalPlatformType, configv1.GCPPlatformType, configv1.OpenStackPlatformType, configv1.LibvirtPlatformType, configv1.OvirtPlatformType, configv1.VSpherePlatformType, configv1.KubevirtPlatformType, configv1.PowerVSPlatformType, configv1.NonePlatformType, configv1.NutanixPlatformType:
return strings.ToLower(string(ic.Infra.Status.PlatformStatus.Type)), nil
default:
// platformNone is used for a non-empty, but currently unsupported platform.
Expand Down Expand Up @@ -408,6 +408,8 @@ func onPremPlatformShortName(cfg RenderConfig) interface{} {
return "vsphere"
case configv1.KubevirtPlatformType:
return "kubevirt"
case configv1.NutanixPlatformType:
return "nutanix"
default:
return ""
}
Expand Down Expand Up @@ -447,6 +449,8 @@ func onPremPlatformIngressIP(cfg RenderConfig) (interface{}, error) {
// VSphere UPI doesn't populate VSphere field. So it's not an error,
// and there is also no data
return nil, nil
case configv1.NutanixPlatformType:
return cfg.Infra.Status.PlatformStatus.Nutanix.IngressIP, nil
default:
return nil, fmt.Errorf("invalid platform for Ingress IP")
}
Expand All @@ -473,6 +477,8 @@ func onPremPlatformAPIServerInternalIP(cfg RenderConfig) (interface{}, error) {
return nil, nil
case configv1.KubevirtPlatformType:
return cfg.Infra.Status.PlatformStatus.Kubevirt.APIServerInternalIP, nil
case configv1.NutanixPlatformType:
return cfg.Infra.Status.PlatformStatus.Nutanix.APIServerInternalIP, nil
default:
return nil, fmt.Errorf("invalid platform for API Server Internal IP")
}
Expand All @@ -499,7 +505,7 @@ func existsDir(path string) (bool, error) {

func onPremPlatform(platformString configv1.PlatformType) bool {
switch platformString {
case configv1.BareMetalPlatformType, configv1.OvirtPlatformType, configv1.OpenStackPlatformType, configv1.VSpherePlatformType, configv1.KubevirtPlatformType:
case configv1.BareMetalPlatformType, configv1.OvirtPlatformType, configv1.OpenStackPlatformType, configv1.VSpherePlatformType, configv1.KubevirtPlatformType, configv1.NutanixPlatformType:
return true
default:
return false
Expand Down
20 changes: 20 additions & 0 deletions pkg/operator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,26 @@ func appendManifestsByPlatform(manifests []manifest, infra configv1.Infrastructu
)
}

if infra.Status.PlatformStatus.Nutanix != nil {
manifests = append(manifests,
manifest{
name: "manifests/on-prem/coredns.yaml",
filename: "nutanix/manifests/coredns.yaml",
},
manifest{
name: "manifests/on-prem/coredns-corefile.tmpl",
filename: "nutanix/static-pod-resources/coredns/Corefile.tmpl",
},
manifest{
name: "manifests/on-prem/keepalived.yaml",
filename: "nutanix/manifests/keepalived.yaml",
},
manifest{
name: "manifests/on-prem/keepalived.conf.tmpl",
filename: "nutanix/static-pod-resources/keepalived/keepalived.conf.tmpl",
},
)
}
return manifests
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/operator/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ func onPremPlatformShortName(cfg mcfgv1.ControllerConfigSpec) interface{} {
return "vsphere"
case configv1.KubevirtPlatformType:
return "kubevirt"
case configv1.NutanixPlatformType:
return "nutanix"
default:
return ""
}
Expand Down Expand Up @@ -228,6 +230,8 @@ func onPremPlatformIngressIP(cfg mcfgv1.ControllerConfigSpec) (interface{}, erro
return cfg.Infra.Status.PlatformStatus.VSphere.IngressIP, nil
case configv1.KubevirtPlatformType:
return cfg.Infra.Status.PlatformStatus.Kubevirt.IngressIP, nil
case configv1.NutanixPlatformType:
return cfg.Infra.Status.PlatformStatus.Nutanix.IngressIP, nil
default:
return nil, fmt.Errorf("invalid platform for Ingress IP")
}
Expand All @@ -249,6 +253,8 @@ func onPremPlatformAPIServerInternalIP(cfg mcfgv1.ControllerConfigSpec) (interfa
return cfg.Infra.Status.PlatformStatus.VSphere.APIServerInternalIP, nil
case configv1.KubevirtPlatformType:
return cfg.Infra.Status.PlatformStatus.Kubevirt.APIServerInternalIP, nil
case configv1.NutanixPlatformType:
return cfg.Infra.Status.PlatformStatus.Nutanix.APIServerInternalIP, nil
default:
return nil, fmt.Errorf("invalid platform for API Server Internal IP")
}
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func (optr *Operator) syncRelatedObjects() error {
{Resource: "namespaces", Name: "openshift-openstack-infra"},
{Resource: "namespaces", Name: "openshift-ovirt-infra"},
{Resource: "namespaces", Name: "openshift-vsphere-infra"},
{Resource: "namespaces", Name: "openshift-nutanix-infra"},
}

if !equality.Semantic.DeepEqual(coCopy.Status.RelatedObjects, co.Status.RelatedObjects) {
Expand Down