diff --git a/go.mod b/go.mod index 5c9c020b3..e50929dd3 100644 --- a/go.mod +++ b/go.mod @@ -197,9 +197,9 @@ replace ( github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20220217140404-6b1ecb71984f github.com/metal3-io/baremetal-operator/pkg/hardwareutils => github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20220217140404-6b1ecb71984f github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.12 - github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 - github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 - github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 + github.com/openshift/assisted-service/api => github.com/carbonin/assisted-service/api v0.0.0-20250113215508-5dbaa6cb10bb + github.com/openshift/assisted-service/client => github.com/carbonin/assisted-service/client v0.0.0-20250113215508-5dbaa6cb10bb + github.com/openshift/assisted-service/models => github.com/carbonin/assisted-service/models v0.0.0-20250113215508-5dbaa6cb10bb sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820 sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205 ) diff --git a/go.sum b/go.sum index 01a4ba965..4c82017ec 100644 --- a/go.sum +++ b/go.sum @@ -105,6 +105,12 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/carbonin/assisted-service/api v0.0.0-20250113215508-5dbaa6cb10bb h1:fOHbZICJcTlVV5bXhvVBvvZ3cJsZjuXnA/Lby9PzbdU= +github.com/carbonin/assisted-service/api v0.0.0-20250113215508-5dbaa6cb10bb/go.mod h1:tvE25aC7I07Uz2jUt7gH2E8+a1Rw4W7qtW6/EFb8l64= +github.com/carbonin/assisted-service/client v0.0.0-20250113215508-5dbaa6cb10bb h1:WtHO8++1jCISmWXNVCQHncIh0JEgOtrQyt//Fl74EL8= +github.com/carbonin/assisted-service/client v0.0.0-20250113215508-5dbaa6cb10bb/go.mod h1:y+GNZgra/iQDYlacSjgscim8ldrSOMtV3jQaSKC3APc= +github.com/carbonin/assisted-service/models v0.0.0-20250113215508-5dbaa6cb10bb h1:nOWMTD4re0GfpiyEcqGCN2VylUxe0seT4nhKU6vM3Yg= +github.com/carbonin/assisted-service/models v0.0.0-20250113215508-5dbaa6cb10bb/go.mod h1:bx9NsPeBkhn7az/qFHo3hW8wFqFj4BmT3g1R7wR9gcw= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.0.0/go.mod h1:eEew/i+1Q6OrCDZh3WiXYv3+nJwBASZ8Bog/87DQnVg= @@ -620,12 +626,6 @@ github.com/openshift/api v0.0.0-20240521212423-414cf30d37be h1:v2sJPAU2bY9quEg9G github.com/openshift/api v0.0.0-20240521212423-414cf30d37be/go.mod h1:CxgbWAlvu2iQB0UmKTtRu1YfepRg1/vJ64n2DlIEVz4= github.com/openshift/assisted-service v1.0.10-0.20241213170211-a5016f125538 h1:/SkX5GwRyPaj6cIkU/KIOBGXkaJdANQQPGKzSu9jxls= github.com/openshift/assisted-service v1.0.10-0.20241213170211-a5016f125538/go.mod h1:0Ygx4AsKw93mKw5lwzVGI9fxS70obgvyAuQ2EUu4uLQ= -github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 h1:Sxw4JHF7NrRlw/FECcGdOzmSwO+FRcdlaKCz/XPrXIE= -github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538/go.mod h1:tvE25aC7I07Uz2jUt7gH2E8+a1Rw4W7qtW6/EFb8l64= -github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 h1:NPQBK49+y8whcMjlVveIFqA74jSW+DL1Do0fsvuMbbk= -github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538/go.mod h1:y+GNZgra/iQDYlacSjgscim8ldrSOMtV3jQaSKC3APc= -github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 h1:YOjfAf4JJk7dM7/dJ4RvGwPu2tkiNAh1dG3pebvfGXg= -github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538/go.mod h1:bx9NsPeBkhn7az/qFHo3hW8wFqFj4BmT3g1R7wR9gcw= github.com/openshift/baremetal-runtimecfg v0.0.0-20220211165258-fe92b9507bec h1:1nC/js8H8s+MBzgu20YDSuVw6IF9Ct5HOR1JLxv572Q= github.com/openshift/baremetal-runtimecfg v0.0.0-20220211165258-fe92b9507bec/go.mod h1:fIhPgDwf2Vm1tIiZ0cFidPw3dS26AKGSRoiIJnlz84o= github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87 h1:cHyxR+Y8rAMT6m1jQCaYGRwikqahI0OjjUDhFNf3ySQ= diff --git a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go index d22067e03..44feb20d4 100644 --- a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go +++ b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/agentclusterinstall_types.go @@ -209,6 +209,10 @@ type AgentClusterInstallSpec struct { // Set per cluster mirror registry // +optional MirrorRegistryRef *MirrorRegistryConfigMapReference `json:"mirrorRegistryRef,omitempty"` + + // LoadBalancer defines the load balancer used by the cluster for ingress traffic. + // +optional + LoadBalancer *LoadBalancer `json:"loadBalancer,omitempty"` } // IgnitionEndpoint stores the data to of the custom ignition endpoint. @@ -506,6 +510,33 @@ type ManifestsConfigMapReference struct { Name string `json:"name"` } +// LoadBalancer defines the load balancer used by the cluster. +// +union +type LoadBalancer struct { + // Type defines the type of load balancer used by the cluster, which can be managed by the user or by the + // cluster. The default value is ClusterManaged. + // +default="ClusterManaged" + // +kubebuilder:default:="ClusterManaged" + // +kubebuilder:validation:Enum:="ClusterManaged";"UserManaged" + // +optional + // +unionDiscriminator + Type LoadBalancerType `json:"type,omitempty"` +} + +// LoadBalancerType defines the type of load balancer used by the cluster. +type LoadBalancerType string + +const ( + // LoadBalancerTypeClusterManaged is a load balancer with virtual IP addresses managed internally by the + // cluster. + LoadBalancerTypeClusterManaged LoadBalancerType = "ClusterManaged" + + // LoadBalancerTypeUserManaged is a load balancer managed outside of the cluster by the customer. When this is + // used no virtual IP addresses should be specified. Note that this is only allowed for the bare metal and + // vSphere platforms. + LoadBalancerTypeUserManaged LoadBalancerType = "UserManaged" +) + func init() { SchemeBuilder.Register(&AgentClusterInstall{}, &AgentClusterInstallList{}) } diff --git a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go index cb7798170..87f61de03 100644 --- a/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/assisted-service/api/hiveextension/v1beta1/zz_generated.deepcopy.go @@ -157,6 +157,11 @@ func (in *AgentClusterInstallSpec) DeepCopyInto(out *AgentClusterInstallSpec) { *out = new(MirrorRegistryConfigMapReference) **out = **in } + if in.LoadBalancer != nil { + in, out := &in.LoadBalancer, &out.LoadBalancer + *out = new(LoadBalancer) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentClusterInstallSpec. @@ -364,6 +369,21 @@ func (in *IgnitionEndpoint) DeepCopy() *IgnitionEndpoint { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LoadBalancer) DeepCopyInto(out *LoadBalancer) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancer. +func (in *LoadBalancer) DeepCopy() *LoadBalancer { + if in == nil { + return nil + } + out := new(LoadBalancer) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *MachineNetworkEntry) DeepCopyInto(out *MachineNetworkEntry) { *out = *in diff --git a/vendor/github.com/openshift/assisted-service/models/cluster.go b/vendor/github.com/openshift/assisted-service/models/cluster.go index dac19159b..b8f7b4276 100644 --- a/vendor/github.com/openshift/assisted-service/models/cluster.go +++ b/vendor/github.com/openshift/assisted-service/models/cluster.go @@ -174,6 +174,9 @@ type Cluster struct { // last installation preparation LastInstallationPreparation LastInstallationPreparation `json:"last-installation-preparation,omitempty" gorm:"embedded;embeddedPrefix:last_installation_preparation_"` + // load balancer + LoadBalancer *LoadBalancer `json:"load_balancer,omitempty" gorm:"embedded;embeddedPrefix:load_balancer_"` + // The progress of log collection or empty if logs are not applicable LogsInfo LogsState `json:"logs_info,omitempty" gorm:"type:varchar(2048)"` @@ -375,6 +378,10 @@ func (m *Cluster) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLoadBalancer(formats); err != nil { + res = append(res, err) + } + if err := m.validateLogsInfo(formats); err != nil { res = append(res, err) } @@ -951,6 +958,25 @@ func (m *Cluster) validateLastInstallationPreparation(formats strfmt.Registry) e return nil } +func (m *Cluster) validateLoadBalancer(formats strfmt.Registry) error { + if swag.IsZero(m.LoadBalancer) { // not required + return nil + } + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *Cluster) validateLogsInfo(formats strfmt.Registry) error { if swag.IsZero(m.LogsInfo) { // not required return nil @@ -1305,6 +1331,10 @@ func (m *Cluster) ContextValidate(ctx context.Context, formats strfmt.Registry) res = append(res, err) } + if err := m.contextValidateLoadBalancer(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateLogsInfo(ctx, formats); err != nil { res = append(res, err) } @@ -1497,6 +1527,22 @@ func (m *Cluster) contextValidateLastInstallationPreparation(ctx context.Context return nil } +func (m *Cluster) contextValidateLoadBalancer(ctx context.Context, formats strfmt.Registry) error { + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *Cluster) contextValidateLogsInfo(ctx context.Context, formats strfmt.Registry) error { if err := m.LogsInfo.ContextValidate(ctx, formats); err != nil { diff --git a/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go b/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go index 6adafe4b3..e29d60626 100644 --- a/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go +++ b/vendor/github.com/openshift/assisted-service/models/cluster_create_params.go @@ -78,6 +78,9 @@ type ClusterCreateParams struct { // The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. IngressVips []*IngressVip `json:"ingress_vips"` + // load balancer + LoadBalancer *LoadBalancer `json:"load_balancer,omitempty" gorm:"embedded;embeddedPrefix:load_balancer_"` + // Machine networks that are associated with this cluster. MachineNetworks []*MachineNetwork `json:"machine_networks"` @@ -178,6 +181,10 @@ func (m *ClusterCreateParams) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLoadBalancer(formats); err != nil { + res = append(res, err) + } + if err := m.validateMachineNetworks(formats); err != nil { res = append(res, err) } @@ -508,6 +515,25 @@ func (m *ClusterCreateParams) validateIngressVips(formats strfmt.Registry) error return nil } +func (m *ClusterCreateParams) validateLoadBalancer(formats strfmt.Registry) error { + if swag.IsZero(m.LoadBalancer) { // not required + return nil + } + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *ClusterCreateParams) validateMachineNetworks(formats strfmt.Registry) error { if swag.IsZero(m.MachineNetworks) { // not required return nil @@ -718,6 +744,10 @@ func (m *ClusterCreateParams) ContextValidate(ctx context.Context, formats strfm res = append(res, err) } + if err := m.contextValidateLoadBalancer(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMachineNetworks(ctx, formats); err != nil { res = append(res, err) } @@ -832,6 +862,22 @@ func (m *ClusterCreateParams) contextValidateIngressVips(ctx context.Context, fo return nil } +func (m *ClusterCreateParams) contextValidateLoadBalancer(ctx context.Context, formats strfmt.Registry) error { + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *ClusterCreateParams) contextValidateMachineNetworks(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.MachineNetworks); i++ { diff --git a/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go b/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go index 6d66947ed..008ff560f 100644 --- a/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go +++ b/vendor/github.com/openshift/assisted-service/models/cluster_validation_id.go @@ -99,6 +99,9 @@ const ( // ClusterValidationIDMtvRequirementsSatisfied captures enum value "mtv-requirements-satisfied" ClusterValidationIDMtvRequirementsSatisfied ClusterValidationID = "mtv-requirements-satisfied" + // ClusterValidationIDOscRequirementsSatisfied captures enum value "osc-requirements-satisfied" + ClusterValidationIDOscRequirementsSatisfied ClusterValidationID = "osc-requirements-satisfied" + // ClusterValidationIDNetworkTypeValid captures enum value "network-type-valid" ClusterValidationIDNetworkTypeValid ClusterValidationID = "network-type-valid" @@ -132,7 +135,7 @@ var clusterValidationIdEnum []interface{} func init() { var res []ClusterValidationID - if err := json.Unmarshal([]byte(`["machine-cidr-defined","cluster-cidr-defined","service-cidr-defined","no-cidrs-overlapping","networks-same-address-families","network-prefix-valid","machine-cidr-equals-to-calculated-cidr","api-vips-defined","api-vips-valid","ingress-vips-defined","ingress-vips-valid","all-hosts-are-ready-to-install","sufficient-masters-count","dns-domain-defined","pull-secret-set","ntp-server-configured","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","cnv-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","network-type-valid","platform-requirements-satisfied","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["machine-cidr-defined","cluster-cidr-defined","service-cidr-defined","no-cidrs-overlapping","networks-same-address-families","network-prefix-valid","machine-cidr-equals-to-calculated-cidr","api-vips-defined","api-vips-valid","ingress-vips-defined","ingress-vips-valid","all-hosts-are-ready-to-install","sufficient-masters-count","dns-domain-defined","pull-secret-set","ntp-server-configured","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","cnv-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","osc-requirements-satisfied","network-type-valid","platform-requirements-satisfied","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go b/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go index 9e14e6411..cdc4e3239 100644 --- a/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go +++ b/vendor/github.com/openshift/assisted-service/models/feature_support_level_id.go @@ -60,6 +60,9 @@ const ( // FeatureSupportLevelIDMTV captures enum value "MTV" FeatureSupportLevelIDMTV FeatureSupportLevelID = "MTV" + // FeatureSupportLevelIDOSC captures enum value "OSC" + FeatureSupportLevelIDOSC FeatureSupportLevelID = "OSC" + // FeatureSupportLevelIDNUTANIXINTEGRATION captures enum value "NUTANIX_INTEGRATION" FeatureSupportLevelIDNUTANIXINTEGRATION FeatureSupportLevelID = "NUTANIX_INTEGRATION" @@ -131,6 +134,9 @@ const ( // FeatureSupportLevelIDAUTHORINO captures enum value "AUTHORINO" FeatureSupportLevelIDAUTHORINO FeatureSupportLevelID = "AUTHORINO" + + // FeatureSupportLevelIDUSERMANAGEDLOADBALANCER captures enum value "USER_MANAGED_LOAD_BALANCER" + FeatureSupportLevelIDUSERMANAGEDLOADBALANCER FeatureSupportLevelID = "USER_MANAGED_LOAD_BALANCER" ) // for schema @@ -138,7 +144,7 @@ var featureSupportLevelIdEnum []interface{} func init() { var res []FeatureSupportLevelID - if err := json.Unmarshal([]byte(`["SNO","VIP_AUTO_ALLOC","CUSTOM_MANIFEST","SINGLE_NODE_EXPANSION","LVM","ODF","LSO","CNV","MCE","MTV","NUTANIX_INTEGRATION","BAREMETAL_PLATFORM","NONE_PLATFORM","VSPHERE_INTEGRATION","DUAL_STACK_VIPS","CLUSTER_MANAGED_NETWORKING","USER_MANAGED_NETWORKING","MINIMAL_ISO","FULL_ISO","EXTERNAL_PLATFORM_OCI","DUAL_STACK","PLATFORM_MANAGED_NETWORKING","SKIP_MCO_REBOOT","EXTERNAL_PLATFORM","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","NODE_FEATURE_DISCOVERY","NVIDIA_GPU","PIPELINES","SERVICEMESH","SERVERLESS","OPENSHIFT_AI","NON_STANDARD_HA_CONTROL_PLANE","AUTHORINO"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["SNO","VIP_AUTO_ALLOC","CUSTOM_MANIFEST","SINGLE_NODE_EXPANSION","LVM","ODF","LSO","CNV","MCE","MTV","OSC","NUTANIX_INTEGRATION","BAREMETAL_PLATFORM","NONE_PLATFORM","VSPHERE_INTEGRATION","DUAL_STACK_VIPS","CLUSTER_MANAGED_NETWORKING","USER_MANAGED_NETWORKING","MINIMAL_ISO","FULL_ISO","EXTERNAL_PLATFORM_OCI","DUAL_STACK","PLATFORM_MANAGED_NETWORKING","SKIP_MCO_REBOOT","EXTERNAL_PLATFORM","OVN_NETWORK_TYPE","SDN_NETWORK_TYPE","NODE_FEATURE_DISCOVERY","NVIDIA_GPU","PIPELINES","SERVICEMESH","SERVERLESS","OPENSHIFT_AI","NON_STANDARD_HA_CONTROL_PLANE","AUTHORINO","USER_MANAGED_LOAD_BALANCER"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/vendor/github.com/openshift/assisted-service/models/host_validation_id.go b/vendor/github.com/openshift/assisted-service/models/host_validation_id.go index 0ecb37276..c99e2319d 100644 --- a/vendor/github.com/openshift/assisted-service/models/host_validation_id.go +++ b/vendor/github.com/openshift/assisted-service/models/host_validation_id.go @@ -102,6 +102,9 @@ const ( // HostValidationIDMtvRequirementsSatisfied captures enum value "mtv-requirements-satisfied" HostValidationIDMtvRequirementsSatisfied HostValidationID = "mtv-requirements-satisfied" + // HostValidationIDOscRequirementsSatisfied captures enum value "osc-requirements-satisfied" + HostValidationIDOscRequirementsSatisfied HostValidationID = "osc-requirements-satisfied" + // HostValidationIDSufficientInstallationDiskSpeed captures enum value "sufficient-installation-disk-speed" HostValidationIDSufficientInstallationDiskSpeed HostValidationID = "sufficient-installation-disk-speed" @@ -189,7 +192,7 @@ var hostValidationIdEnum []interface{} func init() { var res []HostValidationID - if err := json.Unmarshal([]byte(`["connected","media-connected","has-inventory","has-min-cpu-cores","has-min-valid-disks","has-min-memory","machine-cidr-defined","has-cpu-cores-for-role","has-memory-for-role","hostname-unique","hostname-valid","belongs-to-machine-cidr","ignition-downloadable","belongs-to-majority-group","valid-platform-network-settings","ntp-synced","time-synced-between-host-and-service","container-images-available","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","sufficient-installation-disk-speed","cnv-requirements-satisfied","sufficient-network-latency-requirement-for-role","sufficient-packet-loss-requirement-for-role","has-default-route","api-domain-name-resolved-correctly","api-int-domain-name-resolved-correctly","apps-domain-name-resolved-correctly","release-domain-name-resolved-correctly","compatible-with-cluster-platform","dns-wildcard-not-configured","disk-encryption-requirements-satisfied","non-overlapping-subnets","vsphere-disk-uuid-enabled","compatible-agent","no-skip-installation-disk","no-skip-missing-disk","no-ip-collisions-in-network","no-iscsi-nic-belongs-to-machine-cidr","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied","mtu-valid"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["connected","media-connected","has-inventory","has-min-cpu-cores","has-min-valid-disks","has-min-memory","machine-cidr-defined","has-cpu-cores-for-role","has-memory-for-role","hostname-unique","hostname-valid","belongs-to-machine-cidr","ignition-downloadable","belongs-to-majority-group","valid-platform-network-settings","ntp-synced","time-synced-between-host-and-service","container-images-available","lso-requirements-satisfied","ocs-requirements-satisfied","odf-requirements-satisfied","lvm-requirements-satisfied","mce-requirements-satisfied","mtv-requirements-satisfied","osc-requirements-satisfied","sufficient-installation-disk-speed","cnv-requirements-satisfied","sufficient-network-latency-requirement-for-role","sufficient-packet-loss-requirement-for-role","has-default-route","api-domain-name-resolved-correctly","api-int-domain-name-resolved-correctly","apps-domain-name-resolved-correctly","release-domain-name-resolved-correctly","compatible-with-cluster-platform","dns-wildcard-not-configured","disk-encryption-requirements-satisfied","non-overlapping-subnets","vsphere-disk-uuid-enabled","compatible-agent","no-skip-installation-disk","no-skip-missing-disk","no-ip-collisions-in-network","no-iscsi-nic-belongs-to-machine-cidr","node-feature-discovery-requirements-satisfied","nvidia-gpu-requirements-satisfied","pipelines-requirements-satisfied","servicemesh-requirements-satisfied","serverless-requirements-satisfied","openshift-ai-requirements-satisfied","authorino-requirements-satisfied","mtu-valid"]`), &res); err != nil { panic(err) } for _, v := range res { diff --git a/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go b/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go index 4a9b4eae6..4ec6e462f 100644 --- a/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go +++ b/vendor/github.com/openshift/assisted-service/models/install_cmd_request.go @@ -38,6 +38,9 @@ type InstallCmdRequest struct { // Pattern: ^(([a-zA-Z0-9\-\.]+)(:[0-9]+)?\/)?[a-z0-9\._\-\/@]+[?::a-zA-Z0-9_\-.]+$ ControllerImage *string `json:"controller_image"` + // CoreOS container image to use if installing to the local device + CoreosImage string `json:"coreos_image,omitempty"` + // List of disks to format DisksToFormat []string `json:"disks_to_format"` diff --git a/vendor/github.com/openshift/assisted-service/models/load_balancer.go b/vendor/github.com/openshift/assisted-service/models/load_balancer.go new file mode 100644 index 000000000..8d4a4fe21 --- /dev/null +++ b/vendor/github.com/openshift/assisted-service/models/load_balancer.go @@ -0,0 +1,114 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "encoding/json" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// LoadBalancer load balancer +// +// swagger:model load_balancer +type LoadBalancer struct { + + // Indicates if the load balancer will be managed by the cluster or by the user. This is optional and The + // default is `cluster-managed`. + // + // `cluster-managed` means that the cluster will start the components that assign the API and ingress VIPs to the + // nodes of the cluster automatically. + // + // `user-managed` means that the user is responsible for configuring an external load balancer and assign the + // API and ingress VIPs to it. Note that this configuration needs to be completed before starting the + // installation of the cluster, as it is needed during the installation process. + // + // Enum: [cluster-managed user-managed] + Type string `json:"type,omitempty" gorm:"not null;check:load_balancer_type in ('cluster-managed', 'user-managed');default:'cluster-managed'"` +} + +// Validate validates this load balancer +func (m *LoadBalancer) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +var loadBalancerTypeTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["cluster-managed","user-managed"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + loadBalancerTypeTypePropEnum = append(loadBalancerTypeTypePropEnum, v) + } +} + +const ( + + // LoadBalancerTypeClusterManaged captures enum value "cluster-managed" + LoadBalancerTypeClusterManaged string = "cluster-managed" + + // LoadBalancerTypeUserManaged captures enum value "user-managed" + LoadBalancerTypeUserManaged string = "user-managed" +) + +// prop value enum +func (m *LoadBalancer) validateTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, loadBalancerTypeTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *LoadBalancer) validateType(formats strfmt.Registry) error { + if swag.IsZero(m.Type) { // not required + return nil + } + + // value enum + if err := m.validateTypeEnum("type", "body", m.Type); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this load balancer based on context it is used +func (m *LoadBalancer) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *LoadBalancer) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *LoadBalancer) UnmarshalBinary(b []byte) error { + var res LoadBalancer + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go b/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go index 6544b46a8..284733618 100644 --- a/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go +++ b/vendor/github.com/openshift/assisted-service/models/v2_cluster_update_params.go @@ -71,6 +71,9 @@ type V2ClusterUpdateParams struct { // The virtual IPs used for cluster ingress traffic. Enter one IP address for single-stack clusters, or up to two for dual-stack clusters (at most one IP address per IP stack used). The order of stacks should be the same as order of subnets in Cluster Networks, Service Networks, and Machine Networks. IngressVips []*IngressVip `json:"ingress_vips"` + // load balancer + LoadBalancer *LoadBalancer `json:"load_balancer,omitempty" gorm:"embedded;embeddedPrefix:load_balancer_"` + // A CIDR that all hosts belonging to the cluster should have an interfaces with IP address that belongs to this CIDR. The api_vip belongs to this CIDR. // Pattern: ^(?:(?:(?:[0-9]{1,3}\.){3}[0-9]{1,3}\/(?:(?:[0-9])|(?:[1-2][0-9])|(?:3[0-2])))|(?:(?:[0-9a-fA-F]*:[0-9a-fA-F]*){2,})/(?:(?:[0-9])|(?:[1-9][0-9])|(?:1[0-1][0-9])|(?:12[0-8])))$ MachineNetworkCidr *string `json:"machine_network_cidr,omitempty"` @@ -158,6 +161,10 @@ func (m *V2ClusterUpdateParams) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateLoadBalancer(formats); err != nil { + res = append(res, err) + } + if err := m.validateMachineNetworkCidr(formats); err != nil { res = append(res, err) } @@ -388,6 +395,25 @@ func (m *V2ClusterUpdateParams) validateIngressVips(formats strfmt.Registry) err return nil } +func (m *V2ClusterUpdateParams) validateLoadBalancer(formats strfmt.Registry) error { + if swag.IsZero(m.LoadBalancer) { // not required + return nil + } + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *V2ClusterUpdateParams) validateMachineNetworkCidr(formats strfmt.Registry) error { if swag.IsZero(m.MachineNetworkCidr) { // not required return nil @@ -591,6 +617,10 @@ func (m *V2ClusterUpdateParams) ContextValidate(ctx context.Context, formats str res = append(res, err) } + if err := m.contextValidateLoadBalancer(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateMachineNetworks(ctx, formats); err != nil { res = append(res, err) } @@ -705,6 +735,22 @@ func (m *V2ClusterUpdateParams) contextValidateIngressVips(ctx context.Context, return nil } +func (m *V2ClusterUpdateParams) contextValidateLoadBalancer(ctx context.Context, formats strfmt.Registry) error { + + if m.LoadBalancer != nil { + if err := m.LoadBalancer.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("load_balancer") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("load_balancer") + } + return err + } + } + + return nil +} + func (m *V2ClusterUpdateParams) contextValidateMachineNetworks(ctx context.Context, formats strfmt.Registry) error { for i := 0; i < len(m.MachineNetworks); i++ { diff --git a/vendor/modules.txt b/vendor/modules.txt index 6517903d7..c95c8ea1f 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -526,11 +526,11 @@ github.com/openshift/assisted-service/restapi/operations/managed_domains github.com/openshift/assisted-service/restapi/operations/manifests github.com/openshift/assisted-service/restapi/operations/operators github.com/openshift/assisted-service/restapi/operations/versions -# github.com/openshift/assisted-service/api v0.0.0 => github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/api v0.0.0 => github.com/carbonin/assisted-service/api v0.0.0-20250113215508-5dbaa6cb10bb ## explicit; go 1.21 github.com/openshift/assisted-service/api/common github.com/openshift/assisted-service/api/hiveextension/v1beta1 -# github.com/openshift/assisted-service/client v0.0.0 => github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/client v0.0.0 => github.com/carbonin/assisted-service/client v0.0.0-20250113215508-5dbaa6cb10bb ## explicit; go 1.21 github.com/openshift/assisted-service/client github.com/openshift/assisted-service/client/events @@ -539,7 +539,7 @@ github.com/openshift/assisted-service/client/managed_domains github.com/openshift/assisted-service/client/manifests github.com/openshift/assisted-service/client/operators github.com/openshift/assisted-service/client/versions -# github.com/openshift/assisted-service/models v0.0.0 => github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/models v0.0.0 => github.com/carbonin/assisted-service/models v0.0.0-20250113215508-5dbaa6cb10bb ## explicit; go 1.21 github.com/openshift/assisted-service/models # github.com/openshift/baremetal-runtimecfg v0.0.0-20220211165258-fe92b9507bec @@ -1153,8 +1153,8 @@ sigs.k8s.io/yaml/goyaml.v2 # github.com/metal3-io/baremetal-operator/apis => github.com/openshift/baremetal-operator/apis v0.0.0-20220217140404-6b1ecb71984f # github.com/metal3-io/baremetal-operator/pkg/hardwareutils => github.com/openshift/baremetal-operator/pkg/hardwareutils v0.0.0-20220217140404-6b1ecb71984f # github.com/opencontainers/runc => github.com/opencontainers/runc v1.1.12 -# github.com/openshift/assisted-service/api => github.com/openshift/assisted-service/api v0.0.0-20241213170211-a5016f125538 -# github.com/openshift/assisted-service/client => github.com/openshift/assisted-service/client v0.0.0-20241213170211-a5016f125538 -# github.com/openshift/assisted-service/models => github.com/openshift/assisted-service/models v0.0.0-20241213170211-a5016f125538 +# github.com/openshift/assisted-service/api => github.com/carbonin/assisted-service/api v0.0.0-20250113215508-5dbaa6cb10bb +# github.com/openshift/assisted-service/client => github.com/carbonin/assisted-service/client v0.0.0-20250113215508-5dbaa6cb10bb +# github.com/openshift/assisted-service/models => github.com/carbonin/assisted-service/models v0.0.0-20250113215508-5dbaa6cb10bb # sigs.k8s.io/cluster-api-provider-aws => github.com/openshift/cluster-api-provider-aws v0.2.1-0.20201022175424-d30c7a274820 # sigs.k8s.io/cluster-api-provider-azure => github.com/openshift/cluster-api-provider-azure v0.1.0-alpha.3.0.20201016155852-4090a6970205