diff --git a/go.mod b/go.mod index 0805a034e7..fa54fd1648 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( github.com/google/uuid v1.1.2 github.com/onsi/ginkgo v1.16.5 github.com/onsi/gomega v1.17.0 - github.com/openshift/api v0.0.0-20220204103739-31ffd77a8f02 + github.com/openshift/api v0.0.0-20220222102030-354aa98a475c github.com/openshift/client-go v0.0.0-20211209144617-7385dd6338e3 github.com/openshift/library-go v0.0.0-20220121154930-b7889002d63e github.com/operator-framework/operator-sdk v0.5.1-0.20190301204940-c2efe6f74e7b diff --git a/go.sum b/go.sum index 757ccd8892..26ec99bb61 100644 --- a/go.sum +++ b/go.sum @@ -535,8 +535,8 @@ github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/openshift/api v0.0.0-20211209135129-c58d9f695577/go.mod h1:DoslCwtqUpr3d/gsbq4ZlkaMEdYqKxuypsDjorcHhME= -github.com/openshift/api v0.0.0-20220204103739-31ffd77a8f02 h1:827CBqmcsUWM9KuwRPirEcUBjq8elzGoBZLKx3NT2xk= -github.com/openshift/api v0.0.0-20220204103739-31ffd77a8f02/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= +github.com/openshift/api v0.0.0-20220222102030-354aa98a475c h1:teP/Es0/vieKbpRde+xwoM0F1cWO5ZFLS4ihJ2WG7BQ= +github.com/openshift/api v0.0.0-20220222102030-354aa98a475c/go.mod h1:F/eU6jgr6Q2VhMu1mSpMmygxAELd7+BUxs3NHZ25jV4= github.com/openshift/build-machinery-go v0.0.0-20210712174854-1bb7fd1518d3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/build-machinery-go v0.0.0-20211213093930-7e33a7eb4ce3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/openshift/client-go v0.0.0-20211209144617-7385dd6338e3 h1:SG1aqwleU6bGD0X4mhkTNupjVnByMYYuW4XbnCPavQU= diff --git a/hack/crds-sync.sh b/hack/crds-sync.sh index f874eac5aa..6c129c669c 100755 --- a/hack/crds-sync.sh +++ b/hack/crds-sync.sh @@ -3,12 +3,13 @@ set -euo pipefail # map names of CRD files between the vendored openshift/api repository and the ./install directory -CRDS_MAPPING=( "0000_10_machine.crd.yaml:0000_30_machine-api-operator_02_machine.crd.yaml" - "0000_10_machineset.crd.yaml:0000_30_machine-api-operator_03_machineset.crd.yaml" - "0000_10_machinehealthcheck.yaml:0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml" ) +CRDS_MAPPING=( "v1beta1/0000_10_machine.crd.yaml:0000_30_machine-api-operator_02_machine.crd.yaml" + "v1beta1/0000_10_machineset.crd.yaml:0000_30_machine-api-operator_03_machineset.crd.yaml" + "v1beta1/0000_10_machinehealthcheck.yaml:0000_30_machine-api-operator_07_machinehealthcheck.crd.yaml" + "v1/0000_10_awsplacementgroup.crd.yaml:0000_30_machine-api-operator_04_awsplacementgroup.crd.yaml") for crd in "${CRDS_MAPPING[@]}" ; do SRC="${crd%%:*}" DES="${crd##*:}" - cp "vendor/github.com/openshift/api/machine/v1beta1/$SRC" "install/$DES" + cp "vendor/github.com/openshift/api/machine/$SRC" "install/$DES" done diff --git a/install/0000_30_machine-api-operator_04_awsplacementgroup.crd.yaml b/install/0000_30_machine-api-operator_04_awsplacementgroup.crd.yaml new file mode 100644 index 0000000000..e6031e1600 --- /dev/null +++ b/install/0000_30_machine-api-operator_04_awsplacementgroup.crd.yaml @@ -0,0 +1,187 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + exclude.release.openshift.io/internal-openshift-hosted: "true" + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + api-approved.openshift.io: https://github.com/openshift/api/pull/1091 + name: awsplacementgroups.machine.openshift.io +spec: + group: machine.openshift.io + names: + kind: AWSPlacementGroup + listKind: AWSPlacementGroupList + plural: awsplacementgroups + singular: awsplacementgroup + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Placement Group Type + jsonPath: .status.observedConfiguration.groupType + name: Type + type: string + - description: Management State + jsonPath: .spec.managementSpec.managementState + name: Management + type: string + - description: EC2 Replicas within the Placement Group + jsonPath: .status.replicas + name: Replicas + type: integer + - description: AWSPlacementGroup age + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + description: 'AWSPlacementGroup ensures that a placement group matching the given configuration exists within AWS Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).' + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + type: object + required: + - managementSpec + properties: + credentialsSecret: + description: CredentialsSecret is a reference to the secret with AWS credentials. The secret must reside in the same namespace as the AWSPlacementGroup resource. Otherwise, the controller will leverage the EC2 instance assigned IAM Role, in OpenShift this will always be the Control Plane Machine IAM Role. + type: object + properties: + name: + description: Name of the Secret. + type: string + managementSpec: + description: AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group. + type: object + required: + - managementState + properties: + managed: + description: Managed defines the configuration for the placement groups to be created. Updates to the configuration will not be observed as placement groups are immutable after creation. + type: object + required: + - groupType + properties: + groupType: + description: 'GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are "Cluster", "Partition", "Spread". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is "Spread", Machines created within the group may no have placement.tenancy set to "dedicated".' + type: string + enum: + - Cluster + - Partition + - Spread + partition: + description: Partition defines the configuration of a partition placement group. + type: object + properties: + count: + description: 'Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines created within the group is unavailable.' + type: integer + format: int32 + maximum: 7 + minimum: 1 + managementState: + description: ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. + type: string + status: + type: object + properties: + conditions: + description: 'Conditions represents the observations of the AWSPlacementGroup''s current state. Known .status.conditions.type are: Ready, Deleting' + type: array + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + type: object + required: + - lastTransitionTime + - message + - reason + - status + - type + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + type: string + format: date-time + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + type: string + maxLength: 32768 + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + type: integer + format: int64 + minimum: 0 + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + type: string + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + status: + description: status of the condition, one of True, False, Unknown. + type: string + enum: + - "True" + - "False" + - Unknown + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + type: string + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + expiresAt: + description: ExpiresAt identifies when the observed configuration is valid until. The observed configuration should not be trusted if this time has passed. The AWSPlacementGroup controller will attempt to update the status before it expires. + type: string + format: date-time + managementState: + description: ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. This value is owned by the controller and may differ from the spec in cases when a user attempts to manage a previously unmanaged placement group. + type: string + observedConfiguration: + description: ObservedConfiguration represents the configuration present on the placement group on AWS. + type: object + required: + - groupType + properties: + groupType: + description: 'GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are "Cluster", "Partition", "Spread". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is "Spread", Machines created within the group may no have placement.tenancy set to "dedicated".' + type: string + enum: + - Cluster + - Partition + - Spread + partition: + description: Partition defines the configuration of a partition placement group. + type: object + properties: + count: + description: 'Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines created within the group is unavailable.' + type: integer + format: int32 + maximum: 7 + minimum: 1 + replicas: + description: 'Replicas counts how many AWS EC2 instances are present within the placement group. Note: This is a pointer to be able to distinguish between an empty placement group and the status having not yet been observed.' + type: integer + format: int32 + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/tools.go b/tools.go new file mode 100644 index 0000000000..68f67eb76f --- /dev/null +++ b/tools.go @@ -0,0 +1,6 @@ +package tools + +import ( + // Import the v1 API so that we can sync the CRD into the install folder + _ "github.com/openshift/api/machine/v1" +) diff --git a/vendor/github.com/openshift/api/Makefile b/vendor/github.com/openshift/api/Makefile index 6dd9c451a0..f049eda2d7 100644 --- a/vendor/github.com/openshift/api/Makefile +++ b/vendor/github.com/openshift/api/Makefile @@ -41,7 +41,8 @@ $(call add-crd-gen,cloudnetwork,./cloudnetwork/v1,./cloudnetwork/v1,./cloudnetwo $(call add-crd-gen,network,./network/v1,./network/v1,./network/v1) $(call add-crd-gen,networkoperator,./networkoperator/v1,./networkoperator/v1,./networkoperator/v1) $(call add-crd-gen,operatorcontrolplane,./operatorcontrolplane/v1alpha1,./operatorcontrolplane/v1alpha1,./operatorcontrolplane/v1alpha1) -$(call add-crd-gen,machine,./machine/v1beta1,./machine/v1beta1,./machine/v1beta1) +$(call add-crd-gen,machine-beta,./machine/v1beta1,./machine/v1beta1,./machine/v1beta1) +$(call add-crd-gen,machine,./machine/v1,./machine/v1,./machine/v1) RUNTIME ?= podman RUNTIME_IMAGE_NAME ?= openshift-api-generator diff --git a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml index 477435fd61..66306bee05 100644 --- a/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml +++ b/vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml @@ -52,6 +52,26 @@ spec: required: - clusterID properties: + capabilities: + description: capabilities configures the installation of optional, core cluster components. A null value here is identical to an empty object; see the child properties for default semantics. + type: object + properties: + additionalEnabledCapabilities: + description: additionalEnabledCapabilities extends the set of managed capabilities beyond the baseline defined in baselineCapabilitySet. The default is an empty set. + type: array + items: + description: ClusterVersionCapability enumerates optional, core cluster components. + type: string + enum: + - openshift-samples + x-kubernetes-list-type: atomic + baselineCapabilitySet: + description: baselineCapabilitySet selects an initial set of optional capabilities to enable, which can be extended via additionalEnabledCapabilities. If unset, the cluster will choose a default, and the default may change over time. The current default is vCurrent. + type: string + enum: + - None + - v4.11 + - vCurrent channel: description: channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters. type: string @@ -133,6 +153,28 @@ spec: description: version is a semantic versioning identifying the update version. When this field is part of spec, version is optional if image is specified. type: string nullable: true + capabilities: + description: capabilities describes the state of optional, core cluster components. + type: object + properties: + enabledCapabilities: + description: enabledCapabilities lists all the capabilities that are currently managed. + type: array + items: + description: ClusterVersionCapability enumerates optional, core cluster components. + type: string + enum: + - openshift-samples + x-kubernetes-list-type: atomic + knownCapabilities: + description: knownCapabilities lists all the capabilities known to the current cluster. + type: array + items: + description: ClusterVersionCapability enumerates optional, core cluster components. + type: string + enum: + - openshift-samples + x-kubernetes-list-type: atomic conditionalUpdates: description: conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified. type: array diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go index 44e8677789..2bd6c65701 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_version.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_version.go @@ -68,6 +68,12 @@ type ClusterVersionSpec struct { // +optional Channel string `json:"channel,omitempty"` + // capabilities configures the installation of optional, core + // cluster components. A null value here is identical to an + // empty object; see the child properties for default semantics. + // +optional + Capabilities *ClusterVersionCapabilitiesSpec `json:"capabilities,omitempty"` + // overrides is list of overides for components that are managed by // cluster version operator. Marking a component unmanaged will prevent // the operator from creating or updating the object. @@ -113,6 +119,9 @@ type ClusterVersionStatus struct { // +required VersionHash string `json:"versionHash"` + // capabilities describes the state of optional, core cluster components. + Capabilities ClusterVersionCapabilitiesStatus `json:"capabilities"` + // conditions provides information about the cluster version. The condition // "Available" is set to true if the desiredUpdate has been reached. The // condition "Progressing" is set to true if an update is being applied. @@ -215,6 +224,86 @@ type UpdateHistory struct { // ClusterID is string RFC4122 uuid. type ClusterID string +// ClusterVersionCapability enumerates optional, core cluster components. +// +kubebuilder:validation:Enum=openshift-samples +type ClusterVersionCapability string + +const ( + // ClusterVersionCapabilityOpenShiftSamples manages the sample + // image streams and templates stored in the openshift + // namespace, and any registry credentials, stored as a secret, + // needed for the image streams to import the images they + // reference. + ClusterVersionCapabilityOpenShiftSamples ClusterVersionCapability = "openshift-samples" +) + +// ClusterVersionCapabilitySet defines sets of cluster version capabilities. +// +kubebuilder:validation:Enum=None;v4.11;vCurrent +type ClusterVersionCapabilitySet string + +const ( + // ClusterVersionCapabilitySetNone is an empty set enabling + // no optional capabilities. + ClusterVersionCapabilitySetNone ClusterVersionCapabilitySet = "None" + + // ClusterVersionCapabilitySet4_11 is the recommended set of + // optional capabilities to enable for the 4.11 version of + // OpenShift. This list will remain the same no matter which + // version of OpenShift is installed. + ClusterVersionCapabilitySet4_11 ClusterVersionCapabilitySet = "v4.11" + + // ClusterVersionCapabilitySetCurrent is the recommended set + // of optional capabilities to enable for the cluster's + // current version of OpenShift. + ClusterVersionCapabilitySetCurrent ClusterVersionCapabilitySet = "vCurrent" +) + +// ClusterVersionCapabilitySets defines sets of cluster version capabilities. +var ClusterVersionCapabilitySets = map[ClusterVersionCapabilitySet][]ClusterVersionCapability{ + ClusterVersionCapabilitySetNone: {}, + ClusterVersionCapabilitySet4_11: { + ClusterVersionCapabilityOpenShiftSamples, + }, + ClusterVersionCapabilitySetCurrent: { + ClusterVersionCapabilityOpenShiftSamples, + }, +} + +// ClusterVersionCapabilitiesSpec selects the managed set of +// optional, core cluster components. +// +k8s:deepcopy-gen=true +type ClusterVersionCapabilitiesSpec struct { + // baselineCapabilitySet selects an initial set of + // optional capabilities to enable, which can be extended via + // additionalEnabledCapabilities. If unset, the cluster will + // choose a default, and the default may change over time. + // The current default is vCurrent. + // +optional + BaselineCapabilitySet ClusterVersionCapabilitySet `json:"baselineCapabilitySet,omitempty"` + + // additionalEnabledCapabilities extends the set of managed + // capabilities beyond the baseline defined in + // baselineCapabilitySet. The default is an empty set. + // +listType=atomic + // +optional + AdditionalEnabledCapabilities []ClusterVersionCapability `json:"additionalEnabledCapabilities,omitempty"` +} + +// ClusterVersionCapabilitiesStatus describes the state of optional, +// core cluster components. +// +k8s:deepcopy-gen=true +type ClusterVersionCapabilitiesStatus struct { + // enabledCapabilities lists all the capabilities that are currently managed. + // +listType=atomic + // +optional + EnabledCapabilities []ClusterVersionCapability `json:"enabledCapabilities,omitempty"` + + // knownCapabilities lists all the capabilities known to the current cluster. + // +listType=atomic + // +optional + KnownCapabilities []ClusterVersionCapability `json:"knownCapabilities,omitempty"` +} + // ComponentOverride allows overriding cluster version operator's behavior // for a component. // +k8s:deepcopy-gen=true diff --git a/vendor/github.com/openshift/api/config/v1/types_feature.go b/vendor/github.com/openshift/api/config/v1/types_feature.go index 032673069f..52015391d6 100644 --- a/vendor/github.com/openshift/api/config/v1/types_feature.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -111,13 +111,9 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ Disabled: []string{}, }, TechPreviewNoUpgrade: newDefaultFeatures(). - with("CSIDriverAzureDisk"). // sig-storage, jsafrane, OCP specific with("CSIDriverAzureFile"). // sig-storage, fbertina, OCP specific - with("CSIDriverVSphere"). // sig-storage, jsafrane, OCP specific with("CSIMigrationAWS"). // sig-storage, jsafrane, Kubernetes feature gate - with("CSIMigrationOpenStack"). // sig-storage, jsafrane, Kubernetes feature gate with("CSIMigrationGCE"). // sig-storage, fbertina, Kubernetes feature gate - with("CSIMigrationAzureDisk"). // sig-storage, fbertina, Kubernetes feature gate with("CSIMigrationAzureFile"). // sig-storage, fbertina, Kubernetes feature gate with("CSIMigrationvSphere"). // sig-storage, fbertina, Kubernetes feature gate with("ExternalCloudProvider"). // sig-cloud-provider, jspeed, OCP specific @@ -147,9 +143,7 @@ var defaultFeatures = &FeatureGateEnabledDisabled{ }, Disabled: []string{ "CSIMigrationAWS", // sig-storage, jsafrane - "CSIMigrationOpenStack", // sig-storage, jsafrane "CSIMigrationGCE", // sig-storage, jsafrane - "CSIMigrationAzureDisk", // sig-storage, jsafrane "CSIMigrationAzureFile", // sig-storage, jsafrane "CSIMigrationvSphere", // sig-storage, jsafrane }, diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go index 97ddfece0b..f28ca70d00 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.deepcopy.go @@ -984,6 +984,53 @@ func (in *ClusterVersion) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVersionCapabilitiesSpec) DeepCopyInto(out *ClusterVersionCapabilitiesSpec) { + *out = *in + if in.AdditionalEnabledCapabilities != nil { + in, out := &in.AdditionalEnabledCapabilities, &out.AdditionalEnabledCapabilities + *out = make([]ClusterVersionCapability, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionCapabilitiesSpec. +func (in *ClusterVersionCapabilitiesSpec) DeepCopy() *ClusterVersionCapabilitiesSpec { + if in == nil { + return nil + } + out := new(ClusterVersionCapabilitiesSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVersionCapabilitiesStatus) DeepCopyInto(out *ClusterVersionCapabilitiesStatus) { + *out = *in + if in.EnabledCapabilities != nil { + in, out := &in.EnabledCapabilities, &out.EnabledCapabilities + *out = make([]ClusterVersionCapability, len(*in)) + copy(*out, *in) + } + if in.KnownCapabilities != nil { + in, out := &in.KnownCapabilities, &out.KnownCapabilities + *out = make([]ClusterVersionCapability, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionCapabilitiesStatus. +func (in *ClusterVersionCapabilitiesStatus) DeepCopy() *ClusterVersionCapabilitiesStatus { + if in == nil { + return nil + } + out := new(ClusterVersionCapabilitiesStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterVersionList) DeepCopyInto(out *ClusterVersionList) { *out = *in @@ -1025,6 +1072,11 @@ func (in *ClusterVersionSpec) DeepCopyInto(out *ClusterVersionSpec) { *out = new(Update) **out = **in } + if in.Capabilities != nil { + in, out := &in.Capabilities, &out.Capabilities + *out = new(ClusterVersionCapabilitiesSpec) + (*in).DeepCopyInto(*out) + } if in.Overrides != nil { in, out := &in.Overrides, &out.Overrides *out = make([]ComponentOverride, len(*in)) @@ -1054,6 +1106,7 @@ func (in *ClusterVersionStatus) DeepCopyInto(out *ClusterVersionStatus) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + in.Capabilities.DeepCopyInto(&out.Capabilities) if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]ClusterOperatorStatusCondition, len(*in)) diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index 811becd56e..020cdded5e 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -548,6 +548,26 @@ func (ClusterVersion) SwaggerDoc() map[string]string { return map_ClusterVersion } +var map_ClusterVersionCapabilitiesSpec = map[string]string{ + "": "ClusterVersionCapabilitiesSpec selects the managed set of optional, core cluster components.", + "baselineCapabilitySet": "baselineCapabilitySet selects an initial set of optional capabilities to enable, which can be extended via additionalEnabledCapabilities. If unset, the cluster will choose a default, and the default may change over time. The current default is vCurrent.", + "additionalEnabledCapabilities": "additionalEnabledCapabilities extends the set of managed capabilities beyond the baseline defined in baselineCapabilitySet. The default is an empty set.", +} + +func (ClusterVersionCapabilitiesSpec) SwaggerDoc() map[string]string { + return map_ClusterVersionCapabilitiesSpec +} + +var map_ClusterVersionCapabilitiesStatus = map[string]string{ + "": "ClusterVersionCapabilitiesStatus describes the state of optional, core cluster components.", + "enabledCapabilities": "enabledCapabilities lists all the capabilities that are currently managed.", + "knownCapabilities": "knownCapabilities lists all the capabilities known to the current cluster.", +} + +func (ClusterVersionCapabilitiesStatus) SwaggerDoc() map[string]string { + return map_ClusterVersionCapabilitiesStatus +} + var map_ClusterVersionList = map[string]string{ "": "ClusterVersionList is a list of ClusterVersion resources.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", } @@ -562,6 +582,7 @@ var map_ClusterVersionSpec = map[string]string{ "desiredUpdate": "desiredUpdate is an optional field that indicates the desired value of the cluster version. Setting this value will trigger an upgrade (if the current version does not match the desired version). The set of recommended update values is listed as part of available updates in status, and setting values outside that range may cause the upgrade to fail. You may specify the version field without setting image if an update exists with that version in the availableUpdates or history.\n\nIf an upgrade fails the operator will halt and report status about the failing component. Setting the desired update value back to the previous version will cause a rollback to be attempted. Not all rollbacks will succeed.", "upstream": "upstream may be used to specify the preferred update server. By default it will use the appropriate update server for the cluster and region.", "channel": "channel is an identifier for explicitly requesting that a non-default set of updates be applied to this cluster. The default channel will be contain stable updates that are appropriate for production clusters.", + "capabilities": "capabilities configures the installation of optional, core cluster components. A null value here is identical to an empty object; see the child properties for default semantics.", "overrides": "overrides is list of overides for components that are managed by cluster version operator. Marking a component unmanaged will prevent the operator from creating or updating the object.", } @@ -575,6 +596,7 @@ var map_ClusterVersionStatus = map[string]string{ "history": "history contains a list of the most recent versions applied to the cluster. This value may be empty during cluster startup, and then will be updated when a new update is being applied. The newest update is first in the list and it is ordered by recency. Updates in the history have state Completed if the rollout completed - if an update was failing or halfway applied the state will be Partial. Only a limited amount of update history is preserved.", "observedGeneration": "observedGeneration reports which version of the spec is being synced. If this value is not equal to metadata.generation, then the desired and conditions fields may represent a previous version.", "versionHash": "versionHash is a fingerprint of the content that the cluster will be updated with. It is used by the operator to avoid unnecessary work and is for internal use only.", + "capabilities": "capabilities describes the state of optional, core cluster components.", "conditions": "conditions provides information about the cluster version. The condition \"Available\" is set to true if the desiredUpdate has been reached. The condition \"Progressing\" is set to true if an update is being applied. The condition \"Degraded\" is set to true if an update is currently blocked by a temporary or permanent error. Conditions are only valid for the current desiredUpdate when metadata.generation is equal to status.generation.", "availableUpdates": "availableUpdates contains updates recommended for this cluster. Updates which appear in conditionalUpdates but not in availableUpdates may expose this cluster to known issues. This list may be empty if no updates are recommended, if the update service is unavailable, or if an invalid channel has been specified.", "conditionalUpdates": "conditionalUpdates contains the list of updates that may be recommended for this cluster if it meets specific required conditions. Consumers interested in the set of updates that are actually recommended for this cluster should use availableUpdates. This list may be empty if no updates are recommended, if the update service is unavailable, or if an empty or invalid channel has been specified.", diff --git a/vendor/github.com/openshift/api/machine/v1/0000_10_awsplacementgroup.crd.yaml b/vendor/github.com/openshift/api/machine/v1/0000_10_awsplacementgroup.crd.yaml new file mode 100644 index 0000000000..e6031e1600 --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/0000_10_awsplacementgroup.crd.yaml @@ -0,0 +1,187 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + exclude.release.openshift.io/internal-openshift-hosted: "true" + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + api-approved.openshift.io: https://github.com/openshift/api/pull/1091 + name: awsplacementgroups.machine.openshift.io +spec: + group: machine.openshift.io + names: + kind: AWSPlacementGroup + listKind: AWSPlacementGroupList + plural: awsplacementgroups + singular: awsplacementgroup + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Placement Group Type + jsonPath: .status.observedConfiguration.groupType + name: Type + type: string + - description: Management State + jsonPath: .spec.managementSpec.managementState + name: Management + type: string + - description: EC2 Replicas within the Placement Group + jsonPath: .status.replicas + name: Replicas + type: integer + - description: AWSPlacementGroup age + jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + description: 'AWSPlacementGroup ensures that a placement group matching the given configuration exists within AWS Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).' + type: object + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + type: object + required: + - managementSpec + properties: + credentialsSecret: + description: CredentialsSecret is a reference to the secret with AWS credentials. The secret must reside in the same namespace as the AWSPlacementGroup resource. Otherwise, the controller will leverage the EC2 instance assigned IAM Role, in OpenShift this will always be the Control Plane Machine IAM Role. + type: object + properties: + name: + description: Name of the Secret. + type: string + managementSpec: + description: AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group. + type: object + required: + - managementState + properties: + managed: + description: Managed defines the configuration for the placement groups to be created. Updates to the configuration will not be observed as placement groups are immutable after creation. + type: object + required: + - groupType + properties: + groupType: + description: 'GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are "Cluster", "Partition", "Spread". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is "Spread", Machines created within the group may no have placement.tenancy set to "dedicated".' + type: string + enum: + - Cluster + - Partition + - Spread + partition: + description: Partition defines the configuration of a partition placement group. + type: object + properties: + count: + description: 'Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines created within the group is unavailable.' + type: integer + format: int32 + maximum: 7 + minimum: 1 + managementState: + description: ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. + type: string + status: + type: object + properties: + conditions: + description: 'Conditions represents the observations of the AWSPlacementGroup''s current state. Known .status.conditions.type are: Ready, Deleting' + type: array + items: + description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo's current state. // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + type: object + required: + - lastTransitionTime + - message + - reason + - status + - type + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + type: string + format: date-time + message: + description: message is a human readable message indicating details about the transition. This may be an empty string. + type: string + maxLength: 32768 + observedGeneration: + description: observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + type: integer + format: int64 + minimum: 0 + reason: + description: reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + type: string + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + status: + description: status of the condition, one of True, False, Unknown. + type: string + enum: + - "True" + - "False" + - Unknown + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + type: string + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + expiresAt: + description: ExpiresAt identifies when the observed configuration is valid until. The observed configuration should not be trusted if this time has passed. The AWSPlacementGroup controller will attempt to update the status before it expires. + type: string + format: date-time + managementState: + description: ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. This value is owned by the controller and may differ from the spec in cases when a user attempts to manage a previously unmanaged placement group. + type: string + observedConfiguration: + description: ObservedConfiguration represents the configuration present on the placement group on AWS. + type: object + required: + - groupType + properties: + groupType: + description: 'GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are "Cluster", "Partition", "Spread". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is "Spread", Machines created within the group may no have placement.tenancy set to "dedicated".' + type: string + enum: + - Cluster + - Partition + - Spread + partition: + description: Partition defines the configuration of a partition placement group. + type: object + properties: + count: + description: 'Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines created within the group is unavailable.' + type: integer + format: int32 + maximum: 7 + minimum: 1 + replicas: + description: 'Replicas counts how many AWS EC2 instances are present within the placement group. Note: This is a pointer to be able to distinguish between an empty placement group and the status having not yet been observed.' + type: integer + format: int32 + served: true + storage: true + subresources: + status: {} +status: + acceptedNames: + kind: "" + plural: "" + conditions: [] + storedVersions: [] diff --git a/vendor/github.com/openshift/api/machine/v1/common.go b/vendor/github.com/openshift/api/machine/v1/common.go new file mode 100644 index 0000000000..941d22b1cc --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/common.go @@ -0,0 +1,13 @@ +package v1 + +// InstanceTenancy indicates if instance should run on shared or single-tenant hardware. +type InstanceTenancy string + +const ( + // DefaultTenancy instance runs on shared hardware + DefaultTenancy InstanceTenancy = "default" + // DedicatedTenancy instance runs on single-tenant hardware + DedicatedTenancy InstanceTenancy = "dedicated" + // HostTenancy instance runs on a Dedicated Host, which is an isolated server with configurations that you can control. + HostTenancy InstanceTenancy = "host" +) diff --git a/vendor/github.com/openshift/api/machine/v1/doc.go b/vendor/github.com/openshift/api/machine/v1/doc.go new file mode 100644 index 0000000000..7bd97c9507 --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/doc.go @@ -0,0 +1,7 @@ +// +k8s:deepcopy-gen=package,register +// +k8s:defaulter-gen=TypeMeta +// +k8s:openapi-gen=true + +// +kubebuilder:validation:Optional +// +groupName=machine.openshift.io +package v1 diff --git a/vendor/github.com/openshift/api/machine/v1/register.go b/vendor/github.com/openshift/api/machine/v1/register.go new file mode 100644 index 0000000000..6df0afa057 --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/register.go @@ -0,0 +1,27 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + GroupName = "machine.openshift.io" + GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + // Install is a function which adds this version to a scheme + Install = schemeBuilder.AddToScheme +) + +// Adds the list of known types to api.Scheme. +func addKnownTypes(scheme *runtime.Scheme) error { + metav1.AddToGroupVersion(scheme, GroupVersion) + + scheme.AddKnownTypes(GroupVersion, + &AWSPlacementGroup{}, + &AWSPlacementGroupList{}, + ) + + return nil +} diff --git a/vendor/github.com/openshift/api/machine/v1/types.go b/vendor/github.com/openshift/api/machine/v1/types.go new file mode 100644 index 0000000000..98c2e17b04 --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/types.go @@ -0,0 +1,21 @@ +package v1 + +// ManagementState denotes whether the resource is expected to be managed by the controller or by the user. +type ManagementState string + +const ( + // ManagedManagementState denotes that the resource is expected to be managed by the controller. + ManagedManagementState ManagementState = "Managed" + + // UnmanagedManagementState denotes that the resource is expected to be managed by the user. + UnmanagedManagementState ManagementState = "Unmanaged" +) + +// LocalSecretReference contains enough information to let you locate the +// referenced Secret inside the same namespace. +// +structType=atomic +type LocalSecretReference struct { + // Name of the Secret. + // +kubebuilder:validation:=Required + Name string `json:"name"` +} diff --git a/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go b/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go new file mode 100644 index 0000000000..dc5d5b274e --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go @@ -0,0 +1,365 @@ +/* +Copyright 2021 The Kubernetes Authors. + +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. +*/ + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// AlibabaDiskPerformanceLevel enum attribute to describe a disk's performance level +type AlibabaDiskPerformanceLevel string + +// AlibabaDiskCatagory enum attribute to deescribe a disk's category +type AlibabaDiskCategory string + +// AlibabaDiskEncryptionMode enum attribute to describe whether to enable or disable disk encryption +type AlibabaDiskEncryptionMode string + +// AlibabaDiskPreservationPolicy enum attribute to describe whether to preserve or delete a disk upon instance removal +type AlibabaDiskPreservationPolicy string + +// AlibabaResourceReferenceType enum attribute to identify the type of resource reference +type AlibabaResourceReferenceType string + +const ( + // DeleteWithInstance enum property to delete disk with instance deletion + DeleteWithInstance AlibabaDiskPreservationPolicy = "DeleteWithInstance" + // PreserveDisk enum property to determine disk preservation with instance deletion + PreserveDisk AlibabaDiskPreservationPolicy = "PreserveDisk" + + // AlibabaDiskEncryptionEnabled enum property to enable disk encryption + AlibabaDiskEncryptionEnabled AlibabaDiskEncryptionMode = "encrypted" + // AlibabaDiskEncryptionDisabled enum property to disable disk encryption + AlibabaDiskEncryptionDisabled AlibabaDiskEncryptionMode = "disabled" + + // AlibabaDiskPerformanceLevel0 enum property to set the level at PL0 + PL0 AlibabaDiskPerformanceLevel = "PL0" + // AlibabaDiskPerformanceLevel1 enum property to set the level at PL1 + PL1 AlibabaDiskPerformanceLevel = "PL1" + // AlibabaDiskPerformanceLevel2 enum property to set the level at PL2 + PL2 AlibabaDiskPerformanceLevel = "PL2" + // AlibabaDiskPerformanceLevel3 enum property to set the level at PL3 + PL3 AlibabaDiskPerformanceLevel = "PL3" + + // AlibabaDiskCategoryUltraDisk enum proprty to set the category of disk to ultra disk + AlibabaDiskCatagoryUltraDisk AlibabaDiskCategory = "cloud_efficiency" + // AlibabaDiskCategorySSD enum proprty to set the category of disk to standard SSD + AlibabaDiskCatagorySSD AlibabaDiskCategory = "cloud_ssd" + // AlibabaDiskCategoryESSD enum proprty to set the category of disk to ESSD + AlibabaDiskCatagoryESSD AlibabaDiskCategory = "cloud_essd" + // AlibabaDiskCategoryBasic enum proprty to set the category of disk to basic + AlibabaDiskCatagoryBasic AlibabaDiskCategory = "cloud" + + // AlibabaResourceReferenceTypeID enum property to identify an ID type resource reference + AlibabaResourceReferenceTypeID AlibabaResourceReferenceType = "ID" + // AlibabaResourceReferenceTypeName enum property to identify an Name type resource reference + AlibabaResourceReferenceTypeName AlibabaResourceReferenceType = "Name" + // AlibabaResourceReferenceTypeTags enum property to identify a tags type resource reference + AlibabaResourceReferenceTypeTags AlibabaResourceReferenceType = "Tags" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AlibabaCloudMachineProviderConfig is the Schema for the alibabacloudmachineproviderconfig API +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +// +k8s:openapi-gen=true +type AlibabaCloudMachineProviderConfig struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // More detail about alibabacloud ECS + // https://www.alibabacloud.com/help/doc-detail/25499.htm?spm=a2c63.l28256.b99.727.496d7453jF7Moz + + //The instance type of the instance. + InstanceType string `json:"instanceType"` + + // The ID of the vpc + VpcID string `json:"vpcId"` + + // The ID of the region in which to create the instance. You can call the DescribeRegions operation to query the most recent region list. + RegionID string `json:"regionId"` + + // The ID of the zone in which to create the instance. You can call the DescribeZones operation to query the most recent region list. + ZoneID string `json:"zoneId"` + + // The ID of the image used to create the instance. + ImageID string `json:"imageId"` + + // DataDisks holds information regarding the extra disks attached to the instance + // +optional + DataDisks []DataDiskProperties `json:"dataDisk,omitempty"` + + // SecurityGroups is a list of security group references to assign to the instance. + // A reference holds either the security group ID, the resource name, or the required tags to search. + // When more than one security group is returned for a tag search, all the groups are associated with the instance up to the + // maximum number of security groups to which an instance can belong. + // For more information, see the "Security group limits" section in Limits. + // https://www.alibabacloud.com/help/en/doc-detail/25412.htm + SecurityGroups []AlibabaResourceReference `json:"securityGroups,omitempty"` + + // Bandwidth describes the internet bandwidth strategy for the instance + // +optional + Bandwidth BandwidthProperties `json:"bandwidth,omitempty"` + + // SystemDisk holds the properties regarding the system disk for the instance + // +optional + SystemDisk SystemDiskProperties `json:"systemDisk,omitempty"` + + // VSwitch is a reference to the vswitch to use for this instance. + // A reference holds either the vSwitch ID, the resource name, or the required tags to search. + // When more than one vSwitch is returned for a tag search, only the first vSwitch returned will be used. + // This parameter is required when you create an instance of the VPC type. + // You can call the DescribeVSwitches operation to query the created vSwitches. + VSwitch AlibabaResourceReference `json:"vSwitch"` + + // RAMRoleName is the name of the instance Resource Access Management (RAM) role. This allows the instance to perform API calls as this specified RAM role. + // +optional + RAMRoleName string `json:"ramRoleName,omitempty"` + + // ResourceGroup references the resource group to which to assign the instance. + // A reference holds either the resource group ID, the resource name, or the required tags to search. + // When more than one resource group are returned for a search, an error will be produced and the Machine will not be created. + // Resource Groups do not support searching by tags. + ResourceGroup AlibabaResourceReference `json:"resourceGroup"` + + // Tenancy specifies whether to create the instance on a dedicated host. + // Valid values: + // + // default: creates the instance on a non-dedicated host. + // host: creates the instance on a dedicated host. If you do not specify the DedicatedHostID parameter, Alibaba Cloud automatically selects a dedicated host for the instance. + // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. + // Currently the default is `default`. + // +optional + Tenancy InstanceTenancy `json:"tenancy,omitempty"` + + // UserDataSecret contains a local reference to a secret that contains the + // UserData to apply to the instance + // +optional + UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"` + + // CredentialsSecret is a reference to the secret with alibabacloud credentials. Otherwise, defaults to permissions + // provided by attached RAM role where the actuator is running. + // +optional + CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` + + // Tags are the set of metadata to add to an instance. + // +optional + Tags []Tag `json:"tag,omitempty"` +} + +// ResourceTagReference is a reference to a specific AlibabaCloud resource by ID, or tags. +// Only one of ID or Tags may be specified. Specifying more than one will result in +// a validation error. +type AlibabaResourceReference struct { + // type identifies the resource reference type for this entry. + Type AlibabaResourceReferenceType `json:"type"` + + // ID of resource + // +optional + ID *string `json:"id,omitempty"` + + // Name of the resource + // +optional + Name *string `json:"name,omitempty"` + + // Tags is a set of metadata based upon ECS object tags used to identify a resource. + // For details about usage when multiple resources are found, please see the owning parent field documentation. + // +optional + Tags *[]Tag `json:"tags,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AlibabaCloudMachineProviderConfigList contains a list of AlibabaCloudMachineProviderConfig +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type AlibabaCloudMachineProviderConfigList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []AlibabaCloudMachineProviderConfig `json:"items"` +} + +// AlibabaCloudMachineProviderStatus is the Schema for the alibabacloudmachineproviderconfig API +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +//+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +type AlibabaCloudMachineProviderStatus struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + // InstanceID is the instance ID of the machine created in alibabacloud + // +optional + InstanceID *string `json:"instanceId,omitempty"` + + // InstanceState is the state of the alibabacloud instance for this machine + // +optional + InstanceState *string `json:"instanceState,omitempty"` + + // Conditions is a set of conditions associated with the Machine to indicate + // errors or other status + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +// SystemDiskProperties contains the information regarding the system disk including performance, size, name, and category +type SystemDiskProperties struct { + // Category is the category of the system disk. + // Valid values: + // cloud_essd: ESSD. When the parameter is set to this value, you can use the SystemDisk.PerformanceLevel parameter to specify the performance level of the disk. + // cloud_efficiency: ultra disk. + // cloud_ssd: standard SSD. + // cloud: basic disk. + // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. + // Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. + // Currently for other instances, the default is `cloud_efficiency`. + // +kubebuilder:validation:Enum="cloud_efficiency"; "cloud_ssd"; "cloud_essd"; "cloud" + // +optional + Category string `json:"category,omitempty"` + + // PerformanceLevel is the performance level of the ESSD used as the system disk. + // Valid values: + // + // PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. + // PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. + // PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. + // PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. + // Empty value means no opinion and the platform chooses a default, which is subject to change over time. + // Currently the default is `PL1`. + // For more information about ESSD performance levels, see ESSDs. + // +kubebuilder:validation:Enum="PL0"; "PL1"; "PL2"; "PL3" + // +optional + PerformanceLevel string `json:"performanceLevel,omitempty"` + + // Name is the name of the system disk. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-). + // Empty value means the platform chooses a default, which is subject to change over time. + // Currently the default is `""`. + // +kubebuilder:validation:MaxLength=128 + // +optional + Name string `json:"name,omitempty"` + + // Size is the size of the system disk. Unit: GiB. Valid values: 20 to 500. + // The value must be at least 20 and greater than or equal to the size of the image. + // Empty value means the platform chooses a default, which is subject to change over time. + // Currently the default is `40` or the size of the image depending on whichever is greater. + // +optional + Size int64 `json:"size,omitempty"` +} + +// DataDisk contains the information regarding the datadisk attached to an instance +type DataDiskProperties struct { + // Name is the name of data disk N. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-). + // + // Empty value means the platform chooses a default, which is subject to change over time. + // Currently the default is `""`. + // +optional + Name string `name:"diskName,omitempty"` + + // SnapshotID is the ID of the snapshot used to create data disk N. Valid values of N: 1 to 16. + // + // When the DataDisk.N.SnapshotID parameter is specified, the DataDisk.N.Size parameter is ignored. The data disk is created based on the size of the specified snapshot. + // Use snapshots created after July 15, 2013. Otherwise, an error is returned and your request is rejected. + // + // +optional + SnapshotID string `name:"snapshotId,omitempty"` + + // Size of the data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values: + // + // Valid values when DataDisk.N.Category is set to cloud_efficiency: 20 to 32768 + // Valid values when DataDisk.N.Category is set to cloud_ssd: 20 to 32768 + // Valid values when DataDisk.N.Category is set to cloud_essd: 20 to 32768 + // Valid values when DataDisk.N.Category is set to cloud: 5 to 2000 + // The value of this parameter must be greater than or equal to the size of the snapshot specified by the SnapshotID parameter. + // +optional + Size int64 `name:"size,omitempty"` + + // DiskEncryption specifies whether to encrypt data disk N. + // + // Empty value means the platform chooses a default, which is subject to change over time. + // Currently the default is `disabled`. + // +kubebuilder:validation:Enum="encrypted";"disabled" + // +optional + DiskEncryption AlibabaDiskEncryptionMode `name:"diskEncryption,omitempty"` + + // PerformanceLevel is the performance level of the ESSD used as as data disk N. The N value must be the same as that in DataDisk.N.Category when DataDisk.N.Category is set to cloud_essd. + // Empty value means no opinion and the platform chooses a default, which is subject to change over time. + // Currently the default is `PL1`. + // Valid values: + // + // PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. + // PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. + // PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. + // PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. + // For more information about ESSD performance levels, see ESSDs. + // +kubebuilder:validation:Enum="PL0"; "PL1"; "PL2"; "PL3" + // +optional + PerformanceLevel AlibabaDiskPerformanceLevel `name:"performanceLevel,omitempty"` + + // Category describes the type of data disk N. + // Valid values: + // cloud_efficiency: ultra disk + // cloud_ssd: standard SSD + // cloud_essd: ESSD + // cloud: basic disk + // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. + // Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. + // Currently for other instances, the default is `cloud_efficiency`. + // +kubebuilder:validation:Enum="cloud_efficiency"; "cloud_ssd"; "cloud_essd"; "cloud" + // +optional + Category AlibabaDiskCategory `name:"category,omitempty"` + + // KMSKeyID is the ID of the Key Management Service (KMS) key to be used by data disk N. + // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. + // Currently the default is `""` which is interpreted as do not use KMSKey encryption. + // +optional + KMSKeyID string `name:"kmsKeyId,omitempty"` + + // DiskPreservation specifies whether to release data disk N along with the instance. + // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. + // Currently the default is `DeleteWithInstance` + // +kubebuilder:validation:Enum="DeleteWithInstance";"PreserveDisk" + // +optional + DiskPreservation AlibabaDiskPreservationPolicy `name:"diskPreservation,omitempty"` +} + +// Tag The tags of ECS Instance +type Tag struct { + // Key is the name of the key pair + Key string `name:"Key"` + // Value is the value or data of the key pair + Value string `name:"value"` +} + +// Bandwidth describes the bandwidth strategy for the network of the instance +type BandwidthProperties struct { + // InternetMaxBandwidthIn is the maximum inbound public bandwidth. Unit: Mbit/s. Valid values: + // When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10. + // Currently the default is `10` when outbound bandwidth is less than or equal to 10 Mbit/s. + // When the purchased outbound public bandwidth is greater than 10, the valid values are 1 to the InternetMaxBandwidthOut value. + // Currently the default is the value used for `InternetMaxBandwidthOut` when outbound public bandwidth is greater than 10. + // +optional + InternetMaxBandwidthIn int64 `json:"internetMaxBandwidthIn,omitempty"` + + // InternetMaxBandwidthOut is the maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. + // When a value greater than 0 is used then a public IP address is assigned to the instance. + // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. + // Currently the default is `0` + // +optional + InternetMaxBandwidthOut int64 `json:"internetMaxBandwidthOut,omitempty"` +} diff --git a/vendor/github.com/openshift/api/machine/v1/types_awsplacementgroup.go b/vendor/github.com/openshift/api/machine/v1/types_awsplacementgroup.go new file mode 100644 index 0000000000..4a091aec12 --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/types_awsplacementgroup.go @@ -0,0 +1,164 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AWSPlacementGroup ensures that a placement group matching the given configuration exists within AWS +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +// +k8s:openapi-gen=true +// +kubebuilder:subresource:status +// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".status.observedConfiguration.groupType",description="Placement Group Type" +// +kubebuilder:printcolumn:name="Management",type="string",JSONPath=".spec.managementSpec.managementState",description="Management State" +// +kubebuilder:printcolumn:name="Replicas",type="integer",JSONPath=".status.replicas",description="EC2 Replicas within the Placement Group" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="AWSPlacementGroup age" +type AWSPlacementGroup struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec AWSPlacementGroupSpec `json:"spec,omitempty"` + Status AWSPlacementGroupStatus `json:"status,omitempty"` +} + +type AWSPlacementGroupSpec struct { + // AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group. + // +kubebuilder:validation:Required + ManagementSpec AWSPlacementGroupManagementSpec `json:"managementSpec"` + + // CredentialsSecret is a reference to the secret with AWS credentials. The secret must reside in the same namespace + // as the AWSPlacementGroup resource. Otherwise, the controller will leverage the EC2 instance assigned IAM Role, + // in OpenShift this will always be the Control Plane Machine IAM Role. + // +optional + CredentialsSecret *LocalSecretReference `json:"credentialsSecret,omitempty"` +} + +// AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group. +// +union +type AWSPlacementGroupManagementSpec struct { + // ManagementState determines whether the placement group is expected + // to be managed by this CRD or whether it is user managed. + // A managed placement group may be moved to unmanaged, however an unmanaged + // group may not be moved back to managed. + // +kubebuilder:validation:Required + // +unionDiscriminator + ManagementState ManagementState `json:"managementState"` + + // Managed defines the configuration for the placement groups to be created. + // Updates to the configuration will not be observed as placement groups are immutable + // after creation. + // +optional + Managed *ManagedAWSPlacementGroup `json:"managed,omitempty"` +} + +// AWSPlacementGroupType represents the valid values for the Placement GroupType field. +type AWSPlacementGroupType string + +const ( + // AWSClusterPlacementGroupType is the "Cluster" placement group type. + // Cluster placement groups place instances close together to improve network latency and throughput. + AWSClusterPlacementGroupType AWSPlacementGroupType = "Cluster" + // AWSPartitionPlacementGroupType is the "Partition" placement group type. + // Partition placement groups reduce the likelihood of hardware failures + // disrupting your application's availability. + // Partition placement groups are recommended for use with large scale + // distributed and replicated workloads. + AWSPartitionPlacementGroupType AWSPlacementGroupType = "Partition" + // AWSSpreadPlacementGroupType is the "Spread" placement group type. + // Spread placement groups place instances on distinct racks within the availability + // zone. This ensures instances each have their own networking and power source + // for maximum hardware fault tolerance. + // Spread placement groups are recommended for a small number of critical instances + // which must be kept separate from one another. + // Using a Spread placement group imposes a limit of seven instances within + // the placement group within a single availability zone. + AWSSpreadPlacementGroupType AWSPlacementGroupType = "Spread" +) + +// ManagedAWSPlacementGroup is a discriminated union of placement group configuration. +// +union +type ManagedAWSPlacementGroup struct { + // GroupType specifies the type of AWS placement group to use for this Machine. + // This parameter is only used when a Machine is being created and the named + // placement group does not exist. + // Valid values are "Cluster", "Partition", "Spread". + // This value is required and, in case a placement group already exists, will be + // validated against the existing placement group. + // Note: If the value of this field is "Spread", Machines created within the group + // may no have placement.tenancy set + // to "dedicated". + // +kubebuilder:validation:Enum:="Cluster";"Partition";"Spread" + // +unionDiscriminator + // +kubebuilder:validation:Required + GroupType AWSPlacementGroupType `json:"groupType,omitempty"` + + // Partition defines the configuration of a partition placement group. + // +optional + Partition *AWSPartitionPlacement `json:"partition,omitempty"` +} + +// AWSPartitionPlacement defines the configuration for partition placement groups. +type AWSPartitionPlacement struct { + // Count specifies the number of partitions for a Partition placement + // group. This value is only observed when creating a placement group and + // only when the `groupType` is set to `Partition`. + // Note the partition count of a placement group cannot be changed after creation. + // If unset, AWS will provide a default partition count. + // This default is currently 2. + // Note: When using more than 2 partitions, the "dedicated" tenancy option on Machines + // created within the group is unavailable. + // +kubebuilder:validation:Minimum:=1 + // +kubebuilder:validation:Maximum:=7 + // +optional + Count int32 `json:"count,omitempty"` +} + +type AWSPlacementGroupStatus struct { + // Conditions represents the observations of the AWSPlacementGroup's current state. + // Known .status.conditions.type are: Ready, Deleting + // +patchMergeKey=type + // +patchStrategy=merge + // +listType=map + // +listMapKey=type + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + + // ExpiresAt identifies when the observed configuration is valid until. + // The observed configuration should not be trusted if this time has passed. + // The AWSPlacementGroup controller will attempt to update the status before it expires. + // +optional + ExpiresAt *metav1.Time `json:"expiresAt,omitempty"` + + // Replicas counts how many AWS EC2 instances are present within the placement group. + // Note: This is a pointer to be able to distinguish between an empty placement group + // and the status having not yet been observed. + // +optional + Replicas *int32 `json:"replicas,omitempty"` + + // ManagementState determines whether the placement group is expected + // to be managed by this CRD or whether it is user managed. + // A managed placement group may be moved to unmanaged, however an unmanaged + // group may not be moved back to managed. + // This value is owned by the controller and may differ from the spec in cases + // when a user attempts to manage a previously unmanaged placement group. + // +optional + ManagementState ManagementState `json:"managementState,omitempty"` + + // ObservedConfiguration represents the configuration present on the placement group on AWS. + // +optional + ObservedConfiguration ManagedAWSPlacementGroup `json:"observedConfiguration,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AWSPlacementGroupList contains a list of AWSPlacementGroup +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type AWSPlacementGroupList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []AWSPlacementGroup `json:"items"` +} diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go new file mode 100644 index 0000000000..47484e7329 --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go @@ -0,0 +1,434 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSPartitionPlacement) DeepCopyInto(out *AWSPartitionPlacement) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPartitionPlacement. +func (in *AWSPartitionPlacement) DeepCopy() *AWSPartitionPlacement { + if in == nil { + return nil + } + out := new(AWSPartitionPlacement) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSPlacementGroup) DeepCopyInto(out *AWSPlacementGroup) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroup. +func (in *AWSPlacementGroup) DeepCopy() *AWSPlacementGroup { + if in == nil { + return nil + } + out := new(AWSPlacementGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AWSPlacementGroup) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSPlacementGroupList) DeepCopyInto(out *AWSPlacementGroupList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AWSPlacementGroup, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupList. +func (in *AWSPlacementGroupList) DeepCopy() *AWSPlacementGroupList { + if in == nil { + return nil + } + out := new(AWSPlacementGroupList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AWSPlacementGroupList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSPlacementGroupManagementSpec) DeepCopyInto(out *AWSPlacementGroupManagementSpec) { + *out = *in + if in.Managed != nil { + in, out := &in.Managed, &out.Managed + *out = new(ManagedAWSPlacementGroup) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupManagementSpec. +func (in *AWSPlacementGroupManagementSpec) DeepCopy() *AWSPlacementGroupManagementSpec { + if in == nil { + return nil + } + out := new(AWSPlacementGroupManagementSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSPlacementGroupSpec) DeepCopyInto(out *AWSPlacementGroupSpec) { + *out = *in + in.ManagementSpec.DeepCopyInto(&out.ManagementSpec) + if in.CredentialsSecret != nil { + in, out := &in.CredentialsSecret, &out.CredentialsSecret + *out = new(LocalSecretReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupSpec. +func (in *AWSPlacementGroupSpec) DeepCopy() *AWSPlacementGroupSpec { + if in == nil { + return nil + } + out := new(AWSPlacementGroupSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AWSPlacementGroupStatus) DeepCopyInto(out *AWSPlacementGroupStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.ExpiresAt != nil { + in, out := &in.ExpiresAt, &out.ExpiresAt + *out = (*in).DeepCopy() + } + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + in.ObservedConfiguration.DeepCopyInto(&out.ObservedConfiguration) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSPlacementGroupStatus. +func (in *AWSPlacementGroupStatus) DeepCopy() *AWSPlacementGroupStatus { + if in == nil { + return nil + } + out := new(AWSPlacementGroupStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AlibabaCloudMachineProviderConfig) DeepCopyInto(out *AlibabaCloudMachineProviderConfig) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.DataDisks != nil { + in, out := &in.DataDisks, &out.DataDisks + *out = make([]DataDiskProperties, len(*in)) + copy(*out, *in) + } + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]AlibabaResourceReference, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + out.Bandwidth = in.Bandwidth + out.SystemDisk = in.SystemDisk + in.VSwitch.DeepCopyInto(&out.VSwitch) + in.ResourceGroup.DeepCopyInto(&out.ResourceGroup) + if in.UserDataSecret != nil { + in, out := &in.UserDataSecret, &out.UserDataSecret + *out = new(corev1.LocalObjectReference) + **out = **in + } + if in.CredentialsSecret != nil { + in, out := &in.CredentialsSecret, &out.CredentialsSecret + *out = new(corev1.LocalObjectReference) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = make([]Tag, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudMachineProviderConfig. +func (in *AlibabaCloudMachineProviderConfig) DeepCopy() *AlibabaCloudMachineProviderConfig { + if in == nil { + return nil + } + out := new(AlibabaCloudMachineProviderConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AlibabaCloudMachineProviderConfig) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AlibabaCloudMachineProviderConfigList) DeepCopyInto(out *AlibabaCloudMachineProviderConfigList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]AlibabaCloudMachineProviderConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudMachineProviderConfigList. +func (in *AlibabaCloudMachineProviderConfigList) DeepCopy() *AlibabaCloudMachineProviderConfigList { + if in == nil { + return nil + } + out := new(AlibabaCloudMachineProviderConfigList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AlibabaCloudMachineProviderConfigList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AlibabaCloudMachineProviderStatus) DeepCopyInto(out *AlibabaCloudMachineProviderStatus) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + if in.InstanceID != nil { + in, out := &in.InstanceID, &out.InstanceID + *out = new(string) + **out = **in + } + if in.InstanceState != nil { + in, out := &in.InstanceState, &out.InstanceState + *out = new(string) + **out = **in + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudMachineProviderStatus. +func (in *AlibabaCloudMachineProviderStatus) DeepCopy() *AlibabaCloudMachineProviderStatus { + if in == nil { + return nil + } + out := new(AlibabaCloudMachineProviderStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AlibabaCloudMachineProviderStatus) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AlibabaResourceReference) DeepCopyInto(out *AlibabaResourceReference) { + *out = *in + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Tags != nil { + in, out := &in.Tags, &out.Tags + *out = new([]Tag) + if **in != nil { + in, out := *in, *out + *out = make([]Tag, len(*in)) + copy(*out, *in) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaResourceReference. +func (in *AlibabaResourceReference) DeepCopy() *AlibabaResourceReference { + if in == nil { + return nil + } + out := new(AlibabaResourceReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BandwidthProperties) DeepCopyInto(out *BandwidthProperties) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BandwidthProperties. +func (in *BandwidthProperties) DeepCopy() *BandwidthProperties { + if in == nil { + return nil + } + out := new(BandwidthProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DataDiskProperties) DeepCopyInto(out *DataDiskProperties) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDiskProperties. +func (in *DataDiskProperties) DeepCopy() *DataDiskProperties { + if in == nil { + return nil + } + out := new(DataDiskProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalSecretReference) DeepCopyInto(out *LocalSecretReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSecretReference. +func (in *LocalSecretReference) DeepCopy() *LocalSecretReference { + if in == nil { + return nil + } + out := new(LocalSecretReference) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ManagedAWSPlacementGroup) DeepCopyInto(out *ManagedAWSPlacementGroup) { + *out = *in + if in.Partition != nil { + in, out := &in.Partition, &out.Partition + *out = new(AWSPartitionPlacement) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedAWSPlacementGroup. +func (in *ManagedAWSPlacementGroup) DeepCopy() *ManagedAWSPlacementGroup { + if in == nil { + return nil + } + out := new(ManagedAWSPlacementGroup) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SystemDiskProperties) DeepCopyInto(out *SystemDiskProperties) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemDiskProperties. +func (in *SystemDiskProperties) DeepCopy() *SystemDiskProperties { + if in == nil { + return nil + } + out := new(SystemDiskProperties) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Tag) DeepCopyInto(out *Tag) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tag. +func (in *Tag) DeepCopy() *Tag { + if in == nil { + return nil + } + out := new(Tag) + in.DeepCopyInto(out) + return out +} diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go new file mode 100644 index 0000000000..e560f9f497 --- /dev/null +++ b/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go @@ -0,0 +1,192 @@ +package v1 + +// This file contains a collection of methods that can be used from go-restful to +// generate Swagger API documentation for its models. Please read this PR for more +// information on the implementation: https://github.com/emicklei/go-restful/pull/215 +// +// TODOs are ignored from the parser (e.g. TODO(andronat):... || TODO:...) if and only if +// they are on one line! For multiple line or blocks that you want to ignore use ---. +// Any context after a --- is ignored. +// +// Those methods can be generated by using hack/update-swagger-docs.sh + +// AUTO-GENERATED FUNCTIONS START HERE +var map_LocalSecretReference = map[string]string{ + "": "LocalSecretReference contains enough information to let you locate the referenced Secret inside the same namespace.", + "name": "Name of the Secret.", +} + +func (LocalSecretReference) SwaggerDoc() map[string]string { + return map_LocalSecretReference +} + +var map_AlibabaCloudMachineProviderConfig = map[string]string{ + "": "AlibabaCloudMachineProviderConfig is the Schema for the alibabacloudmachineproviderconfig API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "instanceType": "The instance type of the instance.", + "vpcId": "The ID of the vpc", + "regionId": "The ID of the region in which to create the instance. You can call the DescribeRegions operation to query the most recent region list.", + "zoneId": "The ID of the zone in which to create the instance. You can call the DescribeZones operation to query the most recent region list.", + "imageId": "The ID of the image used to create the instance.", + "dataDisk": "DataDisks holds information regarding the extra disks attached to the instance", + "securityGroups": "SecurityGroups is a list of security group references to assign to the instance. A reference holds either the security group ID, the resource name, or the required tags to search. When more than one security group is returned for a tag search, all the groups are associated with the instance up to the maximum number of security groups to which an instance can belong. For more information, see the \"Security group limits\" section in Limits. https://www.alibabacloud.com/help/en/doc-detail/25412.htm", + "bandwidth": "Bandwidth describes the internet bandwidth strategy for the instance", + "systemDisk": "SystemDisk holds the properties regarding the system disk for the instance", + "vSwitch": "VSwitch is a reference to the vswitch to use for this instance. A reference holds either the vSwitch ID, the resource name, or the required tags to search. When more than one vSwitch is returned for a tag search, only the first vSwitch returned will be used. This parameter is required when you create an instance of the VPC type. You can call the DescribeVSwitches operation to query the created vSwitches.", + "ramRoleName": "RAMRoleName is the name of the instance Resource Access Management (RAM) role. This allows the instance to perform API calls as this specified RAM role.", + "resourceGroup": "ResourceGroup references the resource group to which to assign the instance. A reference holds either the resource group ID, the resource name, or the required tags to search. When more than one resource group are returned for a search, an error will be produced and the Machine will not be created. Resource Groups do not support searching by tags.", + "tenancy": "Tenancy specifies whether to create the instance on a dedicated host. Valid values:\n\ndefault: creates the instance on a non-dedicated host. host: creates the instance on a dedicated host. If you do not specify the DedicatedHostID parameter, Alibaba Cloud automatically selects a dedicated host for the instance. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `default`.", + "userDataSecret": "UserDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", + "credentialsSecret": "CredentialsSecret is a reference to the secret with alibabacloud credentials. Otherwise, defaults to permissions provided by attached RAM role where the actuator is running.", + "tag": "Tags are the set of metadata to add to an instance.", +} + +func (AlibabaCloudMachineProviderConfig) SwaggerDoc() map[string]string { + return map_AlibabaCloudMachineProviderConfig +} + +var map_AlibabaCloudMachineProviderConfigList = map[string]string{ + "": "AlibabaCloudMachineProviderConfigList contains a list of AlibabaCloudMachineProviderConfig Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (AlibabaCloudMachineProviderConfigList) SwaggerDoc() map[string]string { + return map_AlibabaCloudMachineProviderConfigList +} + +var map_AlibabaCloudMachineProviderStatus = map[string]string{ + "": "AlibabaCloudMachineProviderStatus is the Schema for the alibabacloudmachineproviderconfig API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "instanceId": "InstanceID is the instance ID of the machine created in alibabacloud", + "instanceState": "InstanceState is the state of the alibabacloud instance for this machine", + "conditions": "Conditions is a set of conditions associated with the Machine to indicate errors or other status", +} + +func (AlibabaCloudMachineProviderStatus) SwaggerDoc() map[string]string { + return map_AlibabaCloudMachineProviderStatus +} + +var map_AlibabaResourceReference = map[string]string{ + "": "ResourceTagReference is a reference to a specific AlibabaCloud resource by ID, or tags. Only one of ID or Tags may be specified. Specifying more than one will result in a validation error.", + "type": "type identifies the resource reference type for this entry.", + "id": "ID of resource", + "name": "Name of the resource", + "tags": "Tags is a set of metadata based upon ECS object tags used to identify a resource. For details about usage when multiple resources are found, please see the owning parent field documentation.", +} + +func (AlibabaResourceReference) SwaggerDoc() map[string]string { + return map_AlibabaResourceReference +} + +var map_BandwidthProperties = map[string]string{ + "": "Bandwidth describes the bandwidth strategy for the network of the instance", + "internetMaxBandwidthIn": "InternetMaxBandwidthIn is the maximum inbound public bandwidth. Unit: Mbit/s. Valid values: When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10. Currently the default is `10` when outbound bandwidth is less than or equal to 10 Mbit/s. When the purchased outbound public bandwidth is greater than 10, the valid values are 1 to the InternetMaxBandwidthOut value. Currently the default is the value used for `InternetMaxBandwidthOut` when outbound public bandwidth is greater than 10.", + "internetMaxBandwidthOut": "InternetMaxBandwidthOut is the maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. When a value greater than 0 is used then a public IP address is assigned to the instance. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `0`", +} + +func (BandwidthProperties) SwaggerDoc() map[string]string { + return map_BandwidthProperties +} + +var map_DataDiskProperties = map[string]string{ + "": "DataDisk contains the information regarding the datadisk attached to an instance", + "Name": "Name is the name of data disk N. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).\n\nEmpty value means the platform chooses a default, which is subject to change over time. Currently the default is `\"\"`.", + "SnapshotID": "SnapshotID is the ID of the snapshot used to create data disk N. Valid values of N: 1 to 16.\n\nWhen the DataDisk.N.SnapshotID parameter is specified, the DataDisk.N.Size parameter is ignored. The data disk is created based on the size of the specified snapshot. Use snapshots created after July 15, 2013. Otherwise, an error is returned and your request is rejected.", + "Size": "Size of the data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values:\n\nValid values when DataDisk.N.Category is set to cloud_efficiency: 20 to 32768 Valid values when DataDisk.N.Category is set to cloud_ssd: 20 to 32768 Valid values when DataDisk.N.Category is set to cloud_essd: 20 to 32768 Valid values when DataDisk.N.Category is set to cloud: 5 to 2000 The value of this parameter must be greater than or equal to the size of the snapshot specified by the SnapshotID parameter.", + "DiskEncryption": "DiskEncryption specifies whether to encrypt data disk N.\n\nEmpty value means the platform chooses a default, which is subject to change over time. Currently the default is `disabled`.", + "PerformanceLevel": "PerformanceLevel is the performance level of the ESSD used as as data disk N. The N value must be the same as that in DataDisk.N.Category when DataDisk.N.Category is set to cloud_essd. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is `PL1`. Valid values:\n\nPL0: A single ESSD can deliver up to 10,000 random read/write IOPS. PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. For more information about ESSD performance levels, see ESSDs.", + "Category": "Category describes the type of data disk N. Valid values: cloud_efficiency: ultra disk cloud_ssd: standard SSD cloud_essd: ESSD cloud: basic disk Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. Currently for other instances, the default is `cloud_efficiency`.", + "KMSKeyID": "KMSKeyID is the ID of the Key Management Service (KMS) key to be used by data disk N. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `\"\"` which is interpreted as do not use KMSKey encryption.", + "DiskPreservation": "DiskPreservation specifies whether to release data disk N along with the instance. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `DeleteWithInstance`", +} + +func (DataDiskProperties) SwaggerDoc() map[string]string { + return map_DataDiskProperties +} + +var map_SystemDiskProperties = map[string]string{ + "": "SystemDiskProperties contains the information regarding the system disk including performance, size, name, and category", + "category": "Category is the category of the system disk. Valid values: cloud_essd: ESSD. When the parameter is set to this value, you can use the SystemDisk.PerformanceLevel parameter to specify the performance level of the disk. cloud_efficiency: ultra disk. cloud_ssd: standard SSD. cloud: basic disk. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. Currently for other instances, the default is `cloud_efficiency`.", + "performanceLevel": "PerformanceLevel is the performance level of the ESSD used as the system disk. Valid values:\n\nPL0: A single ESSD can deliver up to 10,000 random read/write IOPS. PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is `PL1`. For more information about ESSD performance levels, see ESSDs.", + "name": "Name is the name of the system disk. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-). Empty value means the platform chooses a default, which is subject to change over time. Currently the default is `\"\"`.", + "size": "Size is the size of the system disk. Unit: GiB. Valid values: 20 to 500. The value must be at least 20 and greater than or equal to the size of the image. Empty value means the platform chooses a default, which is subject to change over time. Currently the default is `40` or the size of the image depending on whichever is greater.", +} + +func (SystemDiskProperties) SwaggerDoc() map[string]string { + return map_SystemDiskProperties +} + +var map_Tag = map[string]string{ + "": "Tag The tags of ECS Instance", + "Key": "Key is the name of the key pair", + "Value": "Value is the value or data of the key pair", +} + +func (Tag) SwaggerDoc() map[string]string { + return map_Tag +} + +var map_AWSPartitionPlacement = map[string]string{ + "": "AWSPartitionPlacement defines the configuration for partition placement groups.", + "count": "Count specifies the number of partitions for a Partition placement group. This value is only observed when creating a placement group and only when the `groupType` is set to `Partition`. Note the partition count of a placement group cannot be changed after creation. If unset, AWS will provide a default partition count. This default is currently 2. Note: When using more than 2 partitions, the \"dedicated\" tenancy option on Machines created within the group is unavailable.", +} + +func (AWSPartitionPlacement) SwaggerDoc() map[string]string { + return map_AWSPartitionPlacement +} + +var map_AWSPlacementGroup = map[string]string{ + "": "AWSPlacementGroup ensures that a placement group matching the given configuration exists within AWS Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (AWSPlacementGroup) SwaggerDoc() map[string]string { + return map_AWSPlacementGroup +} + +var map_AWSPlacementGroupList = map[string]string{ + "": "AWSPlacementGroupList contains a list of AWSPlacementGroup Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", +} + +func (AWSPlacementGroupList) SwaggerDoc() map[string]string { + return map_AWSPlacementGroupList +} + +var map_AWSPlacementGroupManagementSpec = map[string]string{ + "": "AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group.", + "managementState": "ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed.", + "managed": "Managed defines the configuration for the placement groups to be created. Updates to the configuration will not be observed as placement groups are immutable after creation.", +} + +func (AWSPlacementGroupManagementSpec) SwaggerDoc() map[string]string { + return map_AWSPlacementGroupManagementSpec +} + +var map_AWSPlacementGroupSpec = map[string]string{ + "managementSpec": "AWSPlacementGroupManagementSpec defines the configuration for a managed or unmanaged placement group.", + "credentialsSecret": "CredentialsSecret is a reference to the secret with AWS credentials. The secret must reside in the same namespace as the AWSPlacementGroup resource. Otherwise, the controller will leverage the EC2 instance assigned IAM Role, in OpenShift this will always be the Control Plane Machine IAM Role.", +} + +func (AWSPlacementGroupSpec) SwaggerDoc() map[string]string { + return map_AWSPlacementGroupSpec +} + +var map_AWSPlacementGroupStatus = map[string]string{ + "conditions": "Conditions represents the observations of the AWSPlacementGroup's current state. Known .status.conditions.type are: Ready, Deleting", + "expiresAt": "ExpiresAt identifies when the observed configuration is valid until. The observed configuration should not be trusted if this time has passed. The AWSPlacementGroup controller will attempt to update the status before it expires.", + "replicas": "Replicas counts how many AWS EC2 instances are present within the placement group. Note: This is a pointer to be able to distinguish between an empty placement group and the status having not yet been observed.", + "managementState": "ManagementState determines whether the placement group is expected to be managed by this CRD or whether it is user managed. A managed placement group may be moved to unmanaged, however an unmanaged group may not be moved back to managed. This value is owned by the controller and may differ from the spec in cases when a user attempts to manage a previously unmanaged placement group.", + "observedConfiguration": "ObservedConfiguration represents the configuration present on the placement group on AWS.", +} + +func (AWSPlacementGroupStatus) SwaggerDoc() map[string]string { + return map_AWSPlacementGroupStatus +} + +var map_ManagedAWSPlacementGroup = map[string]string{ + "": "ManagedAWSPlacementGroup is a discriminated union of placement group configuration.", + "groupType": "GroupType specifies the type of AWS placement group to use for this Machine. This parameter is only used when a Machine is being created and the named placement group does not exist. Valid values are \"Cluster\", \"Partition\", \"Spread\". This value is required and, in case a placement group already exists, will be validated against the existing placement group. Note: If the value of this field is \"Spread\", Machines created within the group may no have placement.tenancy set to \"dedicated\".", + "partition": "Partition defines the configuration of a partition placement group.", +} + +func (ManagedAWSPlacementGroup) SwaggerDoc() map[string]string { + return map_ManagedAWSPlacementGroup +} + +// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go index a9df9b7758..eeb3e57c57 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go @@ -187,6 +187,29 @@ type Placement struct { // supported 3 options: default, dedicated and host. // +optional Tenancy InstanceTenancy `json:"tenancy,omitempty"` + // Group specifies a reference to an AWSPlacementGroup resource to create the Machine within. + // If the group specified does not exist, the Machine will not be created and will enter the failed phase. + // +optional + Group LocalAWSPlacementGroupReference `json:"group,omitempty"` + // PartitionNumber specifies the numbered partition in which instances should be launched. + // It is recommended to only use this value if multiple MachineSets share + // a single Placement Group, in which case, each MachineSet should represent an individual partition number. + // If unset, when a Partition placement group is used, AWS will attempt to + // distribute instances evenly between partitions. + // If PartitionNumber is set when used with a non Partition type Placement Group, this will be considered an error. + // +kubebuilder:validation:Minimum:=1 + // +kubebuilder:validation:Maximum:=7 + // +optional + PartitionNumber int32 `json:"number,omitempty"` +} + +// LocalAWSPlacementGroupReference contains enough information to let you locate the +// referenced AWSPlacementGroup inside the same namespace. +// +structType=atomic +type LocalAWSPlacementGroupReference struct { + // Name of the AWSPlacementGroup. + // +kubebuilder:validation:=Required + Name string `json:"name"` } // Filter is a filter used to identify an AWS resource diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go index f9bf7ca986..892ac166a2 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go @@ -897,6 +897,22 @@ func (in *LoadBalancerReference) DeepCopy() *LoadBalancerReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LocalAWSPlacementGroupReference) DeepCopyInto(out *LocalAWSPlacementGroupReference) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalAWSPlacementGroupReference. +func (in *LocalAWSPlacementGroupReference) DeepCopy() *LocalAWSPlacementGroupReference { + if in == nil { + return nil + } + out := new(LocalAWSPlacementGroupReference) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Machine) DeepCopyInto(out *Machine) { *out = *in @@ -1426,6 +1442,7 @@ func (in *ObjectMeta) DeepCopy() *ObjectMeta { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Placement) DeepCopyInto(out *Placement) { *out = *in + out.Group = in.Group return } diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go index 9302077ac6..782659436c 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go @@ -123,11 +123,22 @@ func (LoadBalancerReference) SwaggerDoc() map[string]string { return map_LoadBalancerReference } +var map_LocalAWSPlacementGroupReference = map[string]string{ + "": "LocalAWSPlacementGroupReference contains enough information to let you locate the referenced AWSPlacementGroup inside the same namespace.", + "name": "Name of the AWSPlacementGroup.", +} + +func (LocalAWSPlacementGroupReference) SwaggerDoc() map[string]string { + return map_LocalAWSPlacementGroupReference +} + var map_Placement = map[string]string{ "": "Placement indicates where to create the instance in AWS", "region": "Region is the region to use to create the instance", "availabilityZone": "AvailabilityZone is the availability zone of the instance", "tenancy": "Tenancy indicates if instance should run on shared or single-tenant hardware. There are supported 3 options: default, dedicated and host.", + "group": "Group specifies a reference to an AWSPlacementGroup resource to create the Machine within. If the group specified does not exist, the Machine will not be created and will enter the failed phase.", + "number": "PartitionNumber specifies the numbered partition in which instances should be launched. It is recommended to only use this value if multiple MachineSets share a single Placement Group, in which case, each MachineSet should represent an individual partition number. If unset, when a Partition placement group is used, AWS will attempt to distribute instances evenly between partitions. If PartitionNumber is set when used with a non Partition type Placement Group, this will be considered an error.", } func (Placement) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/route/v1/generated.proto b/vendor/github.com/openshift/api/route/v1/generated.proto index e916ca4f22..6b3c557be6 100644 --- a/vendor/github.com/openshift/api/route/v1/generated.proto +++ b/vendor/github.com/openshift/api/route/v1/generated.proto @@ -75,7 +75,7 @@ message RouteIngress { // router. message RouteIngressCondition { // Type is the type of the condition. - // Currently only Ready. + // Currently only Admitted. optional string type = 1; // Status is the status of the condition. diff --git a/vendor/github.com/openshift/api/route/v1/types.go b/vendor/github.com/openshift/api/route/v1/types.go index 4b096632a4..f413ec58d0 100644 --- a/vendor/github.com/openshift/api/route/v1/types.go +++ b/vendor/github.com/openshift/api/route/v1/types.go @@ -187,7 +187,7 @@ const ( // router. type RouteIngressCondition struct { // Type is the type of the condition. - // Currently only Ready. + // Currently only Admitted. Type RouteIngressConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RouteIngressConditionType"` // Status is the status of the condition. // Can be True, False, Unknown. diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go index 259817358a..bdcbe1518a 100644 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go @@ -36,7 +36,7 @@ func (RouteIngress) SwaggerDoc() map[string]string { var map_RouteIngressCondition = map[string]string{ "": "RouteIngressCondition contains details for the current condition of this route on a particular router.", - "type": "Type is the type of the condition. Currently only Ready.", + "type": "Type is the type of the condition. Currently only Admitted.", "status": "Status is the status of the condition. Can be True, False, Unknown.", "reason": "(brief) reason for the condition's last transition, and is usually a machine and human readable constant", "message": "Human readable message indicating details about last transition.", diff --git a/vendor/github.com/openshift/api/security/v1/generated.proto b/vendor/github.com/openshift/api/security/v1/generated.proto index 7abbf1c2be..98d68f8ea9 100644 --- a/vendor/github.com/openshift/api/security/v1/generated.proto +++ b/vendor/github.com/openshift/api/security/v1/generated.proto @@ -40,8 +40,8 @@ message IDRange { // PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec` in question. // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=2 message PodSecurityPolicyReview { // spec is the PodSecurityPolicy to check. optional PodSecurityPolicyReviewSpec spec = 1; @@ -73,8 +73,8 @@ message PodSecurityPolicyReviewStatus { // PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=2 message PodSecurityPolicySelfSubjectReview { // spec defines specification the PodSecurityPolicySelfSubjectReview. optional PodSecurityPolicySelfSubjectReviewSpec spec = 1; @@ -91,8 +91,8 @@ message PodSecurityPolicySelfSubjectReviewSpec { // PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec. // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=2 message PodSecurityPolicySubjectReview { // spec defines specification for the PodSecurityPolicySubjectReview. optional PodSecurityPolicySubjectReviewSpec spec = 1; @@ -134,8 +134,8 @@ message PodSecurityPolicySubjectReviewStatus { // RangeAllocation is used so we can easily expose a RangeAllocation typed for security group // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 message RangeAllocation { optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; diff --git a/vendor/github.com/openshift/api/security/v1/types.go b/vendor/github.com/openshift/api/security/v1/types.go index a9bcb56641..06bc4acfec 100644 --- a/vendor/github.com/openshift/api/security/v1/types.go +++ b/vendor/github.com/openshift/api/security/v1/types.go @@ -307,8 +307,8 @@ type SecurityContextConstraintsList struct { // PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec. // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=2 type PodSecurityPolicySubjectReview struct { metav1.TypeMeta `json:",inline"` @@ -356,8 +356,8 @@ type PodSecurityPolicySubjectReviewStatus struct { // PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=2 type PodSecurityPolicySelfSubjectReview struct { metav1.TypeMeta `json:",inline"` @@ -380,8 +380,8 @@ type PodSecurityPolicySelfSubjectReviewSpec struct { // PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec` in question. // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=2 type PodSecurityPolicyReview struct { metav1.TypeMeta `json:",inline"` @@ -427,8 +427,8 @@ type ServiceAccountPodSecurityPolicyReviewStatus struct { // RangeAllocation is used so we can easily expose a RangeAllocation typed for security group // -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 +// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. +// +openshift:compatibility-gen:level=4 type RangeAllocation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` diff --git a/vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go index d32864f178..3211967882 100644 --- a/vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go @@ -41,7 +41,7 @@ func (IDRange) SwaggerDoc() map[string]string { } var map_PodSecurityPolicyReview = map[string]string{ - "": "PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec` in question.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec` in question.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", "spec": "spec is the PodSecurityPolicy to check.", "status": "status represents the current information/status for the PodSecurityPolicyReview.", } @@ -70,7 +70,7 @@ func (PodSecurityPolicyReviewStatus) SwaggerDoc() map[string]string { } var map_PodSecurityPolicySelfSubjectReview = map[string]string{ - "": "PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", "spec": "spec defines specification the PodSecurityPolicySelfSubjectReview.", "status": "status represents the current information/status for the PodSecurityPolicySelfSubjectReview.", } @@ -89,7 +89,7 @@ func (PodSecurityPolicySelfSubjectReviewSpec) SwaggerDoc() map[string]string { } var map_PodSecurityPolicySubjectReview = map[string]string{ - "": "PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", "spec": "spec defines specification for the PodSecurityPolicySubjectReview.", "status": "status represents the current information/status for the PodSecurityPolicySubjectReview.", } @@ -121,7 +121,7 @@ func (PodSecurityPolicySubjectReviewStatus) SwaggerDoc() map[string]string { } var map_RangeAllocation = map[string]string{ - "": "RangeAllocation is used so we can easily expose a RangeAllocation typed for security group\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "RangeAllocation is used so we can easily expose a RangeAllocation typed for security group\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", "range": "range is a string representing a unique label for a range of uids, \"1000000000-2000000000/10000\".", "data": "data is a byte array representing the serialized state of a range allocation. It is a bitmap with each bit set to one to represent a range is taken.", } diff --git a/vendor/modules.txt b/vendor/modules.txt index 0163249fed..bce2fecaa5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -187,7 +187,7 @@ github.com/onsi/gomega/matchers/support/goraph/edge github.com/onsi/gomega/matchers/support/goraph/node github.com/onsi/gomega/matchers/support/goraph/util github.com/onsi/gomega/types -# github.com/openshift/api v0.0.0-20220204103739-31ffd77a8f02 +# github.com/openshift/api v0.0.0-20220222102030-354aa98a475c ## explicit; go 1.16 github.com/openshift/api github.com/openshift/api/apiserver @@ -214,6 +214,7 @@ github.com/openshift/api/kubecontrolplane github.com/openshift/api/kubecontrolplane/v1 github.com/openshift/api/legacyconfig/v1 github.com/openshift/api/machine +github.com/openshift/api/machine/v1 github.com/openshift/api/machine/v1beta1 github.com/openshift/api/network github.com/openshift/api/network/v1