diff --git a/CHANGES.md b/CHANGES.md index c277fda6f..2d4d9d0fc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,11 @@ This document describes the relevant changes between releases of the API model. +## 0.0.462 Jul 21 2026 +- ROSAENG-61032 | task: ocm-api/sdk changes to support SpotMarketOptions for ROSA HCP +- ROSAENG-61032 | task: ocm-api/sdk changes to support SpotMarketOptions for ROSA HCP +- ROSAENG-61032 | task: ocm-api/sdk changes to support SpotMarketOptions for ROSA HCP + ## 0.0.461 Jul 02 2026 - ROSAENG-59819 | feat: add severity constants for HCC alignment diff --git a/Makefile b/Makefile index 13a1f09f9..c2d47d990 100644 --- a/Makefile +++ b/Makefile @@ -85,7 +85,7 @@ metamodel: # Enforce indentation by tabs. License contains 2 spaces, so reject 3+. lint: - find -name '*.model' -print0 | xargs -0 sh -c '! egrep --with-filename --line-number "^( |\t+ )" "$$@"' + find . -name '*.model' -print0 | xargs -0 sh -c '! egrep --with-filename --line-number "^( |\t+ )" "$$@"' .PHONY: clean clean: diff --git a/clientapi/arohcp/v1alpha1/cluster_builder.go b/clientapi/arohcp/v1alpha1/cluster_builder.go index 24c8746eb..82fd6f9d2 100644 --- a/clientapi/arohcp/v1alpha1/cluster_builder.go +++ b/clientapi/arohcp/v1alpha1/cluster_builder.go @@ -106,6 +106,7 @@ type ClusterBuilder struct { managedService *ManagedServiceBuilder name string network *NetworkBuilder + nodeSSHPublicKey string nodeDrainGracePeriod *ValueBuilder nodePools *NodePoolListBuilder nodes *ClusterNodesBuilder @@ -131,14 +132,14 @@ type ClusterBuilder struct { // NewCluster creates a new builder of 'cluster' objects. func NewCluster() *ClusterBuilder { return &ClusterBuilder{ - fieldSet_: make([]bool, 63), + fieldSet_: make([]bool, 64), } } // Link sets the flag that indicates if this is a link. func (b *ClusterBuilder) Link(value bool) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.fieldSet_[0] = true return b @@ -147,7 +148,7 @@ func (b *ClusterBuilder) Link(value bool) *ClusterBuilder { // ID sets the identifier of the object. func (b *ClusterBuilder) ID(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.id = value b.fieldSet_[1] = true @@ -157,7 +158,7 @@ func (b *ClusterBuilder) ID(value string) *ClusterBuilder { // HREF sets the link to the object. func (b *ClusterBuilder) HREF(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.href = value b.fieldSet_[2] = true @@ -184,7 +185,7 @@ func (b *ClusterBuilder) Empty() bool { // Information about the API of a cluster. func (b *ClusterBuilder) API(value *ClusterAPIBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.api = value if value != nil { @@ -200,7 +201,7 @@ func (b *ClusterBuilder) API(value *ClusterAPIBuilder) *ClusterBuilder { // _Amazon Web Services_ specific settings of a cluster. func (b *ClusterBuilder) AWS(value *AWSBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.aws = value if value != nil { @@ -214,7 +215,7 @@ func (b *ClusterBuilder) AWS(value *AWSBuilder) *ClusterBuilder { // AWSInfrastructureAccessRoleGrants sets the value of the 'AWS_infrastructure_access_role_grants' attribute to the given values. func (b *ClusterBuilder) AWSInfrastructureAccessRoleGrants(value *AWSInfrastructureAccessRoleGrantListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.awsInfrastructureAccessRoleGrants = value b.fieldSet_[5] = true @@ -224,7 +225,7 @@ func (b *ClusterBuilder) AWSInfrastructureAccessRoleGrants(value *AWSInfrastruct // CCS sets the value of the 'CCS' attribute to the given value. func (b *ClusterBuilder) CCS(value *CCSBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.ccs = value if value != nil { @@ -240,7 +241,7 @@ func (b *ClusterBuilder) CCS(value *CCSBuilder) *ClusterBuilder { // DNS settings of the cluster. func (b *ClusterBuilder) DNS(value *DNSBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.dns = value if value != nil { @@ -254,7 +255,7 @@ func (b *ClusterBuilder) DNS(value *DNSBuilder) *ClusterBuilder { // FIPS sets the value of the 'FIPS' attribute to the given value. func (b *ClusterBuilder) FIPS(value bool) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.fips = value b.fieldSet_[8] = true @@ -266,7 +267,7 @@ func (b *ClusterBuilder) FIPS(value bool) *ClusterBuilder { // Google cloud platform settings of a cluster. func (b *ClusterBuilder) GCP(value *GCPBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.gcp = value if value != nil { @@ -282,7 +283,7 @@ func (b *ClusterBuilder) GCP(value *GCPBuilder) *ClusterBuilder { // GCP Encryption Key for CCS clusters. func (b *ClusterBuilder) GCPEncryptionKey(value *GCPEncryptionKeyBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.gcpEncryptionKey = value if value != nil { @@ -298,7 +299,7 @@ func (b *ClusterBuilder) GCPEncryptionKey(value *GCPEncryptionKeyBuilder) *Clust // GCP Network configuration of a cluster. func (b *ClusterBuilder) GCPNetwork(value *GCPNetworkBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.gcpNetwork = value if value != nil { @@ -312,7 +313,7 @@ func (b *ClusterBuilder) GCPNetwork(value *GCPNetworkBuilder) *ClusterBuilder { // AdditionalTrustBundle sets the value of the 'additional_trust_bundle' attribute to the given value. func (b *ClusterBuilder) AdditionalTrustBundle(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.additionalTrustBundle = value b.fieldSet_[12] = true @@ -322,7 +323,7 @@ func (b *ClusterBuilder) AdditionalTrustBundle(value string) *ClusterBuilder { // Addons sets the value of the 'addons' attribute to the given values. func (b *ClusterBuilder) Addons(value *AddOnInstallationListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.addons = value b.fieldSet_[13] = true @@ -334,7 +335,7 @@ func (b *ClusterBuilder) Addons(value *AddOnInstallationListBuilder) *ClusterBui // The AutoNode configuration for the Cluster. func (b *ClusterBuilder) AutoNode(value *ClusterAutoNodeBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.autoNode = value if value != nil { @@ -350,7 +351,7 @@ func (b *ClusterBuilder) AutoNode(value *ClusterAutoNodeBuilder) *ClusterBuilder // Cluster-wide autoscaling configuration. func (b *ClusterBuilder) Autoscaler(value *ClusterAutoscalerBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.autoscaler = value if value != nil { @@ -366,7 +367,7 @@ func (b *ClusterBuilder) Autoscaler(value *ClusterAutoscalerBuilder) *ClusterBui // Microsoft Azure settings of a cluster. func (b *ClusterBuilder) Azure(value *AzureBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.azure = value if value != nil { @@ -382,7 +383,7 @@ func (b *ClusterBuilder) Azure(value *AzureBuilder) *ClusterBuilder { // Billing model for cluster resources. func (b *ClusterBuilder) BillingModel(value BillingModel) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.billingModel = value b.fieldSet_[17] = true @@ -394,7 +395,7 @@ func (b *ClusterBuilder) BillingModel(value BillingModel) *ClusterBuilder { // ByoOidc configuration. func (b *ClusterBuilder) ByoOidc(value *ByoOidcBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.byoOidc = value if value != nil { @@ -410,7 +411,7 @@ func (b *ClusterBuilder) ByoOidc(value *ByoOidcBuilder) *ClusterBuilder { // Cloud provider. func (b *ClusterBuilder) CloudProvider(value *CloudProviderBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.cloudProvider = value if value != nil { @@ -426,7 +427,7 @@ func (b *ClusterBuilder) CloudProvider(value *CloudProviderBuilder) *ClusterBuil // Information about the console of a cluster. func (b *ClusterBuilder) Console(value *ClusterConsoleBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.console = value if value != nil { @@ -440,7 +441,7 @@ func (b *ClusterBuilder) Console(value *ClusterConsoleBuilder) *ClusterBuilder { // CreationTimestamp sets the value of the 'creation_timestamp' attribute to the given value. func (b *ClusterBuilder) CreationTimestamp(value time.Time) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.creationTimestamp = value b.fieldSet_[21] = true @@ -452,7 +453,7 @@ func (b *ClusterBuilder) CreationTimestamp(value time.Time) *ClusterBuilder { // DeleteProtection configuration. func (b *ClusterBuilder) DeleteProtection(value *DeleteProtectionBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.deleteProtection = value if value != nil { @@ -466,7 +467,7 @@ func (b *ClusterBuilder) DeleteProtection(value *DeleteProtectionBuilder) *Clust // DomainPrefix sets the value of the 'domain_prefix' attribute to the given value. func (b *ClusterBuilder) DomainPrefix(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.domainPrefix = value b.fieldSet_[23] = true @@ -476,7 +477,7 @@ func (b *ClusterBuilder) DomainPrefix(value string) *ClusterBuilder { // EtcdEncryption sets the value of the 'etcd_encryption' attribute to the given value. func (b *ClusterBuilder) EtcdEncryption(value bool) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.etcdEncryption = value b.fieldSet_[24] = true @@ -486,7 +487,7 @@ func (b *ClusterBuilder) EtcdEncryption(value bool) *ClusterBuilder { // ExpirationTimestamp sets the value of the 'expiration_timestamp' attribute to the given value. func (b *ClusterBuilder) ExpirationTimestamp(value time.Time) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.expirationTimestamp = value b.fieldSet_[25] = true @@ -496,7 +497,7 @@ func (b *ClusterBuilder) ExpirationTimestamp(value time.Time) *ClusterBuilder { // ExternalID sets the value of the 'external_ID' attribute to the given value. func (b *ClusterBuilder) ExternalID(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.externalID = value b.fieldSet_[26] = true @@ -508,7 +509,7 @@ func (b *ClusterBuilder) ExternalID(value string) *ClusterBuilder { // Represents an external authentication configuration func (b *ClusterBuilder) ExternalAuthConfig(value *ExternalAuthConfigBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.externalAuthConfig = value if value != nil { @@ -524,7 +525,7 @@ func (b *ClusterBuilder) ExternalAuthConfig(value *ExternalAuthConfigBuilder) *C // Representation of cluster external configuration. func (b *ClusterBuilder) ExternalConfiguration(value *ExternalConfigurationBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.externalConfiguration = value if value != nil { @@ -541,7 +542,7 @@ func (b *ClusterBuilder) ExternalConfiguration(value *ExternalConfigurationBuild // with 10 infra nodes and 1000 compute nodes. func (b *ClusterBuilder) Flavour(value *FlavourBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.flavour = value if value != nil { @@ -555,7 +556,7 @@ func (b *ClusterBuilder) Flavour(value *FlavourBuilder) *ClusterBuilder { // Groups sets the value of the 'groups' attribute to the given values. func (b *ClusterBuilder) Groups(value *GroupListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.groups = value b.fieldSet_[30] = true @@ -567,7 +568,7 @@ func (b *ClusterBuilder) Groups(value *GroupListBuilder) *ClusterBuilder { // ClusterHealthState indicates the health of a cluster. func (b *ClusterBuilder) HealthState(value ClusterHealthState) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.healthState = value b.fieldSet_[31] = true @@ -579,7 +580,7 @@ func (b *ClusterBuilder) HealthState(value ClusterHealthState) *ClusterBuilder { // Details for `htpasswd` identity providers. func (b *ClusterBuilder) Htpasswd(value *HTPasswdIdentityProviderBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.htpasswd = value if value != nil { @@ -595,7 +596,7 @@ func (b *ClusterBuilder) Htpasswd(value *HTPasswdIdentityProviderBuilder) *Clust // Hypershift configuration. func (b *ClusterBuilder) Hypershift(value *HypershiftBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.hypershift = value if value != nil { @@ -609,7 +610,7 @@ func (b *ClusterBuilder) Hypershift(value *HypershiftBuilder) *ClusterBuilder { // IdentityProviders sets the value of the 'identity_providers' attribute to the given values. func (b *ClusterBuilder) IdentityProviders(value *IdentityProviderListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.identityProviders = value b.fieldSet_[34] = true @@ -621,7 +622,7 @@ func (b *ClusterBuilder) IdentityProviders(value *IdentityProviderListBuilder) * // ClusterImageRegistry represents the configuration for the cluster's internal image registry. func (b *ClusterBuilder) ImageRegistry(value *ClusterImageRegistryBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.imageRegistry = value if value != nil { @@ -635,7 +636,7 @@ func (b *ClusterBuilder) ImageRegistry(value *ClusterImageRegistryBuilder) *Clus // InflightChecks sets the value of the 'inflight_checks' attribute to the given values. func (b *ClusterBuilder) InflightChecks(value *InflightCheckListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.inflightChecks = value b.fieldSet_[36] = true @@ -645,7 +646,7 @@ func (b *ClusterBuilder) InflightChecks(value *InflightCheckListBuilder) *Cluste // InfraID sets the value of the 'infra_ID' attribute to the given value. func (b *ClusterBuilder) InfraID(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.infraID = value b.fieldSet_[37] = true @@ -655,7 +656,7 @@ func (b *ClusterBuilder) InfraID(value string) *ClusterBuilder { // Ingresses sets the value of the 'ingresses' attribute to the given values. func (b *ClusterBuilder) Ingresses(value *IngressListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.ingresses = value b.fieldSet_[38] = true @@ -668,7 +669,7 @@ func (b *ClusterBuilder) Ingresses(value *IngressListBuilder) *ClusterBuilder { // KubeletConfig that can be managed by users func (b *ClusterBuilder) KubeletConfig(value *KubeletConfigBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.kubeletConfig = value if value != nil { @@ -682,7 +683,7 @@ func (b *ClusterBuilder) KubeletConfig(value *KubeletConfigBuilder) *ClusterBuil // LoadBalancerQuota sets the value of the 'load_balancer_quota' attribute to the given value. func (b *ClusterBuilder) LoadBalancerQuota(value int) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.loadBalancerQuota = value b.fieldSet_[40] = true @@ -692,7 +693,7 @@ func (b *ClusterBuilder) LoadBalancerQuota(value int) *ClusterBuilder { // MachinePools sets the value of the 'machine_pools' attribute to the given values. func (b *ClusterBuilder) MachinePools(value *MachinePoolListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.machinePools = value b.fieldSet_[41] = true @@ -702,7 +703,7 @@ func (b *ClusterBuilder) MachinePools(value *MachinePoolListBuilder) *ClusterBui // Managed sets the value of the 'managed' attribute to the given value. func (b *ClusterBuilder) Managed(value bool) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.managed = value b.fieldSet_[42] = true @@ -714,7 +715,7 @@ func (b *ClusterBuilder) Managed(value bool) *ClusterBuilder { // Contains the necessary attributes to support role-based authentication on AWS. func (b *ClusterBuilder) ManagedService(value *ManagedServiceBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.managedService = value if value != nil { @@ -728,7 +729,7 @@ func (b *ClusterBuilder) ManagedService(value *ManagedServiceBuilder) *ClusterBu // MultiAZ sets the value of the 'multi_AZ' attribute to the given value. func (b *ClusterBuilder) MultiAZ(value bool) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.multiAZ = value b.fieldSet_[44] = true @@ -738,7 +739,7 @@ func (b *ClusterBuilder) MultiAZ(value bool) *ClusterBuilder { // MultiArchEnabled sets the value of the 'multi_arch_enabled' attribute to the given value. func (b *ClusterBuilder) MultiArchEnabled(value bool) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.multiArchEnabled = value b.fieldSet_[45] = true @@ -748,7 +749,7 @@ func (b *ClusterBuilder) MultiArchEnabled(value bool) *ClusterBuilder { // Name sets the value of the 'name' attribute to the given value. func (b *ClusterBuilder) Name(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.name = value b.fieldSet_[46] = true @@ -760,7 +761,7 @@ func (b *ClusterBuilder) Name(value string) *ClusterBuilder { // Network configuration of a cluster. func (b *ClusterBuilder) Network(value *NetworkBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.network = value if value != nil { @@ -771,6 +772,16 @@ func (b *ClusterBuilder) Network(value *NetworkBuilder) *ClusterBuilder { return b } +// NodeSSHPublicKey sets the value of the 'node_SSH_public_key' attribute to the given value. +func (b *ClusterBuilder) NodeSSHPublicKey(value string) *ClusterBuilder { + if len(b.fieldSet_) == 0 { + b.fieldSet_ = make([]bool, 64) + } + b.nodeSSHPublicKey = value + b.fieldSet_[48] = true + return b +} + // NodeDrainGracePeriod sets the value of the 'node_drain_grace_period' attribute to the given value. // // Numeric value and the unit used to measure it. @@ -793,13 +804,13 @@ func (b *ClusterBuilder) Network(value *NetworkBuilder) *ClusterBuilder { // - 1 PiB = 2^50 bytes func (b *ClusterBuilder) NodeDrainGracePeriod(value *ValueBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.nodeDrainGracePeriod = value if value != nil { - b.fieldSet_[48] = true + b.fieldSet_[49] = true } else { - b.fieldSet_[48] = false + b.fieldSet_[49] = false } return b } @@ -807,10 +818,10 @@ func (b *ClusterBuilder) NodeDrainGracePeriod(value *ValueBuilder) *ClusterBuild // NodePools sets the value of the 'node_pools' attribute to the given values. func (b *ClusterBuilder) NodePools(value *NodePoolListBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.nodePools = value - b.fieldSet_[49] = true + b.fieldSet_[50] = true return b } @@ -819,13 +830,13 @@ func (b *ClusterBuilder) NodePools(value *NodePoolListBuilder) *ClusterBuilder { // Counts of different classes of nodes inside a cluster. func (b *ClusterBuilder) Nodes(value *ClusterNodesBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.nodes = value if value != nil { - b.fieldSet_[50] = true + b.fieldSet_[51] = true } else { - b.fieldSet_[50] = false + b.fieldSet_[51] = false } return b } @@ -833,10 +844,10 @@ func (b *ClusterBuilder) Nodes(value *ClusterNodesBuilder) *ClusterBuilder { // OpenshiftVersion sets the value of the 'openshift_version' attribute to the given value. func (b *ClusterBuilder) OpenshiftVersion(value string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.openshiftVersion = value - b.fieldSet_[51] = true + b.fieldSet_[52] = true return b } @@ -845,13 +856,13 @@ func (b *ClusterBuilder) OpenshiftVersion(value string) *ClusterBuilder { // Representation of an product that can be selected as a cluster type. func (b *ClusterBuilder) Product(value *ProductBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.product = value if value != nil { - b.fieldSet_[52] = true + b.fieldSet_[53] = true } else { - b.fieldSet_[52] = false + b.fieldSet_[53] = false } return b } @@ -859,13 +870,13 @@ func (b *ClusterBuilder) Product(value *ProductBuilder) *ClusterBuilder { // Properties sets the value of the 'properties' attribute to the given value. func (b *ClusterBuilder) Properties(value map[string]string) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.properties = value if value != nil { - b.fieldSet_[53] = true + b.fieldSet_[54] = true } else { - b.fieldSet_[53] = false + b.fieldSet_[54] = false } return b } @@ -875,13 +886,13 @@ func (b *ClusterBuilder) Properties(value map[string]string) *ClusterBuilder { // Contains the properties of the provision shard func (b *ClusterBuilder) ProvisionShard(value *ProvisionShardBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.provisionShard = value if value != nil { - b.fieldSet_[54] = true + b.fieldSet_[55] = true } else { - b.fieldSet_[54] = false + b.fieldSet_[55] = false } return b } @@ -891,13 +902,13 @@ func (b *ClusterBuilder) ProvisionShard(value *ProvisionShardBuilder) *ClusterBu // Proxy configuration of a cluster. func (b *ClusterBuilder) Proxy(value *ProxyBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.proxy = value if value != nil { - b.fieldSet_[55] = true + b.fieldSet_[56] = true } else { - b.fieldSet_[55] = false + b.fieldSet_[56] = false } return b } @@ -907,13 +918,13 @@ func (b *ClusterBuilder) Proxy(value *ProxyBuilder) *ClusterBuilder { // Description of a region of a cloud provider. func (b *ClusterBuilder) Region(value *CloudRegionBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.region = value if value != nil { - b.fieldSet_[56] = true + b.fieldSet_[57] = true } else { - b.fieldSet_[56] = false + b.fieldSet_[57] = false } return b } @@ -939,13 +950,13 @@ func (b *ClusterBuilder) Region(value *CloudRegionBuilder) *ClusterBuilder { // ``` func (b *ClusterBuilder) RegistryConfig(value *ClusterRegistryConfigBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.registryConfig = value if value != nil { - b.fieldSet_[57] = true + b.fieldSet_[58] = true } else { - b.fieldSet_[57] = false + b.fieldSet_[58] = false } return b } @@ -955,10 +966,10 @@ func (b *ClusterBuilder) RegistryConfig(value *ClusterRegistryConfigBuilder) *Cl // Overall state of a cluster. func (b *ClusterBuilder) State(value ClusterState) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.state = value - b.fieldSet_[58] = true + b.fieldSet_[59] = true return b } @@ -967,13 +978,13 @@ func (b *ClusterBuilder) State(value ClusterState) *ClusterBuilder { // Detailed status of a cluster. func (b *ClusterBuilder) Status(value *ClusterStatusBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.status = value if value != nil { - b.fieldSet_[59] = true + b.fieldSet_[60] = true } else { - b.fieldSet_[59] = false + b.fieldSet_[60] = false } return b } @@ -1000,13 +1011,13 @@ func (b *ClusterBuilder) Status(value *ClusterStatusBuilder) *ClusterBuilder { // - 1 PiB = 2^50 bytes func (b *ClusterBuilder) StorageQuota(value *ValueBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.storageQuota = value if value != nil { - b.fieldSet_[60] = true + b.fieldSet_[61] = true } else { - b.fieldSet_[60] = false + b.fieldSet_[61] = false } return b } @@ -1016,13 +1027,13 @@ func (b *ClusterBuilder) StorageQuota(value *ValueBuilder) *ClusterBuilder { // Definition of a subscription. func (b *ClusterBuilder) Subscription(value *SubscriptionBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.subscription = value if value != nil { - b.fieldSet_[61] = true + b.fieldSet_[62] = true } else { - b.fieldSet_[61] = false + b.fieldSet_[62] = false } return b } @@ -1032,13 +1043,13 @@ func (b *ClusterBuilder) Subscription(value *SubscriptionBuilder) *ClusterBuilde // Representation of an _OpenShift_ version. func (b *ClusterBuilder) Version(value *VersionBuilder) *ClusterBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 63) + b.fieldSet_ = make([]bool, 64) } b.version = value if value != nil { - b.fieldSet_[62] = true + b.fieldSet_[63] = true } else { - b.fieldSet_[62] = false + b.fieldSet_[63] = false } return b } @@ -1219,6 +1230,7 @@ func (b *ClusterBuilder) Copy(object *Cluster) *ClusterBuilder { } else { b.network = nil } + b.nodeSSHPublicKey = object.nodeSSHPublicKey if object.nodeDrainGracePeriod != nil { b.nodeDrainGracePeriod = NewValue().Copy(object.nodeDrainGracePeriod) } else { @@ -1496,6 +1508,7 @@ func (b *ClusterBuilder) Build() (object *Cluster, err error) { return } } + object.nodeSSHPublicKey = b.nodeSSHPublicKey if b.nodeDrainGracePeriod != nil { object.nodeDrainGracePeriod, err = b.nodeDrainGracePeriod.Build() if err != nil { diff --git a/clientapi/arohcp/v1alpha1/cluster_type.go b/clientapi/arohcp/v1alpha1/cluster_type.go index c1f200997..0d5ec1a0c 100644 --- a/clientapi/arohcp/v1alpha1/cluster_type.go +++ b/clientapi/arohcp/v1alpha1/cluster_type.go @@ -120,6 +120,7 @@ type Cluster struct { managedService *ManagedService name string network *Network + nodeSSHPublicKey string nodeDrainGracePeriod *Value nodePools *NodePoolList nodes *ClusterNodes @@ -1286,12 +1287,41 @@ func (o *Cluster) GetNetwork() (value *Network, ok bool) { return } +// NodeSSHPublicKey returns the value of the 'node_SSH_public_key' attribute, or +// the zero value of the type if the attribute doesn't have a value. +// +// The SSH public key used for secure access to cluster nodes. When set, this key +// is distributed to all nodes, enabling SSH access for debugging +// and maintenance purposes. +// This is currently only supported for ARO HCP +func (o *Cluster) NodeSSHPublicKey() string { + if o != nil && len(o.fieldSet_) > 48 && o.fieldSet_[48] { + return o.nodeSSHPublicKey + } + return "" +} + +// GetNodeSSHPublicKey returns the value of the 'node_SSH_public_key' attribute and +// a flag indicating if the attribute has a value. +// +// The SSH public key used for secure access to cluster nodes. When set, this key +// is distributed to all nodes, enabling SSH access for debugging +// and maintenance purposes. +// This is currently only supported for ARO HCP +func (o *Cluster) GetNodeSSHPublicKey() (value string, ok bool) { + ok = o != nil && len(o.fieldSet_) > 48 && o.fieldSet_[48] + if ok { + value = o.nodeSSHPublicKey + } + return +} + // NodeDrainGracePeriod returns the value of the 'node_drain_grace_period' attribute, or // the zero value of the type if the attribute doesn't have a value. // // Node drain grace period. func (o *Cluster) NodeDrainGracePeriod() *Value { - if o != nil && len(o.fieldSet_) > 48 && o.fieldSet_[48] { + if o != nil && len(o.fieldSet_) > 49 && o.fieldSet_[49] { return o.nodeDrainGracePeriod } return nil @@ -1302,7 +1332,7 @@ func (o *Cluster) NodeDrainGracePeriod() *Value { // // Node drain grace period. func (o *Cluster) GetNodeDrainGracePeriod() (value *Value, ok bool) { - ok = o != nil && len(o.fieldSet_) > 48 && o.fieldSet_[48] + ok = o != nil && len(o.fieldSet_) > 49 && o.fieldSet_[49] if ok { value = o.nodeDrainGracePeriod } @@ -1315,7 +1345,7 @@ func (o *Cluster) GetNodeDrainGracePeriod() (value *Value, ok bool) { // List of node pools on this cluster. // NodePool is a scalable set of worker nodes attached to a hosted cluster. func (o *Cluster) NodePools() *NodePoolList { - if o != nil && len(o.fieldSet_) > 49 && o.fieldSet_[49] { + if o != nil && len(o.fieldSet_) > 50 && o.fieldSet_[50] { return o.nodePools } return nil @@ -1327,7 +1357,7 @@ func (o *Cluster) NodePools() *NodePoolList { // List of node pools on this cluster. // NodePool is a scalable set of worker nodes attached to a hosted cluster. func (o *Cluster) GetNodePools() (value *NodePoolList, ok bool) { - ok = o != nil && len(o.fieldSet_) > 49 && o.fieldSet_[49] + ok = o != nil && len(o.fieldSet_) > 50 && o.fieldSet_[50] if ok { value = o.nodePools } @@ -1339,7 +1369,7 @@ func (o *Cluster) GetNodePools() (value *NodePoolList, ok bool) { // // Information about the nodes of the cluster. func (o *Cluster) Nodes() *ClusterNodes { - if o != nil && len(o.fieldSet_) > 50 && o.fieldSet_[50] { + if o != nil && len(o.fieldSet_) > 51 && o.fieldSet_[51] { return o.nodes } return nil @@ -1350,7 +1380,7 @@ func (o *Cluster) Nodes() *ClusterNodes { // // Information about the nodes of the cluster. func (o *Cluster) GetNodes() (value *ClusterNodes, ok bool) { - ok = o != nil && len(o.fieldSet_) > 50 && o.fieldSet_[50] + ok = o != nil && len(o.fieldSet_) > 51 && o.fieldSet_[51] if ok { value = o.nodes } @@ -1367,7 +1397,7 @@ func (o *Cluster) GetNodes() (value *ClusterNodes, ok bool) { // When provisioning a cluster this will be ignored, as the version to // deploy will be determined internally. func (o *Cluster) OpenshiftVersion() string { - if o != nil && len(o.fieldSet_) > 51 && o.fieldSet_[51] { + if o != nil && len(o.fieldSet_) > 52 && o.fieldSet_[52] { return o.openshiftVersion } return "" @@ -1383,7 +1413,7 @@ func (o *Cluster) OpenshiftVersion() string { // When provisioning a cluster this will be ignored, as the version to // deploy will be determined internally. func (o *Cluster) GetOpenshiftVersion() (value string, ok bool) { - ok = o != nil && len(o.fieldSet_) > 51 && o.fieldSet_[51] + ok = o != nil && len(o.fieldSet_) > 52 && o.fieldSet_[52] if ok { value = o.openshiftVersion } @@ -1395,7 +1425,7 @@ func (o *Cluster) GetOpenshiftVersion() (value string, ok bool) { // // Link to the product type of this cluster. func (o *Cluster) Product() *Product { - if o != nil && len(o.fieldSet_) > 52 && o.fieldSet_[52] { + if o != nil && len(o.fieldSet_) > 53 && o.fieldSet_[53] { return o.product } return nil @@ -1406,7 +1436,7 @@ func (o *Cluster) Product() *Product { // // Link to the product type of this cluster. func (o *Cluster) GetProduct() (value *Product, ok bool) { - ok = o != nil && len(o.fieldSet_) > 52 && o.fieldSet_[52] + ok = o != nil && len(o.fieldSet_) > 53 && o.fieldSet_[53] if ok { value = o.product } @@ -1418,7 +1448,7 @@ func (o *Cluster) GetProduct() (value *Product, ok bool) { // // User defined properties for tagging and querying. func (o *Cluster) Properties() map[string]string { - if o != nil && len(o.fieldSet_) > 53 && o.fieldSet_[53] { + if o != nil && len(o.fieldSet_) > 54 && o.fieldSet_[54] { return o.properties } return nil @@ -1429,7 +1459,7 @@ func (o *Cluster) Properties() map[string]string { // // User defined properties for tagging and querying. func (o *Cluster) GetProperties() (value map[string]string, ok bool) { - ok = o != nil && len(o.fieldSet_) > 53 && o.fieldSet_[53] + ok = o != nil && len(o.fieldSet_) > 54 && o.fieldSet_[54] if ok { value = o.properties } @@ -1441,7 +1471,7 @@ func (o *Cluster) GetProperties() (value map[string]string, ok bool) { // // ProvisionShard contains the properties of the provision shard, including AWS and GCP related configurations func (o *Cluster) ProvisionShard() *ProvisionShard { - if o != nil && len(o.fieldSet_) > 54 && o.fieldSet_[54] { + if o != nil && len(o.fieldSet_) > 55 && o.fieldSet_[55] { return o.provisionShard } return nil @@ -1452,7 +1482,7 @@ func (o *Cluster) ProvisionShard() *ProvisionShard { // // ProvisionShard contains the properties of the provision shard, including AWS and GCP related configurations func (o *Cluster) GetProvisionShard() (value *ProvisionShard, ok bool) { - ok = o != nil && len(o.fieldSet_) > 54 && o.fieldSet_[54] + ok = o != nil && len(o.fieldSet_) > 55 && o.fieldSet_[55] if ok { value = o.provisionShard } @@ -1464,7 +1494,7 @@ func (o *Cluster) GetProvisionShard() (value *ProvisionShard, ok bool) { // // Proxy. func (o *Cluster) Proxy() *Proxy { - if o != nil && len(o.fieldSet_) > 55 && o.fieldSet_[55] { + if o != nil && len(o.fieldSet_) > 56 && o.fieldSet_[56] { return o.proxy } return nil @@ -1475,7 +1505,7 @@ func (o *Cluster) Proxy() *Proxy { // // Proxy. func (o *Cluster) GetProxy() (value *Proxy, ok bool) { - ok = o != nil && len(o.fieldSet_) > 55 && o.fieldSet_[55] + ok = o != nil && len(o.fieldSet_) > 56 && o.fieldSet_[56] if ok { value = o.proxy } @@ -1487,7 +1517,7 @@ func (o *Cluster) GetProxy() (value *Proxy, ok bool) { // // Link to the cloud provider region where the cluster is installed. func (o *Cluster) Region() *CloudRegion { - if o != nil && len(o.fieldSet_) > 56 && o.fieldSet_[56] { + if o != nil && len(o.fieldSet_) > 57 && o.fieldSet_[57] { return o.region } return nil @@ -1498,7 +1528,7 @@ func (o *Cluster) Region() *CloudRegion { // // Link to the cloud provider region where the cluster is installed. func (o *Cluster) GetRegion() (value *CloudRegion, ok bool) { - ok = o != nil && len(o.fieldSet_) > 56 && o.fieldSet_[56] + ok = o != nil && len(o.fieldSet_) > 57 && o.fieldSet_[57] if ok { value = o.region } @@ -1510,7 +1540,7 @@ func (o *Cluster) GetRegion() (value *CloudRegion, ok bool) { // // External registry configuration for the cluster func (o *Cluster) RegistryConfig() *ClusterRegistryConfig { - if o != nil && len(o.fieldSet_) > 57 && o.fieldSet_[57] { + if o != nil && len(o.fieldSet_) > 58 && o.fieldSet_[58] { return o.registryConfig } return nil @@ -1521,7 +1551,7 @@ func (o *Cluster) RegistryConfig() *ClusterRegistryConfig { // // External registry configuration for the cluster func (o *Cluster) GetRegistryConfig() (value *ClusterRegistryConfig, ok bool) { - ok = o != nil && len(o.fieldSet_) > 57 && o.fieldSet_[57] + ok = o != nil && len(o.fieldSet_) > 58 && o.fieldSet_[58] if ok { value = o.registryConfig } @@ -1533,7 +1563,7 @@ func (o *Cluster) GetRegistryConfig() (value *ClusterRegistryConfig, ok bool) { // // Overall state of the cluster. func (o *Cluster) State() ClusterState { - if o != nil && len(o.fieldSet_) > 58 && o.fieldSet_[58] { + if o != nil && len(o.fieldSet_) > 59 && o.fieldSet_[59] { return o.state } return ClusterState("") @@ -1544,7 +1574,7 @@ func (o *Cluster) State() ClusterState { // // Overall state of the cluster. func (o *Cluster) GetState() (value ClusterState, ok bool) { - ok = o != nil && len(o.fieldSet_) > 58 && o.fieldSet_[58] + ok = o != nil && len(o.fieldSet_) > 59 && o.fieldSet_[59] if ok { value = o.state } @@ -1556,7 +1586,7 @@ func (o *Cluster) GetState() (value ClusterState, ok bool) { // // Status of cluster func (o *Cluster) Status() *ClusterStatus { - if o != nil && len(o.fieldSet_) > 59 && o.fieldSet_[59] { + if o != nil && len(o.fieldSet_) > 60 && o.fieldSet_[60] { return o.status } return nil @@ -1567,7 +1597,7 @@ func (o *Cluster) Status() *ClusterStatus { // // Status of cluster func (o *Cluster) GetStatus() (value *ClusterStatus, ok bool) { - ok = o != nil && len(o.fieldSet_) > 59 && o.fieldSet_[59] + ok = o != nil && len(o.fieldSet_) > 60 && o.fieldSet_[60] if ok { value = o.status } @@ -1579,7 +1609,7 @@ func (o *Cluster) GetStatus() (value *ClusterStatus, ok bool) { // // Storage quota to be assigned to the cluster. func (o *Cluster) StorageQuota() *Value { - if o != nil && len(o.fieldSet_) > 60 && o.fieldSet_[60] { + if o != nil && len(o.fieldSet_) > 61 && o.fieldSet_[61] { return o.storageQuota } return nil @@ -1590,7 +1620,7 @@ func (o *Cluster) StorageQuota() *Value { // // Storage quota to be assigned to the cluster. func (o *Cluster) GetStorageQuota() (value *Value, ok bool) { - ok = o != nil && len(o.fieldSet_) > 60 && o.fieldSet_[60] + ok = o != nil && len(o.fieldSet_) > 61 && o.fieldSet_[61] if ok { value = o.storageQuota } @@ -1603,7 +1633,7 @@ func (o *Cluster) GetStorageQuota() (value *Value, ok bool) { // Link to the subscription that comes from the account management service when the cluster // is registered. func (o *Cluster) Subscription() *Subscription { - if o != nil && len(o.fieldSet_) > 61 && o.fieldSet_[61] { + if o != nil && len(o.fieldSet_) > 62 && o.fieldSet_[62] { return o.subscription } return nil @@ -1615,7 +1645,7 @@ func (o *Cluster) Subscription() *Subscription { // Link to the subscription that comes from the account management service when the cluster // is registered. func (o *Cluster) GetSubscription() (value *Subscription, ok bool) { - ok = o != nil && len(o.fieldSet_) > 61 && o.fieldSet_[61] + ok = o != nil && len(o.fieldSet_) > 62 && o.fieldSet_[62] if ok { value = o.subscription } @@ -1627,7 +1657,7 @@ func (o *Cluster) GetSubscription() (value *Subscription, ok bool) { // // Link to the version of _OpenShift_ that will be used to install the cluster. func (o *Cluster) Version() *Version { - if o != nil && len(o.fieldSet_) > 62 && o.fieldSet_[62] { + if o != nil && len(o.fieldSet_) > 63 && o.fieldSet_[63] { return o.version } return nil @@ -1638,7 +1668,7 @@ func (o *Cluster) Version() *Version { // // Link to the version of _OpenShift_ that will be used to install the cluster. func (o *Cluster) GetVersion() (value *Version, ok bool) { - ok = o != nil && len(o.fieldSet_) > 62 && o.fieldSet_[62] + ok = o != nil && len(o.fieldSet_) > 63 && o.fieldSet_[63] if ok { value = o.version } diff --git a/clientapi/arohcp/v1alpha1/cluster_type_json.go b/clientapi/arohcp/v1alpha1/cluster_type_json.go index 7fc048ddc..4c903fda3 100644 --- a/clientapi/arohcp/v1alpha1/cluster_type_json.go +++ b/clientapi/arohcp/v1alpha1/cluster_type_json.go @@ -493,7 +493,16 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteNetwork(object.network, stream) count++ } - present_ = len(object.fieldSet_) > 48 && object.fieldSet_[48] && object.nodeDrainGracePeriod != nil + present_ = len(object.fieldSet_) > 48 && object.fieldSet_[48] + if present_ { + if count > 0 { + stream.WriteMore() + } + stream.WriteObjectField("node_ssh_public_key") + stream.WriteString(object.nodeSSHPublicKey) + count++ + } + present_ = len(object.fieldSet_) > 49 && object.fieldSet_[49] && object.nodeDrainGracePeriod != nil if present_ { if count > 0 { stream.WriteMore() @@ -502,7 +511,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteValue(object.nodeDrainGracePeriod, stream) count++ } - present_ = len(object.fieldSet_) > 49 && object.fieldSet_[49] && object.nodePools != nil + present_ = len(object.fieldSet_) > 50 && object.fieldSet_[50] && object.nodePools != nil if present_ { if count > 0 { stream.WriteMore() @@ -514,7 +523,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { stream.WriteObjectEnd() count++ } - present_ = len(object.fieldSet_) > 50 && object.fieldSet_[50] && object.nodes != nil + present_ = len(object.fieldSet_) > 51 && object.fieldSet_[51] && object.nodes != nil if present_ { if count > 0 { stream.WriteMore() @@ -523,7 +532,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteClusterNodes(object.nodes, stream) count++ } - present_ = len(object.fieldSet_) > 51 && object.fieldSet_[51] + present_ = len(object.fieldSet_) > 52 && object.fieldSet_[52] if present_ { if count > 0 { stream.WriteMore() @@ -532,7 +541,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { stream.WriteString(object.openshiftVersion) count++ } - present_ = len(object.fieldSet_) > 52 && object.fieldSet_[52] && object.product != nil + present_ = len(object.fieldSet_) > 53 && object.fieldSet_[53] && object.product != nil if present_ { if count > 0 { stream.WriteMore() @@ -541,7 +550,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteProduct(object.product, stream) count++ } - present_ = len(object.fieldSet_) > 53 && object.fieldSet_[53] && object.properties != nil + present_ = len(object.fieldSet_) > 54 && object.fieldSet_[54] && object.properties != nil if present_ { if count > 0 { stream.WriteMore() @@ -570,7 +579,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { } count++ } - present_ = len(object.fieldSet_) > 54 && object.fieldSet_[54] && object.provisionShard != nil + present_ = len(object.fieldSet_) > 55 && object.fieldSet_[55] && object.provisionShard != nil if present_ { if count > 0 { stream.WriteMore() @@ -579,7 +588,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteProvisionShard(object.provisionShard, stream) count++ } - present_ = len(object.fieldSet_) > 55 && object.fieldSet_[55] && object.proxy != nil + present_ = len(object.fieldSet_) > 56 && object.fieldSet_[56] && object.proxy != nil if present_ { if count > 0 { stream.WriteMore() @@ -588,7 +597,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteProxy(object.proxy, stream) count++ } - present_ = len(object.fieldSet_) > 56 && object.fieldSet_[56] && object.region != nil + present_ = len(object.fieldSet_) > 57 && object.fieldSet_[57] && object.region != nil if present_ { if count > 0 { stream.WriteMore() @@ -597,7 +606,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteCloudRegion(object.region, stream) count++ } - present_ = len(object.fieldSet_) > 57 && object.fieldSet_[57] && object.registryConfig != nil + present_ = len(object.fieldSet_) > 58 && object.fieldSet_[58] && object.registryConfig != nil if present_ { if count > 0 { stream.WriteMore() @@ -606,7 +615,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteClusterRegistryConfig(object.registryConfig, stream) count++ } - present_ = len(object.fieldSet_) > 58 && object.fieldSet_[58] + present_ = len(object.fieldSet_) > 59 && object.fieldSet_[59] if present_ { if count > 0 { stream.WriteMore() @@ -615,7 +624,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { stream.WriteString(string(object.state)) count++ } - present_ = len(object.fieldSet_) > 59 && object.fieldSet_[59] && object.status != nil + present_ = len(object.fieldSet_) > 60 && object.fieldSet_[60] && object.status != nil if present_ { if count > 0 { stream.WriteMore() @@ -624,7 +633,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteClusterStatus(object.status, stream) count++ } - present_ = len(object.fieldSet_) > 60 && object.fieldSet_[60] && object.storageQuota != nil + present_ = len(object.fieldSet_) > 61 && object.fieldSet_[61] && object.storageQuota != nil if present_ { if count > 0 { stream.WriteMore() @@ -633,7 +642,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteValue(object.storageQuota, stream) count++ } - present_ = len(object.fieldSet_) > 61 && object.fieldSet_[61] && object.subscription != nil + present_ = len(object.fieldSet_) > 62 && object.fieldSet_[62] && object.subscription != nil if present_ { if count > 0 { stream.WriteMore() @@ -642,7 +651,7 @@ func WriteCluster(object *Cluster, stream *jsoniter.Stream) { WriteSubscription(object.subscription, stream) count++ } - present_ = len(object.fieldSet_) > 62 && object.fieldSet_[62] && object.version != nil + present_ = len(object.fieldSet_) > 63 && object.fieldSet_[63] && object.version != nil if present_ { if count > 0 { stream.WriteMore() @@ -668,7 +677,7 @@ func UnmarshalCluster(source interface{}) (object *Cluster, err error) { // ReadCluster reads a value of the 'cluster' type from the given iterator. func ReadCluster(iterator *jsoniter.Iterator) *Cluster { object := &Cluster{ - fieldSet_: make([]bool, 63), + fieldSet_: make([]bool, 64), } for { field := iterator.ReadObject() @@ -996,10 +1005,14 @@ func ReadCluster(iterator *jsoniter.Iterator) *Cluster { value := ReadNetwork(iterator) object.network = value object.fieldSet_[47] = true + case "node_ssh_public_key": + value := iterator.ReadString() + object.nodeSSHPublicKey = value + object.fieldSet_[48] = true case "node_drain_grace_period": value := ReadValue(iterator) object.nodeDrainGracePeriod = value - object.fieldSet_[48] = true + object.fieldSet_[49] = true case "node_pools": value := &NodePoolList{} for { @@ -1020,19 +1033,19 @@ func ReadCluster(iterator *jsoniter.Iterator) *Cluster { } } object.nodePools = value - object.fieldSet_[49] = true + object.fieldSet_[50] = true case "nodes": value := ReadClusterNodes(iterator) object.nodes = value - object.fieldSet_[50] = true + object.fieldSet_[51] = true case "openshift_version": value := iterator.ReadString() object.openshiftVersion = value - object.fieldSet_[51] = true + object.fieldSet_[52] = true case "product": value := ReadProduct(iterator) object.product = value - object.fieldSet_[52] = true + object.fieldSet_[53] = true case "properties": value := map[string]string{} for { @@ -1044,44 +1057,44 @@ func ReadCluster(iterator *jsoniter.Iterator) *Cluster { value[key] = item } object.properties = value - object.fieldSet_[53] = true + object.fieldSet_[54] = true case "provision_shard": value := ReadProvisionShard(iterator) object.provisionShard = value - object.fieldSet_[54] = true + object.fieldSet_[55] = true case "proxy": value := ReadProxy(iterator) object.proxy = value - object.fieldSet_[55] = true + object.fieldSet_[56] = true case "region": value := ReadCloudRegion(iterator) object.region = value - object.fieldSet_[56] = true + object.fieldSet_[57] = true case "registry_config": value := ReadClusterRegistryConfig(iterator) object.registryConfig = value - object.fieldSet_[57] = true + object.fieldSet_[58] = true case "state": text := iterator.ReadString() value := ClusterState(text) object.state = value - object.fieldSet_[58] = true + object.fieldSet_[59] = true case "status": value := ReadClusterStatus(iterator) object.status = value - object.fieldSet_[59] = true + object.fieldSet_[60] = true case "storage_quota": value := ReadValue(iterator) object.storageQuota = value - object.fieldSet_[60] = true + object.fieldSet_[61] = true case "subscription": value := ReadSubscription(iterator) object.subscription = value - object.fieldSet_[61] = true + object.fieldSet_[62] = true case "version": value := ReadVersion(iterator) object.version = value - object.fieldSet_[62] = true + object.fieldSet_[63] = true default: iterator.ReadAny() } diff --git a/clientapi/clustersmgmt/v1/aws_builder.go b/clientapi/clustersmgmt/v1/aws_builder.go index d27ba50a3..3c9c95e00 100644 --- a/clientapi/clustersmgmt/v1/aws_builder.go +++ b/clientapi/clustersmgmt/v1/aws_builder.go @@ -42,6 +42,7 @@ type AWSBuilder struct { secretAccessKey string subnetIDs []string tags map[string]string + terminationHandlerQueueUrl string vpcEndpointRoleArn string zeroEgress *ZeroEgressBuilder privateLink bool @@ -50,7 +51,7 @@ type AWSBuilder struct { // NewAWS creates a new builder of 'AWS' objects. func NewAWS() *AWSBuilder { return &AWSBuilder{ - fieldSet_: make([]bool, 23), + fieldSet_: make([]bool, 24), } } @@ -70,7 +71,7 @@ func (b *AWSBuilder) Empty() bool { // KMSKeyArn sets the value of the 'KMS_key_arn' attribute to the given value. func (b *AWSBuilder) KMSKeyArn(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.kmsKeyArn = value b.fieldSet_[0] = true @@ -82,7 +83,7 @@ func (b *AWSBuilder) KMSKeyArn(value string) *AWSBuilder { // Contains the necessary attributes to support role-based authentication on AWS. func (b *AWSBuilder) STS(value *STSBuilder) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.sts = value if value != nil { @@ -96,7 +97,7 @@ func (b *AWSBuilder) STS(value *STSBuilder) *AWSBuilder { // AccessKeyID sets the value of the 'access_key_ID' attribute to the given value. func (b *AWSBuilder) AccessKeyID(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.accessKeyID = value b.fieldSet_[2] = true @@ -106,7 +107,7 @@ func (b *AWSBuilder) AccessKeyID(value string) *AWSBuilder { // AccountID sets the value of the 'account_ID' attribute to the given value. func (b *AWSBuilder) AccountID(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.accountID = value b.fieldSet_[3] = true @@ -116,7 +117,7 @@ func (b *AWSBuilder) AccountID(value string) *AWSBuilder { // AdditionalAllowedPrincipals sets the value of the 'additional_allowed_principals' attribute to the given values. func (b *AWSBuilder) AdditionalAllowedPrincipals(values ...string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.additionalAllowedPrincipals = make([]string, len(values)) copy(b.additionalAllowedPrincipals, values) @@ -127,7 +128,7 @@ func (b *AWSBuilder) AdditionalAllowedPrincipals(values ...string) *AWSBuilder { // AdditionalComputeSecurityGroupIds sets the value of the 'additional_compute_security_group_ids' attribute to the given values. func (b *AWSBuilder) AdditionalComputeSecurityGroupIds(values ...string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.additionalComputeSecurityGroupIds = make([]string, len(values)) copy(b.additionalComputeSecurityGroupIds, values) @@ -138,7 +139,7 @@ func (b *AWSBuilder) AdditionalComputeSecurityGroupIds(values ...string) *AWSBui // AdditionalControlPlaneSecurityGroupIds sets the value of the 'additional_control_plane_security_group_ids' attribute to the given values. func (b *AWSBuilder) AdditionalControlPlaneSecurityGroupIds(values ...string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.additionalControlPlaneSecurityGroupIds = make([]string, len(values)) copy(b.additionalControlPlaneSecurityGroupIds, values) @@ -149,7 +150,7 @@ func (b *AWSBuilder) AdditionalControlPlaneSecurityGroupIds(values ...string) *A // AdditionalInfraSecurityGroupIds sets the value of the 'additional_infra_security_group_ids' attribute to the given values. func (b *AWSBuilder) AdditionalInfraSecurityGroupIds(values ...string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.additionalInfraSecurityGroupIds = make([]string, len(values)) copy(b.additionalInfraSecurityGroupIds, values) @@ -162,7 +163,7 @@ func (b *AWSBuilder) AdditionalInfraSecurityGroupIds(values ...string) *AWSBuild // Contains the necessary attributes to support audit log forwarding func (b *AWSBuilder) AuditLog(value *AuditLogBuilder) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.auditLog = value if value != nil { @@ -178,7 +179,7 @@ func (b *AWSBuilder) AuditLog(value *AuditLogBuilder) *AWSBuilder { // AWS provider configuration settings when using AutoNode on a ROSA HCP Cluster func (b *AWSBuilder) AutoNode(value *AwsAutoNodeBuilder) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.autoNode = value if value != nil { @@ -192,7 +193,7 @@ func (b *AWSBuilder) AutoNode(value *AwsAutoNodeBuilder) *AWSBuilder { // BillingAccountID sets the value of the 'billing_account_ID' attribute to the given value. func (b *AWSBuilder) BillingAccountID(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.billingAccountID = value b.fieldSet_[10] = true @@ -204,7 +205,7 @@ func (b *AWSBuilder) BillingAccountID(value string) *AWSBuilder { // Which Ec2MetadataHttpTokens to use for metadata service interaction options for EC2 instances func (b *AWSBuilder) Ec2MetadataHttpTokens(value Ec2MetadataHttpTokens) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.ec2MetadataHttpTokens = value b.fieldSet_[11] = true @@ -216,7 +217,7 @@ func (b *AWSBuilder) Ec2MetadataHttpTokens(value Ec2MetadataHttpTokens) *AWSBuil // Contains the necessary attributes to support etcd encryption for AWS based clusters. func (b *AWSBuilder) EtcdEncryption(value *AwsEtcdEncryptionBuilder) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.etcdEncryption = value if value != nil { @@ -230,7 +231,7 @@ func (b *AWSBuilder) EtcdEncryption(value *AwsEtcdEncryptionBuilder) *AWSBuilder // HcpInternalCommunicationHostedZoneId sets the value of the 'hcp_internal_communication_hosted_zone_id' attribute to the given value. func (b *AWSBuilder) HcpInternalCommunicationHostedZoneId(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.hcpInternalCommunicationHostedZoneId = value b.fieldSet_[13] = true @@ -240,7 +241,7 @@ func (b *AWSBuilder) HcpInternalCommunicationHostedZoneId(value string) *AWSBuil // PrivateHostedZoneID sets the value of the 'private_hosted_zone_ID' attribute to the given value. func (b *AWSBuilder) PrivateHostedZoneID(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.privateHostedZoneID = value b.fieldSet_[14] = true @@ -250,7 +251,7 @@ func (b *AWSBuilder) PrivateHostedZoneID(value string) *AWSBuilder { // PrivateHostedZoneRoleARN sets the value of the 'private_hosted_zone_role_ARN' attribute to the given value. func (b *AWSBuilder) PrivateHostedZoneRoleARN(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.privateHostedZoneRoleARN = value b.fieldSet_[15] = true @@ -260,7 +261,7 @@ func (b *AWSBuilder) PrivateHostedZoneRoleARN(value string) *AWSBuilder { // PrivateLink sets the value of the 'private_link' attribute to the given value. func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.privateLink = value b.fieldSet_[16] = true @@ -272,7 +273,7 @@ func (b *AWSBuilder) PrivateLink(value bool) *AWSBuilder { // Manages the configuration for the Private Links. func (b *AWSBuilder) PrivateLinkConfiguration(value *PrivateLinkClusterConfigurationBuilder) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.privateLinkConfiguration = value if value != nil { @@ -286,7 +287,7 @@ func (b *AWSBuilder) PrivateLinkConfiguration(value *PrivateLinkClusterConfigura // SecretAccessKey sets the value of the 'secret_access_key' attribute to the given value. func (b *AWSBuilder) SecretAccessKey(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.secretAccessKey = value b.fieldSet_[18] = true @@ -296,7 +297,7 @@ func (b *AWSBuilder) SecretAccessKey(value string) *AWSBuilder { // SubnetIDs sets the value of the 'subnet_IDs' attribute to the given values. func (b *AWSBuilder) SubnetIDs(values ...string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.subnetIDs = make([]string, len(values)) copy(b.subnetIDs, values) @@ -307,7 +308,7 @@ func (b *AWSBuilder) SubnetIDs(values ...string) *AWSBuilder { // Tags sets the value of the 'tags' attribute to the given value. func (b *AWSBuilder) Tags(value map[string]string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.tags = value if value != nil { @@ -318,13 +319,23 @@ func (b *AWSBuilder) Tags(value map[string]string) *AWSBuilder { return b } +// TerminationHandlerQueueUrl sets the value of the 'termination_handler_queue_url' attribute to the given value. +func (b *AWSBuilder) TerminationHandlerQueueUrl(value string) *AWSBuilder { + if len(b.fieldSet_) == 0 { + b.fieldSet_ = make([]bool, 24) + } + b.terminationHandlerQueueUrl = value + b.fieldSet_[21] = true + return b +} + // VpcEndpointRoleArn sets the value of the 'vpc_endpoint_role_arn' attribute to the given value. func (b *AWSBuilder) VpcEndpointRoleArn(value string) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.vpcEndpointRoleArn = value - b.fieldSet_[21] = true + b.fieldSet_[22] = true return b } @@ -333,13 +344,13 @@ func (b *AWSBuilder) VpcEndpointRoleArn(value string) *AWSBuilder { // Zero egress configuration. func (b *AWSBuilder) ZeroEgress(value *ZeroEgressBuilder) *AWSBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 23) + b.fieldSet_ = make([]bool, 24) } b.zeroEgress = value if value != nil { - b.fieldSet_[22] = true + b.fieldSet_[23] = true } else { - b.fieldSet_[22] = false + b.fieldSet_[23] = false } return b } @@ -426,6 +437,7 @@ func (b *AWSBuilder) Copy(object *AWS) *AWSBuilder { } else { b.tags = nil } + b.terminationHandlerQueueUrl = object.terminationHandlerQueueUrl b.vpcEndpointRoleArn = object.vpcEndpointRoleArn if object.zeroEgress != nil { b.zeroEgress = NewZeroEgress().Copy(object.zeroEgress) @@ -508,6 +520,7 @@ func (b *AWSBuilder) Build() (object *AWS, err error) { object.tags[k] = v } } + object.terminationHandlerQueueUrl = b.terminationHandlerQueueUrl object.vpcEndpointRoleArn = b.vpcEndpointRoleArn if b.zeroEgress != nil { object.zeroEgress, err = b.zeroEgress.Build() diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_builder.go b/clientapi/clustersmgmt/v1/aws_node_pool_builder.go index d389d4928..00aaef274 100644 --- a/clientapi/clustersmgmt/v1/aws_node_pool_builder.go +++ b/clientapi/clustersmgmt/v1/aws_node_pool_builder.go @@ -31,6 +31,7 @@ type AWSNodePoolBuilder struct { instanceProfile string instanceType string rootVolume *AWSVolumeBuilder + spotMarketOptions *AwsNodePoolSpotMarketOptionsBuilder subnetOutposts map[string]string tags map[string]string } @@ -38,14 +39,14 @@ type AWSNodePoolBuilder struct { // NewAWSNodePool creates a new builder of 'AWS_node_pool' objects. func NewAWSNodePool() *AWSNodePoolBuilder { return &AWSNodePoolBuilder{ - fieldSet_: make([]bool, 12), + fieldSet_: make([]bool, 13), } } // Link sets the flag that indicates if this is a link. func (b *AWSNodePoolBuilder) Link(value bool) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.fieldSet_[0] = true return b @@ -54,7 +55,7 @@ func (b *AWSNodePoolBuilder) Link(value bool) *AWSNodePoolBuilder { // ID sets the identifier of the object. func (b *AWSNodePoolBuilder) ID(value string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.id = value b.fieldSet_[1] = true @@ -64,7 +65,7 @@ func (b *AWSNodePoolBuilder) ID(value string) *AWSNodePoolBuilder { // HREF sets the link to the object. func (b *AWSNodePoolBuilder) HREF(value string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.href = value b.fieldSet_[2] = true @@ -88,7 +89,7 @@ func (b *AWSNodePoolBuilder) Empty() bool { // AdditionalSecurityGroupIds sets the value of the 'additional_security_group_ids' attribute to the given values. func (b *AWSNodePoolBuilder) AdditionalSecurityGroupIds(values ...string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.additionalSecurityGroupIds = make([]string, len(values)) copy(b.additionalSecurityGroupIds, values) @@ -99,7 +100,7 @@ func (b *AWSNodePoolBuilder) AdditionalSecurityGroupIds(values ...string) *AWSNo // AvailabilityZoneTypes sets the value of the 'availability_zone_types' attribute to the given value. func (b *AWSNodePoolBuilder) AvailabilityZoneTypes(value map[string]string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.availabilityZoneTypes = value if value != nil { @@ -115,7 +116,7 @@ func (b *AWSNodePoolBuilder) AvailabilityZoneTypes(value map[string]string) *AWS // AWS Capacity Reservation specification. func (b *AWSNodePoolBuilder) CapacityReservation(value *AWSCapacityReservationBuilder) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.capacityReservation = value if value != nil { @@ -131,7 +132,7 @@ func (b *AWSNodePoolBuilder) CapacityReservation(value *AWSCapacityReservationBu // Which Ec2MetadataHttpTokens to use for metadata service interaction options for EC2 instances func (b *AWSNodePoolBuilder) Ec2MetadataHttpTokens(value Ec2MetadataHttpTokens) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.ec2MetadataHttpTokens = value b.fieldSet_[6] = true @@ -141,7 +142,7 @@ func (b *AWSNodePoolBuilder) Ec2MetadataHttpTokens(value Ec2MetadataHttpTokens) // InstanceProfile sets the value of the 'instance_profile' attribute to the given value. func (b *AWSNodePoolBuilder) InstanceProfile(value string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.instanceProfile = value b.fieldSet_[7] = true @@ -151,7 +152,7 @@ func (b *AWSNodePoolBuilder) InstanceProfile(value string) *AWSNodePoolBuilder { // InstanceType sets the value of the 'instance_type' attribute to the given value. func (b *AWSNodePoolBuilder) InstanceType(value string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.instanceType = value b.fieldSet_[8] = true @@ -163,7 +164,7 @@ func (b *AWSNodePoolBuilder) InstanceType(value string) *AWSNodePoolBuilder { // Holds settings for an AWS storage volume. func (b *AWSNodePoolBuilder) RootVolume(value *AWSVolumeBuilder) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.rootVolume = value if value != nil { @@ -174,16 +175,32 @@ func (b *AWSNodePoolBuilder) RootVolume(value *AWSVolumeBuilder) *AWSNodePoolBui return b } +// SpotMarketOptions sets the value of the 'spot_market_options' attribute to the given value. +// +// Spot market options for AWS node pool. +func (b *AWSNodePoolBuilder) SpotMarketOptions(value *AwsNodePoolSpotMarketOptionsBuilder) *AWSNodePoolBuilder { + if len(b.fieldSet_) == 0 { + b.fieldSet_ = make([]bool, 13) + } + b.spotMarketOptions = value + if value != nil { + b.fieldSet_[10] = true + } else { + b.fieldSet_[10] = false + } + return b +} + // SubnetOutposts sets the value of the 'subnet_outposts' attribute to the given value. func (b *AWSNodePoolBuilder) SubnetOutposts(value map[string]string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.subnetOutposts = value if value != nil { - b.fieldSet_[10] = true + b.fieldSet_[11] = true } else { - b.fieldSet_[10] = false + b.fieldSet_[11] = false } return b } @@ -191,13 +208,13 @@ func (b *AWSNodePoolBuilder) SubnetOutposts(value map[string]string) *AWSNodePoo // Tags sets the value of the 'tags' attribute to the given value. func (b *AWSNodePoolBuilder) Tags(value map[string]string) *AWSNodePoolBuilder { if len(b.fieldSet_) == 0 { - b.fieldSet_ = make([]bool, 12) + b.fieldSet_ = make([]bool, 13) } b.tags = value if value != nil { - b.fieldSet_[11] = true + b.fieldSet_[12] = true } else { - b.fieldSet_[11] = false + b.fieldSet_[12] = false } return b } @@ -240,6 +257,11 @@ func (b *AWSNodePoolBuilder) Copy(object *AWSNodePool) *AWSNodePoolBuilder { } else { b.rootVolume = nil } + if object.spotMarketOptions != nil { + b.spotMarketOptions = NewAwsNodePoolSpotMarketOptions().Copy(object.spotMarketOptions) + } else { + b.spotMarketOptions = nil + } if len(object.subnetOutposts) > 0 { b.subnetOutposts = map[string]string{} for k, v := range object.subnetOutposts { @@ -293,6 +315,12 @@ func (b *AWSNodePoolBuilder) Build() (object *AWSNodePool, err error) { return } } + if b.spotMarketOptions != nil { + object.spotMarketOptions, err = b.spotMarketOptions.Build() + if err != nil { + return + } + } if b.subnetOutposts != nil { object.subnetOutposts = make(map[string]string) for k, v := range b.subnetOutposts { diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_builder.go b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_builder.go new file mode 100644 index 000000000..c06178cc9 --- /dev/null +++ b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_builder.go @@ -0,0 +1,116 @@ +/* +Copyright (c) 2020 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all +// your changes will be lost when the file is generated again. + +package v1 // github.com/openshift-online/ocm-api-model/clientapi/clustersmgmt/v1 + +// Spot market options for AWS node pool. +type AwsNodePoolSpotMarketOptionsBuilder struct { + fieldSet_ []bool + id string + href string + maxPrice string +} + +// NewAwsNodePoolSpotMarketOptions creates a new builder of 'aws_node_pool_spot_market_options' objects. +func NewAwsNodePoolSpotMarketOptions() *AwsNodePoolSpotMarketOptionsBuilder { + return &AwsNodePoolSpotMarketOptionsBuilder{ + fieldSet_: make([]bool, 4), + } +} + +// Link sets the flag that indicates if this is a link. +func (b *AwsNodePoolSpotMarketOptionsBuilder) Link(value bool) *AwsNodePoolSpotMarketOptionsBuilder { + if len(b.fieldSet_) == 0 { + b.fieldSet_ = make([]bool, 4) + } + b.fieldSet_[0] = true + return b +} + +// ID sets the identifier of the object. +func (b *AwsNodePoolSpotMarketOptionsBuilder) ID(value string) *AwsNodePoolSpotMarketOptionsBuilder { + if len(b.fieldSet_) == 0 { + b.fieldSet_ = make([]bool, 4) + } + b.id = value + b.fieldSet_[1] = true + return b +} + +// HREF sets the link to the object. +func (b *AwsNodePoolSpotMarketOptionsBuilder) HREF(value string) *AwsNodePoolSpotMarketOptionsBuilder { + if len(b.fieldSet_) == 0 { + b.fieldSet_ = make([]bool, 4) + } + b.href = value + b.fieldSet_[2] = true + return b +} + +// Empty returns true if the builder is empty, i.e. no attribute has a value. +func (b *AwsNodePoolSpotMarketOptionsBuilder) Empty() bool { + if b == nil || len(b.fieldSet_) == 0 { + return true + } + // Check all fields except the link flag (index 0) + for i := 1; i < len(b.fieldSet_); i++ { + if b.fieldSet_[i] { + return false + } + } + return true +} + +// MaxPrice sets the value of the 'max_price' attribute to the given value. +func (b *AwsNodePoolSpotMarketOptionsBuilder) MaxPrice(value string) *AwsNodePoolSpotMarketOptionsBuilder { + if len(b.fieldSet_) == 0 { + b.fieldSet_ = make([]bool, 4) + } + b.maxPrice = value + b.fieldSet_[3] = true + return b +} + +// Copy copies the attributes of the given object into this builder, discarding any previous values. +func (b *AwsNodePoolSpotMarketOptionsBuilder) Copy(object *AwsNodePoolSpotMarketOptions) *AwsNodePoolSpotMarketOptionsBuilder { + if object == nil { + return b + } + if len(object.fieldSet_) > 0 { + b.fieldSet_ = make([]bool, len(object.fieldSet_)) + copy(b.fieldSet_, object.fieldSet_) + } + b.id = object.id + b.href = object.href + b.maxPrice = object.maxPrice + return b +} + +// Build creates a 'aws_node_pool_spot_market_options' object using the configuration stored in the builder. +func (b *AwsNodePoolSpotMarketOptionsBuilder) Build() (object *AwsNodePoolSpotMarketOptions, err error) { + object = new(AwsNodePoolSpotMarketOptions) + object.id = b.id + object.href = b.href + if len(b.fieldSet_) > 0 { + object.fieldSet_ = make([]bool, len(b.fieldSet_)) + copy(object.fieldSet_, b.fieldSet_) + } + object.maxPrice = b.maxPrice + return +} diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_list_builder.go b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_list_builder.go new file mode 100644 index 000000000..d7702fec5 --- /dev/null +++ b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_list_builder.go @@ -0,0 +1,71 @@ +/* +Copyright (c) 2020 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all +// your changes will be lost when the file is generated again. + +package v1 // github.com/openshift-online/ocm-api-model/clientapi/clustersmgmt/v1 + +// AwsNodePoolSpotMarketOptionsListBuilder contains the data and logic needed to build +// 'aws_node_pool_spot_market_options' objects. +type AwsNodePoolSpotMarketOptionsListBuilder struct { + items []*AwsNodePoolSpotMarketOptionsBuilder +} + +// NewAwsNodePoolSpotMarketOptionsList creates a new builder of 'aws_node_pool_spot_market_options' objects. +func NewAwsNodePoolSpotMarketOptionsList() *AwsNodePoolSpotMarketOptionsListBuilder { + return new(AwsNodePoolSpotMarketOptionsListBuilder) +} + +// Items sets the items of the list. +func (b *AwsNodePoolSpotMarketOptionsListBuilder) Items(values ...*AwsNodePoolSpotMarketOptionsBuilder) *AwsNodePoolSpotMarketOptionsListBuilder { + b.items = make([]*AwsNodePoolSpotMarketOptionsBuilder, len(values)) + copy(b.items, values) + return b +} + +// Empty returns true if the list is empty. +func (b *AwsNodePoolSpotMarketOptionsListBuilder) Empty() bool { + return b == nil || len(b.items) == 0 +} + +// Copy copies the items of the given list into this builder, discarding any previous items. +func (b *AwsNodePoolSpotMarketOptionsListBuilder) Copy(list *AwsNodePoolSpotMarketOptionsList) *AwsNodePoolSpotMarketOptionsListBuilder { + if list == nil || list.items == nil { + b.items = nil + } else { + b.items = make([]*AwsNodePoolSpotMarketOptionsBuilder, len(list.items)) + for i, v := range list.items { + b.items[i] = NewAwsNodePoolSpotMarketOptions().Copy(v) + } + } + return b +} + +// Build creates a list of 'aws_node_pool_spot_market_options' objects using the +// configuration stored in the builder. +func (b *AwsNodePoolSpotMarketOptionsListBuilder) Build() (list *AwsNodePoolSpotMarketOptionsList, err error) { + items := make([]*AwsNodePoolSpotMarketOptions, len(b.items)) + for i, item := range b.items { + items[i], err = item.Build() + if err != nil { + return + } + } + list = new(AwsNodePoolSpotMarketOptionsList) + list.items = items + return +} diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_list_type_json.go b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_list_type_json.go new file mode 100644 index 000000000..759db9efd --- /dev/null +++ b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_list_type_json.go @@ -0,0 +1,75 @@ +/* +Copyright (c) 2020 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all +// your changes will be lost when the file is generated again. + +package v1 // github.com/openshift-online/ocm-api-model/clientapi/clustersmgmt/v1 + +import ( + "io" + + jsoniter "github.com/json-iterator/go" + "github.com/openshift-online/ocm-api-model/clientapi/helpers" +) + +// MarshalAwsNodePoolSpotMarketOptionsList writes a list of values of the 'aws_node_pool_spot_market_options' type to +// the given writer. +func MarshalAwsNodePoolSpotMarketOptionsList(list []*AwsNodePoolSpotMarketOptions, writer io.Writer) error { + stream := helpers.NewStream(writer) + WriteAwsNodePoolSpotMarketOptionsList(list, stream) + err := stream.Flush() + if err != nil { + return err + } + return stream.Error +} + +// WriteAwsNodePoolSpotMarketOptionsList writes a list of value of the 'aws_node_pool_spot_market_options' type to +// the given stream. +func WriteAwsNodePoolSpotMarketOptionsList(list []*AwsNodePoolSpotMarketOptions, stream *jsoniter.Stream) { + stream.WriteArrayStart() + for i, value := range list { + if i > 0 { + stream.WriteMore() + } + WriteAwsNodePoolSpotMarketOptions(value, stream) + } + stream.WriteArrayEnd() +} + +// UnmarshalAwsNodePoolSpotMarketOptionsList reads a list of values of the 'aws_node_pool_spot_market_options' type +// from the given source, which can be a slice of bytes, a string or a reader. +func UnmarshalAwsNodePoolSpotMarketOptionsList(source interface{}) (items []*AwsNodePoolSpotMarketOptions, err error) { + iterator, err := helpers.NewIterator(source) + if err != nil { + return + } + items = ReadAwsNodePoolSpotMarketOptionsList(iterator) + err = iterator.Error + return +} + +// ReadAwsNodePoolSpotMarketOptionsList reads list of values of the ”aws_node_pool_spot_market_options' type from +// the given iterator. +func ReadAwsNodePoolSpotMarketOptionsList(iterator *jsoniter.Iterator) []*AwsNodePoolSpotMarketOptions { + list := []*AwsNodePoolSpotMarketOptions{} + for iterator.ReadArray() { + item := ReadAwsNodePoolSpotMarketOptions(iterator) + list = append(list, item) + } + return list +} diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_type.go b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_type.go new file mode 100644 index 000000000..6c3d09e0b --- /dev/null +++ b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_type.go @@ -0,0 +1,277 @@ +/* +Copyright (c) 2020 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all +// your changes will be lost when the file is generated again. + +package v1 // github.com/openshift-online/ocm-api-model/clientapi/clustersmgmt/v1 + +// AwsNodePoolSpotMarketOptionsKind is the name of the type used to represent objects +// of type 'aws_node_pool_spot_market_options'. +const AwsNodePoolSpotMarketOptionsKind = "AwsNodePoolSpotMarketOptions" + +// AwsNodePoolSpotMarketOptionsLinkKind is the name of the type used to represent links +// to objects of type 'aws_node_pool_spot_market_options'. +const AwsNodePoolSpotMarketOptionsLinkKind = "AwsNodePoolSpotMarketOptionsLink" + +// AwsNodePoolSpotMarketOptionsNilKind is the name of the type used to nil references +// to objects of type 'aws_node_pool_spot_market_options'. +const AwsNodePoolSpotMarketOptionsNilKind = "AwsNodePoolSpotMarketOptionsNil" + +// AwsNodePoolSpotMarketOptions represents the values of the 'aws_node_pool_spot_market_options' type. +// +// Spot market options for AWS node pool. +type AwsNodePoolSpotMarketOptions struct { + fieldSet_ []bool + id string + href string + maxPrice string +} + +// Kind returns the name of the type of the object. +func (o *AwsNodePoolSpotMarketOptions) Kind() string { + if o == nil { + return AwsNodePoolSpotMarketOptionsNilKind + } + if len(o.fieldSet_) > 0 && o.fieldSet_[0] { + return AwsNodePoolSpotMarketOptionsLinkKind + } + return AwsNodePoolSpotMarketOptionsKind +} + +// Link returns true if this is a link. +func (o *AwsNodePoolSpotMarketOptions) Link() bool { + return o != nil && len(o.fieldSet_) > 0 && o.fieldSet_[0] +} + +// ID returns the identifier of the object. +func (o *AwsNodePoolSpotMarketOptions) ID() string { + if o != nil && len(o.fieldSet_) > 1 && o.fieldSet_[1] { + return o.id + } + return "" +} + +// GetID returns the identifier of the object and a flag indicating if the +// identifier has a value. +func (o *AwsNodePoolSpotMarketOptions) GetID() (value string, ok bool) { + ok = o != nil && len(o.fieldSet_) > 1 && o.fieldSet_[1] + if ok { + value = o.id + } + return +} + +// HREF returns the link to the object. +func (o *AwsNodePoolSpotMarketOptions) HREF() string { + if o != nil && len(o.fieldSet_) > 2 && o.fieldSet_[2] { + return o.href + } + return "" +} + +// GetHREF returns the link of the object and a flag indicating if the +// link has a value. +func (o *AwsNodePoolSpotMarketOptions) GetHREF() (value string, ok bool) { + ok = o != nil && len(o.fieldSet_) > 2 && o.fieldSet_[2] + if ok { + value = o.href + } + return +} + +// Empty returns true if the object is empty, i.e. no attribute has a value. +func (o *AwsNodePoolSpotMarketOptions) Empty() bool { + if o == nil || len(o.fieldSet_) == 0 { + return true + } + + // Check all fields except the link flag (index 0) + for i := 1; i < len(o.fieldSet_); i++ { + if o.fieldSet_[i] { + return false + } + } + return true +} + +// MaxPrice returns the value of the 'max_price' attribute, or +// the zero value of the type if the attribute doesn't have a value. +// +// The max price for spot instance. Optional. +// If not set, use the on-demand price. +func (o *AwsNodePoolSpotMarketOptions) MaxPrice() string { + if o != nil && len(o.fieldSet_) > 3 && o.fieldSet_[3] { + return o.maxPrice + } + return "" +} + +// GetMaxPrice returns the value of the 'max_price' attribute and +// a flag indicating if the attribute has a value. +// +// The max price for spot instance. Optional. +// If not set, use the on-demand price. +func (o *AwsNodePoolSpotMarketOptions) GetMaxPrice() (value string, ok bool) { + ok = o != nil && len(o.fieldSet_) > 3 && o.fieldSet_[3] + if ok { + value = o.maxPrice + } + return +} + +// AwsNodePoolSpotMarketOptionsListKind is the name of the type used to represent list of objects of +// type 'aws_node_pool_spot_market_options'. +const AwsNodePoolSpotMarketOptionsListKind = "AwsNodePoolSpotMarketOptionsList" + +// AwsNodePoolSpotMarketOptionsListLinkKind is the name of the type used to represent links to list +// of objects of type 'aws_node_pool_spot_market_options'. +const AwsNodePoolSpotMarketOptionsListLinkKind = "AwsNodePoolSpotMarketOptionsListLink" + +// AwsNodePoolSpotMarketOptionsNilKind is the name of the type used to nil lists of objects of +// type 'aws_node_pool_spot_market_options'. +const AwsNodePoolSpotMarketOptionsListNilKind = "AwsNodePoolSpotMarketOptionsListNil" + +// AwsNodePoolSpotMarketOptionsList is a list of values of the 'aws_node_pool_spot_market_options' type. +type AwsNodePoolSpotMarketOptionsList struct { + href string + link bool + items []*AwsNodePoolSpotMarketOptions +} + +// Kind returns the name of the type of the object. +func (l *AwsNodePoolSpotMarketOptionsList) Kind() string { + if l == nil { + return AwsNodePoolSpotMarketOptionsListNilKind + } + if l.link { + return AwsNodePoolSpotMarketOptionsListLinkKind + } + return AwsNodePoolSpotMarketOptionsListKind +} + +// Link returns true iif this is a link. +func (l *AwsNodePoolSpotMarketOptionsList) Link() bool { + return l != nil && l.link +} + +// HREF returns the link to the list. +func (l *AwsNodePoolSpotMarketOptionsList) HREF() string { + if l != nil { + return l.href + } + return "" +} + +// GetHREF returns the link of the list and a flag indicating if the +// link has a value. +func (l *AwsNodePoolSpotMarketOptionsList) GetHREF() (value string, ok bool) { + ok = l != nil && l.href != "" + if ok { + value = l.href + } + return +} + +// Len returns the length of the list. +func (l *AwsNodePoolSpotMarketOptionsList) Len() int { + if l == nil { + return 0 + } + return len(l.items) +} + +// Items sets the items of the list. +func (l *AwsNodePoolSpotMarketOptionsList) SetLink(link bool) { + l.link = link +} + +// Items sets the items of the list. +func (l *AwsNodePoolSpotMarketOptionsList) SetHREF(href string) { + l.href = href +} + +// Items sets the items of the list. +func (l *AwsNodePoolSpotMarketOptionsList) SetItems(items []*AwsNodePoolSpotMarketOptions) { + l.items = items +} + +// Items returns the items of the list. +func (l *AwsNodePoolSpotMarketOptionsList) Items() []*AwsNodePoolSpotMarketOptions { + if l == nil { + return nil + } + return l.items +} + +// Empty returns true if the list is empty. +func (l *AwsNodePoolSpotMarketOptionsList) Empty() bool { + return l == nil || len(l.items) == 0 +} + +// Get returns the item of the list with the given index. If there is no item with +// that index it returns nil. +func (l *AwsNodePoolSpotMarketOptionsList) Get(i int) *AwsNodePoolSpotMarketOptions { + if l == nil || i < 0 || i >= len(l.items) { + return nil + } + return l.items[i] +} + +// Slice returns an slice containing the items of the list. The returned slice is a +// copy of the one used internally, so it can be modified without affecting the +// internal representation. +// +// If you don't need to modify the returned slice consider using the Each or Range +// functions, as they don't need to allocate a new slice. +func (l *AwsNodePoolSpotMarketOptionsList) Slice() []*AwsNodePoolSpotMarketOptions { + var slice []*AwsNodePoolSpotMarketOptions + if l == nil { + slice = make([]*AwsNodePoolSpotMarketOptions, 0) + } else { + slice = make([]*AwsNodePoolSpotMarketOptions, len(l.items)) + copy(slice, l.items) + } + return slice +} + +// Each runs the given function for each item of the list, in order. If the function +// returns false the iteration stops, otherwise it continues till all the elements +// of the list have been processed. +func (l *AwsNodePoolSpotMarketOptionsList) Each(f func(item *AwsNodePoolSpotMarketOptions) bool) { + if l == nil { + return + } + for _, item := range l.items { + if !f(item) { + break + } + } +} + +// Range runs the given function for each index and item of the list, in order. If +// the function returns false the iteration stops, otherwise it continues till all +// the elements of the list have been processed. +func (l *AwsNodePoolSpotMarketOptionsList) Range(f func(index int, item *AwsNodePoolSpotMarketOptions) bool) { + if l == nil { + return + } + for index, item := range l.items { + if !f(index, item) { + break + } + } +} diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_type_json.go b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_type_json.go new file mode 100644 index 000000000..7a4b1fc2d --- /dev/null +++ b/clientapi/clustersmgmt/v1/aws_node_pool_spot_market_options_type_json.go @@ -0,0 +1,122 @@ +/* +Copyright (c) 2020 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// IMPORTANT: This file has been generated automatically, refrain from modifying it manually as all +// your changes will be lost when the file is generated again. + +package v1 // github.com/openshift-online/ocm-api-model/clientapi/clustersmgmt/v1 + +import ( + "io" + + jsoniter "github.com/json-iterator/go" + "github.com/openshift-online/ocm-api-model/clientapi/helpers" +) + +// MarshalAwsNodePoolSpotMarketOptions writes a value of the 'aws_node_pool_spot_market_options' type to the given writer. +func MarshalAwsNodePoolSpotMarketOptions(object *AwsNodePoolSpotMarketOptions, writer io.Writer) error { + stream := helpers.NewStream(writer) + WriteAwsNodePoolSpotMarketOptions(object, stream) + err := stream.Flush() + if err != nil { + return err + } + return stream.Error +} + +// WriteAwsNodePoolSpotMarketOptions writes a value of the 'aws_node_pool_spot_market_options' type to the given stream. +func WriteAwsNodePoolSpotMarketOptions(object *AwsNodePoolSpotMarketOptions, stream *jsoniter.Stream) { + count := 0 + stream.WriteObjectStart() + stream.WriteObjectField("kind") + if len(object.fieldSet_) > 0 && object.fieldSet_[0] { + stream.WriteString(AwsNodePoolSpotMarketOptionsLinkKind) + } else { + stream.WriteString(AwsNodePoolSpotMarketOptionsKind) + } + count++ + if len(object.fieldSet_) > 1 && object.fieldSet_[1] { + if count > 0 { + stream.WriteMore() + } + stream.WriteObjectField("id") + stream.WriteString(object.id) + count++ + } + if len(object.fieldSet_) > 2 && object.fieldSet_[2] { + if count > 0 { + stream.WriteMore() + } + stream.WriteObjectField("href") + stream.WriteString(object.href) + count++ + } + var present_ bool + present_ = len(object.fieldSet_) > 3 && object.fieldSet_[3] + if present_ { + if count > 0 { + stream.WriteMore() + } + stream.WriteObjectField("max_price") + stream.WriteString(object.maxPrice) + } + stream.WriteObjectEnd() +} + +// UnmarshalAwsNodePoolSpotMarketOptions reads a value of the 'aws_node_pool_spot_market_options' type from the given +// source, which can be an slice of bytes, a string or a reader. +func UnmarshalAwsNodePoolSpotMarketOptions(source interface{}) (object *AwsNodePoolSpotMarketOptions, err error) { + iterator, err := helpers.NewIterator(source) + if err != nil { + return + } + object = ReadAwsNodePoolSpotMarketOptions(iterator) + err = iterator.Error + return +} + +// ReadAwsNodePoolSpotMarketOptions reads a value of the 'aws_node_pool_spot_market_options' type from the given iterator. +func ReadAwsNodePoolSpotMarketOptions(iterator *jsoniter.Iterator) *AwsNodePoolSpotMarketOptions { + object := &AwsNodePoolSpotMarketOptions{ + fieldSet_: make([]bool, 4), + } + for { + field := iterator.ReadObject() + if field == "" { + break + } + switch field { + case "kind": + value := iterator.ReadString() + if value == AwsNodePoolSpotMarketOptionsLinkKind { + object.fieldSet_[0] = true + } + case "id": + object.id = iterator.ReadString() + object.fieldSet_[1] = true + case "href": + object.href = iterator.ReadString() + object.fieldSet_[2] = true + case "max_price": + value := iterator.ReadString() + object.maxPrice = value + object.fieldSet_[3] = true + default: + iterator.ReadAny() + } + } + return object +} diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_type.go b/clientapi/clustersmgmt/v1/aws_node_pool_type.go index 1dc985cf2..56113b9a0 100644 --- a/clientapi/clustersmgmt/v1/aws_node_pool_type.go +++ b/clientapi/clustersmgmt/v1/aws_node_pool_type.go @@ -45,6 +45,7 @@ type AWSNodePool struct { instanceProfile string instanceType string rootVolume *AWSVolume + spotMarketOptions *AwsNodePoolSpotMarketOptions subnetOutposts map[string]string tags map[string]string } @@ -277,12 +278,35 @@ func (o *AWSNodePool) GetRootVolume() (value *AWSVolume, ok bool) { return } +// SpotMarketOptions returns the value of the 'spot_market_options' attribute, or +// the zero value of the type if the attribute doesn't have a value. +// +// Use spot instances on this node pool to reduce cost. +func (o *AWSNodePool) SpotMarketOptions() *AwsNodePoolSpotMarketOptions { + if o != nil && len(o.fieldSet_) > 10 && o.fieldSet_[10] { + return o.spotMarketOptions + } + return nil +} + +// GetSpotMarketOptions returns the value of the 'spot_market_options' attribute and +// a flag indicating if the attribute has a value. +// +// Use spot instances on this node pool to reduce cost. +func (o *AWSNodePool) GetSpotMarketOptions() (value *AwsNodePoolSpotMarketOptions, ok bool) { + ok = o != nil && len(o.fieldSet_) > 10 && o.fieldSet_[10] + if ok { + value = o.spotMarketOptions + } + return +} + // SubnetOutposts returns the value of the 'subnet_outposts' attribute, or // the zero value of the type if the attribute doesn't have a value. // // Associates nodepool subnets with AWS Outposts. func (o *AWSNodePool) SubnetOutposts() map[string]string { - if o != nil && len(o.fieldSet_) > 10 && o.fieldSet_[10] { + if o != nil && len(o.fieldSet_) > 11 && o.fieldSet_[11] { return o.subnetOutposts } return nil @@ -293,7 +317,7 @@ func (o *AWSNodePool) SubnetOutposts() map[string]string { // // Associates nodepool subnets with AWS Outposts. func (o *AWSNodePool) GetSubnetOutposts() (value map[string]string, ok bool) { - ok = o != nil && len(o.fieldSet_) > 10 && o.fieldSet_[10] + ok = o != nil && len(o.fieldSet_) > 11 && o.fieldSet_[11] if ok { value = o.subnetOutposts } @@ -312,7 +336,7 @@ func (o *AWSNodePool) GetSubnetOutposts() (value map[string]string, ok bool) { // - Tag values may be between 0 and 256 characters in length // - Tags may only contain letters, numbers, spaces, and the following characters: [_ . : / = + - @] func (o *AWSNodePool) Tags() map[string]string { - if o != nil && len(o.fieldSet_) > 11 && o.fieldSet_[11] { + if o != nil && len(o.fieldSet_) > 12 && o.fieldSet_[12] { return o.tags } return nil @@ -330,7 +354,7 @@ func (o *AWSNodePool) Tags() map[string]string { // - Tag values may be between 0 and 256 characters in length // - Tags may only contain letters, numbers, spaces, and the following characters: [_ . : / = + - @] func (o *AWSNodePool) GetTags() (value map[string]string, ok bool) { - ok = o != nil && len(o.fieldSet_) > 11 && o.fieldSet_[11] + ok = o != nil && len(o.fieldSet_) > 12 && o.fieldSet_[12] if ok { value = o.tags } diff --git a/clientapi/clustersmgmt/v1/aws_node_pool_type_json.go b/clientapi/clustersmgmt/v1/aws_node_pool_type_json.go index 260f4a41a..1e5690ca4 100644 --- a/clientapi/clustersmgmt/v1/aws_node_pool_type_json.go +++ b/clientapi/clustersmgmt/v1/aws_node_pool_type_json.go @@ -149,7 +149,16 @@ func WriteAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) { WriteAWSVolume(object.rootVolume, stream) count++ } - present_ = len(object.fieldSet_) > 10 && object.fieldSet_[10] && object.subnetOutposts != nil + present_ = len(object.fieldSet_) > 10 && object.fieldSet_[10] && object.spotMarketOptions != nil + if present_ { + if count > 0 { + stream.WriteMore() + } + stream.WriteObjectField("spot_market_options") + WriteAwsNodePoolSpotMarketOptions(object.spotMarketOptions, stream) + count++ + } + present_ = len(object.fieldSet_) > 11 && object.fieldSet_[11] && object.subnetOutposts != nil if present_ { if count > 0 { stream.WriteMore() @@ -178,7 +187,7 @@ func WriteAWSNodePool(object *AWSNodePool, stream *jsoniter.Stream) { } count++ } - present_ = len(object.fieldSet_) > 11 && object.fieldSet_[11] && object.tags != nil + present_ = len(object.fieldSet_) > 12 && object.fieldSet_[12] && object.tags != nil if present_ { if count > 0 { stream.WriteMore() @@ -224,7 +233,7 @@ func UnmarshalAWSNodePool(source interface{}) (object *AWSNodePool, err error) { // ReadAWSNodePool reads a value of the 'AWS_node_pool' type from the given iterator. func ReadAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool { object := &AWSNodePool{ - fieldSet_: make([]bool, 12), + fieldSet_: make([]bool, 13), } for { field := iterator.ReadObject() @@ -280,6 +289,10 @@ func ReadAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool { value := ReadAWSVolume(iterator) object.rootVolume = value object.fieldSet_[9] = true + case "spot_market_options": + value := ReadAwsNodePoolSpotMarketOptions(iterator) + object.spotMarketOptions = value + object.fieldSet_[10] = true case "subnet_outposts": value := map[string]string{} for { @@ -291,7 +304,7 @@ func ReadAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool { value[key] = item } object.subnetOutposts = value - object.fieldSet_[10] = true + object.fieldSet_[11] = true case "tags": value := map[string]string{} for { @@ -303,7 +316,7 @@ func ReadAWSNodePool(iterator *jsoniter.Iterator) *AWSNodePool { value[key] = item } object.tags = value - object.fieldSet_[11] = true + object.fieldSet_[12] = true default: iterator.ReadAny() } diff --git a/clientapi/clustersmgmt/v1/aws_type.go b/clientapi/clustersmgmt/v1/aws_type.go index ea7f36430..fad69c640 100644 --- a/clientapi/clustersmgmt/v1/aws_type.go +++ b/clientapi/clustersmgmt/v1/aws_type.go @@ -44,6 +44,7 @@ type AWS struct { secretAccessKey string subnetIDs []string tags map[string]string + terminationHandlerQueueUrl string vpcEndpointRoleArn string zeroEgress *ZeroEgress privateLink bool @@ -545,12 +546,39 @@ func (o *AWS) GetTags() (value map[string]string, ok bool) { return } +// TerminationHandlerQueueUrl returns the value of the 'termination_handler_queue_url' attribute, or +// the zero value of the type if the attribute doesn't have a value. +// +// URL of the SQS queue used for graceful Spot instance interruption handling. +// When set, HyperShift deploys the AWS Node Termination Handler in the hosted +// control plane. Queue must be in the same region as the cluster. +func (o *AWS) TerminationHandlerQueueUrl() string { + if o != nil && len(o.fieldSet_) > 21 && o.fieldSet_[21] { + return o.terminationHandlerQueueUrl + } + return "" +} + +// GetTerminationHandlerQueueUrl returns the value of the 'termination_handler_queue_url' attribute and +// a flag indicating if the attribute has a value. +// +// URL of the SQS queue used for graceful Spot instance interruption handling. +// When set, HyperShift deploys the AWS Node Termination Handler in the hosted +// control plane. Queue must be in the same region as the cluster. +func (o *AWS) GetTerminationHandlerQueueUrl() (value string, ok bool) { + ok = o != nil && len(o.fieldSet_) > 21 && o.fieldSet_[21] + if ok { + value = o.terminationHandlerQueueUrl + } + return +} + // VpcEndpointRoleArn returns the value of the 'vpc_endpoint_role_arn' attribute, or // the zero value of the type if the attribute doesn't have a value. // // Role ARN for VPC Endpoint Service cross account role. func (o *AWS) VpcEndpointRoleArn() string { - if o != nil && len(o.fieldSet_) > 21 && o.fieldSet_[21] { + if o != nil && len(o.fieldSet_) > 22 && o.fieldSet_[22] { return o.vpcEndpointRoleArn } return "" @@ -561,7 +589,7 @@ func (o *AWS) VpcEndpointRoleArn() string { // // Role ARN for VPC Endpoint Service cross account role. func (o *AWS) GetVpcEndpointRoleArn() (value string, ok bool) { - ok = o != nil && len(o.fieldSet_) > 21 && o.fieldSet_[21] + ok = o != nil && len(o.fieldSet_) > 22 && o.fieldSet_[22] if ok { value = o.vpcEndpointRoleArn } @@ -573,7 +601,7 @@ func (o *AWS) GetVpcEndpointRoleArn() (value string, ok bool) { // // Zero egress configuration. func (o *AWS) ZeroEgress() *ZeroEgress { - if o != nil && len(o.fieldSet_) > 22 && o.fieldSet_[22] { + if o != nil && len(o.fieldSet_) > 23 && o.fieldSet_[23] { return o.zeroEgress } return nil @@ -584,7 +612,7 @@ func (o *AWS) ZeroEgress() *ZeroEgress { // // Zero egress configuration. func (o *AWS) GetZeroEgress() (value *ZeroEgress, ok bool) { - ok = o != nil && len(o.fieldSet_) > 22 && o.fieldSet_[22] + ok = o != nil && len(o.fieldSet_) > 23 && o.fieldSet_[23] if ok { value = o.zeroEgress } diff --git a/clientapi/clustersmgmt/v1/aws_type_json.go b/clientapi/clustersmgmt/v1/aws_type_json.go index 32680b914..ee6f731ea 100644 --- a/clientapi/clustersmgmt/v1/aws_type_json.go +++ b/clientapi/clustersmgmt/v1/aws_type_json.go @@ -253,6 +253,15 @@ func WriteAWS(object *AWS, stream *jsoniter.Stream) { count++ } present_ = len(object.fieldSet_) > 21 && object.fieldSet_[21] + if present_ { + if count > 0 { + stream.WriteMore() + } + stream.WriteObjectField("termination_handler_queue_url") + stream.WriteString(object.terminationHandlerQueueUrl) + count++ + } + present_ = len(object.fieldSet_) > 22 && object.fieldSet_[22] if present_ { if count > 0 { stream.WriteMore() @@ -261,7 +270,7 @@ func WriteAWS(object *AWS, stream *jsoniter.Stream) { stream.WriteString(object.vpcEndpointRoleArn) count++ } - present_ = len(object.fieldSet_) > 22 && object.fieldSet_[22] && object.zeroEgress != nil + present_ = len(object.fieldSet_) > 23 && object.fieldSet_[23] && object.zeroEgress != nil if present_ { if count > 0 { stream.WriteMore() @@ -287,7 +296,7 @@ func UnmarshalAWS(source interface{}) (object *AWS, err error) { // ReadAWS reads a value of the 'AWS' type from the given iterator. func ReadAWS(iterator *jsoniter.Iterator) *AWS { object := &AWS{ - fieldSet_: make([]bool, 23), + fieldSet_: make([]bool, 24), } for { field := iterator.ReadObject() @@ -388,14 +397,18 @@ func ReadAWS(iterator *jsoniter.Iterator) *AWS { } object.tags = value object.fieldSet_[20] = true + case "termination_handler_queue_url": + value := iterator.ReadString() + object.terminationHandlerQueueUrl = value + object.fieldSet_[21] = true case "vpc_endpoint_role_arn": value := iterator.ReadString() object.vpcEndpointRoleArn = value - object.fieldSet_[21] = true + object.fieldSet_[22] = true case "zero_egress": value := ReadZeroEgress(iterator) object.zeroEgress = value - object.fieldSet_[22] = true + object.fieldSet_[23] = true default: iterator.ReadAny() } diff --git a/model/aro_hcp/v1alpha1/cluster_type.model b/model/aro_hcp/v1alpha1/cluster_type.model index dddfb163f..eca02d5e4 100644 --- a/model/aro_hcp/v1alpha1/cluster_type.model +++ b/model/aro_hcp/v1alpha1/cluster_type.model @@ -257,4 +257,10 @@ class Cluster { // The AutoNode settings for this cluster. // This is currently only supported for ROSA HCP AutoNode ClusterAutoNode + + // The SSH public key used for secure access to cluster nodes. When set, this key + // is distributed to all nodes, enabling SSH access for debugging + // and maintenance purposes. + // This is currently only supported for ARO HCP + NodeSSHPublicKey String } diff --git a/model/clusters_mgmt/v1/aws_node_pool_spot_market_options_type.model b/model/clusters_mgmt/v1/aws_node_pool_spot_market_options_type.model new file mode 100644 index 000000000..26ad425ab --- /dev/null +++ b/model/clusters_mgmt/v1/aws_node_pool_spot_market_options_type.model @@ -0,0 +1,22 @@ +/* +Copyright (c) 2026 Red Hat, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Spot market options for AWS node pool. +class AwsNodePoolSpotMarketOptions { + // The max price for spot instance. Optional. + // If not set, use the on-demand price. + MaxPrice String +} diff --git a/model/clusters_mgmt/v1/aws_node_pool_type.model b/model/clusters_mgmt/v1/aws_node_pool_type.model index 1a81cb9ee..58fd97e28 100644 --- a/model/clusters_mgmt/v1/aws_node_pool_type.model +++ b/model/clusters_mgmt/v1/aws_node_pool_type.model @@ -51,4 +51,8 @@ class AWSNodePool { // If present it defines the AWS Capacity Reservation used for this NodePool @json(name = "capacity_reservation") CapacityReservation AWSCapacityReservation + + // Use spot instances on this node pool to reduce cost. + @json(name = "spot_market_options") + SpotMarketOptions AwsNodePoolSpotMarketOptions } diff --git a/model/clusters_mgmt/v1/aws_type.model b/model/clusters_mgmt/v1/aws_type.model index 190d411e0..25f49a5de 100644 --- a/model/clusters_mgmt/v1/aws_type.model +++ b/model/clusters_mgmt/v1/aws_type.model @@ -85,4 +85,10 @@ struct AWS { // Zero egress configuration. ZeroEgress ZeroEgress + + // URL of the SQS queue used for graceful Spot instance interruption handling. + // When set, HyperShift deploys the AWS Node Termination Handler in the hosted + // control plane. Queue must be in the same region as the cluster. + @json(name = "termination_handler_queue_url") + TerminationHandlerQueueUrl String } diff --git a/openapi/aro_hcp/v1alpha1/openapi.json b/openapi/aro_hcp/v1alpha1/openapi.json index 9720669a0..d1fd4ddb3 100644 --- a/openapi/aro_hcp/v1alpha1/openapi.json +++ b/openapi/aro_hcp/v1alpha1/openapi.json @@ -4920,6 +4920,10 @@ "description": "Network settings of the cluster.", "$ref": "#/components/schemas/Network" }, + "node_ssh_public_key": { + "description": "The SSH public key used for secure access to cluster nodes. When set, this key\nis distributed to all nodes, enabling SSH access for debugging\nand maintenance purposes.\nThis is currently only supported for ARO HCP", + "type": "string" + }, "node_drain_grace_period": { "description": "Node drain grace period.", "$ref": "#/components/schemas/Value" diff --git a/openapi/clusters_mgmt/v1/openapi.json b/openapi/clusters_mgmt/v1/openapi.json index 60c0c9a61..d608082c0 100644 --- a/openapi/clusters_mgmt/v1/openapi.json +++ b/openapi/clusters_mgmt/v1/openapi.json @@ -14229,6 +14229,10 @@ "type": "string" } }, + "termination_handler_queue_url": { + "description": "URL of the SQS queue used for graceful Spot instance interruption handling.\nWhen set, HyperShift deploys the AWS Node Termination Handler in the hosted\ncontrol plane. Queue must be in the same region as the cluster.", + "type": "string" + }, "vpc_endpoint_role_arn": { "description": "Role ARN for VPC Endpoint Service cross account role.", "type": "string" @@ -14498,6 +14502,10 @@ "description": "AWS Volume specification to be used to set custom worker disk size", "$ref": "#/components/schemas/AWSVolume" }, + "spot_market_options": { + "description": "Use spot instances on this node pool to reduce cost.", + "$ref": "#/components/schemas/AwsNodePoolSpotMarketOptions" + }, "subnet_outposts": { "description": "Associates nodepool subnets with AWS Outposts.", "type": "object", @@ -15983,6 +15991,27 @@ } } }, + "AwsNodePoolSpotMarketOptions": { + "description": "Spot market options for AWS node pool.", + "properties": { + "kind": { + "description": "Indicates the type of this object. Will be 'AwsNodePoolSpotMarketOptions' if this is a complete object or 'AwsNodePoolSpotMarketOptionsLink' if it is just a link.", + "type": "string" + }, + "id": { + "description": "Unique identifier of the object.", + "type": "string" + }, + "href": { + "description": "Self link.", + "type": "string" + }, + "max_price": { + "description": "The max price for spot instance. Optional.\nIf not set, use the on-demand price.", + "type": "string" + } + } + }, "Azure": { "description": "Microsoft Azure settings of a cluster.", "properties": {