diff --git a/data/data/install.openshift.io_installconfigs.yaml b/data/data/install.openshift.io_installconfigs.yaml index f900ff92a17..a5672ad1748 100644 --- a/data/data/install.openshift.io_installconfigs.yaml +++ b/data/data/install.openshift.io_installconfigs.yaml @@ -900,7 +900,7 @@ spec: description: name is the resource name in the PC type: string type: - description: Type is the identifier type to use for + description: type is the identifier type to use for this resource. enum: - uuid @@ -1967,7 +1967,7 @@ spec: description: name is the resource name in the PC type: string type: - description: Type is the identifier type to use for this + description: type is the identifier type to use for this resource. enum: - uuid @@ -4071,7 +4071,7 @@ spec: description: name is the resource name in the PC type: string type: - description: Type is the identifier type to use for this + description: type is the identifier type to use for this resource. enum: - uuid @@ -5056,9 +5056,26 @@ spec: type: string region: description: |- - region defines a FailureDomainCoordinate which - includes the name of the vCenter tag, the failure domain type - and the name of the vCenter tag category. + The region is the name of the tag in vCenter that is associated with the + tag category `openshift-region`. The region name must match the tag name + and must exist prior to installation. When the regionType is Datacenter + the tag must be attached to the toplogy.datacenter object in vCenter. + When the regionType is ComputeCluster the tag must be attached to the topology.computeCluster + object in vCenter. + type: string + regionType: + allOf: + - enum: + - HostGroup + - Datacenter + - ComputeCluster + - enum: + - Datacenter + - ComputeCluster + description: |- + regionType is the type of failure domain region, the current values are "Datacenter" and "ComputeCluster" + When regionType is Datacenter the zoneType must be ComputeCluster. + When regionType is ComputeCluster the zoneType must be HostGroup type: string server: description: server is the fully-qualified domain name or @@ -5099,6 +5116,13 @@ spec: minLength: 1 pattern: ^/.*?/vm/.*? type: string + hostGroup: + description: |- + hostGroup is the name of the vm-host group of type host within vCenter for this failure domain. + hostGroup is limited to 80 characters. + This field is required when the ZoneType is HostGroup + maxLength: 80 + type: string networks: description: networks is the list of networks within this failure domain @@ -5136,9 +5160,27 @@ spec: type: object zone: description: |- - zone defines a VSpherePlatformFailureDomain which - includes the name of the vCenter tag, the failure domain type - and the name of the vCenter tag category. + The zone is the name of the tag in vCenter that is associated with + the tag category `openshift-zone`. The zone name must match the tag name + and must exist prior to installation. When zoneType is HostGroup the + ESXi hosts defined in the provided in the topology.hostGroup field must be tagged. + When the zoneType is ComputeCluster the tag must be attached to the topology.computeCluster + object in vCenter. + type: string + zoneType: + allOf: + - enum: + - HostGroup + - Datacenter + - ComputeCluster + - enum: + - ComputeCluster + - HostGroup + description: |- + When zoneType is ComputeCluster the regionType must be Datacenter + When zoneType is HostGroup the regionType must be ComputeCluster + If the zoneType is HostGroup topology.hostGroup must be defined and exist in vCenter + prior to installation. type: string required: - name diff --git a/go.mod b/go.mod index 7b1422e519d..bcc9a8916ab 100644 --- a/go.mod +++ b/go.mod @@ -73,7 +73,7 @@ require ( github.com/nutanix-cloud-native/cluster-api-provider-nutanix v1.3.3-0.20240416171357-98239ba02cb2 github.com/nutanix-cloud-native/prism-go-client v0.3.4 github.com/onsi/gomega v1.35.1 - github.com/openshift/api v0.0.0-20241203091751-58d4ac495429 + github.com/openshift/api v0.0.0-20241216151652-de9de05a8e43 github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6 github.com/openshift/assisted-service/api v0.0.0 github.com/openshift/assisted-service/client v0.0.0 @@ -84,7 +84,7 @@ require ( github.com/openshift/cluster-api-provider-libvirt v0.2.1-0.20230308152226-83c0473d4429 github.com/openshift/cluster-api-provider-ovirt v0.1.1-0.20220323121149-e3f2850dd519 github.com/openshift/hive/apis v0.0.0-20231220215202-ad99b9e52d27 - github.com/openshift/library-go v0.0.0-20241210171208-85e36bca7246 + github.com/openshift/library-go v0.0.0-20241216140520-201d816c66f0 github.com/openshift/machine-api-provider-gcp v0.0.1-0.20241021180644-0eca0846914a github.com/openshift/machine-api-provider-ibmcloud v0.0.0-20231207164151-6b0b8ea7b16d github.com/ovirt/go-ovirt v0.0.0-20210809163552-d4276e35d3db @@ -104,6 +104,7 @@ require ( github.com/ulikunitz/xz v0.5.12 github.com/vincent-petithory/dataurl v1.0.0 github.com/vmware/govmomi v0.43.0 + go.uber.org/mock v0.5.0 golang.org/x/crypto v0.31.0 golang.org/x/oauth2 v0.23.0 golang.org/x/sync v0.10.0 diff --git a/go.sum b/go.sum index ab713cf7b41..128b7050817 100644 --- a/go.sum +++ b/go.sum @@ -772,8 +772,8 @@ github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQ github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE7dzrbT927iTk= github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/openshift/api v0.0.0-20241203091751-58d4ac495429 h1:fz+u78YFRL14rXqBKWIVYK04mUOy6LccHe3wQsUS3iI= -github.com/openshift/api v0.0.0-20241203091751-58d4ac495429/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= +github.com/openshift/api v0.0.0-20241216151652-de9de05a8e43 h1:3lcB5nqOOfsJzY4JD12AMKyg3+yQhAdJzNDenbmbMQg= +github.com/openshift/api v0.0.0-20241216151652-de9de05a8e43/go.mod h1:Shkl4HanLwDiiBzakv+con/aMGnVE2MAGvoKp5oyYUo= github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6 h1:U6ve+dnHlHhAELoxX+rdFOHVhoaYl0l9qtxwYtsO6C0= github.com/openshift/assisted-image-service v0.0.0-20240607085136-02df2e56dde6/go.mod h1:o2H5VwQhUD8P6XsK6dRmKpCCJqVvv12KJQZBXmcCXCU= github.com/openshift/assisted-service v1.0.10-0.20230830164851-6573b5d7021d h1:CKw2Y4EdaFsMoqAdr2Tq0nlYTaaXmCRdP0gOu7pN64U= @@ -808,8 +808,8 @@ github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87 github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87/go.mod h1:DB/Mf2oTeiAmVVX1gN+NEqweonAPY0TKUwADizj8+ZA= github.com/openshift/hive/apis v0.0.0-20231220215202-ad99b9e52d27 h1:9C86viyQl7HE9yg7Gctgx803Oq6DbrCUAberyMVcWDE= github.com/openshift/hive/apis v0.0.0-20231220215202-ad99b9e52d27/go.mod h1:RRH8lt09SAiPECNdsbh7Gun0lkcRWi1nYKq6tDp5WxQ= -github.com/openshift/library-go v0.0.0-20241210171208-85e36bca7246 h1:HpUROtJipZRTCLLGlSrl+fwniNb9Z1q1trPOUFSXhvI= -github.com/openshift/library-go v0.0.0-20241210171208-85e36bca7246/go.mod h1:eGSI6tp7yUVr4V2d0WrVt2l5s3iCwAh8Hi0RC9Fo16U= +github.com/openshift/library-go v0.0.0-20241216140520-201d816c66f0 h1:LZ+/F23GNY0xyefWmAGecL/QBzZgxpf5cq6Nx19eFjU= +github.com/openshift/library-go v0.0.0-20241216140520-201d816c66f0/go.mod h1:eGSI6tp7yUVr4V2d0WrVt2l5s3iCwAh8Hi0RC9Fo16U= github.com/openshift/machine-api-operator v0.2.1-0.20240930121047-57b7917e6140 h1:VKn644y4Ra94L8YZ3JT8ZuOZMEspZt8yoIjHeaRM3pA= github.com/openshift/machine-api-operator v0.2.1-0.20240930121047-57b7917e6140/go.mod h1:JEUa45hXYbC6tDpLjJCRuLXIKs7pdcawDkodqfZuQEE= github.com/openshift/machine-api-provider-gcp v0.0.1-0.20241021180644-0eca0846914a h1:2/DQryD6yCabqVtYLELnsrzX8SLUuGJEABvHrd4x5/U= @@ -998,6 +998,8 @@ go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpK go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= diff --git a/pkg/asset/installconfig/vsphere/mock/vsphere_sim.go b/pkg/asset/installconfig/vsphere/mock/vsphere_sim.go index ac5805881de..789212afa03 100644 --- a/pkg/asset/installconfig/vsphere/mock/vsphere_sim.go +++ b/pkg/asset/installconfig/vsphere/mock/vsphere_sim.go @@ -44,6 +44,7 @@ func StartSimulator(setVersionToSupported bool) (*simulator.Server, error) { model.ServiceContent.About.Version = vcenter7U2Version } + model.ClusterHost = 6 model.Folder = 1 model.Datacenter = 5 model.OpaqueNetwork = 1 diff --git a/pkg/asset/installconfig/vsphere/validation.go b/pkg/asset/installconfig/vsphere/validation.go index 87c1f531d2c..7fd72354ad3 100644 --- a/pkg/asset/installconfig/vsphere/validation.go +++ b/pkg/asset/installconfig/vsphere/validation.go @@ -155,15 +155,24 @@ func validateFailureDomain(validationCtx *validationContext, failureDomain *vsph } vsphereField := field.NewPath("platform").Child("vsphere") - topologyField := vsphereField.Child("failureDomains").Child("topology") + failureDomainField := vsphereField.Child("failureDomains") + topologyField := failureDomainField.Child("topology") if checkTags { regionTagCategoryID, zoneTagCategoryID, err := validateTagCategories(validationCtx) if err != nil { allErrs = append(allErrs, field.InternalError(vsphereField, err)) } + validationCtx.regionTagCategoryID = regionTagCategoryID validationCtx.zoneTagCategoryID = zoneTagCategoryID + if failureDomain.ZoneType == vsphere.HostGroupFailureDomain { + allErrs = append(allErrs, validateTagAttachments(validationCtx, clusterComputeResource, failureDomain.Topology.ComputeCluster, region, failureDomain.Zone, topologyField.Child("computeCluster"))...) + allErrs = append(allErrs, validateTagAttachments(validationCtx, hostSystem, failureDomain.Topology.ComputeCluster, zone, failureDomain.Zone, topologyField.Child("hostGroup"))...) + } else { + allErrs = append(allErrs, validateTagAttachments(validationCtx, datacenter, failureDomain.Topology.Datacenter, region, failureDomain.Zone, topologyField.Child("datacenter"))...) + allErrs = append(allErrs, validateTagAttachments(validationCtx, clusterComputeResource, failureDomain.Topology.ComputeCluster, zone, failureDomain.Zone, topologyField.Child("computeCluster"))...) + } } allErrs = append(allErrs, resourcePoolExists(validationCtx, resourcePool, topologyField.Child("resourcePool"))...) @@ -173,6 +182,10 @@ func validateFailureDomain(validationCtx *validationContext, failureDomain *vsph checkDatacenterPrivileges = false } + if failureDomain.ZoneType == vsphere.HostGroupFailureDomain { + allErrs = append(allErrs, validateHostGroups(validationCtx, failureDomain.Topology.ComputeCluster, failureDomain.Topology.HostGroup, topologyField.Child("hostGroup"))...) + } + allErrs = append(allErrs, validateESXiVersion(validationCtx, failureDomain.Topology.ComputeCluster, vsphereField, topologyField.Child("computeCluster"))...) allErrs = append(allErrs, validateVcenterPrivileges(validationCtx, topologyField.Child("server"))...) allErrs = append(allErrs, computeClusterExists(validationCtx, failureDomain.Topology.ComputeCluster, topologyField.Child("computeCluster"), checkComputeClusterPrivileges, checkTags)...) @@ -190,6 +203,32 @@ func validateFailureDomain(validationCtx *validationContext, failureDomain *vsph return allErrs } +func validateHostGroups(validationCtx *validationContext, cluster, hostGroup string, fldPath *field.Path) field.ErrorList { + allErrs := field.ErrorList{} + ctx, cancel := context.WithTimeout(context.TODO(), 60*time.Second) + defer cancel() + + ccr, err := validationCtx.Finder.ClusterComputeResource(ctx, cluster) + if err != nil { + allErrs = append(allErrs, field.InternalError(fldPath, err)) + } + + configInfoEx, err := ccr.Configuration(ctx) + if err != nil { + allErrs = append(allErrs, field.InternalError(fldPath, err)) + } + + for _, g := range configInfoEx.Group { + if hg, ok := g.(*vim25types.ClusterHostGroup); ok { + if hg.Name == hostGroup { + return nil + } + } + } + + return allErrs +} + func validateVCenterVersion(validationCtx *validationContext, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} @@ -354,13 +393,6 @@ func computeClusterExists(validationCtx *validationContext, computeCluster strin } } - if checkTagAttachment { - err = validateTagAttachment(validationCtx, computeClusterMo.Reference()) - if err != nil { - return field.ErrorList{field.InternalError(fldPath, err)} - } - } - return field.ErrorList{} } @@ -567,59 +599,118 @@ func validateTagCategories(validationCtx *validationContext) (string, string, er return regionTagCategoryID, zoneTagCategoryID, nil } -func validateTagAttachment(validationCtx *validationContext, reference vim25types.ManagedObjectReference) error { - if validationCtx.TagManager == nil { - return nil - } - client := validationCtx.Client - tagManager := validationCtx.TagManager +type vsphereObjectType string + +const ( + datacenter vsphereObjectType = "Datacenter" + clusterComputeResource vsphereObjectType = "ClusterComputeResource" + hostSystem vsphereObjectType = "HostSystem" +) + +const ( + region string = "region" + zone string = "zone" +) + +func validateTagAttachments(validationCtx *validationContext, objectType vsphereObjectType, objectPath, objectLocation, locationName string, fldPath *field.Path) field.ErrorList { + errList := field.ErrorList{} + var refs []mo.Reference regionTagCategoryID := validationCtx.regionTagCategoryID zoneTagCategoryID := validationCtx.zoneTagCategoryID + if validationCtx.TagManager == nil { + return append(errList, field.InternalError(fldPath, errors.New("Tag manager is unavailable"))) + } ctx, cancel := context.WithTimeout(context.TODO(), 60*time.Second) defer cancel() - referencesToCheck := []mo.Reference{reference} - ancestors, err := mo.Ancestors(ctx, - client.RoundTripper, - client.ServiceContent.PropertyCollector, - reference) - if err != nil { - return err - } - for _, ancestor := range ancestors { - referencesToCheck = append(referencesToCheck, ancestor.Reference()) + switch objectType { + case datacenter: + obj, err := validationCtx.Finder.Datacenter(ctx, objectPath) + if err != nil { + return field.ErrorList{field.InternalError(fldPath, err)} + } + refs = append(refs, obj.Reference()) + case clusterComputeResource: + obj, err := validationCtx.Finder.ClusterComputeResource(ctx, objectPath) + if err != nil { + return field.ErrorList{field.InternalError(fldPath, err)} + } + refs = append(refs, obj.Reference()) + case hostSystem: + ccr, err := validationCtx.Finder.ClusterComputeResource(ctx, objectPath) + if err != nil { + errList = append(errList, field.Invalid(fldPath, objectPath, err.Error())) + } + if err != nil { + return field.ErrorList{field.InternalError(fldPath, err)} + } + hosts, err := ccr.Hosts(ctx) + if err != nil { + errList = append(errList, field.Invalid(fldPath, objectPath, err.Error())) + } + + for _, o := range hosts { + refs = append(refs, o.Reference()) + } } - attachedTags, err := tagManager.GetAttachedTagsOnObjects(ctx, referencesToCheck) + attachedTags, err := validationCtx.TagManager.GetAttachedTagsOnObjects(ctx, refs) if err != nil { - return err - } - regionTagAttached := false - zoneTagAttached := false - for _, attachedTag := range attachedTags { - for _, tag := range attachedTag.Tags { - if !regionTagAttached { - if tag.CategoryID == regionTagCategoryID { - regionTagAttached = true - } - } - if !zoneTagAttached { - if tag.CategoryID == zoneTagCategoryID { - zoneTagAttached = true + errList = append(errList, field.Invalid(fldPath, objectPath, err.Error())) + } + + anyHostsTagged := false + +taggedHostFound: + for _, ta := range attachedTags { + if findReference(refs, ta.ObjectID) { + for _, tag := range ta.Tags { + switch objectLocation { + case region: + if tag.CategoryID == regionTagCategoryID { + return nil + } + case zone: + if tag.CategoryID == zoneTagCategoryID { + if objectType == hostSystem { + if tag.Name == locationName { + anyHostsTagged = true + // since we are getting all hosts from the defined cluster + // there will be hosts not defined in the failure domain being checked + // if there is a single host tagged we will continue + // this could be expanded to include the vm-host group of type HostSystem + // to confirm each is tagged + break taggedHostFound + } + } else { + return nil + } + } } } - if regionTagAttached && zoneTagAttached { - return nil - } } } - var errs []string - if !regionTagAttached { - errs = append(errs, fmt.Sprintf("tag associated with tag category %s not attached to this resource or ancestor", vsphere.TagCategoryRegion)) + + if objectType != hostSystem { + tagCategory := vsphere.TagCategoryRegion + if objectLocation == zone { + tagCategory = vsphere.TagCategoryZone + } + + errList = append(errList, field.Invalid(fldPath, tagCategory, errors.New("tag associated with tag category not attached to this resource or ancestor").Error())) + } else if !anyHostsTagged { + errList = append(errList, field.Invalid(fldPath, locationName, errors.New("no tagged attached to host in zone").Error())) } - if !zoneTagAttached { - errs = append(errs, fmt.Sprintf("tag associated with tag category %s not attached to this resource or ancestor", vsphere.TagCategoryZone)) + + return errList +} + +func findReference(refs []mo.Reference, ref mo.Reference) bool { + for _, r := range refs { + if r.Reference().Value == ref.Reference().Value { + return true + } } - return errors.New(strings.Join(errs, ",")) + return false } func validateTemplate(validationCtx *validationContext, template string, fldPath *field.Path) field.ErrorList { diff --git a/pkg/asset/installconfig/vsphere/validation_test.go b/pkg/asset/installconfig/vsphere/validation_test.go index 468ab2ff8ad..773b7bc673c 100644 --- a/pkg/asset/installconfig/vsphere/validation_test.go +++ b/pkg/asset/installconfig/vsphere/validation_test.go @@ -32,11 +32,13 @@ var ( ) const ( - tagTestCreateRegionCategory = 0x01 - tagTestCreateZoneCategory = 0x02 - tagTestAttachRegionTags = 0x04 - tagTestAttachZoneTags = 0x08 - tagTestNothingCreatedOrAttached = 0x10 + tagTestCreateRegionCategory = 0x01 + tagTestCreateZoneCategory = 0x02 + tagTestAttachRegionTags = 0x04 + tagTestAttachZoneTags = 0x08 + tagTestNothingCreatedOrAttached = 0x10 + tagTestAttachRegionOnClusterTags = 0x20 + tagTestAttachZoneOnHostsTags = 0x40 ) const wildcardDNS = "nip.io" @@ -127,6 +129,50 @@ func teardownTagAttachmentTest(ctx context.Context, tagMgr *vapitags.Manager) er return nil } +func createTagAndAttachToType(ctx context.Context, restClient *rest.Client, finder Finder, objectType vsphereObjectType, tagName, categoryID string) error { + tagMgr := vapitags.NewManager(restClient) + var refs []mo.Reference + + switch objectType { + case datacenter: + objects, err := finder.DatacenterList(ctx, "/...") + if err != nil { + return err + } + for _, o := range objects { + refs = append(refs, o.Reference()) + } + case clusterComputeResource: + objects, err := finder.ClusterComputeResourceList(ctx, "/...") + if err != nil { + return err + } + for _, o := range objects { + refs = append(refs, o.Reference()) + } + case hostSystem: + objects, err := finder.HostSystemList(ctx, "/...") + if err != nil { + return err + } + for _, o := range objects { + refs = append(refs, o.Reference()) + } + default: + return errors.New("unknown object type") + } + + tagID, err := tagMgr.CreateTag(ctx, &vapitags.Tag{ + Name: tagName, + CategoryID: categoryID, + }) + if err != nil { + return err + } + + return tagMgr.AttachTagToMultipleObjects(ctx, tagID, refs) +} + func setupTagAttachmentTest(ctx context.Context, restClient *rest.Client, finder Finder, attachmentMask int64) (*vapitags.Manager, error) { tagMgr := vapitags.NewManager(restClient) @@ -140,23 +186,14 @@ func setupTagAttachmentTest(ctx context.Context, restClient *rest.Client, finder } if attachmentMask&tagTestAttachRegionTags != 0 { - tagID, err := tagMgr.CreateTag(ctx, &vapitags.Tag{ - Name: "us-east", - CategoryID: categoryID, - }) - if err != nil { + if err := createTagAndAttachToType(ctx, restClient, finder, datacenter, "us-east", categoryID); err != nil { return nil, err } - datacenters, err := finder.DatacenterList(ctx, "/...") - if err != nil { + } + if attachmentMask&tagTestAttachRegionOnClusterTags != 0 { + if err := createTagAndAttachToType(ctx, restClient, finder, clusterComputeResource, "us-east", categoryID); err != nil { return nil, err } - for _, datacenter := range datacenters { - err = tagMgr.AttachTag(ctx, tagID, datacenter) - if err != nil { - return nil, err - } - } } } if attachmentMask&tagTestCreateZoneCategory != 0 { @@ -168,23 +205,14 @@ func setupTagAttachmentTest(ctx context.Context, restClient *rest.Client, finder return nil, err } if attachmentMask&tagTestAttachZoneTags != 0 { - tagID, err := tagMgr.CreateTag(ctx, &vapitags.Tag{ - Name: "us-east-1a", - CategoryID: categoryID, - }) - if err != nil { + if err := createTagAndAttachToType(ctx, restClient, finder, clusterComputeResource, "us-east-1a", categoryID); err != nil { return nil, err } - clusters, err := finder.ClusterComputeResourceList(ctx, "/...") - if err != nil { + } + if attachmentMask&tagTestAttachZoneOnHostsTags != 0 { + if err := createTagAndAttachToType(ctx, restClient, finder, hostSystem, "us-east-1a", categoryID); err != nil { return nil, err } - for _, cluster := range clusters { - err = tagMgr.AttachTag(ctx, tagID, cluster) - if err != nil { - return nil, err - } - } } } @@ -360,7 +388,8 @@ func TestValidateFailureDomains(t *testing.T) { validationMethod: validateFailureDomain, checkTags: false, expectErr: `^platform.vsphere.failureDomains.topology: Invalid value: "invalid-network": unable to find network provided$`, - }, { + }, + { name: "multi-zone validation - create missing folder", failureDomain: func() *vsphere.FailureDomain { failureDomain := &validMultiVCenterPlatform().FailureDomains[0] @@ -370,7 +399,8 @@ func TestValidateFailureDomains(t *testing.T) { validationMethod: validateFailureDomain, checkTags: false, expectErr: ``, - }, { + }, + { name: "multi-zone tag categories present and tags attached", validationMethod: validateFailureDomain, failureDomain: &validMultiVCenterPlatform().FailureDomains[0], @@ -387,7 +417,7 @@ func TestValidateFailureDomains(t *testing.T) { tagTestMask: tagTestCreateZoneCategory | tagTestCreateRegionCategory | tagTestAttachRegionTags, - expectErr: "platform.vsphere.failureDomains.topology.computeCluster: Internal error: tag associated with tag category openshift-zone not attached to this resource or ancestor", + expectErr: "platform.vsphere.failureDomains.topology.computeCluster: Invalid value: \"openshift-zone\": tag associated with tag category not attached to this resource or ancestor", }, { name: "multi-zone tag categories, missing zone and region tag categories", validationMethod: validateFailureDomain, @@ -396,6 +426,26 @@ func TestValidateFailureDomains(t *testing.T) { tagTestMask: tagTestNothingCreatedOrAttached, expectErr: "platform.vsphere: Internal error: tag categories openshift-zone and openshift-region must be created", }, + { + name: "vm-host group zonal tag categories present and tags attached", + failureDomain: func() *vsphere.FailureDomain { + failureDomain := &validMultiVCenterPlatform().FailureDomains[0] + // The Zone and Region names *MUST* match the tag names + failureDomain.Zone = "us-east-1a" + failureDomain.Region = "us-east" + failureDomain.Topology.HostGroup = "us-east-1a-hostgroup" + failureDomain.ZoneType = vsphere.HostGroupFailureDomain + failureDomain.RegionType = vsphere.ComputeClusterFailureDomain + return failureDomain + }(), + validationMethod: validateFailureDomain, + checkTags: true, + tagTestMask: tagTestCreateZoneCategory | + tagTestCreateRegionCategory | + tagTestAttachRegionOnClusterTags | + tagTestAttachZoneOnHostsTags, + expectErr: ``, + }, } for _, test := range tests { diff --git a/pkg/asset/machines/vsphere/capimachines.go b/pkg/asset/machines/vsphere/capimachines.go index 6ca0aa83342..d289f5637f8 100644 --- a/pkg/asset/machines/vsphere/capimachines.go +++ b/pkg/asset/machines/vsphere/capimachines.go @@ -128,6 +128,7 @@ func GenerateMachines(ctx context.Context, clusterID string, config *types.Insta "cluster.x-k8s.io/control-plane": "", }, }, + Spec: capv.VSphereMachineSpec{ VirtualMachineCloneSpec: capv.VirtualMachineCloneSpec{ CloneMode: capv.FullClone, @@ -148,6 +149,13 @@ func GenerateMachines(ctx context.Context, clusterID string, config *types.Insta }, }, } + + if failureDomainName, ok := data.MachineFailureDomain[machine.Name]; ok { + vsphereMachine.Spec.FailureDomain = &failureDomainName + } else { + return nil, fmt.Errorf("unable to find failure domain for machine %s", machine.Name) + } + vsphereMachine.SetGroupVersionKind(capv.GroupVersion.WithKind("VSphereMachine")) capvMachines = append(capvMachines, vsphereMachine) diff --git a/pkg/asset/machines/vsphere/machines.go b/pkg/asset/machines/vsphere/machines.go index 041fdcd6f3c..557a00153a7 100644 --- a/pkg/asset/machines/vsphere/machines.go +++ b/pkg/asset/machines/vsphere/machines.go @@ -27,6 +27,8 @@ type MachineData struct { ControlPlaneMachineSet *machinev1.ControlPlaneMachineSet IPClaims []ipamv1.IPAddressClaim IPAddresses []ipamv1.IPAddress + + MachineFailureDomain map[string]string } // Machines returns a list of machines for a machinepool. @@ -67,12 +69,14 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine } } - failureDomains := []machinev1.VSphereFailureDomain{} + var failureDomains []machinev1.VSphereFailureDomain vsphereMachineProvider := &machineapi.VSphereMachineProviderSpec{} + data.MachineFailureDomain = make(map[string]string) for idx := int32(0); idx < replicas; idx++ { logrus.Debugf("Creating %v machine %v", role, idx) + var host *vsphere.Host desiredZone := mpool.Zones[int(idx)%numOfZones] if hosts != nil && int(idx) < len(hosts) { @@ -110,6 +114,7 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine if err != nil { return data, errors.Wrap(err, "unable to find vCenter in failure domains") } + provider, err := provider(clusterID, vcenter, failureDomain, mpool, osImageForZone, userDataSecret) if err != nil { return data, errors.Wrap(err, "failed to create provider") @@ -133,6 +138,8 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine }, } + data.MachineFailureDomain[machine.Name] = failureDomain.Name + // Apply static IP if configured claim, address, err := applyNetworkConfig(host, provider, machine) if err != nil { @@ -335,7 +342,7 @@ func provider(clusterID string, vcenter *vsphere.VCenter, failureDomain vsphere. networkDeviceSpec[i] = machineapi.NetworkDeviceSpec{NetworkName: network} } - return &machineapi.VSphereMachineProviderSpec{ + vSphereMachineProviderSpec := &machineapi.VSphereMachineProviderSpec{ TypeMeta: metav1.TypeMeta{ APIVersion: machineapi.SchemeGroupVersion.String(), Kind: "VSphereMachineProviderSpec", @@ -358,7 +365,14 @@ func provider(clusterID string, vcenter *vsphere.VCenter, failureDomain vsphere. NumCoresPerSocket: mpool.NumCoresPerSocket, MemoryMiB: mpool.MemoryMiB, DiskGiB: mpool.OSDisk.DiskSizeGB, - }, nil + } + + if failureDomain.ZoneType == vsphere.HostGroupFailureDomain { + vSphereMachineProviderSpec.Workspace.VMGroup = fmt.Sprintf("%s-%s", clusterID, failureDomain.Name) + } + + return vSphereMachineProviderSpec, nil + } // ConfigMasters sets the PublicIP flag and assigns a set of load balancers to the given machines diff --git a/pkg/asset/manifests/vsphere/cluster.go b/pkg/asset/manifests/vsphere/cluster.go index e4873fb44b7..0bd16bfcb91 100644 --- a/pkg/asset/manifests/vsphere/cluster.go +++ b/pkg/asset/manifests/vsphere/cluster.go @@ -5,11 +5,13 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/ptr" capv "sigs.k8s.io/cluster-api-provider-vsphere/apis/v1beta1" "github.com/openshift/installer/pkg/asset" "github.com/openshift/installer/pkg/asset/installconfig" "github.com/openshift/installer/pkg/asset/manifests/capiutils" + "github.com/openshift/installer/pkg/types/vsphere" ) // GenerateClusterAssets generates the manifests for the cluster-api. @@ -69,6 +71,68 @@ func GenerateClusterAssets(installConfig *installconfig.InstallConfig, clusterID assetOutput.InfrastructureRefs = append(assetOutput.InfrastructureRefs, infra) } + for _, failureDomain := range installConfig.Config.VSphere.FailureDomains { + if failureDomain.ZoneType == vsphere.HostGroupFailureDomain { + dz := &capv.VSphereDeploymentZone{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: failureDomain.Name, + }, + Spec: capv.VSphereDeploymentZoneSpec{ + Server: fmt.Sprintf("https://%s", failureDomain.Server), + FailureDomain: failureDomain.Name, + ControlPlane: ptr.To(true), + PlacementConstraint: capv.PlacementConstraint{ + ResourcePool: failureDomain.Topology.ResourcePool, + Folder: failureDomain.Topology.Folder, + }, + }, + } + + dz.SetGroupVersionKind(capv.GroupVersion.WithKind("VSphereDeploymentZone")) + + fd := &capv.VSphereFailureDomain{ + TypeMeta: metav1.TypeMeta{}, + ObjectMeta: metav1.ObjectMeta{ + Name: failureDomain.Name, + }, + Spec: capv.VSphereFailureDomainSpec{ + Region: capv.FailureDomain{ + Name: failureDomain.Region, + Type: capv.FailureDomainType(failureDomain.RegionType), + TagCategory: "openshift-region", + }, + Zone: capv.FailureDomain{ + Name: failureDomain.Zone, + Type: capv.FailureDomainType(failureDomain.ZoneType), + TagCategory: "openshift-zone", + }, + Topology: capv.Topology{ + Datacenter: failureDomain.Topology.Datacenter, + ComputeCluster: &failureDomain.Topology.ComputeCluster, + Hosts: &capv.FailureDomainHosts{ + VMGroupName: fmt.Sprintf("%s-%s", clusterID.InfraID, failureDomain.Name), + HostGroupName: failureDomain.Topology.HostGroup, + }, + Networks: failureDomain.Topology.Networks, + Datastore: failureDomain.Topology.Datastore, + }, + }, + } + fd.SetGroupVersionKind(capv.GroupVersion.WithKind("VSphereFailureDomain")) + + manifests = append(manifests, &asset.RuntimeFile{ + Object: fd, + File: asset.File{Filename: fmt.Sprintf("01_vsphere-failuredomain-%s.yaml", failureDomain.Name)}, + }) + + manifests = append(manifests, &asset.RuntimeFile{ + Object: dz, + File: asset.File{Filename: fmt.Sprintf("01_vsphere-deploymentzone-%s.yaml", failureDomain.Name)}, + }) + } + } + assetOutput.Manifests = manifests return assetOutput, nil diff --git a/pkg/asset/manifests/vsphere/infrastructure.go b/pkg/asset/manifests/vsphere/infrastructure.go index 6055124761d..98520bcafe7 100644 --- a/pkg/asset/manifests/vsphere/infrastructure.go +++ b/pkg/asset/manifests/vsphere/infrastructure.go @@ -9,6 +9,7 @@ import ( "github.com/openshift/api/features" "github.com/openshift/installer/pkg/asset/installconfig" "github.com/openshift/installer/pkg/types" + "github.com/openshift/installer/pkg/types/vsphere" ) // GetInfraPlatformSpec constructs VSpherePlatformSpec for the infrastructure spec @@ -32,7 +33,7 @@ func GetInfraPlatformSpec(ic *installconfig.InstallConfig, clusterID string) *co template = fmt.Sprintf("/%s/vm/%s-rhcos-%s-%s", topology.Datacenter, clusterID, failureDomain.Region, failureDomain.Zone) } - platformSpec.FailureDomains = append(platformSpec.FailureDomains, configv1.VSpherePlatformFailureDomainSpec{ + failureDomainSpec := configv1.VSpherePlatformFailureDomainSpec{ Name: failureDomain.Name, Region: failureDomain.Region, Zone: failureDomain.Zone, @@ -46,7 +47,28 @@ func GetInfraPlatformSpec(ic *installconfig.InstallConfig, clusterID string) *co Folder: topology.Folder, Template: template, }, - }) + } + + if ic.Config.EnabledFeatureGates().Enabled(features.FeatureGateVSphereHostVMGroupZonal) { + logrus.Debug("Host VM Group based zonal feature gate enabled") + + if failureDomain.ZoneType == vsphere.HostGroupFailureDomain { + vmGroupAndRuleName := fmt.Sprintf("%s-%s", clusterID, failureDomain.Name) + failureDomainSpec.RegionAffinity = &configv1.VSphereFailureDomainRegionAffinity{ + Type: configv1.VSphereFailureDomainRegionType(failureDomain.RegionType), + } + failureDomainSpec.ZoneAffinity = &configv1.VSphereFailureDomainZoneAffinity{ + Type: configv1.VSphereFailureDomainZoneType(failureDomain.ZoneType), + HostGroup: &configv1.VSphereFailureDomainHostGroup{ + HostGroup: failureDomain.Topology.HostGroup, + VMGroup: vmGroupAndRuleName, + VMHostRule: vmGroupAndRuleName, + }, + } + } + } + + platformSpec.FailureDomains = append(platformSpec.FailureDomains, failureDomainSpec) } } diff --git a/pkg/destroy/vsphere/client.go b/pkg/destroy/vsphere/client.go index 545ebd45395..3735b3fe459 100644 --- a/pkg/destroy/vsphere/client.go +++ b/pkg/destroy/vsphere/client.go @@ -7,6 +7,7 @@ import ( "time" "github.com/pkg/errors" + "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/pbm" pbmtypes "github.com/vmware/govmomi/pbm/types" @@ -34,6 +35,7 @@ type API interface { DeleteStoragePolicy(ctx context.Context, policyName string) error DeleteTag(ctx context.Context, id string) error DeleteTagCategory(ctx context.Context, id string) error + DeleteHostZoneObjects(ctx context.Context, infraID string) error } // Client makes calls to the Azure API. @@ -281,3 +283,76 @@ func (c *Client) DeleteTagCategory(ctx context.Context, categoryName string) err return utilerrors.NewAggregate(errs) } + +// DeleteHostZoneObjects removes from the vCenter cluster the associated OCP cluster's vm-host group (VirtualMachine) +// and the vm-host affinity rule. +func (c *Client) DeleteHostZoneObjects(ctx context.Context, infraID string) error { + ctx, cancel := context.WithTimeout(ctx, defaultTimeout) + defer cancel() + + finder := find.NewFinder(c.client, false) + + datacenters, err := finder.DatacenterList(ctx, "/...") + if err != nil { + return err + } + + for _, dc := range datacenters { + finder = finder.SetDatacenter(dc) + clusterObjs, err := finder.ClusterComputeResourceList(ctx, "/...") + if err != nil { + return err + } + + for _, ccr := range clusterObjs { + clusterConfigSpec := &types.ClusterConfigSpecEx{} + + clusterConfig, err := ccr.Configuration(ctx) + if err != nil { + return err + } + + for _, r := range clusterConfig.Rule { + if rule, ok := r.(*types.ClusterVmHostRuleInfo); ok { + if strings.Contains(rule.Name, infraID) { + clusterConfigSpec.RulesSpec = append(clusterConfigSpec.RulesSpec, types.ClusterRuleSpec{ + ArrayUpdateSpec: types.ArrayUpdateSpec{ + Operation: "remove", + RemoveKey: rule.GetClusterRuleInfo().Key, + }, + Info: &rule.ClusterRuleInfo, + }) + } + } + } + + for _, g := range clusterConfig.Group { + if vmg, ok := g.(*types.ClusterVmGroup); ok { + if strings.Contains(vmg.Name, infraID) { + clusterConfigSpec.GroupSpec = append(clusterConfigSpec.GroupSpec, types.ClusterGroupSpec{ + ArrayUpdateSpec: types.ArrayUpdateSpec{ + Operation: "remove", + RemoveKey: vmg.Name, + }, + Info: &vmg.ClusterGroupInfo, + }) + } + } + } + + // If the rules or group spec are empty there is no need to modify the cluster + if len(clusterConfigSpec.RulesSpec) != 0 || len(clusterConfigSpec.GroupSpec) != 0 { + task, err := ccr.Reconfigure(ctx, clusterConfigSpec, true) + if err != nil { + return err + } + + if err := task.Wait(ctx); err != nil { + return err + } + } + } + } + + return nil +} diff --git a/pkg/destroy/vsphere/mock/vsphereclient_generated.go b/pkg/destroy/vsphere/mock/vsphereclient_generated.go index 14a55dd29c6..88363f740f2 100644 --- a/pkg/destroy/vsphere/mock/vsphereclient_generated.go +++ b/pkg/destroy/vsphere/mock/vsphereclient_generated.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: ./client.go +// +// Generated by this command: +// +// mockgen -source=./client.go -destination=mock/vsphereclient_generated.go -package=mock +// // Package mock is a generated GoMock package. package mock @@ -8,8 +13,8 @@ import ( context "context" reflect "reflect" - gomock "github.com/golang/mock/gomock" mo "github.com/vmware/govmomi/vim25/mo" + gomock "go.uber.org/mock/gomock" ) // MockAPI is a mock of API interface. @@ -44,11 +49,25 @@ func (m *MockAPI) DeleteFolder(ctx context.Context, f mo.Folder) error { } // DeleteFolder indicates an expected call of DeleteFolder. -func (mr *MockAPIMockRecorder) DeleteFolder(ctx, f interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) DeleteFolder(ctx, f any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteFolder", reflect.TypeOf((*MockAPI)(nil).DeleteFolder), ctx, f) } +// DeleteHostZoneObjects mocks base method. +func (m *MockAPI) DeleteHostZoneObjects(ctx context.Context, infraID string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DeleteHostZoneObjects", ctx, infraID) + ret0, _ := ret[0].(error) + return ret0 +} + +// DeleteHostZoneObjects indicates an expected call of DeleteHostZoneObjects. +func (mr *MockAPIMockRecorder) DeleteHostZoneObjects(ctx, infraID any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteHostZoneObjects", reflect.TypeOf((*MockAPI)(nil).DeleteHostZoneObjects), ctx, infraID) +} + // DeleteStoragePolicy mocks base method. func (m *MockAPI) DeleteStoragePolicy(ctx context.Context, policyName string) error { m.ctrl.T.Helper() @@ -58,7 +77,7 @@ func (m *MockAPI) DeleteStoragePolicy(ctx context.Context, policyName string) er } // DeleteStoragePolicy indicates an expected call of DeleteStoragePolicy. -func (mr *MockAPIMockRecorder) DeleteStoragePolicy(ctx, policyName interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) DeleteStoragePolicy(ctx, policyName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteStoragePolicy", reflect.TypeOf((*MockAPI)(nil).DeleteStoragePolicy), ctx, policyName) } @@ -72,7 +91,7 @@ func (m *MockAPI) DeleteTag(ctx context.Context, id string) error { } // DeleteTag indicates an expected call of DeleteTag. -func (mr *MockAPIMockRecorder) DeleteTag(ctx, id interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) DeleteTag(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTag", reflect.TypeOf((*MockAPI)(nil).DeleteTag), ctx, id) } @@ -86,7 +105,7 @@ func (m *MockAPI) DeleteTagCategory(ctx context.Context, id string) error { } // DeleteTagCategory indicates an expected call of DeleteTagCategory. -func (mr *MockAPIMockRecorder) DeleteTagCategory(ctx, id interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) DeleteTagCategory(ctx, id any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTagCategory", reflect.TypeOf((*MockAPI)(nil).DeleteTagCategory), ctx, id) } @@ -100,7 +119,7 @@ func (m *MockAPI) DeleteVirtualMachine(ctx context.Context, vmMO mo.VirtualMachi } // DeleteVirtualMachine indicates an expected call of DeleteVirtualMachine. -func (mr *MockAPIMockRecorder) DeleteVirtualMachine(ctx, vmMO interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) DeleteVirtualMachine(ctx, vmMO any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteVirtualMachine", reflect.TypeOf((*MockAPI)(nil).DeleteVirtualMachine), ctx, vmMO) } @@ -115,7 +134,7 @@ func (m *MockAPI) ListFolders(ctx context.Context, tagID string) ([]mo.Folder, e } // ListFolders indicates an expected call of ListFolders. -func (mr *MockAPIMockRecorder) ListFolders(ctx, tagID interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) ListFolders(ctx, tagID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListFolders", reflect.TypeOf((*MockAPI)(nil).ListFolders), ctx, tagID) } @@ -130,7 +149,7 @@ func (m *MockAPI) ListVirtualMachines(ctx context.Context, tagID string) ([]mo.V } // ListVirtualMachines indicates an expected call of ListVirtualMachines. -func (mr *MockAPIMockRecorder) ListVirtualMachines(ctx, tagID interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) ListVirtualMachines(ctx, tagID any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListVirtualMachines", reflect.TypeOf((*MockAPI)(nil).ListVirtualMachines), ctx, tagID) } @@ -156,7 +175,7 @@ func (m *MockAPI) StopVirtualMachine(ctx context.Context, vmMO mo.VirtualMachine } // StopVirtualMachine indicates an expected call of StopVirtualMachine. -func (mr *MockAPIMockRecorder) StopVirtualMachine(ctx, vmMO interface{}) *gomock.Call { +func (mr *MockAPIMockRecorder) StopVirtualMachine(ctx, vmMO any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StopVirtualMachine", reflect.TypeOf((*MockAPI)(nil).StopVirtualMachine), ctx, vmMO) } diff --git a/pkg/destroy/vsphere/vsphere.go b/pkg/destroy/vsphere/vsphere.go index 777ac9a813d..2da9f9e2f7c 100644 --- a/pkg/destroy/vsphere/vsphere.go +++ b/pkg/destroy/vsphere/vsphere.go @@ -230,6 +230,20 @@ func (o *ClusterUninstaller) deleteVirtualMachines(ctx context.Context) error { return utilerrors.NewAggregate(errs) } +func (o *ClusterUninstaller) deleteHostZoneObjects(ctx context.Context) error { + var errs []error + ctx, cancel := context.WithTimeout(ctx, defaultTimeout) + defer cancel() + o.Logger.Debug("Deleting VM Groups and VM Host Rules") + for _, client := range o.clients { + if err := client.DeleteHostZoneObjects(ctx, o.InfraID); err != nil { + errs = append(errs, err) + } + } + + return utilerrors.NewAggregate(errs) +} + func (o *ClusterUninstaller) destroyCluster(ctx context.Context) (bool, error) { stagedFuncs := [][]struct { name string @@ -244,6 +258,8 @@ func (o *ClusterUninstaller) destroyCluster(ctx context.Context) (bool, error) { {name: "Storage Policy", execute: o.deleteStoragePolicy}, {name: "Tag", execute: o.deleteTag}, {name: "Tag Category", execute: o.deleteTagCategory}, + }, { + {name: "VM Groups and VM Host Rules", execute: o.deleteHostZoneObjects}, }} stageFailed := false diff --git a/pkg/destroy/vsphere/vsphere_test.go b/pkg/destroy/vsphere/vsphere_test.go index 168518a0682..06a81220b01 100644 --- a/pkg/destroy/vsphere/vsphere_test.go +++ b/pkg/destroy/vsphere/vsphere_test.go @@ -7,11 +7,11 @@ import ( "io" "testing" - "github.com/golang/mock/gomock" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/vmware/govmomi/vim25/mo" vspheretypes "github.com/vmware/govmomi/vim25/types" + gomock "go.uber.org/mock/gomock" "github.com/openshift/installer/pkg/destroy/vsphere/mock" "github.com/openshift/installer/pkg/types" diff --git a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go index 0f7080c5b4e..8b84d8f08f5 100644 --- a/pkg/infrastructure/vsphere/clusterapi/clusterapi.go +++ b/pkg/infrastructure/vsphere/clusterapi/clusterapi.go @@ -21,7 +21,7 @@ type Provider struct { clusterapi.InfraProvider } -var _ clusterapi.PreProvider = Provider{} +var _ clusterapi.PreProvider = (*Provider)(nil) // Name returns the vsphere provider name. func (p Provider) Name() string { @@ -125,6 +125,20 @@ func (p Provider) PreProvision(ctx context.Context, in clusterapi.PreProvisionIn continue } + if failureDomain.ZoneType == vsphere.HostGroupFailureDomain { + vmGroupAndRuleName := fmt.Sprintf("%s-%s", clusterID.InfraID, failureDomain.Name) + + err = createVMGroup(ctx, vctrSession, failureDomain.Topology.ComputeCluster, vmGroupAndRuleName) + if err != nil { + return err + } + + err = createVMHostAffinityRule(ctx, vctrSession, failureDomain.Topology.ComputeCluster, failureDomain.Topology.HostGroup, vmGroupAndRuleName, vmGroupAndRuleName) + if err != nil { + return err + } + } + if err = initializeFoldersAndTemplates(ctx, cachedImage, failureDomain, vctrSession, installConfig.Config.VSphere.DiskType, clusterID.InfraID, tagID); err != nil { return fmt.Errorf("unable to initialize folders and templates: %w", err) } diff --git a/pkg/infrastructure/vsphere/clusterapi/groups.go b/pkg/infrastructure/vsphere/clusterapi/groups.go new file mode 100644 index 00000000000..4c7be55ef83 --- /dev/null +++ b/pkg/infrastructure/vsphere/clusterapi/groups.go @@ -0,0 +1,70 @@ +package clusterapi + +import ( + "context" + + "github.com/vmware/govmomi/vim25/types" + "sigs.k8s.io/cluster-api-provider-vsphere/pkg/session" +) + +func createVMGroup(ctx context.Context, session *session.Session, cluster, vmGroup string) error { + clusterObj, err := session.Finder.ClusterComputeResource(ctx, cluster) + if err != nil { + return err + } + + clusterConfigSpec := &types.ClusterConfigSpecEx{ + GroupSpec: []types.ClusterGroupSpec{ + { + ArrayUpdateSpec: types.ArrayUpdateSpec{ + Operation: types.ArrayUpdateOperation("add"), + }, + Info: &types.ClusterVmGroup{ + ClusterGroupInfo: types.ClusterGroupInfo{ + Name: vmGroup, + }, + }, + }, + }, + } + + task, err := clusterObj.Reconfigure(ctx, clusterConfigSpec, true) + if err != nil { + return err + } + + return task.Wait(ctx) +} + +func createVMHostAffinityRule(ctx context.Context, session *session.Session, cluster, hostGroup, vmGroup, rule string) error { + clusterObj, err := session.Finder.ClusterComputeResource(ctx, cluster) + if err != nil { + return err + } + clusterConfigSpec := &types.ClusterConfigSpecEx{ + RulesSpec: []types.ClusterRuleSpec{ + { + ArrayUpdateSpec: types.ArrayUpdateSpec{ + Operation: types.ArrayUpdateOperation("add"), + }, + Info: &types.ClusterVmHostRuleInfo{ + ClusterRuleInfo: types.ClusterRuleInfo{ + Name: rule, + Mandatory: types.NewBool(true), + Enabled: types.NewBool(true), + UserCreated: types.NewBool(true), + }, + VmGroupName: vmGroup, + AffineHostGroupName: hostGroup, + }, + }, + }, + } + + task, err := clusterObj.Reconfigure(ctx, clusterConfigSpec, true) + if err != nil { + return err + } + + return task.Wait(ctx) +} diff --git a/pkg/types/vsphere/platform.go b/pkg/types/vsphere/platform.go index 82a9accd239..bf4bd71c870 100644 --- a/pkg/types/vsphere/platform.go +++ b/pkg/types/vsphere/platform.go @@ -8,8 +8,8 @@ import ( // +kubebuilder:validation:Enum="";thin;thick;eagerZeroedThick type DiskType string -// FailureDomainType is the name of the failure domain type. -// There are two defined failure domains currently, Datacenter and ComputeCluster. +// FailureDomainType is the string representation name of the failure domain type. +// There are three defined failure domains types currently, Datacenter, ComputeCluster and HostGroup. // Each represents a vCenter object type within a vSphere environment. // +kubebuilder:validation:Enum=HostGroup;Datacenter;ComputeCluster type FailureDomainType string @@ -40,6 +40,15 @@ const ( BootstrapRole = "bootstrap" ) +const ( + // HostGroupFailureDomain is a failure domain for a vCenter vm-host group. + HostGroupFailureDomain FailureDomainType = "HostGroup" + // ComputeClusterFailureDomain is a failure domain for a vCenter compute cluster. + ComputeClusterFailureDomain FailureDomainType = "ComputeCluster" + // DatacenterFailureDomain is a failure domain for a vCenter datacenter. + DatacenterFailureDomain FailureDomainType = "Datacenter" +) + // Platform stores any global configuration used for vsphere platforms. type Platform struct { // VCenter is the domain name or IP address of the vCenter. @@ -159,11 +168,21 @@ type FailureDomain struct { // region defines a FailureDomainCoordinate which // includes the name of the vCenter tag, the failure domain type // and the name of the vCenter tag category. + + // The region is the name of the tag in vCenter that is associated with the + // tag category `openshift-region`. The region name must match the tag name + // and must exist prior to installation. When the regionType is Datacenter + // the tag must be attached to the toplogy.datacenter object in vCenter. + // When the regionType is ComputeCluster the tag must be attached to the topology.computeCluster + // object in vCenter. // +kubebuilder:validation:Required Region string `json:"region"` - // zone defines a VSpherePlatformFailureDomain which - // includes the name of the vCenter tag, the failure domain type - // and the name of the vCenter tag category. + // The zone is the name of the tag in vCenter that is associated with + // the tag category `openshift-zone`. The zone name must match the tag name + // and must exist prior to installation. When zoneType is HostGroup the + // ESXi hosts defined in the provided in the topology.hostGroup field must be tagged. + // When the zoneType is ComputeCluster the tag must be attached to the topology.computeCluster + // object in vCenter. // +kubebuilder:validation:Required Zone string `json:"zone"` // server is the fully-qualified domain name or the IP address of the vCenter server. @@ -174,6 +193,22 @@ type FailureDomain struct { // Topology describes a given failure domain using vSphere constructs // +kubebuilder:validation:Required Topology Topology `json:"topology"` + + // regionType is the type of failure domain region, the current values are "Datacenter" and "ComputeCluster" + // +kubebuilder:validation:Enum=Datacenter;ComputeCluster + // When regionType is Datacenter the zoneType must be ComputeCluster. + // When regionType is ComputeCluster the zoneType must be HostGroup + // +optional + RegionType FailureDomainType `json:"regionType,omitempty"` + // zoneType is the type of the failure domain zone, the current values are "ComputeCluster" and "HostGroup" + + // When zoneType is ComputeCluster the regionType must be Datacenter + // When zoneType is HostGroup the regionType must be ComputeCluster + // If the zoneType is HostGroup topology.hostGroup must be defined and exist in vCenter + // prior to installation. + // +kubebuilder:validation:Enum=ComputeCluster;HostGroup + // +optional + ZoneType FailureDomainType `json:"zoneType,omitempty"` } // Topology holds the required and optional vCenter objects - datacenter, @@ -225,6 +260,13 @@ type Topology struct { // +kubebuilder:example=`urn:vmomi:InventoryServiceTag:5736bf56-49f5-4667-b38c-b97e09dc9578:GLOBAL` // +optional TagIDs []string `json:"tagIDs,omitempty"` + + // hostGroup is the name of the vm-host group of type host within vCenter for this failure domain. + // hostGroup is limited to 80 characters. + // This field is required when the ZoneType is HostGroup + // +kubebuilder:validation:MaxLength=80 + // +optional + HostGroup string `json:"hostGroup,omitempty"` } // VCenter stores the vCenter connection fields diff --git a/pkg/types/vsphere/validation/featuregates.go b/pkg/types/vsphere/validation/featuregates.go index 80b6b8c596f..1a14177aa68 100644 --- a/pkg/types/vsphere/validation/featuregates.go +++ b/pkg/types/vsphere/validation/featuregates.go @@ -6,6 +6,7 @@ import ( "github.com/openshift/api/features" "github.com/openshift/installer/pkg/types" "github.com/openshift/installer/pkg/types/featuregates" + "github.com/openshift/installer/pkg/types/vsphere" ) // GatedFeatures determines all of the vSphere install config fields that should @@ -43,5 +44,16 @@ func GatedFeatures(c *types.InstallConfig) []featuregates.GatedInstallConfigFeat Condition: nodeNetworkingDefined, Field: field.NewPath("platform", "vsphere", "nodeNetworking"), }, + { + FeatureGateName: features.FeatureGateVSphereHostVMGroupZonal, + Condition: func(v *vsphere.Platform) bool { + for _, fd := range v.FailureDomains { + if fd.ZoneType == vsphere.HostGroupFailureDomain || fd.Topology.HostGroup != "" { + return true + } + } + return false + }(v), + }, } } diff --git a/pkg/types/vsphere/validation/platform.go b/pkg/types/vsphere/validation/platform.go index 4099243c78d..f1a51564549 100644 --- a/pkg/types/vsphere/validation/platform.go +++ b/pkg/types/vsphere/validation/platform.go @@ -158,6 +158,33 @@ func validateFailureDomains(p *vsphere.Platform, fldPath *field.Path, isLegacyUp topologyFld := fldPath.Child("topology") var associatedVCenter *vsphere.VCenter for index, failureDomain := range p.FailureDomains { + if failureDomain.ZoneType == "" && failureDomain.RegionType == "" { + logrus.Debug("using the defaults regionType is Datacenter and zoneType is ComputeCluster") + } + + if failureDomain.RegionType == "" && failureDomain.ZoneType != "" { + allErrs = append(allErrs, field.Required(fldPath.Child("regionType"), "must specify regionType if zoneType is defined")) + } + if failureDomain.RegionType != "" && failureDomain.ZoneType == "" { + allErrs = append(allErrs, field.Required(fldPath.Child("zoneType"), "must specify zoneType if regionType is defined")) + } + + if failureDomain.RegionType == vsphere.HostGroupFailureDomain { + return append(allErrs, field.Required(fldPath.Child("regionType"), "region type cannot be used for host group failure domains")) + } + + if failureDomain.ZoneType == vsphere.HostGroupFailureDomain && failureDomain.Topology.HostGroup == "" { + allErrs = append(allErrs, field.Required(fldPath.Child("hostGroup"), "must not be empty if zoneType is HostGroup")) + } + + if failureDomain.RegionType == vsphere.ComputeClusterFailureDomain { + if failureDomain.ZoneType != vsphere.HostGroupFailureDomain { + allErrs = append(allErrs, field.Required(fldPath.Child("regionType"), "zoneType must be HostGroup")) + allErrs = append(allErrs, field.Required(fldPath.Child("zoneType"), "something something...")) + return allErrs + } + } + if len(failureDomain.Name) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("name"), "must specify the name")) } else { diff --git a/vendor/github.com/openshift/api/config/v1/types.go b/vendor/github.com/openshift/api/config/v1/types.go index d4d09e7feec..3e17ca0ccb6 100644 --- a/vendor/github.com/openshift/api/config/v1/types.go +++ b/vendor/github.com/openshift/api/config/v1/types.go @@ -9,7 +9,7 @@ import ( // The namespace must be specified at the point of use. type ConfigMapFileReference struct { Name string `json:"name"` - // Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references. + // key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references. Key string `json:"key,omitempty"` } @@ -17,7 +17,6 @@ type ConfigMapFileReference struct { // The namespace must be specified at the point of use. type ConfigMapNameReference struct { // name is the metadata.name of the referenced config map - // +kubebuilder:validation:Required // +required Name string `json:"name"` } @@ -26,7 +25,6 @@ type ConfigMapNameReference struct { // The namespace must be specified at the point of use. type SecretNameReference struct { // name is the metadata.name of the referenced secret - // +kubebuilder:validation:Required // +required Name string `json:"name"` } @@ -35,47 +33,47 @@ type SecretNameReference struct { type HTTPServingInfo struct { // ServingInfo is the HTTP serving information ServingInfo `json:",inline"` - // MaxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit. + // maxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit. MaxRequestsInFlight int64 `json:"maxRequestsInFlight"` - // RequestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if + // requestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if // -1 there is no limit on requests. RequestTimeoutSeconds int64 `json:"requestTimeoutSeconds"` } // ServingInfo holds information about serving web pages type ServingInfo struct { - // BindAddress is the ip:port to serve on + // bindAddress is the ip:port to serve on BindAddress string `json:"bindAddress"` - // BindNetwork is the type of network to bind to - defaults to "tcp4", accepts "tcp", + // bindNetwork is the type of network to bind to - defaults to "tcp4", accepts "tcp", // "tcp4", and "tcp6" BindNetwork string `json:"bindNetwork"` // CertInfo is the TLS cert info for serving secure traffic. // this is anonymous so that we can inline it for serialization CertInfo `json:",inline"` - // ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates + // clientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates // +optional ClientCA string `json:"clientCA,omitempty"` - // NamedCertificates is a list of certificates to use to secure requests to specific hostnames + // namedCertificates is a list of certificates to use to secure requests to specific hostnames NamedCertificates []NamedCertificate `json:"namedCertificates,omitempty"` - // MinTLSVersion is the minimum TLS version supported. + // minTLSVersion is the minimum TLS version supported. // Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants MinTLSVersion string `json:"minTLSVersion,omitempty"` - // CipherSuites contains an overridden list of ciphers for the server to support. + // cipherSuites contains an overridden list of ciphers for the server to support. // Values must match cipher suite IDs from https://golang.org/pkg/crypto/tls/#pkg-constants CipherSuites []string `json:"cipherSuites,omitempty"` } // CertInfo relates a certificate with a private key type CertInfo struct { - // CertFile is a file containing a PEM-encoded certificate + // certFile is a file containing a PEM-encoded certificate CertFile string `json:"certFile"` - // KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile + // keyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile KeyFile string `json:"keyFile"` } // NamedCertificate specifies a certificate/key, and the names it should be served for type NamedCertificate struct { - // Names is a list of DNS names this certificate should be used to secure + // names is a list of DNS names this certificate should be used to secure // A name can be a normal DNS name, or can contain leading wildcard segments. Names []string `json:"names,omitempty"` // CertInfo is the TLS cert info for serving secure traffic @@ -121,24 +119,24 @@ type StringSource struct { // StringSourceSpec specifies a string value, or external location type StringSourceSpec struct { - // Value specifies the cleartext value, or an encrypted value if keyFile is specified. + // value specifies the cleartext value, or an encrypted value if keyFile is specified. Value string `json:"value"` - // Env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified. + // env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified. Env string `json:"env"` - // File references a file containing the cleartext value, or an encrypted value if a keyFile is specified. + // file references a file containing the cleartext value, or an encrypted value if a keyFile is specified. File string `json:"file"` - // KeyFile references a file containing the key to use to decrypt the value. + // keyFile references a file containing the key to use to decrypt the value. KeyFile string `json:"keyFile"` } // RemoteConnectionInfo holds information necessary for establishing a remote connection type RemoteConnectionInfo struct { - // URL is the remote URL to connect to + // url is the remote URL to connect to URL string `json:"url"` - // CA is the CA for verifying TLS connections + // ca is the CA for verifying TLS connections CA string `json:"ca"` // CertInfo is the TLS client cert information to present // this is anonymous so that we can inline it for serialization @@ -160,11 +158,11 @@ type AdmissionConfig struct { // AdmissionPluginConfig holds the necessary configuration options for admission plugins type AdmissionPluginConfig struct { - // Location is the path to a configuration file that contains the plugin's + // location is the path to a configuration file that contains the plugin's // configuration Location string `json:"location"` - // Configuration is an embedded configuration object to be used as the plugin's + // configuration is an embedded configuration object to be used as the plugin's // configuration. If present, it will be used instead of the path to the configuration file. // +nullable // +kubebuilder:pruning:PreserveUnknownFields @@ -205,9 +203,9 @@ type AuditConfig struct { // Maximum size in megabytes of the log file before it gets rotated. Defaults to 100MB. MaximumFileSizeMegabytes int32 `json:"maximumFileSizeMegabytes"` - // PolicyFile is a path to the file that defines the audit policy configuration. + // policyFile is a path to the file that defines the audit policy configuration. PolicyFile string `json:"policyFile"` - // PolicyConfiguration is an embedded policy configuration object to be used + // policyConfiguration is an embedded policy configuration object to be used // as the audit policy configuration. If present, it will be used instead of // the path to the policy file. // +nullable @@ -225,9 +223,9 @@ type AuditConfig struct { // EtcdConnectionInfo holds information necessary for connecting to an etcd server type EtcdConnectionInfo struct { - // URLs are the URLs for etcd + // urls are the URLs for etcd URLs []string `json:"urls,omitempty"` - // CA is a file containing trusted roots for the etcd server certificates + // ca is a file containing trusted roots for the etcd server certificates CA string `json:"ca"` // CertInfo is the TLS client cert information for securing communication to etcd // this is anonymous so that we can inline it for serialization @@ -237,7 +235,7 @@ type EtcdConnectionInfo struct { type EtcdStorageConfig struct { EtcdConnectionInfo `json:",inline"` - // StoragePrefix is the path within etcd that the OpenShift resources will + // storagePrefix is the path within etcd that the OpenShift resources will // be rooted under. This value, if changed, will mean existing objects in etcd will // no longer be located. StoragePrefix string `json:"storagePrefix"` @@ -287,7 +285,7 @@ type ClientConnectionOverrides struct { // GenericControllerConfig provides information to configure a controller type GenericControllerConfig struct { - // ServingInfo is the HTTP serving information for the controller's endpoints + // servingInfo is the HTTP serving information for the controller's endpoints ServingInfo HTTPServingInfo `json:"servingInfo"` // leaderElection provides information to elect a leader. Only override this if you have a specific need @@ -324,7 +322,6 @@ type RequiredHSTSPolicy struct { // The use of wildcards is allowed like this: *.foo.com matches everything under foo.com. // foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*. // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:Required // +required DomainPatterns []string `json:"domainPatterns"` diff --git a/vendor/github.com/openshift/api/config/v1/types_apiserver.go b/vendor/github.com/openshift/api/config/v1/types_apiserver.go index d815556d28c..75b647f745c 100644 --- a/vendor/github.com/openshift/api/config/v1/types_apiserver.go +++ b/vendor/github.com/openshift/api/config/v1/types_apiserver.go @@ -27,7 +27,6 @@ type APIServer struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec APIServerSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -129,7 +128,6 @@ type Audit struct { type AuditCustomRule struct { // group is a name of group a request user must be member of in order to this profile to apply. // - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +required Group string `json:"group"` @@ -146,7 +144,6 @@ type AuditCustomRule struct { // // If unset, the 'Default' profile is used as the default. // - // +kubebuilder:validation:Required // +required Profile AuditProfileType `json:"profile,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_authentication.go b/vendor/github.com/openshift/api/config/v1/types_authentication.go index f6f0c12a3be..65dffddb00f 100644 --- a/vendor/github.com/openshift/api/config/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/config/v1/types_authentication.go @@ -26,7 +26,6 @@ type Authentication struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec AuthenticationSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -81,7 +80,7 @@ type AuthenticationSpec struct { // +optional ServiceAccountIssuer string `json:"serviceAccountIssuer"` - // OIDCProviders are OIDC identity providers that can issue tokens + // oidcProviders are OIDC identity providers that can issue tokens // for this cluster // Can only be set if "Type" is set to "OIDC". // @@ -110,7 +109,7 @@ type AuthenticationStatus struct { // The namespace for this config map is openshift-config-managed. IntegratedOAuthMetadata ConfigMapNameReference `json:"integratedOAuthMetadata"` - // OIDCClients is where participating operators place the current OIDC client status + // oidcClients is where participating operators place the current OIDC client status // for OIDC clients that can be customized by the cluster-admin. // // +listType=map @@ -181,7 +180,6 @@ type WebhookTokenAuthenticator struct { // The key "kubeConfig" is used to locate the data. // If the secret or expected key is not found, the webhook is not honored. // If the specified kube config data is not valid, the webhook is not honored. - // +kubebuilder:validation:Required // +required KubeConfig SecretNameReference `json:"kubeConfig"` } @@ -195,19 +193,17 @@ const ( ) type OIDCProvider struct { - // Name of the OIDC provider + // name of the OIDC provider // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required // +required Name string `json:"name"` - // Issuer describes atributes of the OIDC token issuer + // issuer describes atributes of the OIDC token issuer // - // +kubebuilder:validation:Required // +required Issuer TokenIssuer `json:"issuer"` - // OIDCClients contains configuration for the platform's clients that + // oidcClients contains configuration for the platform's clients that // need to request tokens from the issuer // // +listType=map @@ -216,11 +212,11 @@ type OIDCProvider struct { // +kubebuilder:validation:MaxItems=20 OIDCClients []OIDCClientConfig `json:"oidcClients"` - // ClaimMappings describes rules on how to transform information from an + // claimMappings describes rules on how to transform information from an // ID token into a cluster identity ClaimMappings TokenClaimMappings `json:"claimMappings"` - // ClaimValidationRules are rules that are applied to validate token claims to authenticate users. + // claimValidationRules are rules that are applied to validate token claims to authenticate users. // // +listType=atomic ClaimValidationRules []TokenClaimValidationRule `json:"claimValidationRules,omitempty"` @@ -234,17 +230,15 @@ type TokenIssuer struct { // Must use the https:// scheme. // // +kubebuilder:validation:Pattern=`^https:\/\/[^\s]` - // +kubebuilder:validation:Required // +required URL string `json:"issuerURL"` - // Audiences is an array of audiences that the token was issued for. + // audiences is an array of audiences that the token was issued for. // Valid tokens must include at least one of these values in their // "aud" claim. // Must be set to exactly one value. // // +listType=set - // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=10 // +required @@ -258,94 +252,88 @@ type TokenIssuer struct { } type TokenClaimMappings struct { - // Username is a name of the claim that should be used to construct + // username is a name of the claim that should be used to construct // usernames for the cluster identity. // // Default value: "sub" Username UsernameClaimMapping `json:"username,omitempty"` - // Groups is a name of the claim that should be used to construct + // groups is a name of the claim that should be used to construct // groups for the cluster identity. // The referenced claim must use array of strings values. Groups PrefixedClaimMapping `json:"groups,omitempty"` } type TokenClaimMapping struct { - // Claim is a JWT token claim to be used in the mapping + // claim is a JWT token claim to be used in the mapping // - // +kubebuilder:validation:Required // +required Claim string `json:"claim"` } type OIDCClientConfig struct { - // ComponentName is the name of the component that is supposed to consume this + // componentName is the name of the component that is supposed to consume this // client configuration // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Required // +required ComponentName string `json:"componentName"` - // ComponentNamespace is the namespace of the component that is supposed to consume this + // componentNamespace is the namespace of the component that is supposed to consume this // client configuration // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Required // +required ComponentNamespace string `json:"componentNamespace"` - // ClientID is the identifier of the OIDC client from the OIDC provider + // clientID is the identifier of the OIDC client from the OIDC provider // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required // +required ClientID string `json:"clientID"` - // ClientSecret refers to a secret in the `openshift-config` namespace that + // clientSecret refers to a secret in the `openshift-config` namespace that // contains the client secret in the `clientSecret` key of the `.data` field ClientSecret SecretNameReference `json:"clientSecret"` - // ExtraScopes is an optional set of scopes to request tokens with. + // extraScopes is an optional set of scopes to request tokens with. // // +listType=set ExtraScopes []string `json:"extraScopes"` } type OIDCClientStatus struct { - // ComponentName is the name of the component that will consume a client configuration. + // componentName is the name of the component that will consume a client configuration. // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Required // +required ComponentName string `json:"componentName"` - // ComponentNamespace is the namespace of the component that will consume a client configuration. + // componentNamespace is the namespace of the component that will consume a client configuration. // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Required // +required ComponentNamespace string `json:"componentNamespace"` - // CurrentOIDCClients is a list of clients that the component is currently using. + // currentOIDCClients is a list of clients that the component is currently using. // // +listType=map // +listMapKey=issuerURL // +listMapKey=clientID CurrentOIDCClients []OIDCClientReference `json:"currentOIDCClients"` - // ConsumingUsers is a slice of ServiceAccounts that need to have read + // consumingUsers is a slice of ServiceAccounts that need to have read // permission on the `clientSecret` secret. // // +kubebuilder:validation:MaxItems=5 // +listType=set ConsumingUsers []ConsumingUser `json:"consumingUsers"` - // Conditions are used to communicate the state of the `oidcClients` entry. + // conditions are used to communicate the state of the `oidcClients` entry. // // Supported conditions include Available, Degraded and Progressing. // @@ -362,7 +350,6 @@ type OIDCClientReference struct { // OIDCName refers to the `name` of the provider from `oidcProviders` // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required // +required OIDCProviderName string `json:"oidcProviderName"` @@ -370,14 +357,12 @@ type OIDCClientReference struct { // Must use the https:// scheme. // // +kubebuilder:validation:Pattern=`^https:\/\/[^\s]` - // +kubebuilder:validation:Required // +required IssuerURL string `json:"issuerURL"` - // ClientID is the identifier of the OIDC client from the OIDC provider + // clientID is the identifier of the OIDC client from the OIDC provider // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required // +required ClientID string `json:"clientID"` } @@ -386,7 +371,7 @@ type OIDCClientReference struct { type UsernameClaimMapping struct { TokenClaimMapping `json:",inline"` - // PrefixPolicy specifies how a prefix should apply. + // prefixPolicy specifies how a prefix should apply. // // By default, claims other than `email` will be prefixed with the issuer URL to // prevent naming clashes with other plugins. @@ -427,7 +412,6 @@ var ( ) type UsernamePrefix struct { - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +required PrefixString string `json:"prefixString"` @@ -436,7 +420,7 @@ type UsernamePrefix struct { type PrefixedClaimMapping struct { TokenClaimMapping `json:",inline"` - // Prefix is a string to prefix the value from the token in the result of the + // prefix is a string to prefix the value from the token in the result of the // claim mapping. // // By default, no prefixing occurs. @@ -454,30 +438,28 @@ const ( ) type TokenClaimValidationRule struct { - // Type sets the type of the validation rule + // type sets the type of the validation rule // // +kubebuilder:validation:Enum={"RequiredClaim"} // +kubebuilder:default="RequiredClaim" Type TokenValidationRuleType `json:"type"` - // RequiredClaim allows configuring a required claim name and its expected + // requiredClaim allows configuring a required claim name and its expected // value RequiredClaim *TokenRequiredClaim `json:"requiredClaim"` } type TokenRequiredClaim struct { - // Claim is a name of a required claim. Only claims with string values are + // claim is a name of a required claim. Only claims with string values are // supported. // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required // +required Claim string `json:"claim"` - // RequiredValue is the required value for the claim. + // requiredValue is the required value for the claim. // // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Required // +required RequiredValue string `json:"requiredValue"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_build.go b/vendor/github.com/openshift/api/config/v1/types_build.go index dad47666db6..dcde1fc5b81 100644 --- a/vendor/github.com/openshift/api/config/v1/types_build.go +++ b/vendor/github.com/openshift/api/config/v1/types_build.go @@ -29,14 +29,13 @@ type Build struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // Spec holds user-settable values for the build controller configuration - // +kubebuilder:validation:Required + // spec holds user-settable values for the build controller configuration // +required Spec BuildSpec `json:"spec"` } type BuildSpec struct { - // AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that + // additionalTrustedCA is a reference to a ConfigMap containing additional CAs that // should be trusted for image pushes and pulls during builds. // The namespace for this config map is openshift-config. // @@ -45,16 +44,16 @@ type BuildSpec struct { // // +optional AdditionalTrustedCA ConfigMapNameReference `json:"additionalTrustedCA"` - // BuildDefaults controls the default information for Builds + // buildDefaults controls the default information for Builds // +optional BuildDefaults BuildDefaults `json:"buildDefaults"` - // BuildOverrides controls override settings for builds + // buildOverrides controls override settings for builds // +optional BuildOverrides BuildOverrides `json:"buildOverrides"` } type BuildDefaults struct { - // DefaultProxy contains the default proxy settings for all build operations, including image pull/push + // defaultProxy contains the default proxy settings for all build operations, including image pull/push // and source download. // // Values can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables @@ -62,55 +61,55 @@ type BuildDefaults struct { // +optional DefaultProxy *ProxySpec `json:"defaultProxy,omitempty"` - // GitProxy contains the proxy settings for git operations only. If set, this will override + // gitProxy contains the proxy settings for git operations only. If set, this will override // any Proxy settings for all git commands, such as git clone. // // Values that are not set here will be inherited from DefaultProxy. // +optional GitProxy *ProxySpec `json:"gitProxy,omitempty"` - // Env is a set of default environment variables that will be applied to the + // env is a set of default environment variables that will be applied to the // build if the specified variables do not exist on the build // +optional Env []corev1.EnvVar `json:"env,omitempty"` - // ImageLabels is a list of docker labels that are applied to the resulting image. + // imageLabels is a list of docker labels that are applied to the resulting image. // User can override a default label by providing a label with the same name in their // Build/BuildConfig. // +optional ImageLabels []ImageLabel `json:"imageLabels,omitempty"` - // Resources defines resource requirements to execute the build. + // resources defines resource requirements to execute the build. // +optional Resources corev1.ResourceRequirements `json:"resources"` } type ImageLabel struct { - // Name defines the name of the label. It must have non-zero length. + // name defines the name of the label. It must have non-zero length. Name string `json:"name"` - // Value defines the literal value of the label. + // value defines the literal value of the label. // +optional Value string `json:"value,omitempty"` } type BuildOverrides struct { - // ImageLabels is a list of docker labels that are applied to the resulting image. + // imageLabels is a list of docker labels that are applied to the resulting image. // If user provided a label in their Build/BuildConfig with the same name as one in this // list, the user's label will be overwritten. // +optional ImageLabels []ImageLabel `json:"imageLabels,omitempty"` - // NodeSelector is a selector which must be true for the build pod to fit on a node + // nodeSelector is a selector which must be true for the build pod to fit on a node // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // Tolerations is a list of Tolerations that will override any existing + // tolerations is a list of Tolerations that will override any existing // tolerations set on a build pod. // +optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - // ForcePull overrides, if set, the equivalent value in the builds, + // forcePull overrides, if set, the equivalent value in the builds, // i.e. false disables force pull for all builds, // true enables force pull for all builds, // independently of what each build specifies itself diff --git a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go index 7951762ccd5..4a6823640d5 100644 --- a/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go +++ b/vendor/github.com/openshift/api/config/v1/types_cluster_operator.go @@ -34,7 +34,6 @@ type ClusterOperator struct { metav1.ObjectMeta `json:"metadata"` // spec holds configuration that could apply to any operator. - // +kubebuilder:validation:Required // +required Spec ClusterOperatorSpec `json:"spec"` @@ -80,14 +79,12 @@ type ClusterOperatorStatus struct { type OperandVersion struct { // name is the name of the particular operand this version is for. It usually matches container images, not operators. - // +kubebuilder:validation:Required // +required Name string `json:"name"` // version indicates which version of a particular operand is currently being managed. It must always match the Available // operand. If 1.0.0 is Available, then this must indicate 1.0.0 even if the operator is trying to rollout // 1.1.0 - // +kubebuilder:validation:Required // +required Version string `json:"version"` } @@ -95,18 +92,15 @@ type OperandVersion struct { // ObjectReference contains enough information to let you inspect or modify the referred object. type ObjectReference struct { // group of the referent. - // +kubebuilder:validation:Required // +required Group string `json:"group"` // resource of the referent. - // +kubebuilder:validation:Required // +required Resource string `json:"resource"` // namespace of the referent. // +optional Namespace string `json:"namespace,omitempty"` // name of the referent. - // +kubebuilder:validation:Required // +required Name string `json:"name"` } @@ -128,17 +122,14 @@ const ( // +k8s:deepcopy-gen=true type ClusterOperatorStatusCondition struct { // type specifies the aspect reported by this condition. - // +kubebuilder:validation:Required // +required Type ClusterStatusConditionType `json:"type"` // status of the condition, one of True, False, Unknown. - // +kubebuilder:validation:Required // +required Status ConditionStatus `json:"status"` // lastTransitionTime is the time of the last update to the current status property. - // +kubebuilder:validation:Required // +required LastTransitionTime metav1.Time `json:"lastTransitionTime"` 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 2b392298e89..8994ca97cdd 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 @@ -34,7 +34,6 @@ type ClusterVersion struct { // spec is the desired state of the cluster version - the operator will work // to ensure that the desired version is applied to the cluster. - // +kubebuilder:validation:Required // +required Spec ClusterVersionSpec `json:"spec"` // status contains information about the available updates and any in-progress @@ -51,7 +50,6 @@ type ClusterVersionSpec struct { // clusterID uniquely identifies this cluster. This is expected to be // an RFC4122 UUID value (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx in // hexadecimal values). This is a required field. - // +kubebuilder:validation:Required // +required ClusterID ClusterID `json:"clusterID"` @@ -138,7 +136,6 @@ type ClusterVersionStatus struct { // desired is the version that the cluster is reconciling towards. // If the cluster is not yet fully initialized desired will be set // with the information available, which may be an image or a tag. - // +kubebuilder:validation:Required // +required Desired Release `json:"desired"` @@ -156,14 +153,12 @@ type ClusterVersionStatus struct { // 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. - // +kubebuilder:validation:Required // +required ObservedGeneration int64 `json:"observedGeneration"` // 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. - // +kubebuilder:validation:Required // +required VersionHash string `json:"versionHash"` @@ -190,7 +185,6 @@ type ClusterVersionStatus struct { // may be empty if no updates are recommended, if the update service // is unavailable, or if an invalid channel has been specified. // +nullable - // +kubebuilder:validation:Required // +listType=atomic // +required AvailableUpdates []Release `json:"availableUpdates"` @@ -226,12 +220,10 @@ type UpdateHistory struct { // indicates the update is not fully applied, while the Completed state // indicates the update was successfully rolled out at least once (all // parts of the update successfully applied). - // +kubebuilder:validation:Required // +required State UpdateState `json:"state"` // startedTime is the time at which the update was started. - // +kubebuilder:validation:Required // +required StartedTime metav1.Time `json:"startedTime"` @@ -239,7 +231,6 @@ type UpdateHistory struct { // that is currently being applied will have a null completion time. // Completion time will always be set for entries that are not the current // update (usually to the started time of the next update). - // +kubebuilder:validation:Required // +required // +nullable CompletionTime *metav1.Time `json:"completionTime"` @@ -253,7 +244,6 @@ type UpdateHistory struct { // image is a container image location that contains the update. This value // is always populated. - // +kubebuilder:validation:Required // +required Image string `json:"image"` @@ -261,7 +251,6 @@ type UpdateHistory struct { // before it was installed. If this is false the cluster may not be trusted. // Verified does not cover upgradeable checks that depend on the cluster // state at the time when the update target was accepted. - // +kubebuilder:validation:Required // +required Verified bool `json:"verified"` @@ -671,28 +660,23 @@ type ClusterVersionCapabilitiesStatus struct { // +k8s:deepcopy-gen=true type ComponentOverride struct { // kind indentifies which object to override. - // +kubebuilder:validation:Required // +required Kind string `json:"kind"` // group identifies the API group that the kind is in. - // +kubebuilder:validation:Required // +required Group string `json:"group"` // namespace is the component's namespace. If the resource is cluster // scoped, the namespace should be empty. - // +kubebuilder:validation:Required // +required Namespace string `json:"namespace"` // name is the component's name. - // +kubebuilder:validation:Required // +required Name string `json:"name"` // unmanaged controls if cluster version operator should stop managing the // resources in this cluster. // Default: false - // +kubebuilder:validation:Required // +required Unmanaged bool `json:"unmanaged"` } @@ -701,8 +685,8 @@ type ComponentOverride struct { type URL string // Update represents an administrator update request. -// +kubebuilder:validation:XValidation:rule="has(self.architecture) && has(self.image) ? (self.architecture == '' || self.image == '') : true",message="cannot set both Architecture and Image" -// +kubebuilder:validation:XValidation:rule="has(self.architecture) && self.architecture != '' ? self.version != '' : true",message="Version must be set if Architecture is set" +// +kubebuilder:validation:XValidation:rule="has(self.architecture) && has(self.image) ? (self.architecture == \"\" || self.image == \"\") : true",message="cannot set both Architecture and Image" +// +kubebuilder:validation:XValidation:rule="has(self.architecture) && self.architecture != \"\" ? self.version != \"\" : true",message="Version must be set if Architecture is set" // +k8s:deepcopy-gen=true type Update struct { // architecture is an optional field that indicates the desired @@ -793,7 +777,6 @@ const RetrievedUpdates ClusterStatusConditionType = "RetrievedUpdates" // may not be recommended for the current cluster. type ConditionalUpdate struct { // release is the target of the update. - // +kubebuilder:validation:Required // +required Release Release `json:"release"` @@ -802,7 +785,6 @@ type ConditionalUpdate struct { // operator will evaluate all entries, and only recommend the // update if there is at least one entry and all entries // recommend the update. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +patchMergeKey=name // +patchStrategy=merge @@ -826,7 +808,6 @@ type ConditionalUpdate struct { // +k8s:deepcopy-gen=true type ConditionalUpdateRisk struct { // url contains information about this risk. - // +kubebuilder:validation:Required // +kubebuilder:validation:Format=uri // +kubebuilder:validation:MinLength=1 // +required @@ -835,7 +816,6 @@ type ConditionalUpdateRisk struct { // name is the CamelCase reason for not recommending a // conditional update, in the event that matchingRules match the // cluster state. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +required Name string `json:"name"` @@ -845,7 +825,6 @@ type ConditionalUpdateRisk struct { // state. This is only to be consumed by humans. It may // contain Line Feed characters (U+000A), which should be // rendered as new lines. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +required Message string `json:"message"` @@ -856,7 +835,6 @@ type ConditionalUpdateRisk struct { // operator will walk the slice in order, and stop after the // first it can successfully evaluate. If no condition can be // successfully evaluated, the update will not be recommended. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinItems=1 // +listType=atomic // +required @@ -871,24 +849,22 @@ type ConditionalUpdateRisk struct { type ClusterCondition struct { // type represents the cluster-condition type. This defines // the members and semantics of any additional properties. - // +kubebuilder:validation:Required // +kubebuilder:validation:Enum={"Always","PromQL"} // +required Type string `json:"type"` - // promQL represents a cluster condition based on PromQL. + // promql represents a cluster condition based on PromQL. // +optional PromQL *PromQLClusterCondition `json:"promql,omitempty"` } // PromQLClusterCondition represents a cluster condition based on PromQL. type PromQLClusterCondition struct { - // PromQL is a PromQL query classifying clusters. This query + // promql is a PromQL query classifying clusters. This query // query should return a 1 in the match case and a 0 in the // does-not-match case. Queries which return no time // series, or which return values besides 0 or 1, are // evaluation failures. - // +kubebuilder:validation:Required // +required PromQL string `json:"promql"` } @@ -917,7 +893,7 @@ type SignatureStore struct { // // +kubebuilder:validation:Type=string // +kubebuilder:validation:XValidation:rule="isURL(self)",message="url must be a valid absolute URL" - // +kubebuilder:validation:Required + // +required URL string `json:"url"` // ca is an optional reference to a config map by name containing the PEM-encoded CA bundle. diff --git a/vendor/github.com/openshift/api/config/v1/types_console.go b/vendor/github.com/openshift/api/config/v1/types_console.go index e8f197b3447..0ccc4a8f85e 100644 --- a/vendor/github.com/openshift/api/config/v1/types_console.go +++ b/vendor/github.com/openshift/api/config/v1/types_console.go @@ -28,7 +28,6 @@ type Console struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ConsoleSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_dns.go b/vendor/github.com/openshift/api/config/v1/types_dns.go index 5daa5d78d26..06eb75ccf70 100644 --- a/vendor/github.com/openshift/api/config/v1/types_dns.go +++ b/vendor/github.com/openshift/api/config/v1/types_dns.go @@ -24,7 +24,6 @@ type DNS struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec DNSSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -121,7 +120,7 @@ type DNSPlatformSpec struct { // and must handle unrecognized platforms with best-effort defaults. // // +unionDiscriminator - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:XValidation:rule="self in ['','AWS']",message="allowed values are '' and 'AWS'" Type PlatformType `json:"type"` 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 88d94ac5276..81bc14f2c74 100644 --- a/vendor/github.com/openshift/api/config/v1/types_feature.go +++ b/vendor/github.com/openshift/api/config/v1/types_feature.go @@ -26,7 +26,6 @@ type FeatureGate struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required // +kubebuilder:validation:XValidation:rule="has(oldSelf.featureSet) ? has(self.featureSet) : true",message=".spec.featureSet cannot be removed" Spec FeatureGateSpec `json:"spec"` @@ -117,7 +116,6 @@ type FeatureGateStatus struct { type FeatureGateDetails struct { // version matches the version provided by the ClusterVersion and in the ClusterOperator.Status.Versions field. - // +kubebuilder:validation:Required // +required Version string `json:"version"` // enabled is a list of all feature gates that are enabled in the cluster for the named version. @@ -130,7 +128,7 @@ type FeatureGateDetails struct { type FeatureGateAttributes struct { // name is the name of the FeatureGate. - // +kubebuilder:validation:Required + // +required Name FeatureGateName `json:"name"` // possible (probable?) future additions include diff --git a/vendor/github.com/openshift/api/config/v1/types_image.go b/vendor/github.com/openshift/api/config/v1/types_image.go index d3c694a56f3..3db935c7fe4 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image.go +++ b/vendor/github.com/openshift/api/config/v1/types_image.go @@ -29,7 +29,6 @@ type Image struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ImageSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go b/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go index 74df4027f91..0bd0d777055 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go +++ b/vendor/github.com/openshift/api/config/v1/types_image_content_policy.go @@ -25,7 +25,6 @@ type ImageContentPolicy struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ImageContentPolicySpec `json:"spec"` } @@ -76,7 +75,6 @@ type ImageContentPolicyList struct { type RepositoryDigestMirrors struct { // source is the repository that users refer to, e.g. in image pull specifications. // +required - // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=`^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])(:[0-9]+)?(\/[^\/:\n]+)*(\/[^\/:\n]+((:[^\/:\n]+)|(@[^\n]+)))?$` Source string `json:"source"` // allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. diff --git a/vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go b/vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go index 43d748c0c32..df2258d12fc 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go +++ b/vendor/github.com/openshift/api/config/v1/types_image_digest_mirror_set.go @@ -25,7 +25,6 @@ type ImageDigestMirrorSet struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ImageDigestMirrorSetSpec `json:"spec"` // status contains the observed state of the resource. @@ -110,7 +109,6 @@ type ImageDigestMirrors struct { // for more information about the format, see the document about the location field: // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table // +required - // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=`^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$` Source string `json:"source"` // mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. diff --git a/vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go b/vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go index ca8d35515e9..b7e1a6a8732 100644 --- a/vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go +++ b/vendor/github.com/openshift/api/config/v1/types_image_tag_mirror_set.go @@ -25,7 +25,6 @@ type ImageTagMirrorSet struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ImageTagMirrorSetSpec `json:"spec"` // status contains the observed state of the resource. @@ -95,7 +94,6 @@ type ImageTagMirrors struct { // for more information about the format, see the document about the location field: // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table // +required - // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=`^\*(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$|^((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:(?:\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+)?(?::[0-9]+)?)(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$` Source string `json:"source"` // mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. diff --git a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go index 1ebe2dfb9cd..0293603d78d 100644 --- a/vendor/github.com/openshift/api/config/v1/types_infrastructure.go +++ b/vendor/github.com/openshift/api/config/v1/types_infrastructure.go @@ -27,7 +27,6 @@ type Infrastructure struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec InfrastructureSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -99,7 +98,8 @@ type InfrastructureStatus struct { // The 'External' mode indicates that the control plane is hosted externally to the cluster and that // its components are not visible within the cluster. // +kubebuilder:default=HighlyAvailable - // +kubebuilder:validation:Enum=HighlyAvailable;SingleReplica;External + // +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=HighlyAvailable;SingleReplica;External + // +openshift:validation:FeatureGateAwareEnum:featureGate=HighlyAvailableArbiter,enum=HighlyAvailable;HighlyAvailableArbiter;SingleReplica;External ControlPlaneTopology TopologyMode `json:"controlPlaneTopology"` // infrastructureTopology expresses the expectations for infrastructure services that do not run on control @@ -136,6 +136,9 @@ const ( // "HighlyAvailable" is for operators to configure high-availability as much as possible. HighlyAvailableTopologyMode TopologyMode = "HighlyAvailable" + // "HighlyAvailableArbiter" is for operators to configure for an arbiter HA deployment. + HighlyAvailableArbiterMode TopologyMode = "HighlyAvailableArbiter" + // "SingleReplica" is for operators to avoid spending resources for high-availability purpose. SingleReplicaTopologyMode TopologyMode = "SingleReplica" @@ -257,7 +260,7 @@ const ( // ExternalPlatformSpec holds the desired state for the generic External infrastructure provider. type ExternalPlatformSpec struct { - // PlatformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. + // platformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. // This field is solely for informational and reporting purposes and is not expected to be used for decision-making. // +kubebuilder:default:="Unknown" // +default="Unknown" @@ -283,55 +286,55 @@ type PlatformSpec struct { // +unionDiscriminator Type PlatformType `json:"type"` - // AWS contains settings specific to the Amazon Web Services infrastructure provider. + // aws contains settings specific to the Amazon Web Services infrastructure provider. // +optional AWS *AWSPlatformSpec `json:"aws,omitempty"` - // Azure contains settings specific to the Azure infrastructure provider. + // azure contains settings specific to the Azure infrastructure provider. // +optional Azure *AzurePlatformSpec `json:"azure,omitempty"` - // GCP contains settings specific to the Google Cloud Platform infrastructure provider. + // gcp contains settings specific to the Google Cloud Platform infrastructure provider. // +optional GCP *GCPPlatformSpec `json:"gcp,omitempty"` - // BareMetal contains settings specific to the BareMetal platform. + // baremetal contains settings specific to the BareMetal platform. // +optional BareMetal *BareMetalPlatformSpec `json:"baremetal,omitempty"` - // OpenStack contains settings specific to the OpenStack infrastructure provider. + // openstack contains settings specific to the OpenStack infrastructure provider. // +optional OpenStack *OpenStackPlatformSpec `json:"openstack,omitempty"` - // Ovirt contains settings specific to the oVirt infrastructure provider. + // ovirt contains settings specific to the oVirt infrastructure provider. // +optional Ovirt *OvirtPlatformSpec `json:"ovirt,omitempty"` - // VSphere contains settings specific to the VSphere infrastructure provider. + // vsphere contains settings specific to the VSphere infrastructure provider. // +optional VSphere *VSpherePlatformSpec `json:"vsphere,omitempty"` - // IBMCloud contains settings specific to the IBMCloud infrastructure provider. + // ibmcloud contains settings specific to the IBMCloud infrastructure provider. // +optional IBMCloud *IBMCloudPlatformSpec `json:"ibmcloud,omitempty"` - // Kubevirt contains settings specific to the kubevirt infrastructure provider. + // kubevirt contains settings specific to the kubevirt infrastructure provider. // +optional Kubevirt *KubevirtPlatformSpec `json:"kubevirt,omitempty"` - // EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. + // equinixMetal contains settings specific to the Equinix Metal infrastructure provider. // +optional EquinixMetal *EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"` - // PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. + // powervs contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. // +optional PowerVS *PowerVSPlatformSpec `json:"powervs,omitempty"` - // AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. + // alibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. // +optional AlibabaCloud *AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"` - // Nutanix contains settings specific to the Nutanix infrastructure provider. + // nutanix contains settings specific to the Nutanix infrastructure provider. // +optional Nutanix *NutanixPlatformSpec `json:"nutanix,omitempty"` @@ -401,59 +404,59 @@ type PlatformStatus struct { // Currently this value cannot be changed once set. Type PlatformType `json:"type"` - // AWS contains settings specific to the Amazon Web Services infrastructure provider. + // aws contains settings specific to the Amazon Web Services infrastructure provider. // +optional AWS *AWSPlatformStatus `json:"aws,omitempty"` - // Azure contains settings specific to the Azure infrastructure provider. + // azure contains settings specific to the Azure infrastructure provider. // +optional Azure *AzurePlatformStatus `json:"azure,omitempty"` - // GCP contains settings specific to the Google Cloud Platform infrastructure provider. + // gcp contains settings specific to the Google Cloud Platform infrastructure provider. // +optional GCP *GCPPlatformStatus `json:"gcp,omitempty"` - // BareMetal contains settings specific to the BareMetal platform. + // baremetal contains settings specific to the BareMetal platform. // +optional BareMetal *BareMetalPlatformStatus `json:"baremetal,omitempty"` - // OpenStack contains settings specific to the OpenStack infrastructure provider. + // openstack contains settings specific to the OpenStack infrastructure provider. // +optional OpenStack *OpenStackPlatformStatus `json:"openstack,omitempty"` - // Ovirt contains settings specific to the oVirt infrastructure provider. + // ovirt contains settings specific to the oVirt infrastructure provider. // +optional Ovirt *OvirtPlatformStatus `json:"ovirt,omitempty"` - // VSphere contains settings specific to the VSphere infrastructure provider. + // vsphere contains settings specific to the VSphere infrastructure provider. // +optional VSphere *VSpherePlatformStatus `json:"vsphere,omitempty"` - // IBMCloud contains settings specific to the IBMCloud infrastructure provider. + // ibmcloud contains settings specific to the IBMCloud infrastructure provider. // +optional IBMCloud *IBMCloudPlatformStatus `json:"ibmcloud,omitempty"` - // Kubevirt contains settings specific to the kubevirt infrastructure provider. + // kubevirt contains settings specific to the kubevirt infrastructure provider. // +optional Kubevirt *KubevirtPlatformStatus `json:"kubevirt,omitempty"` - // EquinixMetal contains settings specific to the Equinix Metal infrastructure provider. + // equinixMetal contains settings specific to the Equinix Metal infrastructure provider. // +optional EquinixMetal *EquinixMetalPlatformStatus `json:"equinixMetal,omitempty"` - // PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider. + // powervs contains settings specific to the Power Systems Virtual Servers infrastructure provider. // +optional PowerVS *PowerVSPlatformStatus `json:"powervs,omitempty"` - // AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. + // alibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. // +optional AlibabaCloud *AlibabaCloudPlatformStatus `json:"alibabaCloud,omitempty"` - // Nutanix contains settings specific to the Nutanix infrastructure provider. + // nutanix contains settings specific to the Nutanix infrastructure provider. // +optional Nutanix *NutanixPlatformStatus `json:"nutanix,omitempty"` - // External contains settings specific to the generic External infrastructure provider. + // external contains settings specific to the generic External infrastructure provider. // +optional External *ExternalPlatformStatus `json:"external,omitempty"` } @@ -492,7 +495,7 @@ type AWSPlatformStatus struct { // region holds the default AWS region for new AWS resources created by the cluster. Region string `json:"region"` - // ServiceEndpoints list contains custom endpoints which will override default + // serviceEndpoints list contains custom endpoints which will override default // service endpoint of AWS Services. // There must be only one ServiceEndpoint for a service. // +listType=atomic @@ -526,7 +529,6 @@ type AWSPlatformStatus struct { // AWSResourceTag is a tag to apply to AWS resources created for the cluster. type AWSResourceTag struct { // key is the key of the tag - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=128 // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.:/=+-@]+$` @@ -535,7 +537,6 @@ type AWSResourceTag struct { // value is the value of the tag. // Some AWS service do not support empty values. Since tags are added to resources in many services, the // length of the tag value must meet the requirements of all services. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.:/=+-@]+$` @@ -584,14 +585,14 @@ type AzureResourceTag struct { // key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key // must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric // characters and the following special characters `_ . -`. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=128 // +kubebuilder:validation:Pattern=`^[a-zA-Z]([0-9A-Za-z_.-]*[0-9A-Za-z_])?$` Key string `json:"key"` // value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value // must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.=+-@]+$` @@ -683,7 +684,7 @@ type GCPResourceLabel struct { // and the following special characters `_-`. Label key must not have the reserved prefixes `kubernetes-io` // and `openshift-io`. // +kubebuilder:validation:XValidation:rule="!self.startsWith('openshift-io') && !self.startsWith('kubernetes-io')",message="label keys must not start with either `openshift-io` or `kubernetes-io`" - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern=`^[a-z][0-9a-z_-]{0,62}$` @@ -691,7 +692,7 @@ type GCPResourceLabel struct { // value is the value part of the label. A label value can have a maximum of 63 characters and cannot be empty. // Value must contain only lowercase letters, numeric characters, and the following special characters `_-`. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern=`^[0-9a-z_-]{1,63}$` @@ -707,7 +708,7 @@ type GCPResourceTag struct { // An OrganizationID must consist of decimal numbers, and cannot have leading zeroes. // A ProjectID must be 6 to 30 characters in length, can only contain lowercase letters, numbers, // and hyphens, and must start with a letter, and cannot end with a hyphen. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=32 // +kubebuilder:validation:Pattern=`(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)` @@ -716,7 +717,7 @@ type GCPResourceTag struct { // key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot be empty. // Tag key must begin and end with an alphanumeric character, and must contain only uppercase, lowercase // alphanumeric characters, and the following special characters `._-`. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.-]{0,61}[a-zA-Z0-9])?$` @@ -725,7 +726,7 @@ type GCPResourceTag struct { // value is the value part of the tag. A tag value can have a maximum of 63 characters and cannot be empty. // Tag value must begin and end with an alphanumeric character, and must contain only uppercase, lowercase // alphanumeric characters, and the following special characters `_-.@%=+:,*#&(){}[]` and spaces. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.@%=+:,*#&()\[\]{}\-\s]{0,61}[a-zA-Z0-9])?$` @@ -1189,7 +1190,7 @@ const ( type VSpherePlatformFailureDomainSpec struct { // name defines the arbitrary but unique name // of a failure domain. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 Name string `json:"name"` @@ -1199,7 +1200,7 @@ type VSpherePlatformFailureDomainSpec struct { // category in vCenter must be named openshift-region. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Required + // +required Region string `json:"region"` // zone defines the name of a zone tag that will @@ -1207,7 +1208,7 @@ type VSpherePlatformFailureDomainSpec struct { // category in vCenter must be named openshift-zone. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Required + // +required Zone string `json:"zone"` // regionAffinity holds the type of region, Datacenter or ComputeCluster. @@ -1226,15 +1227,15 @@ type VSpherePlatformFailureDomainSpec struct { ZoneAffinity *VSphereFailureDomainZoneAffinity `json:"zoneAffinity,omitempty"` // server is the fully-qualified domain name or the IP address of the vCenter server. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 // --- // + Validation is applied via a patch, we validate the format as either ipv4, ipv6 or hostname Server string `json:"server"` - // Topology describes a given failure domain using vSphere constructs - // +kubebuilder:validation:Required + // topology describes a given failure domain using vSphere constructs + // +required Topology VSpherePlatformTopology `json:"topology"` } @@ -1243,7 +1244,7 @@ type VSpherePlatformFailureDomainSpec struct { type VSpherePlatformTopology struct { // datacenter is the name of vCenter datacenter in which virtual machines will be located. // The maximum length of the datacenter name is 80 characters. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=80 Datacenter string `json:"datacenter"` @@ -1251,7 +1252,7 @@ type VSpherePlatformTopology struct { // in which virtual machine will be located. // The absolute path is of the form //host/. // The maximum length of the path is 2048 characters. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=2048 // +kubebuilder:validation:Pattern=`^/.*?/host/.*?` ComputeCluster string `json:"computeCluster"` @@ -1264,7 +1265,7 @@ type VSpherePlatformTopology struct { // `govc ls 'network/*'` // Networks should be in the form of an absolute path: // //network/. - // +kubebuilder:validation:Required + // +required // +openshift:validation:FeatureGateAwareMaxItems:featureGate="",maxItems=1 // +openshift:validation:FeatureGateAwareMaxItems:featureGate=VSphereMultiNetworks,maxItems=10 // +kubebuilder:validation:MinItems=1 @@ -1275,7 +1276,7 @@ type VSpherePlatformTopology struct { // virtual machine is located. // The absolute path is of the form //datastore/ // The maximum length of the path is 2048 characters. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=2048 // +kubebuilder:validation:Pattern=`^/.*?/datastore/.*?` Datastore string `json:"datastore"` @@ -1327,7 +1328,7 @@ type VSphereFailureDomainZoneAffinity struct { // When set to HostGroup, hostGroup must be configured with hostGroup, vmGroup and vmHostRule and // this means the zone is defined by the grouping of those fields. // +kubebuilder:validation:Enum:=HostGroup;ComputeCluster - // +kubebuilder:validation:Required + // +required // +unionDiscriminator Type VSphereFailureDomainZoneType `json:"type"` @@ -1348,7 +1349,7 @@ type VSphereFailureDomainRegionAffinity struct { // When set to Datacenter, this means the vCenter Datacenter defined is the region. // When set to ComputeCluster, this means the vCenter cluster defined is the region. // +kubebuilder:validation:Enum:=ComputeCluster;Datacenter - // +kubebuilder:validation:Required + // +required // +unionDiscriminator Type VSphereFailureDomainRegionType `json:"type"` } @@ -1362,7 +1363,7 @@ type VSphereFailureDomainHostGroup struct { // This field is required when the VSphereFailureDomain ZoneType is HostGroup // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Required + // +required VMGroup string `json:"vmGroup"` // hostGroup is the name of the vm-host group of type host within vCenter for this failure domain. @@ -1370,7 +1371,7 @@ type VSphereFailureDomainHostGroup struct { // This field is required when the VSphereFailureDomain ZoneType is HostGroup // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Required + // +required HostGroup string `json:"hostGroup"` // vmHostRule is the name of the affinity vm-host rule within vCenter for this failure domain. @@ -1378,7 +1379,7 @@ type VSphereFailureDomainHostGroup struct { // This field is required when the VSphereFailureDomain ZoneType is HostGroup // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Required + // +required VMHostRule string `json:"vmHostRule"` } @@ -1387,7 +1388,7 @@ type VSphereFailureDomainHostGroup struct { type VSpherePlatformVCenterSpec struct { // server is the fully-qualified domain name or the IP address of the vCenter server. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=255 // --- // + Validation is applied via a patch, we validate the format as either ipv4, ipv6 or hostname @@ -1408,7 +1409,7 @@ type VSpherePlatformVCenterSpec struct { // be used by the Cloud Controller Manager. // Each datacenter listed here should be used within // a topology. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinItems=1 // +listType=set Datacenters []string `json:"datacenters"` @@ -1609,14 +1610,14 @@ type IBMCloudServiceEndpoint struct { // Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured // with the service `name` of `VPC` and `url` of `https://us.south.private.iaas.cloud.ibm.com` // - // +kubebuilder:validation:Required + // +required Name IBMCloudServiceName `json:"name"` // url is fully qualified URI with scheme https, that overrides the default generated // endpoint for a client. // This must be provided and cannot be empty. // - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Type=string // +kubebuilder:validation:XValidation:rule="isURL(self)",message="url must be a valid absolute URL" URL string `json:"url"` @@ -1628,20 +1629,20 @@ type IBMCloudPlatformSpec struct{} // IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider. type IBMCloudPlatformStatus struct { - // Location is where the cluster has been deployed + // location is where the cluster has been deployed Location string `json:"location,omitempty"` - // ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster. + // resourceGroupName is the Resource Group for new IBMCloud resources created for the cluster. ResourceGroupName string `json:"resourceGroupName,omitempty"` - // ProviderType indicates the type of cluster that was created + // providerType indicates the type of cluster that was created ProviderType IBMCloudProviderType `json:"providerType,omitempty"` - // CISInstanceCRN is the CRN of the Cloud Internet Services instance managing + // cisInstanceCRN is the CRN of the Cloud Internet Services instance managing // the DNS zone for the cluster's base domain CISInstanceCRN string `json:"cisInstanceCRN,omitempty"` - // DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone + // dnsInstanceCRN is the CRN of the DNS Services instance managing the DNS zone // for the cluster's base domain DNSInstanceCRN string `json:"dnsInstanceCRN,omitempty"` @@ -1697,7 +1698,7 @@ type PowerVSServiceEndpoint struct { // ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller // Power Cloud - https://cloud.ibm.com/apidocs/power-cloud // - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Enum=CIS;COS;COSConfig;DNSServices;GlobalCatalog;GlobalSearch;GlobalTagging;HyperProtect;IAM;KeyProtect;Power;ResourceController;ResourceManager;VPC Name string `json:"name"` @@ -1705,7 +1706,7 @@ type PowerVSServiceEndpoint struct { // endpoint for a client. // This must be provided and cannot be empty. // - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Type=string // +kubebuilder:validation:Format=uri // +kubebuilder:validation:Pattern=`^https://` @@ -1752,11 +1753,11 @@ type PowerVSPlatformStatus struct { // +optional ServiceEndpoints []PowerVSServiceEndpoint `json:"serviceEndpoints,omitempty"` - // CISInstanceCRN is the CRN of the Cloud Internet Services instance managing + // cisInstanceCRN is the CRN of the Cloud Internet Services instance managing // the DNS zone for the cluster's base domain CISInstanceCRN string `json:"cisInstanceCRN,omitempty"` - // DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone + // dnsInstanceCRN is the CRN of the DNS Services instance managing the DNS zone // for the cluster's base domain DNSInstanceCRN string `json:"dnsInstanceCRN,omitempty"` } @@ -1768,7 +1769,6 @@ type AlibabaCloudPlatformSpec struct{} // AlibabaCloudPlatformStatus holds the current status of the Alibaba Cloud infrastructure provider. type AlibabaCloudPlatformStatus struct { // region specifies the region for Alibaba Cloud resources created for the cluster. - // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern=`^[0-9A-Za-z-]+$` // +required Region string `json:"region"` @@ -1787,13 +1787,11 @@ type AlibabaCloudPlatformStatus struct { // AlibabaCloudResourceTag is the set of tags to add to apply to resources. type AlibabaCloudResourceTag struct { // key is the key of the tag. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=128 // +required Key string `json:"key"` // value is the value of the tag. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=128 // +required @@ -1828,7 +1826,7 @@ type NutanixPlatformSpec struct { // When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. // Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the // proxy spec.noProxy list. - // +kubebuilder:validation:Required + // +required PrismCentral NutanixPrismEndpoint `json:"prismCentral"` // prismElements holds one or more endpoint address and port data to access the Nutanix @@ -1836,7 +1834,7 @@ type NutanixPlatformSpec struct { // Prism Element (cluster) for an OpenShift cluster, where all the Nutanix resources (VMs, subnets, volumes, etc.) // used in the OpenShift cluster are located. In the future, we may support Nutanix resources (VMs, etc.) // spread over multiple Prism Elements (clusters) of the Prism Central. - // +kubebuilder:validation:Required + // +required // +listType=map // +listMapKey=name PrismElements []NutanixPrismElementEndpoint `json:"prismElements"` @@ -1858,7 +1856,7 @@ type NutanixFailureDomain struct { // It must consist of only lower case alphanumeric characters and hyphens (-). // It must start and end with an alphanumeric character. // This value is arbitrary and is used to identify the failure domain within the platform. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 // +kubebuilder:validation:Pattern=`[a-z0-9]([-a-z0-9]*[a-z0-9])?` @@ -1867,14 +1865,14 @@ type NutanixFailureDomain struct { // cluster is to identify the cluster (the Prism Element under management of the Prism Central), // in which the Machine's VM will be created. The cluster identifier (uuid or name) can be obtained // from the Prism Central console or using the prism_central API. - // +kubebuilder:validation:Required + // +required Cluster NutanixResourceIdentifier `json:"cluster"` // subnets holds a list of identifiers (one or more) of the cluster's network subnets // If the feature gate NutanixMultiSubnets is enabled, up to 32 subnets may be configured. // for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be // obtained from the Prism Central console or using the prism_central API. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinItems=1 // +openshift:validation:FeatureGateAwareMaxItems:featureGate="",maxItems=1 // +openshift:validation:FeatureGateAwareMaxItems:featureGate=NutanixMultiSubnets,maxItems=32 @@ -1902,7 +1900,7 @@ const ( type NutanixResourceIdentifier struct { // type is the identifier type to use for this resource. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required Type NutanixIdentifierType `json:"type"` // uuid is the UUID of the resource in the PC. It cannot be empty if the type is UUID. @@ -1917,12 +1915,12 @@ type NutanixResourceIdentifier struct { // NutanixPrismEndpoint holds the endpoint address and port to access the Nutanix Prism Central or Element (cluster) type NutanixPrismEndpoint struct { // address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=256 Address string `json:"address"` // port is the port number to access the Nutanix Prism Central or Element (cluster) - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 Port int32 `json:"port"` @@ -1932,7 +1930,7 @@ type NutanixPrismEndpoint struct { type NutanixPrismElementEndpoint struct { // name is the name of the Prism Element (cluster). This value will correspond with // the cluster field configured on other resources (eg Machines, PVCs, etc). - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=256 Name string `json:"name"` @@ -1940,7 +1938,7 @@ type NutanixPrismElementEndpoint struct { // When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. // Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the // proxy spec.noProxy list. - // +kubebuilder:validation:Required + // +required Endpoint NutanixPrismEndpoint `json:"endpoint"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_ingress.go b/vendor/github.com/openshift/api/config/v1/types_ingress.go index 302913a16f9..9492e08a72c 100644 --- a/vendor/github.com/openshift/api/config/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/config/v1/types_ingress.go @@ -27,7 +27,6 @@ type Ingress struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec IngressSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -150,7 +149,7 @@ type AWSIngressSpec struct { // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb // +unionDiscriminator // +kubebuilder:validation:Enum:=NLB;Classic - // +kubebuilder:validation:Required + // +required Type AWSLBType `json:"type,omitempty"` } @@ -223,7 +222,6 @@ type ComponentRouteSpec struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Required // +required Namespace string `json:"namespace"` @@ -233,12 +231,10 @@ type ComponentRouteSpec struct { // entry in the list of status.componentRoutes if the route is to be customized. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Required // +required Name string `json:"name"` // hostname is the hostname that should be used by the route. - // +kubebuilder:validation:Required // +required Hostname Hostname `json:"hostname"` @@ -260,7 +256,6 @@ type ComponentRouteStatus struct { // +kubebuilder:validation:Pattern=^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Required // +required Namespace string `json:"namespace"` @@ -271,12 +266,10 @@ type ComponentRouteStatus struct { // entry in the list of spec.componentRoutes if the route is to be customized. // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Required // +required Name string `json:"name"` // defaultHostname is the hostname of this route prior to customization. - // +kubebuilder:validation:Required // +required DefaultHostname Hostname `json:"defaultHostname"` @@ -310,7 +303,6 @@ type ComponentRouteStatus struct { // relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied. // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:Required // +required RelatedObjects []ObjectReference `json:"relatedObjects"` } diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go index 1eeae69dac9..95e55a7ffc0 100644 --- a/vendor/github.com/openshift/api/config/v1/types_network.go +++ b/vendor/github.com/openshift/api/config/v1/types_network.go @@ -30,7 +30,6 @@ type Network struct { // As a general rule, this SHOULD NOT be read directly. Instead, you should // consume the NetworkStatus, as it indicates the currently deployed configuration. // Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each. - // +kubebuilder:validation:Required // +required Spec NetworkSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -55,7 +54,7 @@ type NetworkSpec struct { // +listType=atomic ServiceNetwork []string `json:"serviceNetwork"` - // NetworkType is the plugin that is to be deployed (e.g. OVNKubernetes). + // networkType is the plugin that is to be deployed (e.g. OVNKubernetes). // This should match a value that the cluster-network-operator understands, // or else no networking will be installed. // Currently supported values are: @@ -101,13 +100,13 @@ type NetworkStatus struct { // +listType=atomic ServiceNetwork []string `json:"serviceNetwork,omitempty"` - // NetworkType is the plugin that is deployed (e.g. OVNKubernetes). + // networkType is the plugin that is deployed (e.g. OVNKubernetes). NetworkType string `json:"networkType,omitempty"` - // ClusterNetworkMTU is the MTU for inter-pod networking. + // clusterNetworkMTU is the MTU for inter-pod networking. ClusterNetworkMTU int `json:"clusterNetworkMTU,omitempty"` - // Migration contains the cluster network migration configuration. + // migration contains the cluster network migration configuration. Migration *NetworkMigration `json:"migration,omitempty"` // conditions represents the observations of a network.config current state. @@ -185,35 +184,35 @@ type NetworkList struct { // NetworkMigration represents the network migration status. type NetworkMigration struct { - // NetworkType is the target plugin that is being deployed. + // networkType is the target plugin that is being deployed. // DEPRECATED: network type migration is no longer supported, // so this should always be unset. // +optional NetworkType string `json:"networkType,omitempty"` - // MTU is the MTU configuration that is being deployed. + // mtu is the MTU configuration that is being deployed. // +optional MTU *MTUMigration `json:"mtu,omitempty"` } // MTUMigration contains infomation about MTU migration. type MTUMigration struct { - // Network contains MTU migration configuration for the default network. + // network contains MTU migration configuration for the default network. // +optional Network *MTUMigrationValues `json:"network,omitempty"` - // Machine contains MTU migration configuration for the machine's uplink. + // machine contains MTU migration configuration for the machine's uplink. // +optional Machine *MTUMigrationValues `json:"machine,omitempty"` } // MTUMigrationValues contains the values for a MTU migration. type MTUMigrationValues struct { - // To is the MTU to migrate to. + // to is the MTU to migrate to. // +kubebuilder:validation:Minimum=0 To *uint32 `json:"to"` - // From is the MTU to migrate from. + // from is the MTU to migrate from. // +kubebuilder:validation:Minimum=0 // +optional From *uint32 `json:"from,omitempty"` diff --git a/vendor/github.com/openshift/api/config/v1/types_node.go b/vendor/github.com/openshift/api/config/v1/types_node.go index a50328c91f6..3fc7bc0c39a 100644 --- a/vendor/github.com/openshift/api/config/v1/types_node.go +++ b/vendor/github.com/openshift/api/config/v1/types_node.go @@ -28,7 +28,6 @@ type Node struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec NodeSpec `json:"spec"` @@ -38,11 +37,11 @@ type Node struct { } type NodeSpec struct { - // CgroupMode determines the cgroups version on the node + // cgroupMode determines the cgroups version on the node // +optional CgroupMode CgroupMode `json:"cgroupMode,omitempty"` - // WorkerLatencyProfile determins the how fast the kubelet is updating + // workerLatencyProfile determins the how fast the kubelet is updating // the status and corresponding reaction of the cluster // +optional WorkerLatencyProfile WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` diff --git a/vendor/github.com/openshift/api/config/v1/types_oauth.go b/vendor/github.com/openshift/api/config/v1/types_oauth.go index dce08a17f54..20845e4dbe9 100644 --- a/vendor/github.com/openshift/api/config/v1/types_oauth.go +++ b/vendor/github.com/openshift/api/config/v1/types_oauth.go @@ -27,7 +27,6 @@ type OAuth struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec OAuthSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_project.go b/vendor/github.com/openshift/api/config/v1/types_project.go index 78fd3f41a0d..3d219862be3 100644 --- a/vendor/github.com/openshift/api/config/v1/types_project.go +++ b/vendor/github.com/openshift/api/config/v1/types_project.go @@ -24,7 +24,6 @@ type Project struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ProjectSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_proxy.go b/vendor/github.com/openshift/api/config/v1/types_proxy.go index 2dfc66b1cdc..ed40176ce36 100644 --- a/vendor/github.com/openshift/api/config/v1/types_proxy.go +++ b/vendor/github.com/openshift/api/config/v1/types_proxy.go @@ -25,8 +25,7 @@ type Proxy struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // Spec holds user-settable values for the proxy configuration - // +kubebuilder:validation:Required + // spec holds user-settable values for the proxy configuration // +required Spec ProxySpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. diff --git a/vendor/github.com/openshift/api/config/v1/types_scheduling.go b/vendor/github.com/openshift/api/config/v1/types_scheduling.go index 2749f4f70d8..c90d5633f68 100644 --- a/vendor/github.com/openshift/api/config/v1/types_scheduling.go +++ b/vendor/github.com/openshift/api/config/v1/types_scheduling.go @@ -25,7 +25,6 @@ type Scheduler struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec SchedulerSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -74,7 +73,7 @@ type SchedulerSpec struct { // would not be applied. // +optional DefaultNodeSelector string `json:"defaultNodeSelector,omitempty"` - // MastersSchedulable allows masters nodes to be schedulable. When this flag is + // mastersSchedulable allows masters nodes to be schedulable. When this flag is // turned on, all the master nodes in the cluster will be made schedulable, // so that workload pods can run on them. The default value for this field is false, // meaning none of the master nodes are schedulable. diff --git a/vendor/github.com/openshift/api/config/v1/types_testreporting.go b/vendor/github.com/openshift/api/config/v1/types_testreporting.go index 4d642e060b5..00953957f49 100644 --- a/vendor/github.com/openshift/api/config/v1/types_testreporting.go +++ b/vendor/github.com/openshift/api/config/v1/types_testreporting.go @@ -15,7 +15,6 @@ type TestReporting struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required // +required Spec TestReportingSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -24,20 +23,20 @@ type TestReporting struct { } type TestReportingSpec struct { - // TestsForFeatureGates is a list, indexed by FeatureGate and includes information about testing. + // testsForFeatureGates is a list, indexed by FeatureGate and includes information about testing. TestsForFeatureGates []FeatureGateTests `json:"testsForFeatureGates"` } type FeatureGateTests struct { - // FeatureGate is the name of the FeatureGate as it appears in The FeatureGate CR instance. + // featureGate is the name of the FeatureGate as it appears in The FeatureGate CR instance. FeatureGate string `json:"featureGate"` - // Tests contains an item for every TestName + // tests contains an item for every TestName Tests []TestDetails `json:"tests"` } type TestDetails struct { - // TestName is the name of the test as it appears in junit XMLs. + // testName is the name of the test as it appears in junit XMLs. // It does not include the suite name since the same test can be executed in many suites. TestName string `json:"testName"` } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml index b2bc82e1a9f..78fd36f3faa 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.featuregated-crd-manifests.yaml @@ -315,6 +315,7 @@ infrastructures.config.openshift.io: - BareMetalLoadBalancer - GCPClusterHostedDNS - GCPLabelsTags + - HighlyAvailableArbiter - NutanixMultiSubnets - VSphereControlPlaneMachineSet - VSphereHostVMGroupZonal 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 a89678edb9e..0ac9c7ccd2b 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 @@ -22,8 +22,8 @@ func (AdmissionConfig) SwaggerDoc() map[string]string { var map_AdmissionPluginConfig = map[string]string{ "": "AdmissionPluginConfig holds the necessary configuration options for admission plugins", - "location": "Location is the path to a configuration file that contains the plugin's configuration", - "configuration": "Configuration is an embedded configuration object to be used as the plugin's configuration. If present, it will be used instead of the path to the configuration file.", + "location": "location is the path to a configuration file that contains the plugin's configuration", + "configuration": "configuration is an embedded configuration object to be used as the plugin's configuration. If present, it will be used instead of the path to the configuration file.", } func (AdmissionPluginConfig) SwaggerDoc() map[string]string { @@ -37,8 +37,8 @@ var map_AuditConfig = map[string]string{ "maximumFileRetentionDays": "Maximum number of days to retain old log files based on the timestamp encoded in their filename.", "maximumRetainedFiles": "Maximum number of old log files to retain.", "maximumFileSizeMegabytes": "Maximum size in megabytes of the log file before it gets rotated. Defaults to 100MB.", - "policyFile": "PolicyFile is a path to the file that defines the audit policy configuration.", - "policyConfiguration": "PolicyConfiguration is an embedded policy configuration object to be used as the audit policy configuration. If present, it will be used instead of the path to the policy file.", + "policyFile": "policyFile is a path to the file that defines the audit policy configuration.", + "policyConfiguration": "policyConfiguration is an embedded policy configuration object to be used as the audit policy configuration. If present, it will be used instead of the path to the policy file.", "logFormat": "Format of saved audits (legacy or json).", "webHookKubeConfig": "Path to a .kubeconfig formatted file that defines the audit webhook configuration.", "webHookMode": "Strategy for sending audit events (block or batch).", @@ -50,8 +50,8 @@ func (AuditConfig) SwaggerDoc() map[string]string { var map_CertInfo = map[string]string{ "": "CertInfo relates a certificate with a private key", - "certFile": "CertFile is a file containing a PEM-encoded certificate", - "keyFile": "KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile", + "certFile": "certFile is a file containing a PEM-encoded certificate", + "keyFile": "keyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile", } func (CertInfo) SwaggerDoc() map[string]string { @@ -71,7 +71,7 @@ func (ClientConnectionOverrides) SwaggerDoc() map[string]string { var map_ConfigMapFileReference = map[string]string{ "": "ConfigMapFileReference references a config map in a specific namespace. The namespace must be specified at the point of use.", - "key": "Key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references.", + "key": "key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references.", } func (ConfigMapFileReference) SwaggerDoc() map[string]string { @@ -107,8 +107,8 @@ func (DelegatedAuthorization) SwaggerDoc() map[string]string { var map_EtcdConnectionInfo = map[string]string{ "": "EtcdConnectionInfo holds information necessary for connecting to an etcd server", - "urls": "URLs are the URLs for etcd", - "ca": "CA is a file containing trusted roots for the etcd server certificates", + "urls": "urls are the URLs for etcd", + "ca": "ca is a file containing trusted roots for the etcd server certificates", } func (EtcdConnectionInfo) SwaggerDoc() map[string]string { @@ -116,7 +116,7 @@ func (EtcdConnectionInfo) SwaggerDoc() map[string]string { } var map_EtcdStorageConfig = map[string]string{ - "storagePrefix": "StoragePrefix is the path within etcd that the OpenShift resources will be rooted under. This value, if changed, will mean existing objects in etcd will no longer be located.", + "storagePrefix": "storagePrefix is the path within etcd that the OpenShift resources will be rooted under. This value, if changed, will mean existing objects in etcd will no longer be located.", } func (EtcdStorageConfig) SwaggerDoc() map[string]string { @@ -138,7 +138,7 @@ func (GenericAPIServerConfig) SwaggerDoc() map[string]string { var map_GenericControllerConfig = map[string]string{ "": "GenericControllerConfig provides information to configure a controller", - "servingInfo": "ServingInfo is the HTTP serving information for the controller's endpoints", + "servingInfo": "servingInfo is the HTTP serving information for the controller's endpoints", "leaderElection": "leaderElection provides information to elect a leader. Only override this if you have a specific need", "authentication": "authentication allows configuration of authentication for the endpoints", "authorization": "authorization allows configuration of authentication for the endpoints", @@ -150,8 +150,8 @@ func (GenericControllerConfig) SwaggerDoc() map[string]string { var map_HTTPServingInfo = map[string]string{ "": "HTTPServingInfo holds configuration for serving HTTP", - "maxRequestsInFlight": "MaxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit.", - "requestTimeoutSeconds": "RequestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if -1 there is no limit on requests.", + "maxRequestsInFlight": "maxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit.", + "requestTimeoutSeconds": "requestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if -1 there is no limit on requests.", } func (HTTPServingInfo) SwaggerDoc() map[string]string { @@ -193,7 +193,7 @@ func (MaxAgePolicy) SwaggerDoc() map[string]string { var map_NamedCertificate = map[string]string{ "": "NamedCertificate specifies a certificate/key, and the names it should be served for", - "names": "Names is a list of DNS names this certificate should be used to secure A name can be a normal DNS name, or can contain leading wildcard segments.", + "names": "names is a list of DNS names this certificate should be used to secure A name can be a normal DNS name, or can contain leading wildcard segments.", } func (NamedCertificate) SwaggerDoc() map[string]string { @@ -202,8 +202,8 @@ func (NamedCertificate) SwaggerDoc() map[string]string { var map_RemoteConnectionInfo = map[string]string{ "": "RemoteConnectionInfo holds information necessary for establishing a remote connection", - "url": "URL is the remote URL to connect to", - "ca": "CA is the CA for verifying TLS connections", + "url": "url is the remote URL to connect to", + "ca": "ca is the CA for verifying TLS connections", } func (RemoteConnectionInfo) SwaggerDoc() map[string]string { @@ -233,12 +233,12 @@ func (SecretNameReference) SwaggerDoc() map[string]string { var map_ServingInfo = map[string]string{ "": "ServingInfo holds information about serving web pages", - "bindAddress": "BindAddress is the ip:port to serve on", - "bindNetwork": "BindNetwork is the type of network to bind to - defaults to \"tcp4\", accepts \"tcp\", \"tcp4\", and \"tcp6\"", - "clientCA": "ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates", - "namedCertificates": "NamedCertificates is a list of certificates to use to secure requests to specific hostnames", - "minTLSVersion": "MinTLSVersion is the minimum TLS version supported. Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants", - "cipherSuites": "CipherSuites contains an overridden list of ciphers for the server to support. Values must match cipher suite IDs from https://golang.org/pkg/crypto/tls/#pkg-constants", + "bindAddress": "bindAddress is the ip:port to serve on", + "bindNetwork": "bindNetwork is the type of network to bind to - defaults to \"tcp4\", accepts \"tcp\", \"tcp4\", and \"tcp6\"", + "clientCA": "clientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates", + "namedCertificates": "namedCertificates is a list of certificates to use to secure requests to specific hostnames", + "minTLSVersion": "minTLSVersion is the minimum TLS version supported. Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants", + "cipherSuites": "cipherSuites contains an overridden list of ciphers for the server to support. Values must match cipher suite IDs from https://golang.org/pkg/crypto/tls/#pkg-constants", } func (ServingInfo) SwaggerDoc() map[string]string { @@ -255,10 +255,10 @@ func (StringSource) SwaggerDoc() map[string]string { var map_StringSourceSpec = map[string]string{ "": "StringSourceSpec specifies a string value, or external location", - "value": "Value specifies the cleartext value, or an encrypted value if keyFile is specified.", - "env": "Env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified.", - "file": "File references a file containing the cleartext value, or an encrypted value if a keyFile is specified.", - "keyFile": "KeyFile references a file containing the key to use to decrypt the value.", + "value": "value specifies the cleartext value, or an encrypted value if keyFile is specified.", + "env": "env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified.", + "file": "file references a file containing the cleartext value, or an encrypted value if a keyFile is specified.", + "keyFile": "keyFile references a file containing the key to use to decrypt the value.", } func (StringSourceSpec) SwaggerDoc() map[string]string { @@ -369,7 +369,7 @@ var map_AuthenticationSpec = map[string]string{ "webhookTokenAuthenticators": "webhookTokenAuthenticators is DEPRECATED, setting it has no effect.", "webhookTokenAuthenticator": "webhookTokenAuthenticator configures a remote token reviewer. These remote authentication webhooks can be used to verify bearer tokens via the tokenreviews.authentication.k8s.io REST API. This is required to honor bearer tokens that are provisioned by an external authentication service.\n\nCan only be set if \"Type\" is set to \"None\".", "serviceAccountIssuer": "serviceAccountIssuer is the identifier of the bound service account token issuer. The default is https://kubernetes.default.svc WARNING: Updating this field will not result in immediate invalidation of all bound tokens with the previous issuer value. Instead, the tokens issued by previous service account issuer will continue to be trusted for a time period chosen by the platform (currently set to 24h). This time period is subject to change over time. This allows internal components to transition to use new service account issuer without service distruption.", - "oidcProviders": "OIDCProviders are OIDC identity providers that can issue tokens for this cluster Can only be set if \"Type\" is set to \"OIDC\".\n\nAt most one provider can be configured.", + "oidcProviders": "oidcProviders are OIDC identity providers that can issue tokens for this cluster Can only be set if \"Type\" is set to \"OIDC\".\n\nAt most one provider can be configured.", } func (AuthenticationSpec) SwaggerDoc() map[string]string { @@ -378,7 +378,7 @@ func (AuthenticationSpec) SwaggerDoc() map[string]string { var map_AuthenticationStatus = map[string]string{ "integratedOAuthMetadata": "integratedOAuthMetadata contains the discovery endpoint data for OAuth 2.0 Authorization Server Metadata for the in-cluster integrated OAuth server. This discovery document can be viewed from its served location: oc get --raw '/.well-known/oauth-authorization-server' For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 This contains the observed value based on cluster state. An explicitly set value in spec.oauthMetadata has precedence over this field. This field has no meaning if authentication spec.type is not set to IntegratedOAuth. The key \"oauthMetadata\" is used to locate the data. If the config map or expected key is not found, no metadata is served. If the specified metadata is not valid, no metadata is served. The namespace for this config map is openshift-config-managed.", - "oidcClients": "OIDCClients is where participating operators place the current OIDC client status for OIDC clients that can be customized by the cluster-admin.", + "oidcClients": "oidcClients is where participating operators place the current OIDC client status for OIDC clients that can be customized by the cluster-admin.", } func (AuthenticationStatus) SwaggerDoc() map[string]string { @@ -395,11 +395,11 @@ func (DeprecatedWebhookTokenAuthenticator) SwaggerDoc() map[string]string { } var map_OIDCClientConfig = map[string]string{ - "componentName": "ComponentName is the name of the component that is supposed to consume this client configuration", - "componentNamespace": "ComponentNamespace is the namespace of the component that is supposed to consume this client configuration", - "clientID": "ClientID is the identifier of the OIDC client from the OIDC provider", - "clientSecret": "ClientSecret refers to a secret in the `openshift-config` namespace that contains the client secret in the `clientSecret` key of the `.data` field", - "extraScopes": "ExtraScopes is an optional set of scopes to request tokens with.", + "componentName": "componentName is the name of the component that is supposed to consume this client configuration", + "componentNamespace": "componentNamespace is the namespace of the component that is supposed to consume this client configuration", + "clientID": "clientID is the identifier of the OIDC client from the OIDC provider", + "clientSecret": "clientSecret refers to a secret in the `openshift-config` namespace that contains the client secret in the `clientSecret` key of the `.data` field", + "extraScopes": "extraScopes is an optional set of scopes to request tokens with.", } func (OIDCClientConfig) SwaggerDoc() map[string]string { @@ -409,7 +409,7 @@ func (OIDCClientConfig) SwaggerDoc() map[string]string { var map_OIDCClientReference = map[string]string{ "oidcProviderName": "OIDCName refers to the `name` of the provider from `oidcProviders`", "issuerURL": "URL is the serving URL of the token issuer. Must use the https:// scheme.", - "clientID": "ClientID is the identifier of the OIDC client from the OIDC provider", + "clientID": "clientID is the identifier of the OIDC client from the OIDC provider", } func (OIDCClientReference) SwaggerDoc() map[string]string { @@ -417,11 +417,11 @@ func (OIDCClientReference) SwaggerDoc() map[string]string { } var map_OIDCClientStatus = map[string]string{ - "componentName": "ComponentName is the name of the component that will consume a client configuration.", - "componentNamespace": "ComponentNamespace is the namespace of the component that will consume a client configuration.", - "currentOIDCClients": "CurrentOIDCClients is a list of clients that the component is currently using.", - "consumingUsers": "ConsumingUsers is a slice of ServiceAccounts that need to have read permission on the `clientSecret` secret.", - "conditions": "Conditions are used to communicate the state of the `oidcClients` entry.\n\nSupported conditions include Available, Degraded and Progressing.\n\nIf Available is true, the component is successfully using the configured client. If Degraded is true, that means something has gone wrong trying to handle the client configuration. If Progressing is true, that means the component is taking some action related to the `oidcClients` entry.", + "componentName": "componentName is the name of the component that will consume a client configuration.", + "componentNamespace": "componentNamespace is the namespace of the component that will consume a client configuration.", + "currentOIDCClients": "currentOIDCClients is a list of clients that the component is currently using.", + "consumingUsers": "consumingUsers is a slice of ServiceAccounts that need to have read permission on the `clientSecret` secret.", + "conditions": "conditions are used to communicate the state of the `oidcClients` entry.\n\nSupported conditions include Available, Degraded and Progressing.\n\nIf Available is true, the component is successfully using the configured client. If Degraded is true, that means something has gone wrong trying to handle the client configuration. If Progressing is true, that means the component is taking some action related to the `oidcClients` entry.", } func (OIDCClientStatus) SwaggerDoc() map[string]string { @@ -429,11 +429,11 @@ func (OIDCClientStatus) SwaggerDoc() map[string]string { } var map_OIDCProvider = map[string]string{ - "name": "Name of the OIDC provider", - "issuer": "Issuer describes atributes of the OIDC token issuer", - "oidcClients": "OIDCClients contains configuration for the platform's clients that need to request tokens from the issuer", - "claimMappings": "ClaimMappings describes rules on how to transform information from an ID token into a cluster identity", - "claimValidationRules": "ClaimValidationRules are rules that are applied to validate token claims to authenticate users.", + "name": "name of the OIDC provider", + "issuer": "issuer describes atributes of the OIDC token issuer", + "oidcClients": "oidcClients contains configuration for the platform's clients that need to request tokens from the issuer", + "claimMappings": "claimMappings describes rules on how to transform information from an ID token into a cluster identity", + "claimValidationRules": "claimValidationRules are rules that are applied to validate token claims to authenticate users.", } func (OIDCProvider) SwaggerDoc() map[string]string { @@ -441,7 +441,7 @@ func (OIDCProvider) SwaggerDoc() map[string]string { } var map_PrefixedClaimMapping = map[string]string{ - "prefix": "Prefix is a string to prefix the value from the token in the result of the claim mapping.\n\nBy default, no prefixing occurs.\n\nExample: if `prefix` is set to \"myoidc:\"\" and the `claim` in JWT contains an array of strings \"a\", \"b\" and \"c\", the mapping will result in an array of string \"myoidc:a\", \"myoidc:b\" and \"myoidc:c\".", + "prefix": "prefix is a string to prefix the value from the token in the result of the claim mapping.\n\nBy default, no prefixing occurs.\n\nExample: if `prefix` is set to \"myoidc:\"\" and the `claim` in JWT contains an array of strings \"a\", \"b\" and \"c\", the mapping will result in an array of string \"myoidc:a\", \"myoidc:b\" and \"myoidc:c\".", } func (PrefixedClaimMapping) SwaggerDoc() map[string]string { @@ -449,7 +449,7 @@ func (PrefixedClaimMapping) SwaggerDoc() map[string]string { } var map_TokenClaimMapping = map[string]string{ - "claim": "Claim is a JWT token claim to be used in the mapping", + "claim": "claim is a JWT token claim to be used in the mapping", } func (TokenClaimMapping) SwaggerDoc() map[string]string { @@ -457,8 +457,8 @@ func (TokenClaimMapping) SwaggerDoc() map[string]string { } var map_TokenClaimMappings = map[string]string{ - "username": "Username is a name of the claim that should be used to construct usernames for the cluster identity.\n\nDefault value: \"sub\"", - "groups": "Groups is a name of the claim that should be used to construct groups for the cluster identity. The referenced claim must use array of strings values.", + "username": "username is a name of the claim that should be used to construct usernames for the cluster identity.\n\nDefault value: \"sub\"", + "groups": "groups is a name of the claim that should be used to construct groups for the cluster identity. The referenced claim must use array of strings values.", } func (TokenClaimMappings) SwaggerDoc() map[string]string { @@ -466,8 +466,8 @@ func (TokenClaimMappings) SwaggerDoc() map[string]string { } var map_TokenClaimValidationRule = map[string]string{ - "type": "Type sets the type of the validation rule", - "requiredClaim": "RequiredClaim allows configuring a required claim name and its expected value", + "type": "type sets the type of the validation rule", + "requiredClaim": "requiredClaim allows configuring a required claim name and its expected value", } func (TokenClaimValidationRule) SwaggerDoc() map[string]string { @@ -476,7 +476,7 @@ func (TokenClaimValidationRule) SwaggerDoc() map[string]string { var map_TokenIssuer = map[string]string{ "issuerURL": "URL is the serving URL of the token issuer. Must use the https:// scheme.", - "audiences": "Audiences is an array of audiences that the token was issued for. Valid tokens must include at least one of these values in their \"aud\" claim. Must be set to exactly one value.", + "audiences": "audiences is an array of audiences that the token was issued for. Valid tokens must include at least one of these values in their \"aud\" claim. Must be set to exactly one value.", "issuerCertificateAuthority": "CertificateAuthority is a reference to a config map in the configuration namespace. The .data of the configMap must contain the \"ca-bundle.crt\" key. If unset, system trust is used instead.", } @@ -485,8 +485,8 @@ func (TokenIssuer) SwaggerDoc() map[string]string { } var map_TokenRequiredClaim = map[string]string{ - "claim": "Claim is a name of a required claim. Only claims with string values are supported.", - "requiredValue": "RequiredValue is the required value for the claim.", + "claim": "claim is a name of a required claim. Only claims with string values are supported.", + "requiredValue": "requiredValue is the required value for the claim.", } func (TokenRequiredClaim) SwaggerDoc() map[string]string { @@ -494,7 +494,7 @@ func (TokenRequiredClaim) SwaggerDoc() map[string]string { } var map_UsernameClaimMapping = map[string]string{ - "prefixPolicy": "PrefixPolicy specifies how a prefix should apply.\n\nBy default, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins.\n\nSet to \"NoPrefix\" to disable prefixing.\n\nExample:\n (1) `prefix` is set to \"myoidc:\" and `claim` is set to \"username\".\n If the JWT claim `username` contains value `userA`, the resulting\n mapped value will be \"myoidc:userA\".\n (2) `prefix` is set to \"myoidc:\" and `claim` is set to \"email\". If the\n JWT `email` claim contains value \"userA@myoidc.tld\", the resulting\n mapped value will be \"myoidc:userA@myoidc.tld\".\n (3) `prefix` is unset, `issuerURL` is set to `https://myoidc.tld`,\n the JWT claims include \"username\":\"userA\" and \"email\":\"userA@myoidc.tld\",\n and `claim` is set to:\n (a) \"username\": the mapped value will be \"https://myoidc.tld#userA\"\n (b) \"email\": the mapped value will be \"userA@myoidc.tld\"", + "prefixPolicy": "prefixPolicy specifies how a prefix should apply.\n\nBy default, claims other than `email` will be prefixed with the issuer URL to prevent naming clashes with other plugins.\n\nSet to \"NoPrefix\" to disable prefixing.\n\nExample:\n (1) `prefix` is set to \"myoidc:\" and `claim` is set to \"username\".\n If the JWT claim `username` contains value `userA`, the resulting\n mapped value will be \"myoidc:userA\".\n (2) `prefix` is set to \"myoidc:\" and `claim` is set to \"email\". If the\n JWT `email` claim contains value \"userA@myoidc.tld\", the resulting\n mapped value will be \"myoidc:userA@myoidc.tld\".\n (3) `prefix` is unset, `issuerURL` is set to `https://myoidc.tld`,\n the JWT claims include \"username\":\"userA\" and \"email\":\"userA@myoidc.tld\",\n and `claim` is set to:\n (a) \"username\": the mapped value will be \"https://myoidc.tld#userA\"\n (b) \"email\": the mapped value will be \"userA@myoidc.tld\"", } func (UsernameClaimMapping) SwaggerDoc() map[string]string { @@ -513,7 +513,7 @@ func (WebhookTokenAuthenticator) SwaggerDoc() map[string]string { var map_Build = map[string]string{ "": "Build configures the behavior of OpenShift builds for the entire cluster. This includes default settings that can be overridden in BuildConfig objects, and overrides which are applied to all builds.\n\nThe canonical name is \"cluster\"\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Spec holds user-settable values for the build controller configuration", + "spec": "spec holds user-settable values for the build controller configuration", } func (Build) SwaggerDoc() map[string]string { @@ -521,11 +521,11 @@ func (Build) SwaggerDoc() map[string]string { } var map_BuildDefaults = map[string]string{ - "defaultProxy": "DefaultProxy contains the default proxy settings for all build operations, including image pull/push and source download.\n\nValues can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables in the build config's strategy.", - "gitProxy": "GitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone.\n\nValues that are not set here will be inherited from DefaultProxy.", - "env": "Env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build", - "imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig.", - "resources": "Resources defines resource requirements to execute the build.", + "defaultProxy": "defaultProxy contains the default proxy settings for all build operations, including image pull/push and source download.\n\nValues can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables in the build config's strategy.", + "gitProxy": "gitProxy contains the proxy settings for git operations only. If set, this will override any Proxy settings for all git commands, such as git clone.\n\nValues that are not set here will be inherited from DefaultProxy.", + "env": "env is a set of default environment variables that will be applied to the build if the specified variables do not exist on the build", + "imageLabels": "imageLabels is a list of docker labels that are applied to the resulting image. User can override a default label by providing a label with the same name in their Build/BuildConfig.", + "resources": "resources defines resource requirements to execute the build.", } func (BuildDefaults) SwaggerDoc() map[string]string { @@ -542,10 +542,10 @@ func (BuildList) SwaggerDoc() map[string]string { } var map_BuildOverrides = map[string]string{ - "imageLabels": "ImageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.", - "nodeSelector": "NodeSelector is a selector which must be true for the build pod to fit on a node", - "tolerations": "Tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.", - "forcePull": "ForcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself", + "imageLabels": "imageLabels is a list of docker labels that are applied to the resulting image. If user provided a label in their Build/BuildConfig with the same name as one in this list, the user's label will be overwritten.", + "nodeSelector": "nodeSelector is a selector which must be true for the build pod to fit on a node", + "tolerations": "tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.", + "forcePull": "forcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself", } func (BuildOverrides) SwaggerDoc() map[string]string { @@ -553,9 +553,9 @@ func (BuildOverrides) SwaggerDoc() map[string]string { } var map_BuildSpec = map[string]string{ - "additionalTrustedCA": "AdditionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config.\n\nDEPRECATED: Additional CAs for image pull and push should be set on image.config.openshift.io/cluster instead.", - "buildDefaults": "BuildDefaults controls the default information for Builds", - "buildOverrides": "BuildOverrides controls override settings for builds", + "additionalTrustedCA": "additionalTrustedCA is a reference to a ConfigMap containing additional CAs that should be trusted for image pushes and pulls during builds. The namespace for this config map is openshift-config.\n\nDEPRECATED: Additional CAs for image pull and push should be set on image.config.openshift.io/cluster instead.", + "buildDefaults": "buildDefaults controls the default information for Builds", + "buildOverrides": "buildOverrides controls override settings for builds", } func (BuildSpec) SwaggerDoc() map[string]string { @@ -563,8 +563,8 @@ func (BuildSpec) SwaggerDoc() map[string]string { } var map_ImageLabel = map[string]string{ - "name": "Name defines the name of the label. It must have non-zero length.", - "value": "Value defines the literal value of the label.", + "name": "name defines the name of the label. It must have non-zero length.", + "value": "value defines the literal value of the label.", } func (ImageLabel) SwaggerDoc() map[string]string { @@ -648,7 +648,7 @@ func (OperandVersion) SwaggerDoc() map[string]string { var map_ClusterCondition = map[string]string{ "": "ClusterCondition is a union of typed cluster conditions. The 'type' property determines which of the type-specific properties are relevant. When evaluated on a cluster, the condition may match, not match, or fail to evaluate.", "type": "type represents the cluster-condition type. This defines the members and semantics of any additional properties.", - "promql": "promQL represents a cluster condition based on PromQL.", + "promql": "promql represents a cluster condition based on PromQL.", } func (ClusterCondition) SwaggerDoc() map[string]string { @@ -764,7 +764,7 @@ func (ConditionalUpdateRisk) SwaggerDoc() map[string]string { var map_PromQLClusterCondition = map[string]string{ "": "PromQLClusterCondition represents a cluster condition based on PromQL.", - "promql": "PromQL is a PromQL query classifying clusters. This query query should return a 1 in the match case and a 0 in the does-not-match case. Queries which return no time series, or which return values besides 0 or 1, are evaluation failures.", + "promql": "promql is a PromQL query classifying clusters. This query query should return a 1 in the match case and a 0 in the does-not-match case. Queries which return no time series, or which return values besides 0 or 1, are evaluation failures.", } func (PromQLClusterCondition) SwaggerDoc() map[string]string { @@ -1187,7 +1187,7 @@ func (AWSPlatformSpec) SwaggerDoc() map[string]string { var map_AWSPlatformStatus = map[string]string{ "": "AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider.", "region": "region holds the default AWS region for new AWS resources created by the cluster.", - "serviceEndpoints": "ServiceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", + "serviceEndpoints": "serviceEndpoints list contains custom endpoints which will override default service endpoint of AWS Services. There must be only one ServiceEndpoint for a service.", "resourceTags": "resourceTags is a list of additional tags to apply to AWS resources created for the cluster. See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags available for the user.", "cloudLoadBalancerConfig": "cloudLoadBalancerConfig holds configuration related to DNS and cloud load balancers. It allows configuration of in-cluster DNS as an alternative to the platform default DNS implementation. When using the ClusterHosted DNS type, Load Balancer IP addresses must be provided for the API and internal API load balancers as well as the ingress load balancer.", } @@ -1361,7 +1361,7 @@ func (EquinixMetalPlatformStatus) SwaggerDoc() map[string]string { var map_ExternalPlatformSpec = map[string]string{ "": "ExternalPlatformSpec holds the desired state for the generic External infrastructure provider.", - "platformName": "PlatformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. This field is solely for informational and reporting purposes and is not expected to be used for decision-making.", + "platformName": "platformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. This field is solely for informational and reporting purposes and is not expected to be used for decision-making.", } func (ExternalPlatformSpec) SwaggerDoc() map[string]string { @@ -1429,11 +1429,11 @@ func (IBMCloudPlatformSpec) SwaggerDoc() map[string]string { var map_IBMCloudPlatformStatus = map[string]string{ "": "IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider.", - "location": "Location is where the cluster has been deployed", - "resourceGroupName": "ResourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.", - "providerType": "ProviderType indicates the type of cluster that was created", - "cisInstanceCRN": "CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", - "dnsInstanceCRN": "DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", + "location": "location is where the cluster has been deployed", + "resourceGroupName": "resourceGroupName is the Resource Group for new IBMCloud resources created for the cluster.", + "providerType": "providerType indicates the type of cluster that was created", + "cisInstanceCRN": "cisInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", + "dnsInstanceCRN": "dnsInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", "serviceEndpoints": "serviceEndpoints is a list of custom endpoints which will override the default service endpoints of an IBM Cloud service. These endpoints are consumed by components within the cluster to reach the respective IBM Cloud Services.", } @@ -1661,19 +1661,19 @@ func (OvirtPlatformStatus) SwaggerDoc() map[string]string { var map_PlatformSpec = map[string]string{ "": "PlatformSpec holds the desired state specific to the underlying infrastructure provider of the current cluster. Since these are used at spec-level for the underlying cluster, it is supposed that only one of the spec structs is set.", "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"KubeVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.", - "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", - "azure": "Azure contains settings specific to the Azure infrastructure provider.", - "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.", - "baremetal": "BareMetal contains settings specific to the BareMetal platform.", - "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.", - "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.", - "vsphere": "VSphere contains settings specific to the VSphere infrastructure provider.", - "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.", - "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.", - "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.", - "powervs": "PowerVS contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider.", - "alibabaCloud": "AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", - "nutanix": "Nutanix contains settings specific to the Nutanix infrastructure provider.", + "aws": "aws contains settings specific to the Amazon Web Services infrastructure provider.", + "azure": "azure contains settings specific to the Azure infrastructure provider.", + "gcp": "gcp contains settings specific to the Google Cloud Platform infrastructure provider.", + "baremetal": "baremetal contains settings specific to the BareMetal platform.", + "openstack": "openstack contains settings specific to the OpenStack infrastructure provider.", + "ovirt": "ovirt contains settings specific to the oVirt infrastructure provider.", + "vsphere": "vsphere contains settings specific to the VSphere infrastructure provider.", + "ibmcloud": "ibmcloud contains settings specific to the IBMCloud infrastructure provider.", + "kubevirt": "kubevirt contains settings specific to the kubevirt infrastructure provider.", + "equinixMetal": "equinixMetal contains settings specific to the Equinix Metal infrastructure provider.", + "powervs": "powervs contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider.", + "alibabaCloud": "alibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", + "nutanix": "nutanix contains settings specific to the Nutanix infrastructure provider.", "external": "ExternalPlatformType represents generic infrastructure provider. Platform-specific components should be supplemented separately.", } @@ -1684,20 +1684,20 @@ func (PlatformSpec) SwaggerDoc() map[string]string { var map_PlatformStatus = map[string]string{ "": "PlatformStatus holds the current status specific to the underlying infrastructure provider of the current cluster. Since these are used at status-level for the underlying cluster, it is supposed that only one of the status structs is set.", "type": "type is the underlying infrastructure provider for the cluster. This value controls whether infrastructure automation such as service load balancers, dynamic volume provisioning, machine creation and deletion, and other integrations are enabled. If None, no infrastructure automation is enabled. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"Libvirt\", \"OpenStack\", \"VSphere\", \"oVirt\", \"EquinixMetal\", \"PowerVS\", \"AlibabaCloud\", \"Nutanix\" and \"None\". Individual components may not support all platforms, and must handle unrecognized platforms as None if they do not support that platform.\n\nThis value will be synced with to the `status.platform` and `status.platformStatus.type`. Currently this value cannot be changed once set.", - "aws": "AWS contains settings specific to the Amazon Web Services infrastructure provider.", - "azure": "Azure contains settings specific to the Azure infrastructure provider.", - "gcp": "GCP contains settings specific to the Google Cloud Platform infrastructure provider.", - "baremetal": "BareMetal contains settings specific to the BareMetal platform.", - "openstack": "OpenStack contains settings specific to the OpenStack infrastructure provider.", - "ovirt": "Ovirt contains settings specific to the oVirt infrastructure provider.", - "vsphere": "VSphere contains settings specific to the VSphere infrastructure provider.", - "ibmcloud": "IBMCloud contains settings specific to the IBMCloud infrastructure provider.", - "kubevirt": "Kubevirt contains settings specific to the kubevirt infrastructure provider.", - "equinixMetal": "EquinixMetal contains settings specific to the Equinix Metal infrastructure provider.", - "powervs": "PowerVS contains settings specific to the Power Systems Virtual Servers infrastructure provider.", - "alibabaCloud": "AlibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", - "nutanix": "Nutanix contains settings specific to the Nutanix infrastructure provider.", - "external": "External contains settings specific to the generic External infrastructure provider.", + "aws": "aws contains settings specific to the Amazon Web Services infrastructure provider.", + "azure": "azure contains settings specific to the Azure infrastructure provider.", + "gcp": "gcp contains settings specific to the Google Cloud Platform infrastructure provider.", + "baremetal": "baremetal contains settings specific to the BareMetal platform.", + "openstack": "openstack contains settings specific to the OpenStack infrastructure provider.", + "ovirt": "ovirt contains settings specific to the oVirt infrastructure provider.", + "vsphere": "vsphere contains settings specific to the VSphere infrastructure provider.", + "ibmcloud": "ibmcloud contains settings specific to the IBMCloud infrastructure provider.", + "kubevirt": "kubevirt contains settings specific to the kubevirt infrastructure provider.", + "equinixMetal": "equinixMetal contains settings specific to the Equinix Metal infrastructure provider.", + "powervs": "powervs contains settings specific to the Power Systems Virtual Servers infrastructure provider.", + "alibabaCloud": "alibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider.", + "nutanix": "nutanix contains settings specific to the Nutanix infrastructure provider.", + "external": "external contains settings specific to the generic External infrastructure provider.", } func (PlatformStatus) SwaggerDoc() map[string]string { @@ -1719,8 +1719,8 @@ var map_PowerVSPlatformStatus = map[string]string{ "zone": "zone holds the default zone for the new Power VS resources created by the cluster. Note: Currently only single-zone OCP clusters are supported", "resourceGroup": "resourceGroup is the resource group name for new IBMCloud resources created for a cluster. The resource group specified here will be used by cluster-image-registry-operator to set up a COS Instance in IBMCloud for the cluster registry. More about resource groups can be found here: https://cloud.ibm.com/docs/account?topic=account-rgs. When omitted, the image registry operator won't be able to configure storage, which results in the image registry cluster operator not being in an available state.", "serviceEndpoints": "serviceEndpoints is a list of custom endpoints which will override the default service endpoints of a Power VS service.", - "cisInstanceCRN": "CISInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", - "dnsInstanceCRN": "DNSInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", + "cisInstanceCRN": "cisInstanceCRN is the CRN of the Cloud Internet Services instance managing the DNS zone for the cluster's base domain", + "dnsInstanceCRN": "dnsInstanceCRN is the CRN of the DNS Services instance managing the DNS zone for the cluster's base domain", } func (PowerVSPlatformStatus) SwaggerDoc() map[string]string { @@ -1775,7 +1775,7 @@ var map_VSpherePlatformFailureDomainSpec = map[string]string{ "regionAffinity": "regionAffinity holds the type of region, Datacenter or ComputeCluster. When set to Datacenter, this means the region is a vCenter Datacenter as defined in topology. When set to ComputeCluster, this means the region is a vCenter Cluster as defined in topology.", "zoneAffinity": "zoneAffinity holds the type of the zone and the hostGroup which vmGroup and the hostGroup names in vCenter corresponds to a vm-host group of type Virtual Machine and Host respectively. Is also contains the vmHostRule which is an affinity vm-host rule in vCenter.", "server": "server is the fully-qualified domain name or the IP address of the vCenter server.", - "topology": "Topology describes a given failure domain using vSphere constructs", + "topology": "topology describes a given failure domain using vSphere constructs", } func (VSpherePlatformFailureDomainSpec) SwaggerDoc() map[string]string { @@ -1994,8 +1994,8 @@ func (ExternalIPPolicy) SwaggerDoc() map[string]string { var map_MTUMigration = map[string]string{ "": "MTUMigration contains infomation about MTU migration.", - "network": "Network contains MTU migration configuration for the default network.", - "machine": "Machine contains MTU migration configuration for the machine's uplink.", + "network": "network contains MTU migration configuration for the default network.", + "machine": "machine contains MTU migration configuration for the machine's uplink.", } func (MTUMigration) SwaggerDoc() map[string]string { @@ -2004,8 +2004,8 @@ func (MTUMigration) SwaggerDoc() map[string]string { var map_MTUMigrationValues = map[string]string{ "": "MTUMigrationValues contains the values for a MTU migration.", - "to": "To is the MTU to migrate to.", - "from": "From is the MTU to migrate from.", + "to": "to is the MTU to migrate to.", + "from": "from is the MTU to migrate from.", } func (MTUMigrationValues) SwaggerDoc() map[string]string { @@ -2064,8 +2064,8 @@ func (NetworkList) SwaggerDoc() map[string]string { var map_NetworkMigration = map[string]string{ "": "NetworkMigration represents the network migration status.", - "networkType": "NetworkType is the target plugin that is being deployed. DEPRECATED: network type migration is no longer supported, so this should always be unset.", - "mtu": "MTU is the MTU configuration that is being deployed.", + "networkType": "networkType is the target plugin that is being deployed. DEPRECATED: network type migration is no longer supported, so this should always be unset.", + "mtu": "mtu is the MTU configuration that is being deployed.", } func (NetworkMigration) SwaggerDoc() map[string]string { @@ -2076,7 +2076,7 @@ var map_NetworkSpec = map[string]string{ "": "NetworkSpec is the desired network configuration. As a general rule, this SHOULD NOT be read directly. Instead, you should consume the NetworkStatus, as it indicates the currently deployed configuration. Currently, most spec fields are immutable after installation. Please view the individual ones for further details on each.", "clusterNetwork": "IP address pool to use for pod IPs. This field is immutable after installation.", "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here. This field is immutable after installation.", - "networkType": "NetworkType is the plugin that is to be deployed (e.g. OVNKubernetes). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OVNKubernetes This field is immutable after installation.", + "networkType": "networkType is the plugin that is to be deployed (e.g. OVNKubernetes). This should match a value that the cluster-network-operator understands, or else no networking will be installed. Currently supported values are: - OVNKubernetes This field is immutable after installation.", "externalIP": "externalIP defines configuration for controllers that affect Service.ExternalIP. If nil, then ExternalIP is not allowed to be set.", "serviceNodePortRange": "The port range allowed for Services of type NodePort. If not specified, the default of 30000-32767 will be used. Such Services without a NodePort specified will have one automatically allocated from this range. This parameter can be updated after the cluster is installed.", "networkDiagnostics": "networkDiagnostics defines network diagnostics configuration.\n\nTakes precedence over spec.disableNetworkDiagnostics in network.operator.openshift.io. If networkDiagnostics is not specified or is empty, and the spec.disableNetworkDiagnostics flag in network.operator.openshift.io is set to true, the network diagnostics feature will be disabled.", @@ -2090,9 +2090,9 @@ var map_NetworkStatus = map[string]string{ "": "NetworkStatus is the current network configuration.", "clusterNetwork": "IP address pool to use for pod IPs.", "serviceNetwork": "IP address pool for services. Currently, we only support a single entry here.", - "networkType": "NetworkType is the plugin that is deployed (e.g. OVNKubernetes).", - "clusterNetworkMTU": "ClusterNetworkMTU is the MTU for inter-pod networking.", - "migration": "Migration contains the cluster network migration configuration.", + "networkType": "networkType is the plugin that is deployed (e.g. OVNKubernetes).", + "clusterNetworkMTU": "clusterNetworkMTU is the MTU for inter-pod networking.", + "migration": "migration contains the cluster network migration configuration.", "conditions": "conditions represents the observations of a network.config current state. Known .status.conditions.type are: \"NetworkDiagnosticsAvailable\"", } @@ -2121,8 +2121,8 @@ func (NodeList) SwaggerDoc() map[string]string { } var map_NodeSpec = map[string]string{ - "cgroupMode": "CgroupMode determines the cgroups version on the node", - "workerLatencyProfile": "WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster", + "cgroupMode": "cgroupMode determines the cgroups version on the node", + "workerLatencyProfile": "workerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster", "minimumKubeletVersion": "minimumKubeletVersion is the lowest version of a kubelet that can join the cluster. Specifically, the apiserver will deny most authorization requests of kubelets that are older than the specified version, only allowing the kubelet to get and update its node object, and perform subjectaccessreviews. This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads, and will eventually be marked as not ready. Its max length is 8, so maximum version allowed is either \"9.999.99\" or \"99.99.99\". Since the kubelet reports the version of the kubernetes release, not Openshift, this field references the underlying kubernetes version this version of Openshift is based off of. In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then they should set the minimumKubeletVersion to 1.30.0. When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version. Thus, a kubelet with version \"1.0.0-ec.0\" will be compatible with minimumKubeletVersion \"1.0.0\" or earlier.", } @@ -2470,7 +2470,7 @@ func (TemplateReference) SwaggerDoc() map[string]string { var map_Proxy = map[string]string{ "": "Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster`\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Spec holds user-settable values for the proxy configuration", + "spec": "spec holds user-settable values for the proxy configuration", "status": "status holds observed values from the cluster. They may not be overridden.", } @@ -2545,7 +2545,7 @@ var map_SchedulerSpec = map[string]string{ "profile": "profile sets which scheduling profile should be set in order to configure scheduling decisions for new pods.\n\nValid values are \"LowNodeUtilization\", \"HighNodeUtilization\", \"NoScoring\" Defaults to \"LowNodeUtilization\"", "profileCustomizations": "profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles.", "defaultNodeSelector": "defaultNodeSelector helps set the cluster-wide default node selector to restrict pod placement to specific nodes. This is applied to the pods created in all namespaces and creates an intersection with any existing nodeSelectors already set on a pod, additionally constraining that pod's selector. For example, defaultNodeSelector: \"type=user-node,region=east\" would set nodeSelector field in pod spec to \"type=user-node,region=east\" to all pods created in all namespaces. Namespaces having project-wide node selectors won't be impacted even if this field is set. This adds an annotation section to the namespace. For example, if a new namespace is created with node-selector='type=user-node,region=east', the annotation openshift.io/node-selector: type=user-node,region=east gets added to the project. When the openshift.io/node-selector annotation is set on the project the value is used in preference to the value we are setting for defaultNodeSelector field. For instance, openshift.io/node-selector: \"type=user-node,region=west\" means that the default of \"type=user-node,region=east\" set in defaultNodeSelector would not be applied.", - "mastersSchedulable": "MastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.", + "mastersSchedulable": "mastersSchedulable allows masters nodes to be schedulable. When this flag is turned on, all the master nodes in the cluster will be made schedulable, so that workload pods can run on them. The default value for this field is false, meaning none of the master nodes are schedulable. Important Note: Once the workload pods start running on the master nodes, extreme care must be taken to ensure that cluster-critical control plane components are not impacted. Please turn on this field after doing due diligence.", } func (SchedulerSpec) SwaggerDoc() map[string]string { @@ -2553,8 +2553,8 @@ func (SchedulerSpec) SwaggerDoc() map[string]string { } var map_FeatureGateTests = map[string]string{ - "featureGate": "FeatureGate is the name of the FeatureGate as it appears in The FeatureGate CR instance.", - "tests": "Tests contains an item for every TestName", + "featureGate": "featureGate is the name of the FeatureGate as it appears in The FeatureGate CR instance.", + "tests": "tests contains an item for every TestName", } func (FeatureGateTests) SwaggerDoc() map[string]string { @@ -2562,7 +2562,7 @@ func (FeatureGateTests) SwaggerDoc() map[string]string { } var map_TestDetails = map[string]string{ - "testName": "TestName is the name of the test as it appears in junit XMLs. It does not include the suite name since the same test can be executed in many suites.", + "testName": "testName is the name of the test as it appears in junit XMLs. It does not include the suite name since the same test can be executed in many suites.", } func (TestDetails) SwaggerDoc() map[string]string { @@ -2580,7 +2580,7 @@ func (TestReporting) SwaggerDoc() map[string]string { } var map_TestReportingSpec = map[string]string{ - "testsForFeatureGates": "TestsForFeatureGates is a list, indexed by FeatureGate and includes information about testing.", + "testsForFeatureGates": "testsForFeatureGates is a list, indexed by FeatureGate and includes information about testing.", } func (TestReportingSpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_backup.go b/vendor/github.com/openshift/api/config/v1alpha1/types_backup.go index 65eb5c1f759..e52a2e5c536 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_backup.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_backup.go @@ -24,18 +24,16 @@ type Backup struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec BackupSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. - // +kubebuilder:validation:Optional // +optional Status BackupStatus `json:"status"` } type BackupSpec struct { // etcd specifies the configuration for periodic backups of the etcd cluster - // +kubebuilder:validation:Required + // +required EtcdBackupSpec EtcdBackupSpec `json:"etcd"` } @@ -45,12 +43,11 @@ type BackupStatus struct { // EtcdBackupSpec provides configuration for automated etcd backups to the cluster-etcd-operator type EtcdBackupSpec struct { - // Schedule defines the recurring backup schedule in Cron format + // schedule defines the recurring backup schedule in Cron format // every 2 hours: 0 */2 * * * // every day at 3am: 0 3 * * * // Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. // The current default is "no backups", but will change in the future. - // +kubebuilder:validation:Optional // +optional // +kubebuilder:validation:Pattern:=`^(@(annually|yearly|monthly|weekly|daily|hourly))|(\*|(?:\*|(?:[0-9]|(?:[1-5][0-9])))\/(?:[0-9]|(?:[1-5][0-9]))|(?:[0-9]|(?:[1-5][0-9]))(?:(?:\-[0-9]|\-(?:[1-5][0-9]))?|(?:\,(?:[0-9]|(?:[1-5][0-9])))*)) (\*|(?:\*|(?:\*|(?:[0-9]|1[0-9]|2[0-3])))\/(?:[0-9]|1[0-9]|2[0-3])|(?:[0-9]|1[0-9]|2[0-3])(?:(?:\-(?:[0-9]|1[0-9]|2[0-3]))?|(?:\,(?:[0-9]|1[0-9]|2[0-3]))*)) (\*|(?:[1-9]|(?:[12][0-9])|3[01])(?:(?:\-(?:[1-9]|(?:[12][0-9])|3[01]))?|(?:\,(?:[1-9]|(?:[12][0-9])|3[01]))*)) (\*|(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(?:(?:\-(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?|(?:\,(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))*)) (\*|(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT)(?:(?:\-(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT))?|(?:\,(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT))*))$` Schedule string `json:"schedule"` @@ -73,7 +70,6 @@ type EtcdBackupSpec struct { // The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. // If not specified, this will default to the time zone of the kube-controller-manager process. // See https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones - // +kubebuilder:validation:Optional // +optional // +kubebuilder:validation:Pattern:=`^([A-Za-z_]+([+-]*0)*|[A-Za-z_]+(\/[A-Za-z_]+){1,2})(\/GMT[+-]\d{1,2})?$` TimeZone string `json:"timeZone"` @@ -84,17 +80,15 @@ type EtcdBackupSpec struct { // [A-Za-z_]+(/[A-Za-z_]+){1,2} - One or more alphabetical characters (uppercase or lowercase) or underscores, followed by one or two occurrences of a forward slash followed by one or more alphabetical characters or underscores. This allows for matching timezone identifiers with 2 or 3 parts, e.g America/Argentina/Buenos_Aires // (/GMT[+-]\d{1,2})? - Makes the GMT offset suffix optional. It matches "/GMT" followed by either a plus ("+") or minus ("-") sign and one or two digits (the GMT offset) - // RetentionPolicy defines the retention policy for retaining and deleting existing backups. - // +kubebuilder:validation:Optional + // retentionPolicy defines the retention policy for retaining and deleting existing backups. // +optional RetentionPolicy RetentionPolicy `json:"retentionPolicy"` - // PVCName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the + // pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the // etcd backup files would be saved // The PVC itself must always be created in the "openshift-etcd" namespace // If the PVC is left unspecified "" then the platform will choose a reasonable default location to save the backup. // In the future this would be backups saved across the control-plane master nodes. - // +kubebuilder:validation:Optional // +optional PVCName string `json:"pvcName"` } @@ -115,45 +109,40 @@ const ( // This struct is a discriminated union that allows users to select the type of retention policy from the supported types. // +union type RetentionPolicy struct { - // RetentionType sets the type of retention policy. + // retentionType sets the type of retention policy. // Currently, the only valid policies are retention by number of backups (RetentionNumber), by the size of backups (RetentionSize). More policies or types may be added in the future. // Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. // The current default is RetentionNumber with 15 backups kept. // +unionDiscriminator // +required - // +kubebuilder:validation:Required // +kubebuilder:validation:Enum:="";"RetentionNumber";"RetentionSize" RetentionType RetentionType `json:"retentionType"` - // RetentionNumber configures the retention policy based on the number of backups - // +kubebuilder:validation:Optional + // retentionNumber configures the retention policy based on the number of backups // +optional RetentionNumber *RetentionNumberConfig `json:"retentionNumber,omitempty"` - // RetentionSize configures the retention policy based on the size of backups - // +kubebuilder:validation:Optional + // retentionSize configures the retention policy based on the size of backups // +optional RetentionSize *RetentionSizeConfig `json:"retentionSize,omitempty"` } // RetentionNumberConfig specifies the configuration of the retention policy on the number of backups type RetentionNumberConfig struct { - // MaxNumberOfBackups defines the maximum number of backups to retain. + // maxNumberOfBackups defines the maximum number of backups to retain. // If the existing number of backups saved is equal to MaxNumberOfBackups then // the oldest backup will be removed before a new backup is initiated. // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Required // +required MaxNumberOfBackups int `json:"maxNumberOfBackups,omitempty"` } // RetentionSizeConfig specifies the configuration of the retention policy on the total size of backups type RetentionSizeConfig struct { - // MaxSizeOfBackupsGb defines the total size in GB of backups to retain. + // maxSizeOfBackupsGb defines the total size in GB of backups to retain. // If the current total size backups exceeds MaxSizeOfBackupsGb then // the oldest backup will be removed before a new backup is initiated. // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Required // +required MaxSizeOfBackupsGb int `json:"maxSizeOfBackupsGb,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go index 14650fd48f4..5eaeeea736b 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_image_policy.go @@ -24,7 +24,7 @@ type ClusterImagePolicy struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec contains the configuration for the cluster image policy. - // +kubebuilder:validation:Required + // +required Spec ClusterImagePolicySpec `json:"spec"` // status contains the observed state of the resource. // +optional @@ -44,13 +44,13 @@ type ClusterImagePolicySpec struct { // If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. // For additional details about the format, please refer to the document explaining the docker transport field, // which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxItems=256 // +listType=set Scopes []ImageScope `json:"scopes"` // policy contains configuration to allow scopes to be verified, and defines how // images not matching the verification policy will be treated. - // +kubebuilder:validation:Required + // +required Policy Policy `json:"policy"` } diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go b/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go index a177ddb0d66..7f57d88f915 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_image_policy.go @@ -23,7 +23,7 @@ type ImagePolicy struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required + // +required Spec ImagePolicySpec `json:"spec"` // status contains the observed state of the resource. // +optional @@ -43,13 +43,13 @@ type ImagePolicySpec struct { // If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. // For additional details about the format, please refer to the document explaining the docker transport field, // which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxItems=256 // +listType=set Scopes []ImageScope `json:"scopes"` // policy contains configuration to allow scopes to be verified, and defines how // images not matching the verification policy will be treated. - // +kubebuilder:validation:Required + // +required Policy Policy `json:"policy"` } @@ -62,7 +62,7 @@ type ImageScope string // Policy defines the verification policy for the items in the scopes list. type Policy struct { // rootOfTrust specifies the root of trust for the policy. - // +kubebuilder:validation:Required + // +required RootOfTrust PolicyRootOfTrust `json:"rootOfTrust"` // signedIdentity specifies what image identity the signature claims about the image. The required matchPolicy field specifies the approach used in the verification process to verify the identity in the signature and the actual image identity, the default matchPolicy is "MatchRepoDigestOrExact". // +optional @@ -78,7 +78,7 @@ type PolicyRootOfTrust struct { // "PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification. // "FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required PolicyType PolicyType `json:"policyType"` // publicKey defines the root of trust based on a sigstore public key. // +optional @@ -102,7 +102,7 @@ const ( type PublicKey struct { // keyData contains inline base64-encoded data for the PEM format public key. // KeyData must be at most 8192 characters. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=8192 KeyData []byte `json:"keyData"` // rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key. @@ -116,16 +116,16 @@ type PublicKey struct { type FulcioCAWithRekor struct { // fulcioCAData contains inline base64-encoded data for the PEM format fulcio CA. // fulcioCAData must be at most 8192 characters. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=8192 FulcioCAData []byte `json:"fulcioCAData"` // rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key. // rekorKeyData must be at most 8192 characters. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=8192 RekorKeyData []byte `json:"rekorKeyData"` // fulcioSubject specifies OIDC issuer and the email of the Fulcio authentication configuration. - // +kubebuilder:validation:Required + // +required FulcioSubject PolicyFulcioSubject `json:"fulcioSubject,omitempty"` } @@ -133,12 +133,12 @@ type FulcioCAWithRekor struct { type PolicyFulcioSubject struct { // oidcIssuer contains the expected OIDC issuer. It will be verified that the Fulcio-issued certificate contains a (Fulcio-defined) certificate extension pointing at this OIDC issuer URL. When Fulcio issues certificates, it includes a value based on an URL inside the client-provided ID token. // Example: "https://expected.OIDC.issuer/" - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:XValidation:rule="isURL(self)",message="oidcIssuer must be a valid URL" OIDCIssuer string `json:"oidcIssuer"` // signedEmail holds the email address the the Fulcio certificate is issued for. // Example: "expected-signing-user@example.com" - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:XValidation:rule=`self.matches('^\\S+@\\S+$')`,message="invalid email address" SignedEmail string `json:"signedEmail"` } @@ -157,7 +157,7 @@ type PolicyIdentity struct { // "ExactRepository" means that the identity in the signature must be in the same repository as a specific identity specified by "repository". // "RemapIdentity" means that the signature must be in the same as the remapped image identity. Remapped image identity is obtained by replacing the "prefix" with the specified “signedPrefix” if the the image identity matches the specified remapPrefix. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required MatchPolicy IdentityMatchPolicy `json:"matchPolicy"` // exactRepository is required if matchPolicy is set to "ExactRepository". // +optional @@ -175,7 +175,7 @@ type IdentityRepositoryPrefix string type PolicyMatchExactRepository struct { // repository is the reference of the image identity to be matched. // The value should be a repository name (by omitting the tag or digest) in a registry implementing the "Docker Registry HTTP API V2". For example, docker.io/library/busybox - // +kubebuilder:validation:Required + // +required Repository IdentityRepositoryPrefix `json:"repository"` } @@ -186,12 +186,12 @@ type PolicyMatchRemapIdentity struct { // The prefix and signedPrefix values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces, // or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form. // For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox. - // +kubebuilder:validation:Required + // +required Prefix IdentityRepositoryPrefix `json:"prefix"` // signedPrefix is the prefix of the image identity to be matched in the signature. The format is the same as "prefix". The values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces, // or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form. // For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox. - // +kubebuilder:validation:Required + // +required SignedPrefix IdentityRepositoryPrefix `json:"signedPrefix"` } diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_insights.go b/vendor/github.com/openshift/api/config/v1alpha1/types_insights.go index 171e96d5b80..3ae4de157cf 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_insights.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_insights.go @@ -24,7 +24,7 @@ type InsightsDataGather struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required + // +required Spec InsightsDataGatherSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. // +optional diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go index 55468f38dac..e6accce0d72 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go @@ -41,10 +41,10 @@ func (BackupSpec) SwaggerDoc() map[string]string { var map_EtcdBackupSpec = map[string]string{ "": "EtcdBackupSpec provides configuration for automated etcd backups to the cluster-etcd-operator", - "schedule": "Schedule defines the recurring backup schedule in Cron format every 2 hours: 0 */2 * * * every day at 3am: 0 3 * * * Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. The current default is \"no backups\", but will change in the future.", + "schedule": "schedule defines the recurring backup schedule in Cron format every 2 hours: 0 */2 * * * every day at 3am: 0 3 * * * Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. The current default is \"no backups\", but will change in the future.", "timeZone": "The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager process. See https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones", - "retentionPolicy": "RetentionPolicy defines the retention policy for retaining and deleting existing backups.", - "pvcName": "PVCName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the etcd backup files would be saved The PVC itself must always be created in the \"openshift-etcd\" namespace If the PVC is left unspecified \"\" then the platform will choose a reasonable default location to save the backup. In the future this would be backups saved across the control-plane master nodes.", + "retentionPolicy": "retentionPolicy defines the retention policy for retaining and deleting existing backups.", + "pvcName": "pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the etcd backup files would be saved The PVC itself must always be created in the \"openshift-etcd\" namespace If the PVC is left unspecified \"\" then the platform will choose a reasonable default location to save the backup. In the future this would be backups saved across the control-plane master nodes.", } func (EtcdBackupSpec) SwaggerDoc() map[string]string { @@ -53,7 +53,7 @@ func (EtcdBackupSpec) SwaggerDoc() map[string]string { var map_RetentionNumberConfig = map[string]string{ "": "RetentionNumberConfig specifies the configuration of the retention policy on the number of backups", - "maxNumberOfBackups": "MaxNumberOfBackups defines the maximum number of backups to retain. If the existing number of backups saved is equal to MaxNumberOfBackups then the oldest backup will be removed before a new backup is initiated.", + "maxNumberOfBackups": "maxNumberOfBackups defines the maximum number of backups to retain. If the existing number of backups saved is equal to MaxNumberOfBackups then the oldest backup will be removed before a new backup is initiated.", } func (RetentionNumberConfig) SwaggerDoc() map[string]string { @@ -62,9 +62,9 @@ func (RetentionNumberConfig) SwaggerDoc() map[string]string { var map_RetentionPolicy = map[string]string{ "": "RetentionPolicy defines the retention policy for retaining and deleting existing backups. This struct is a discriminated union that allows users to select the type of retention policy from the supported types.", - "retentionType": "RetentionType sets the type of retention policy. Currently, the only valid policies are retention by number of backups (RetentionNumber), by the size of backups (RetentionSize). More policies or types may be added in the future. Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. The current default is RetentionNumber with 15 backups kept.", - "retentionNumber": "RetentionNumber configures the retention policy based on the number of backups", - "retentionSize": "RetentionSize configures the retention policy based on the size of backups", + "retentionType": "retentionType sets the type of retention policy. Currently, the only valid policies are retention by number of backups (RetentionNumber), by the size of backups (RetentionSize). More policies or types may be added in the future. Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. The current default is RetentionNumber with 15 backups kept.", + "retentionNumber": "retentionNumber configures the retention policy based on the number of backups", + "retentionSize": "retentionSize configures the retention policy based on the size of backups", } func (RetentionPolicy) SwaggerDoc() map[string]string { @@ -73,7 +73,7 @@ func (RetentionPolicy) SwaggerDoc() map[string]string { var map_RetentionSizeConfig = map[string]string{ "": "RetentionSizeConfig specifies the configuration of the retention policy on the total size of backups", - "maxSizeOfBackupsGb": "MaxSizeOfBackupsGb defines the total size in GB of backups to retain. If the current total size backups exceeds MaxSizeOfBackupsGb then the oldest backup will be removed before a new backup is initiated.", + "maxSizeOfBackupsGb": "maxSizeOfBackupsGb defines the total size in GB of backups to retain. If the current total size backups exceeds MaxSizeOfBackupsGb then the oldest backup will be removed before a new backup is initiated.", } func (RetentionSizeConfig) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/features/features.go b/vendor/github.com/openshift/api/features/features.go index dcaf5712c02..d79959e8cf7 100644 --- a/vendor/github.com/openshift/api/features/features.go +++ b/vendor/github.com/openshift/api/features/features.go @@ -256,7 +256,7 @@ var ( contactPerson("jcaamano"). productScope(ocpSpecific). enhancementPR(legacyFeatureGateWithoutEnhancement). - enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + enableIn(configv1.Default, configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() FeatureGateRouteAdvertisements = newFeatureGate("RouteAdvertisements"). @@ -694,4 +694,28 @@ var ( enhancementPR("https://github.com/openshift/enhancements/pull/1711"). enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). mustRegister() + + FeatureGateKMSEncryptionProvider = newFeatureGate("KMSEncryptionProvider"). + reportProblemsToJiraComponent("kube-apiserver"). + contactPerson("swghosh"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1682"). + enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + mustRegister() + + FeatureGateHighlyAvailableArbiter = newFeatureGate("HighlyAvailableArbiter"). + reportProblemsToJiraComponent("TwoNode / Arbiter"). + contactPerson("eggfoobar"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1674"). + enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade). + mustRegister() + + FeatureGateCVOConfiguration = newFeatureGate("ClusterVersionOperatorConfiguration"). + reportProblemsToJiraComponent("Cluster Version Operator"). + contactPerson("dhurta"). + productScope(ocpSpecific). + enhancementPR("https://github.com/openshift/enhancements/pull/1492"). + enableIn(configv1.DevPreviewNoUpgrade). + mustRegister() ) diff --git a/vendor/github.com/openshift/api/image/v1/generated.proto b/vendor/github.com/openshift/api/image/v1/generated.proto index 6b5f24cb21a..dabdc6d84a5 100644 --- a/vendor/github.com/openshift/api/image/v1/generated.proto +++ b/vendor/github.com/openshift/api/image/v1/generated.proto @@ -47,39 +47,39 @@ message Image { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // DockerImageReference is the string that can be used to pull this image. + // dockerImageReference is the string that can be used to pull this image. optional string dockerImageReference = 2; - // DockerImageMetadata contains metadata about this image + // dockerImageMetadata contains metadata about this image // +patchStrategy=replace // +kubebuilder:pruning:PreserveUnknownFields optional .k8s.io.apimachinery.pkg.runtime.RawExtension dockerImageMetadata = 3; - // DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" + // dockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" optional string dockerImageMetadataVersion = 4; - // DockerImageManifest is the raw JSON of the manifest + // dockerImageManifest is the raw JSON of the manifest optional string dockerImageManifest = 5; - // DockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list. + // dockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list. repeated ImageLayer dockerImageLayers = 6; - // Signatures holds all signatures of the image. + // signatures holds all signatures of the image. // +patchMergeKey=name // +patchStrategy=merge repeated ImageSignature signatures = 7; - // DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. + // dockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. repeated bytes dockerImageSignatures = 8; - // DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. + // dockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. optional string dockerImageManifestMediaType = 9; - // DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. + // dockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. // Will not be set when the image represents a manifest list. optional string dockerImageConfig = 10; - // DockerImageManifests holds information about sub-manifests when the image represents a manifest list. + // dockerImageManifests holds information about sub-manifests when the image represents a manifest list. // When this field is present, no DockerImageLayers should be specified. repeated ImageManifest dockerImageManifests = 11; } @@ -114,56 +114,56 @@ message ImageBlobReferences { // ImageImportSpec describes a request to import a specific image. message ImageImportSpec { - // From is the source of an image to import; only kind DockerImage is allowed + // from is the source of an image to import; only kind DockerImage is allowed optional .k8s.io.api.core.v1.ObjectReference from = 1; - // To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used + // to is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used optional .k8s.io.api.core.v1.LocalObjectReference to = 2; - // ImportPolicy is the policy controlling how the image is imported + // importPolicy is the policy controlling how the image is imported optional TagImportPolicy importPolicy = 3; - // ReferencePolicy defines how other components should consume the image + // referencePolicy defines how other components should consume the image optional TagReferencePolicy referencePolicy = 5; - // IncludeManifest determines if the manifest for each image is returned in the response + // includeManifest determines if the manifest for each image is returned in the response optional bool includeManifest = 4; } // ImageImportStatus describes the result of an image import. message ImageImportStatus { - // Status is the status of the image import, including errors encountered while retrieving the image + // status is the status of the image import, including errors encountered while retrieving the image optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 1; - // Image is the metadata of that image, if the image was located + // image is the metadata of that image, if the image was located optional Image image = 2; - // Tag is the tag this image was located under, if any + // tag is the tag this image was located under, if any optional string tag = 3; - // Manifests holds sub-manifests metadata when importing a manifest list + // manifests holds sub-manifests metadata when importing a manifest list repeated Image manifests = 4; } // ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none. message ImageLayer { - // Name of the layer as defined by the underlying store. + // name of the layer as defined by the underlying store. optional string name = 1; - // Size of the layer in bytes as defined by the underlying store. + // size of the layer in bytes as defined by the underlying store. optional int64 size = 2; - // MediaType of the referenced object. + // mediaType of the referenced object. optional string mediaType = 3; } // ImageLayerData contains metadata about an image layer. message ImageLayerData { - // Size of the layer in bytes as defined by the underlying store. This field is + // size of the layer in bytes as defined by the underlying store. This field is // optional if the necessary information about size is not available. optional int64 size = 1; - // MediaType of the referenced object. + // mediaType of the referenced object. optional string mediaType = 2; } @@ -176,7 +176,7 @@ message ImageList { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // Items is a list of images + // items is a list of images repeated Image items = 2; } @@ -194,23 +194,23 @@ message ImageLookupPolicy { // ImageManifest represents sub-manifests of a manifest list. The Digest field points to a regular // Image object. message ImageManifest { - // Digest is the unique identifier for the manifest. It refers to an Image object. + // digest is the unique identifier for the manifest. It refers to an Image object. optional string digest = 1; - // MediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, + // mediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, // application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json. optional string mediaType = 2; - // ManifestSize represents the size of the raw object contents, in bytes. + // manifestSize represents the size of the raw object contents, in bytes. optional int64 manifestSize = 3; - // Architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`. + // architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`. optional string architecture = 4; - // OS specifies the operating system, for example `linux`. + // os specifies the operating system, for example `linux`. optional string os = 5; - // Variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU + // variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU // variant of the ARM CPU. optional string variant = 6; } @@ -234,7 +234,7 @@ message ImageSignature { // Required: An opaque binary string which is an image's signature. optional bytes content = 3; - // Conditions represent the latest available observations of a signature's current state. + // conditions represent the latest available observations of a signature's current state. // +patchMergeKey=type // +patchStrategy=merge repeated SignatureCondition conditions = 4; @@ -280,11 +280,11 @@ message ImageStream { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Spec describes the desired state of this stream + // spec describes the desired state of this stream // +optional optional ImageStreamSpec spec = 2; - // Status describes the current state of this stream + // status describes the current state of this stream // +optional optional ImageStreamStatus status = 3; } @@ -309,7 +309,7 @@ message ImageStreamImage { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Image associated with the ImageStream and image name. + // image associated with the ImageStream and image name. optional Image image = 2; } @@ -329,36 +329,36 @@ message ImageStreamImport { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Spec is a description of the images that the user wishes to import + // spec is a description of the images that the user wishes to import optional ImageStreamImportSpec spec = 2; - // Status is the result of importing the image + // status is the result of importing the image optional ImageStreamImportStatus status = 3; } // ImageStreamImportSpec defines what images should be imported. message ImageStreamImportSpec { - // Import indicates whether to perform an import - if so, the specified tags are set on the spec + // import indicates whether to perform an import - if so, the specified tags are set on the spec // and status of the image stream defined by the type meta. optional bool import = 1; - // Repository is an optional import of an entire container image repository. A maximum limit on the + // repository is an optional import of an entire container image repository. A maximum limit on the // number of tags imported this way is imposed by the server. optional RepositoryImportSpec repository = 2; - // Images are a list of individual images to import. + // images are a list of individual images to import. repeated ImageImportSpec images = 3; } // ImageStreamImportStatus contains information about the status of an image stream import. message ImageStreamImportStatus { - // Import is the image stream that was successfully updated or created when 'to' was set. + // import is the image stream that was successfully updated or created when 'to' was set. optional ImageStream import = 1; - // Repository is set if spec.repository was set to the outcome of the import + // repository is set if spec.repository was set to the outcome of the import optional RepositoryImportStatus repository = 2; - // Images is set with the result of importing spec.images + // images is set with the result of importing spec.images repeated ImageImportStatus images = 3; } @@ -389,7 +389,7 @@ message ImageStreamList { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // Items is a list of imageStreams + // items is a list of imageStreams repeated ImageStream items = 2; } @@ -409,10 +409,10 @@ message ImageStreamMapping { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - // Image is a container image. + // image is a container image. optional Image image = 2; - // Tag is a string value this image can be located with inside the stream. + // tag is a string value this image can be located with inside the stream. optional string tag = 3; } @@ -434,16 +434,16 @@ message ImageStreamSpec { // ImageStreamStatus contains information about the state of this image stream. message ImageStreamStatus { - // DockerImageRepository represents the effective location this stream may be accessed at. + // dockerImageRepository represents the effective location this stream may be accessed at. // May be empty until the server determines where the repository is located optional string dockerImageRepository = 1; - // PublicDockerImageRepository represents the public location from where the image can + // publicDockerImageRepository represents the public location from where the image can // be pulled outside the cluster. This field may be empty if the administrator // has not exposed the integrated registry externally. optional string publicDockerImageRepository = 3; - // Tags are a historical record of images associated with each tag. The first entry in the + // tags are a historical record of images associated with each tag. The first entry in the // TagEvent array is the currently tagged image. // +patchMergeKey=tag // +patchStrategy=merge @@ -496,7 +496,7 @@ message ImageStreamTagList { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // Items is the list of image stream tags + // items is the list of image stream tags repeated ImageStreamTag items = 2; } @@ -543,46 +543,46 @@ message ImageTagList { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - // Items is the list of image stream tags + // items is the list of image stream tags repeated ImageTag items = 2; } // NamedTagEventList relates a tag to its image history. message NamedTagEventList { - // Tag is the tag for which the history is recorded + // tag is the tag for which the history is recorded optional string tag = 1; // Standard object's metadata. repeated TagEvent items = 2; - // Conditions is an array of conditions that apply to the tag event list. + // conditions is an array of conditions that apply to the tag event list. repeated TagEventCondition conditions = 3; } // RepositoryImportSpec describes a request to import images from a container image repository. message RepositoryImportSpec { - // From is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed + // from is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed optional .k8s.io.api.core.v1.ObjectReference from = 1; - // ImportPolicy is the policy controlling how the image is imported + // importPolicy is the policy controlling how the image is imported optional TagImportPolicy importPolicy = 2; - // ReferencePolicy defines how other components should consume the image + // referencePolicy defines how other components should consume the image optional TagReferencePolicy referencePolicy = 4; - // IncludeManifest determines if the manifest for each image is returned in the response + // includeManifest determines if the manifest for each image is returned in the response optional bool includeManifest = 3; } // RepositoryImportStatus describes the result of an image repository import message RepositoryImportStatus { - // Status reflects whether any failure occurred during import + // status reflects whether any failure occurred during import optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 1; - // Images is a list of images successfully retrieved by the import of the repository. + // images is a list of images successfully retrieved by the import of the repository. repeated ImageImportStatus images = 2; - // AdditionalTags are tags that exist in the repository but were not imported because + // additionalTags are tags that exist in the repository but were not imported because // a maximum limit of automatic imports was applied. repeated string additionalTags = 3; } @@ -602,10 +602,10 @@ message SecretList { // SignatureCondition describes an image signature condition of particular kind at particular probe time. message SignatureCondition { - // Type of signature condition, Complete or Failed. + // type of signature condition, Complete or Failed. optional string type = 1; - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. optional string status = 2; // Last time the condition was checked. @@ -624,7 +624,7 @@ message SignatureCondition { // SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject // of signing certificate or key. message SignatureGenericEntity { - // Organization name. + // organization name. optional string organization = 1; // Common name (e.g. openshift-signing-service). @@ -648,55 +648,55 @@ message SignatureSubject { // TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag. message TagEvent { - // Created holds the time the TagEvent was created + // created holds the time the TagEvent was created optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time created = 1; - // DockerImageReference is the string that can be used to pull this image + // dockerImageReference is the string that can be used to pull this image optional string dockerImageReference = 2; - // Image is the image + // image is the image optional string image = 3; - // Generation is the spec tag generation that resulted in this tag being updated + // generation is the spec tag generation that resulted in this tag being updated optional int64 generation = 4; } // TagEventCondition contains condition information for a tag event. message TagEventCondition { - // Type of tag event condition, currently only ImportSuccess + // type of tag event condition, currently only ImportSuccess optional string type = 1; - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. optional string status = 2; - // LastTransitionTIme is the time the condition transitioned from one status to another. + // lastTransitionTime is the time the condition transitioned from one status to another. optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - // Reason is a brief machine readable explanation for the condition's last transition. + // reason is a brief machine readable explanation for the condition's last transition. optional string reason = 4; - // Message is a human readable description of the details about last transition, complementing reason. + // message is a human readable description of the details about last transition, complementing reason. optional string message = 5; - // Generation is the spec tag generation that this status corresponds to + // generation is the spec tag generation that this status corresponds to optional int64 generation = 6; } // TagImportPolicy controls how images related to this tag will be imported. message TagImportPolicy { - // Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. + // insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. optional bool insecure = 1; - // Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported + // scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported optional bool scheduled = 2; - // ImportMode describes how to import an image manifest. + // importMode describes how to import an image manifest. optional string importMode = 3; } // TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track. message TagReference { - // Name of the tag + // name of the tag optional string name = 1; // Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags. @@ -708,11 +708,11 @@ message TagReference { // can only reference a tag within this same ImageStream. optional .k8s.io.api.core.v1.ObjectReference from = 3; - // Reference states if the tag will be imported. Default value is false, which means the tag will + // reference states if the tag will be imported. Default value is false, which means the tag will // be imported. optional bool reference = 4; - // Generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference + // generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference // is changed the generation is set to match the current stream generation (which is incremented every // time spec is changed). Other processes in the system like the image importer observe that the // generation of spec tag is newer than the generation recorded in the status and use that as a trigger @@ -722,10 +722,10 @@ message TagReference { // +optional optional int64 generation = 5; - // ImportPolicy is information that controls how images may be imported by the server. + // importPolicy is information that controls how images may be imported by the server. optional TagImportPolicy importPolicy = 6; - // ReferencePolicy defines how other components should consume the image. + // referencePolicy defines how other components should consume the image. optional TagReferencePolicy referencePolicy = 7; } @@ -733,7 +733,7 @@ message TagReference { // image change triggers in deployment configs or builds are resolved. This allows the image stream // author to control how images are accessed. message TagReferencePolicy { - // Type determines how the image pull spec should be transformed when the image stream tag is used in + // type determines how the image pull spec should be transformed when the image stream tag is used in // deployment config triggers or new builds. The default value is `Source`, indicating the original // location of the image should be used (if imported). The user may also specify `Local`, indicating // that the pull spec should point to the integrated container image registry and leverage the registry's diff --git a/vendor/github.com/openshift/api/image/v1/types.go b/vendor/github.com/openshift/api/image/v1/types.go index 9919c0fe764..d4ee4bff697 100644 --- a/vendor/github.com/openshift/api/image/v1/types.go +++ b/vendor/github.com/openshift/api/image/v1/types.go @@ -19,7 +19,7 @@ type ImageList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Items is a list of images + // items is a list of images Items []Image `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -45,30 +45,30 @@ type Image struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // DockerImageReference is the string that can be used to pull this image. + // dockerImageReference is the string that can be used to pull this image. DockerImageReference string `json:"dockerImageReference,omitempty" protobuf:"bytes,2,opt,name=dockerImageReference"` - // DockerImageMetadata contains metadata about this image + // dockerImageMetadata contains metadata about this image // +patchStrategy=replace // +kubebuilder:pruning:PreserveUnknownFields DockerImageMetadata runtime.RawExtension `json:"dockerImageMetadata,omitempty" patchStrategy:"replace" protobuf:"bytes,3,opt,name=dockerImageMetadata"` - // DockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" + // dockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" DockerImageMetadataVersion string `json:"dockerImageMetadataVersion,omitempty" protobuf:"bytes,4,opt,name=dockerImageMetadataVersion"` - // DockerImageManifest is the raw JSON of the manifest + // dockerImageManifest is the raw JSON of the manifest DockerImageManifest string `json:"dockerImageManifest,omitempty" protobuf:"bytes,5,opt,name=dockerImageManifest"` - // DockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list. + // dockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list. DockerImageLayers []ImageLayer `json:"dockerImageLayers,omitempty" protobuf:"bytes,6,rep,name=dockerImageLayers"` - // Signatures holds all signatures of the image. + // signatures holds all signatures of the image. // +patchMergeKey=name // +patchStrategy=merge Signatures []ImageSignature `json:"signatures,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=signatures"` - // DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. + // dockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty" protobuf:"bytes,8,rep,name=dockerImageSignatures"` - // DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. + // dockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. DockerImageManifestMediaType string `json:"dockerImageManifestMediaType,omitempty" protobuf:"bytes,9,opt,name=dockerImageManifestMediaType"` - // DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. + // dockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. // Will not be set when the image represents a manifest list. DockerImageConfig string `json:"dockerImageConfig,omitempty" protobuf:"bytes,10,opt,name=dockerImageConfig"` - // DockerImageManifests holds information about sub-manifests when the image represents a manifest list. + // dockerImageManifests holds information about sub-manifests when the image represents a manifest list. // When this field is present, no DockerImageLayers should be specified. DockerImageManifests []ImageManifest `json:"dockerImageManifests,omitempty" protobuf:"bytes,11,rep,name=dockerImageManifests"` } @@ -76,29 +76,29 @@ type Image struct { // ImageManifest represents sub-manifests of a manifest list. The Digest field points to a regular // Image object. type ImageManifest struct { - // Digest is the unique identifier for the manifest. It refers to an Image object. + // digest is the unique identifier for the manifest. It refers to an Image object. Digest string `json:"digest" protobuf:"bytes,1,opt,name=digest"` - // MediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, + // mediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, // application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json. MediaType string `json:"mediaType" protobuf:"bytes,2,opt,name=mediaType"` - // ManifestSize represents the size of the raw object contents, in bytes. + // manifestSize represents the size of the raw object contents, in bytes. ManifestSize int64 `json:"manifestSize" protobuf:"varint,3,opt,name=manifestSize"` - // Architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`. + // architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`. Architecture string `json:"architecture" protobuf:"bytes,4,opt,name=architecture"` - // OS specifies the operating system, for example `linux`. + // os specifies the operating system, for example `linux`. OS string `json:"os" protobuf:"bytes,5,opt,name=os"` - // Variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU + // variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU // variant of the ARM CPU. Variant string `json:"variant,omitempty" protobuf:"bytes,6,opt,name=variant"` } // ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none. type ImageLayer struct { - // Name of the layer as defined by the underlying store. + // name of the layer as defined by the underlying store. Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Size of the layer in bytes as defined by the underlying store. + // size of the layer in bytes as defined by the underlying store. LayerSize int64 `json:"size" protobuf:"varint,2,opt,name=size"` - // MediaType of the referenced object. + // mediaType of the referenced object. MediaType string `json:"mediaType" protobuf:"bytes,3,opt,name=mediaType"` } @@ -126,7 +126,7 @@ type ImageSignature struct { Type string `json:"type" protobuf:"bytes,2,opt,name=type"` // Required: An opaque binary string which is an image's signature. Content []byte `json:"content" protobuf:"bytes,3,opt,name=content"` - // Conditions represent the latest available observations of a signature's current state. + // conditions represent the latest available observations of a signature's current state. // +patchMergeKey=type // +patchStrategy=merge Conditions []SignatureCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` @@ -154,9 +154,9 @@ type SignatureConditionType string // SignatureCondition describes an image signature condition of particular kind at particular probe time. type SignatureCondition struct { - // Type of signature condition, Complete or Failed. + // type of signature condition, Complete or Failed. Type SignatureConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=SignatureConditionType"` - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // Last time the condition was checked. LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` @@ -171,7 +171,7 @@ type SignatureCondition struct { // SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject // of signing certificate or key. type SignatureGenericEntity struct { - // Organization name. + // organization name. Organization string `json:"organization,omitempty" protobuf:"bytes,1,opt,name=organization"` // Common name (e.g. openshift-signing-service). CommonName string `json:"commonName,omitempty" protobuf:"bytes,2,opt,name=commonName"` @@ -204,7 +204,7 @@ type ImageStreamList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Items is a list of imageStreams + // items is a list of imageStreams Items []ImageStream `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -237,10 +237,10 @@ type ImageStream struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Spec describes the desired state of this stream + // spec describes the desired state of this stream // +optional Spec ImageStreamSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // Status describes the current state of this stream + // status describes the current state of this stream // +optional Status ImageStreamStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` } @@ -272,7 +272,7 @@ type ImageLookupPolicy struct { // TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track. type TagReference struct { - // Name of the tag + // name of the tag Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags. // +optional @@ -281,10 +281,10 @@ type TagReference struct { // are ImageStreamTag, ImageStreamImage, and DockerImage. ImageStreamTag references // can only reference a tag within this same ImageStream. From *corev1.ObjectReference `json:"from,omitempty" protobuf:"bytes,3,opt,name=from"` - // Reference states if the tag will be imported. Default value is false, which means the tag will + // reference states if the tag will be imported. Default value is false, which means the tag will // be imported. Reference bool `json:"reference,omitempty" protobuf:"varint,4,opt,name=reference"` - // Generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference + // generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference // is changed the generation is set to match the current stream generation (which is incremented every // time spec is changed). Other processes in the system like the image importer observe that the // generation of spec tag is newer than the generation recorded in the status and use that as a trigger @@ -293,19 +293,19 @@ type TagReference struct { // nil which will be merged with the current tag generation. // +optional Generation *int64 `json:"generation" protobuf:"varint,5,opt,name=generation"` - // ImportPolicy is information that controls how images may be imported by the server. + // importPolicy is information that controls how images may be imported by the server. ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,6,opt,name=importPolicy"` - // ReferencePolicy defines how other components should consume the image. + // referencePolicy defines how other components should consume the image. ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,7,opt,name=referencePolicy"` } // TagImportPolicy controls how images related to this tag will be imported. type TagImportPolicy struct { - // Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. + // insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. Insecure bool `json:"insecure,omitempty" protobuf:"varint,1,opt,name=insecure"` - // Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported + // scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported Scheduled bool `json:"scheduled,omitempty" protobuf:"varint,2,opt,name=scheduled"` - // ImportMode describes how to import an image manifest. + // importMode describes how to import an image manifest. ImportMode ImportModeType `json:"importMode,omitempty" protobuf:"bytes,3,opt,name=importMode,casttype=ImportModeType"` } @@ -342,7 +342,7 @@ const ( // image change triggers in deployment configs or builds are resolved. This allows the image stream // author to control how images are accessed. type TagReferencePolicy struct { - // Type determines how the image pull spec should be transformed when the image stream tag is used in + // type determines how the image pull spec should be transformed when the image stream tag is used in // deployment config triggers or new builds. The default value is `Source`, indicating the original // location of the image should be used (if imported). The user may also specify `Local`, indicating // that the pull spec should point to the integrated container image registry and leverage the registry's @@ -355,14 +355,14 @@ type TagReferencePolicy struct { // ImageStreamStatus contains information about the state of this image stream. type ImageStreamStatus struct { - // DockerImageRepository represents the effective location this stream may be accessed at. + // dockerImageRepository represents the effective location this stream may be accessed at. // May be empty until the server determines where the repository is located DockerImageRepository string `json:"dockerImageRepository" protobuf:"bytes,1,opt,name=dockerImageRepository"` - // PublicDockerImageRepository represents the public location from where the image can + // publicDockerImageRepository represents the public location from where the image can // be pulled outside the cluster. This field may be empty if the administrator // has not exposed the integrated registry externally. PublicDockerImageRepository string `json:"publicDockerImageRepository,omitempty" protobuf:"bytes,3,opt,name=publicDockerImageRepository"` - // Tags are a historical record of images associated with each tag. The first entry in the + // tags are a historical record of images associated with each tag. The first entry in the // TagEvent array is the currently tagged image. // +patchMergeKey=tag // +patchStrategy=merge @@ -371,23 +371,23 @@ type ImageStreamStatus struct { // NamedTagEventList relates a tag to its image history. type NamedTagEventList struct { - // Tag is the tag for which the history is recorded + // tag is the tag for which the history is recorded Tag string `json:"tag" protobuf:"bytes,1,opt,name=tag"` // Standard object's metadata. Items []TagEvent `json:"items" protobuf:"bytes,2,rep,name=items"` - // Conditions is an array of conditions that apply to the tag event list. + // conditions is an array of conditions that apply to the tag event list. Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` } // TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag. type TagEvent struct { - // Created holds the time the TagEvent was created + // created holds the time the TagEvent was created Created metav1.Time `json:"created" protobuf:"bytes,1,opt,name=created"` - // DockerImageReference is the string that can be used to pull this image + // dockerImageReference is the string that can be used to pull this image DockerImageReference string `json:"dockerImageReference" protobuf:"bytes,2,opt,name=dockerImageReference"` - // Image is the image + // image is the image Image string `json:"image" protobuf:"bytes,3,opt,name=image"` - // Generation is the spec tag generation that resulted in this tag being updated + // generation is the spec tag generation that resulted in this tag being updated Generation int64 `json:"generation" protobuf:"varint,4,opt,name=generation"` } @@ -401,17 +401,17 @@ const ( // TagEventCondition contains condition information for a tag event. type TagEventCondition struct { - // Type of tag event condition, currently only ImportSuccess + // type of tag event condition, currently only ImportSuccess Type TagEventConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TagEventConditionType"` - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` - // LastTransitionTIme is the time the condition transitioned from one status to another. + // lastTransitionTime is the time the condition transitioned from one status to another. LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // Reason is a brief machine readable explanation for the condition's last transition. + // reason is a brief machine readable explanation for the condition's last transition. Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // Message is a human readable description of the details about last transition, complementing reason. + // message is a human readable description of the details about last transition, complementing reason. Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` - // Generation is the spec tag generation that this status corresponds to + // generation is the spec tag generation that this status corresponds to Generation int64 `json:"generation" protobuf:"varint,6,opt,name=generation"` } @@ -438,9 +438,9 @@ type ImageStreamMapping struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Image is a container image. + // image is a container image. Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` - // Tag is a string value this image can be located with inside the stream. + // tag is a string value this image can be located with inside the stream. Tag string `json:"tag" protobuf:"bytes,3,opt,name=tag"` } @@ -500,7 +500,7 @@ type ImageStreamTagList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Items is the list of image stream tags + // items is the list of image stream tags Items []ImageStreamTag `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -555,7 +555,7 @@ type ImageTagList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Items is the list of image stream tags + // items is the list of image stream tags Items []ImageTag `json:"items" protobuf:"bytes,2,rep,name=items"` } @@ -585,7 +585,7 @@ type ImageStreamImage struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Image associated with the ImageStream and image name. + // image associated with the ImageStream and image name. Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` } @@ -651,10 +651,10 @@ type ImageBlobReferences struct { // ImageLayerData contains metadata about an image layer. type ImageLayerData struct { - // Size of the layer in bytes as defined by the underlying store. This field is + // size of the layer in bytes as defined by the underlying store. This field is // optional if the necessary information about size is not available. LayerSize *int64 `json:"size" protobuf:"varint,1,opt,name=size"` - // MediaType of the referenced object. + // mediaType of the referenced object. MediaType string `json:"mediaType" protobuf:"bytes,2,opt,name=mediaType"` } @@ -680,82 +680,82 @@ type ImageStreamImport struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - // Spec is a description of the images that the user wishes to import + // spec is a description of the images that the user wishes to import Spec ImageStreamImportSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // Status is the result of importing the image + // status is the result of importing the image Status ImageStreamImportStatus `json:"status" protobuf:"bytes,3,opt,name=status"` } // ImageStreamImportSpec defines what images should be imported. type ImageStreamImportSpec struct { - // Import indicates whether to perform an import - if so, the specified tags are set on the spec + // import indicates whether to perform an import - if so, the specified tags are set on the spec // and status of the image stream defined by the type meta. Import bool `json:"import" protobuf:"varint,1,opt,name=import"` - // Repository is an optional import of an entire container image repository. A maximum limit on the + // repository is an optional import of an entire container image repository. A maximum limit on the // number of tags imported this way is imposed by the server. Repository *RepositoryImportSpec `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` - // Images are a list of individual images to import. + // images are a list of individual images to import. Images []ImageImportSpec `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` } // ImageStreamImportStatus contains information about the status of an image stream import. type ImageStreamImportStatus struct { - // Import is the image stream that was successfully updated or created when 'to' was set. + // import is the image stream that was successfully updated or created when 'to' was set. Import *ImageStream `json:"import,omitempty" protobuf:"bytes,1,opt,name=import"` - // Repository is set if spec.repository was set to the outcome of the import + // repository is set if spec.repository was set to the outcome of the import Repository *RepositoryImportStatus `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` - // Images is set with the result of importing spec.images + // images is set with the result of importing spec.images Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` } // RepositoryImportSpec describes a request to import images from a container image repository. type RepositoryImportSpec struct { - // From is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed + // from is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - // ImportPolicy is the policy controlling how the image is imported + // importPolicy is the policy controlling how the image is imported ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,2,opt,name=importPolicy"` - // ReferencePolicy defines how other components should consume the image + // referencePolicy defines how other components should consume the image ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,4,opt,name=referencePolicy"` - // IncludeManifest determines if the manifest for each image is returned in the response + // includeManifest determines if the manifest for each image is returned in the response IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,3,opt,name=includeManifest"` } // RepositoryImportStatus describes the result of an image repository import type RepositoryImportStatus struct { - // Status reflects whether any failure occurred during import + // status reflects whether any failure occurred during import Status metav1.Status `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` - // Images is a list of images successfully retrieved by the import of the repository. + // images is a list of images successfully retrieved by the import of the repository. Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,2,rep,name=images"` - // AdditionalTags are tags that exist in the repository but were not imported because + // additionalTags are tags that exist in the repository but were not imported because // a maximum limit of automatic imports was applied. AdditionalTags []string `json:"additionalTags,omitempty" protobuf:"bytes,3,rep,name=additionalTags"` } // ImageImportSpec describes a request to import a specific image. type ImageImportSpec struct { - // From is the source of an image to import; only kind DockerImage is allowed + // from is the source of an image to import; only kind DockerImage is allowed From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - // To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used + // to is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used To *corev1.LocalObjectReference `json:"to,omitempty" protobuf:"bytes,2,opt,name=to"` - // ImportPolicy is the policy controlling how the image is imported + // importPolicy is the policy controlling how the image is imported ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,3,opt,name=importPolicy"` - // ReferencePolicy defines how other components should consume the image + // referencePolicy defines how other components should consume the image ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,5,opt,name=referencePolicy"` - // IncludeManifest determines if the manifest for each image is returned in the response + // includeManifest determines if the manifest for each image is returned in the response IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,4,opt,name=includeManifest"` } // ImageImportStatus describes the result of an image import. type ImageImportStatus struct { - // Status is the status of the image import, including errors encountered while retrieving the image + // status is the status of the image import, including errors encountered while retrieving the image Status metav1.Status `json:"status" protobuf:"bytes,1,opt,name=status"` - // Image is the metadata of that image, if the image was located + // image is the metadata of that image, if the image was located Image *Image `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` - // Tag is the tag this image was located under, if any + // tag is the tag this image was located under, if any Tag string `json:"tag,omitempty" protobuf:"bytes,3,opt,name=tag"` - // Manifests holds sub-manifests metadata when importing a manifest list + // manifests holds sub-manifests metadata when importing a manifest list Manifests []Image `json:"manifests,omitempty" protobuf:"bytes,4,rep,name=manifests"` } diff --git a/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go index ec7fc2b4576..e0720bec772 100644 --- a/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go @@ -27,16 +27,16 @@ func (DockerImageReference) SwaggerDoc() map[string]string { var map_Image = map[string]string{ "": "Image is an immutable representation of a container image and metadata at a point in time. Images are named by taking a hash of their contents (metadata and content) and any change in format, content, or metadata results in a new name. The images resource is primarily for use by cluster administrators and integrations like the cluster image registry - end users instead access images via the imagestreamtags or imagestreamimages resources. While image metadata is stored in the API, any integration that implements the container image registry API must provide its own storage for the raw manifest data, image config, and layer contents.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "dockerImageReference": "DockerImageReference is the string that can be used to pull this image.", - "dockerImageMetadata": "DockerImageMetadata contains metadata about this image", - "dockerImageMetadataVersion": "DockerImageMetadataVersion conveys the version of the object, which if empty defaults to \"1.0\"", - "dockerImageManifest": "DockerImageManifest is the raw JSON of the manifest", - "dockerImageLayers": "DockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list.", - "signatures": "Signatures holds all signatures of the image.", - "dockerImageSignatures": "DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.", - "dockerImageManifestMediaType": "DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.", - "dockerImageConfig": "DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. Will not be set when the image represents a manifest list.", - "dockerImageManifests": "DockerImageManifests holds information about sub-manifests when the image represents a manifest list. When this field is present, no DockerImageLayers should be specified.", + "dockerImageReference": "dockerImageReference is the string that can be used to pull this image.", + "dockerImageMetadata": "dockerImageMetadata contains metadata about this image", + "dockerImageMetadataVersion": "dockerImageMetadataVersion conveys the version of the object, which if empty defaults to \"1.0\"", + "dockerImageManifest": "dockerImageManifest is the raw JSON of the manifest", + "dockerImageLayers": "dockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list.", + "signatures": "signatures holds all signatures of the image.", + "dockerImageSignatures": "dockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.", + "dockerImageManifestMediaType": "dockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.", + "dockerImageConfig": "dockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. Will not be set when the image represents a manifest list.", + "dockerImageManifests": "dockerImageManifests holds information about sub-manifests when the image represents a manifest list. When this field is present, no DockerImageLayers should be specified.", } func (Image) SwaggerDoc() map[string]string { @@ -57,11 +57,11 @@ func (ImageBlobReferences) SwaggerDoc() map[string]string { var map_ImageImportSpec = map[string]string{ "": "ImageImportSpec describes a request to import a specific image.", - "from": "From is the source of an image to import; only kind DockerImage is allowed", - "to": "To is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used", - "importPolicy": "ImportPolicy is the policy controlling how the image is imported", - "referencePolicy": "ReferencePolicy defines how other components should consume the image", - "includeManifest": "IncludeManifest determines if the manifest for each image is returned in the response", + "from": "from is the source of an image to import; only kind DockerImage is allowed", + "to": "to is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used", + "importPolicy": "importPolicy is the policy controlling how the image is imported", + "referencePolicy": "referencePolicy defines how other components should consume the image", + "includeManifest": "includeManifest determines if the manifest for each image is returned in the response", } func (ImageImportSpec) SwaggerDoc() map[string]string { @@ -70,10 +70,10 @@ func (ImageImportSpec) SwaggerDoc() map[string]string { var map_ImageImportStatus = map[string]string{ "": "ImageImportStatus describes the result of an image import.", - "status": "Status is the status of the image import, including errors encountered while retrieving the image", - "image": "Image is the metadata of that image, if the image was located", - "tag": "Tag is the tag this image was located under, if any", - "manifests": "Manifests holds sub-manifests metadata when importing a manifest list", + "status": "status is the status of the image import, including errors encountered while retrieving the image", + "image": "image is the metadata of that image, if the image was located", + "tag": "tag is the tag this image was located under, if any", + "manifests": "manifests holds sub-manifests metadata when importing a manifest list", } func (ImageImportStatus) SwaggerDoc() map[string]string { @@ -82,9 +82,9 @@ func (ImageImportStatus) SwaggerDoc() map[string]string { var map_ImageLayer = map[string]string{ "": "ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.", - "name": "Name of the layer as defined by the underlying store.", - "size": "Size of the layer in bytes as defined by the underlying store.", - "mediaType": "MediaType of the referenced object.", + "name": "name of the layer as defined by the underlying store.", + "size": "size of the layer in bytes as defined by the underlying store.", + "mediaType": "mediaType of the referenced object.", } func (ImageLayer) SwaggerDoc() map[string]string { @@ -93,8 +93,8 @@ func (ImageLayer) SwaggerDoc() map[string]string { var map_ImageLayerData = map[string]string{ "": "ImageLayerData contains metadata about an image layer.", - "size": "Size of the layer in bytes as defined by the underlying store. This field is optional if the necessary information about size is not available.", - "mediaType": "MediaType of the referenced object.", + "size": "size of the layer in bytes as defined by the underlying store. This field is optional if the necessary information about size is not available.", + "mediaType": "mediaType of the referenced object.", } func (ImageLayerData) SwaggerDoc() map[string]string { @@ -104,7 +104,7 @@ func (ImageLayerData) SwaggerDoc() map[string]string { var map_ImageList = map[string]string{ "": "ImageList is a list of Image objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items is a list of images", + "items": "items is a list of images", } func (ImageList) SwaggerDoc() map[string]string { @@ -122,12 +122,12 @@ func (ImageLookupPolicy) SwaggerDoc() map[string]string { var map_ImageManifest = map[string]string{ "": "ImageManifest represents sub-manifests of a manifest list. The Digest field points to a regular Image object.", - "digest": "Digest is the unique identifier for the manifest. It refers to an Image object.", - "mediaType": "MediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json.", - "manifestSize": "ManifestSize represents the size of the raw object contents, in bytes.", - "architecture": "Architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`.", - "os": "OS specifies the operating system, for example `linux`.", - "variant": "Variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU variant of the ARM CPU.", + "digest": "digest is the unique identifier for the manifest. It refers to an Image object.", + "mediaType": "mediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json.", + "manifestSize": "manifestSize represents the size of the raw object contents, in bytes.", + "architecture": "architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`.", + "os": "os specifies the operating system, for example `linux`.", + "variant": "variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU variant of the ARM CPU.", } func (ImageManifest) SwaggerDoc() map[string]string { @@ -139,7 +139,7 @@ var map_ImageSignature = map[string]string{ "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", "type": "Required: Describes a type of stored blob.", "content": "Required: An opaque binary string which is an image's signature.", - "conditions": "Conditions represent the latest available observations of a signature's current state.", + "conditions": "conditions represent the latest available observations of a signature's current state.", "imageIdentity": "A human readable string representing image's identity. It could be a product name and version, or an image pull spec (e.g. \"registry.access.redhat.com/rhel7/rhel:7.2\").", "signedClaims": "Contains claims from the signature.", "created": "If specified, it is the time of signature's creation.", @@ -154,8 +154,8 @@ func (ImageSignature) SwaggerDoc() map[string]string { var map_ImageStream = map[string]string{ "": "An ImageStream stores a mapping of tags to images, metadata overrides that are applied when images are tagged in a stream, and an optional reference to a container image repository on a registry. Users typically update the spec.tags field to point to external images which are imported from container registries using credentials in your namespace with the pull secret type, or to existing image stream tags and images which are immediately accessible for tagging or pulling. The history of images applied to a tag is visible in the status.tags field and any user who can view an image stream is allowed to tag that image into their own image streams. Access to pull images from the integrated registry is granted by having the \"get imagestreams/layers\" permission on a given image stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both spec and status for that tag to be removed. Image stream history is retained until an administrator runs the prune operation, which removes references that are no longer in use. To preserve a historical image, ensure there is a tag in spec pointing to that image by its digest.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Spec describes the desired state of this stream", - "status": "Status describes the current state of this stream", + "spec": "spec describes the desired state of this stream", + "status": "status describes the current state of this stream", } func (ImageStream) SwaggerDoc() map[string]string { @@ -165,7 +165,7 @@ func (ImageStream) SwaggerDoc() map[string]string { var map_ImageStreamImage = map[string]string{ "": "ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. User interfaces and regular users can use this resource to access the metadata details of a tagged image in the image stream history for viewing, since Image resources are not directly accessible to end users. A not found error will be returned if no such image is referenced by a tag within the ImageStream. Images are created when spec tags are set on an image stream that represent an image in an external registry, when pushing to the integrated registry, or when tagging an existing image from one image stream to another. The name of an image stream image is in the form \"@\", where the digest is the content addressible identifier for the image (sha256:xxxxx...). You can use ImageStreamImages as the from.kind of an image stream spec tag to reference an image exactly. The only operations supported on the imagestreamimage endpoint are retrieving the image.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "image": "Image associated with the ImageStream and image name.", + "image": "image associated with the ImageStream and image name.", } func (ImageStreamImage) SwaggerDoc() map[string]string { @@ -175,8 +175,8 @@ func (ImageStreamImage) SwaggerDoc() map[string]string { var map_ImageStreamImport = map[string]string{ "": "The image stream import resource provides an easy way for a user to find and import container images from other container image registries into the server. Individual images or an entire image repository may be imported, and users may choose to see the results of the import prior to tagging the resulting images into the specified image stream.\n\nThis API is intended for end-user tools that need to see the metadata of the image prior to import (for instance, to generate an application from it). Clients that know the desired image can continue to create spec.tags directly into their image streams.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Spec is a description of the images that the user wishes to import", - "status": "Status is the result of importing the image", + "spec": "spec is a description of the images that the user wishes to import", + "status": "status is the result of importing the image", } func (ImageStreamImport) SwaggerDoc() map[string]string { @@ -185,9 +185,9 @@ func (ImageStreamImport) SwaggerDoc() map[string]string { var map_ImageStreamImportSpec = map[string]string{ "": "ImageStreamImportSpec defines what images should be imported.", - "import": "Import indicates whether to perform an import - if so, the specified tags are set on the spec and status of the image stream defined by the type meta.", - "repository": "Repository is an optional import of an entire container image repository. A maximum limit on the number of tags imported this way is imposed by the server.", - "images": "Images are a list of individual images to import.", + "import": "import indicates whether to perform an import - if so, the specified tags are set on the spec and status of the image stream defined by the type meta.", + "repository": "repository is an optional import of an entire container image repository. A maximum limit on the number of tags imported this way is imposed by the server.", + "images": "images are a list of individual images to import.", } func (ImageStreamImportSpec) SwaggerDoc() map[string]string { @@ -196,9 +196,9 @@ func (ImageStreamImportSpec) SwaggerDoc() map[string]string { var map_ImageStreamImportStatus = map[string]string{ "": "ImageStreamImportStatus contains information about the status of an image stream import.", - "import": "Import is the image stream that was successfully updated or created when 'to' was set.", - "repository": "Repository is set if spec.repository was set to the outcome of the import", - "images": "Images is set with the result of importing spec.images", + "import": "import is the image stream that was successfully updated or created when 'to' was set.", + "repository": "repository is set if spec.repository was set to the outcome of the import", + "images": "images is set with the result of importing spec.images", } func (ImageStreamImportStatus) SwaggerDoc() map[string]string { @@ -219,7 +219,7 @@ func (ImageStreamLayers) SwaggerDoc() map[string]string { var map_ImageStreamList = map[string]string{ "": "ImageStreamList is a list of ImageStream objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items is a list of imageStreams", + "items": "items is a list of imageStreams", } func (ImageStreamList) SwaggerDoc() map[string]string { @@ -229,8 +229,8 @@ func (ImageStreamList) SwaggerDoc() map[string]string { var map_ImageStreamMapping = map[string]string{ "": "ImageStreamMapping represents a mapping from a single image stream tag to a container image as well as the reference to the container image stream the image came from. This resource is used by privileged integrators to create an image resource and to associate it with an image stream in the status tags field. Creating an ImageStreamMapping will allow any user who can view the image stream to tag or pull that image, so only create mappings where the user has proven they have access to the image contents directly. The only operation supported for this resource is create and the metadata name and namespace should be set to the image stream containing the tag that should be updated.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "image": "Image is a container image.", - "tag": "Tag is a string value this image can be located with inside the stream.", + "image": "image is a container image.", + "tag": "tag is a string value this image can be located with inside the stream.", } func (ImageStreamMapping) SwaggerDoc() map[string]string { @@ -250,9 +250,9 @@ func (ImageStreamSpec) SwaggerDoc() map[string]string { var map_ImageStreamStatus = map[string]string{ "": "ImageStreamStatus contains information about the state of this image stream.", - "dockerImageRepository": "DockerImageRepository represents the effective location this stream may be accessed at. May be empty until the server determines where the repository is located", - "publicDockerImageRepository": "PublicDockerImageRepository represents the public location from where the image can be pulled outside the cluster. This field may be empty if the administrator has not exposed the integrated registry externally.", - "tags": "Tags are a historical record of images associated with each tag. The first entry in the TagEvent array is the currently tagged image.", + "dockerImageRepository": "dockerImageRepository represents the effective location this stream may be accessed at. May be empty until the server determines where the repository is located", + "publicDockerImageRepository": "publicDockerImageRepository represents the public location from where the image can be pulled outside the cluster. This field may be empty if the administrator has not exposed the integrated registry externally.", + "tags": "tags are a historical record of images associated with each tag. The first entry in the TagEvent array is the currently tagged image.", } func (ImageStreamStatus) SwaggerDoc() map[string]string { @@ -276,7 +276,7 @@ func (ImageStreamTag) SwaggerDoc() map[string]string { var map_ImageStreamTagList = map[string]string{ "": "ImageStreamTagList is a list of ImageStreamTag objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items is the list of image stream tags", + "items": "items is the list of image stream tags", } func (ImageStreamTagList) SwaggerDoc() map[string]string { @@ -298,7 +298,7 @@ func (ImageTag) SwaggerDoc() map[string]string { var map_ImageTagList = map[string]string{ "": "ImageTagList is a list of ImageTag objects. When listing image tags, the image field is not populated. Tags are returned in alphabetical order by image stream and then tag.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items is the list of image stream tags", + "items": "items is the list of image stream tags", } func (ImageTagList) SwaggerDoc() map[string]string { @@ -307,9 +307,9 @@ func (ImageTagList) SwaggerDoc() map[string]string { var map_NamedTagEventList = map[string]string{ "": "NamedTagEventList relates a tag to its image history.", - "tag": "Tag is the tag for which the history is recorded", + "tag": "tag is the tag for which the history is recorded", "items": "Standard object's metadata.", - "conditions": "Conditions is an array of conditions that apply to the tag event list.", + "conditions": "conditions is an array of conditions that apply to the tag event list.", } func (NamedTagEventList) SwaggerDoc() map[string]string { @@ -318,10 +318,10 @@ func (NamedTagEventList) SwaggerDoc() map[string]string { var map_RepositoryImportSpec = map[string]string{ "": "RepositoryImportSpec describes a request to import images from a container image repository.", - "from": "From is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed", - "importPolicy": "ImportPolicy is the policy controlling how the image is imported", - "referencePolicy": "ReferencePolicy defines how other components should consume the image", - "includeManifest": "IncludeManifest determines if the manifest for each image is returned in the response", + "from": "from is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed", + "importPolicy": "importPolicy is the policy controlling how the image is imported", + "referencePolicy": "referencePolicy defines how other components should consume the image", + "includeManifest": "includeManifest determines if the manifest for each image is returned in the response", } func (RepositoryImportSpec) SwaggerDoc() map[string]string { @@ -330,9 +330,9 @@ func (RepositoryImportSpec) SwaggerDoc() map[string]string { var map_RepositoryImportStatus = map[string]string{ "": "RepositoryImportStatus describes the result of an image repository import", - "status": "Status reflects whether any failure occurred during import", - "images": "Images is a list of images successfully retrieved by the import of the repository.", - "additionalTags": "AdditionalTags are tags that exist in the repository but were not imported because a maximum limit of automatic imports was applied.", + "status": "status reflects whether any failure occurred during import", + "images": "images is a list of images successfully retrieved by the import of the repository.", + "additionalTags": "additionalTags are tags that exist in the repository but were not imported because a maximum limit of automatic imports was applied.", } func (RepositoryImportStatus) SwaggerDoc() map[string]string { @@ -341,8 +341,8 @@ func (RepositoryImportStatus) SwaggerDoc() map[string]string { var map_SignatureCondition = map[string]string{ "": "SignatureCondition describes an image signature condition of particular kind at particular probe time.", - "type": "Type of signature condition, Complete or Failed.", - "status": "Status of the condition, one of True, False, Unknown.", + "type": "type of signature condition, Complete or Failed.", + "status": "status of the condition, one of True, False, Unknown.", "lastProbeTime": "Last time the condition was checked.", "lastTransitionTime": "Last time the condition transit from one status to another.", "reason": "(brief) reason for the condition's last transition.", @@ -355,7 +355,7 @@ func (SignatureCondition) SwaggerDoc() map[string]string { var map_SignatureGenericEntity = map[string]string{ "": "SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject of signing certificate or key.", - "organization": "Organization name.", + "organization": "organization name.", "commonName": "Common name (e.g. openshift-signing-service).", } @@ -382,10 +382,10 @@ func (SignatureSubject) SwaggerDoc() map[string]string { var map_TagEvent = map[string]string{ "": "TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag.", - "created": "Created holds the time the TagEvent was created", - "dockerImageReference": "DockerImageReference is the string that can be used to pull this image", - "image": "Image is the image", - "generation": "Generation is the spec tag generation that resulted in this tag being updated", + "created": "created holds the time the TagEvent was created", + "dockerImageReference": "dockerImageReference is the string that can be used to pull this image", + "image": "image is the image", + "generation": "generation is the spec tag generation that resulted in this tag being updated", } func (TagEvent) SwaggerDoc() map[string]string { @@ -394,12 +394,12 @@ func (TagEvent) SwaggerDoc() map[string]string { var map_TagEventCondition = map[string]string{ "": "TagEventCondition contains condition information for a tag event.", - "type": "Type of tag event condition, currently only ImportSuccess", - "status": "Status of the condition, one of True, False, Unknown.", - "lastTransitionTime": "LastTransitionTIme is the time the condition transitioned from one status to another.", - "reason": "Reason is a brief machine readable explanation for the condition's last transition.", - "message": "Message is a human readable description of the details about last transition, complementing reason.", - "generation": "Generation is the spec tag generation that this status corresponds to", + "type": "type of tag event condition, currently only ImportSuccess", + "status": "status of the condition, one of True, False, Unknown.", + "lastTransitionTime": "lastTransitionTime is the time the condition transitioned from one status to another.", + "reason": "reason is a brief machine readable explanation for the condition's last transition.", + "message": "message is a human readable description of the details about last transition, complementing reason.", + "generation": "generation is the spec tag generation that this status corresponds to", } func (TagEventCondition) SwaggerDoc() map[string]string { @@ -408,9 +408,9 @@ func (TagEventCondition) SwaggerDoc() map[string]string { var map_TagImportPolicy = map[string]string{ "": "TagImportPolicy controls how images related to this tag will be imported.", - "insecure": "Insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.", - "scheduled": "Scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported", - "importMode": "ImportMode describes how to import an image manifest.", + "insecure": "insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.", + "scheduled": "scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported", + "importMode": "importMode describes how to import an image manifest.", } func (TagImportPolicy) SwaggerDoc() map[string]string { @@ -419,13 +419,13 @@ func (TagImportPolicy) SwaggerDoc() map[string]string { var map_TagReference = map[string]string{ "": "TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track.", - "name": "Name of the tag", + "name": "name of the tag", "annotations": "Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags.", "from": "Optional; if specified, a reference to another image that this tag should point to. Valid values are ImageStreamTag, ImageStreamImage, and DockerImage. ImageStreamTag references can only reference a tag within this same ImageStream.", - "reference": "Reference states if the tag will be imported. Default value is false, which means the tag will be imported.", - "generation": "Generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference is changed the generation is set to match the current stream generation (which is incremented every time spec is changed). Other processes in the system like the image importer observe that the generation of spec tag is newer than the generation recorded in the status and use that as a trigger to import the newest remote tag. To trigger a new import, clients may set this value to zero which will reset the generation to the latest stream generation. Legacy clients will send this value as nil which will be merged with the current tag generation.", - "importPolicy": "ImportPolicy is information that controls how images may be imported by the server.", - "referencePolicy": "ReferencePolicy defines how other components should consume the image.", + "reference": "reference states if the tag will be imported. Default value is false, which means the tag will be imported.", + "generation": "generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference is changed the generation is set to match the current stream generation (which is incremented every time spec is changed). Other processes in the system like the image importer observe that the generation of spec tag is newer than the generation recorded in the status and use that as a trigger to import the newest remote tag. To trigger a new import, clients may set this value to zero which will reset the generation to the latest stream generation. Legacy clients will send this value as nil which will be merged with the current tag generation.", + "importPolicy": "importPolicy is information that controls how images may be imported by the server.", + "referencePolicy": "referencePolicy defines how other components should consume the image.", } func (TagReference) SwaggerDoc() map[string]string { @@ -434,7 +434,7 @@ func (TagReference) SwaggerDoc() map[string]string { var map_TagReferencePolicy = map[string]string{ "": "TagReferencePolicy describes how pull-specs for images in this image stream tag are generated when image change triggers in deployment configs or builds are resolved. This allows the image stream author to control how images are accessed.", - "type": "Type determines how the image pull spec should be transformed when the image stream tag is used in deployment config triggers or new builds. The default value is `Source`, indicating the original location of the image should be used (if imported). The user may also specify `Local`, indicating that the pull spec should point to the integrated container image registry and leverage the registry's ability to proxy the pull to an upstream registry. `Local` allows the credentials used to pull this image to be managed from the image stream's namespace, so others on the platform can access a remote image but have no access to the remote secret. It also allows the image layers to be mirrored into the local registry which the images can still be pulled even if the upstream registry is unavailable.", + "type": "type determines how the image pull spec should be transformed when the image stream tag is used in deployment config triggers or new builds. The default value is `Source`, indicating the original location of the image should be used (if imported). The user may also specify `Local`, indicating that the pull spec should point to the integrated container image registry and leverage the registry's ability to proxy the pull to an upstream registry. `Local` allows the credentials used to pull this image to be managed from the image stream's namespace, so others on the platform can access a remote image but have no access to the remote secret. It also allows the image layers to be mirrored into the local registry which the images can still be pulled even if the upstream registry is unavailable.", } func (TagReferencePolicy) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go b/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go index 4b5c8d6efba..d1396fbfb2f 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go +++ b/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go @@ -108,7 +108,7 @@ type AlibabaCloudMachineProviderConfig struct { // +optional DataDisks []DataDiskProperties `json:"dataDisk,omitempty"` - // SecurityGroups is a list of security group references to assign to the instance. + // 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. @@ -116,32 +116,32 @@ type AlibabaCloudMachineProviderConfig struct { // https://www.alibabacloud.com/help/en/doc-detail/25412.htm SecurityGroups []AlibabaResourceReference `json:"securityGroups,omitempty"` - // Bandwidth describes the internet bandwidth strategy for the instance + // 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 + // 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. + // 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. + // 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. + // 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. + // tenancy specifies whether to create the instance on a dedicated host. // Valid values: // // default: creates the instance on a non-dedicated host. @@ -151,12 +151,12 @@ type AlibabaCloudMachineProviderConfig struct { // +optional Tenancy InstanceTenancy `json:"tenancy,omitempty"` - // UserDataSecret contains a local reference to a secret that contains the + // 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 + // 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"` @@ -173,15 +173,15 @@ type AlibabaResourceReference struct { // type identifies the resource reference type for this entry. Type AlibabaResourceReferenceType `json:"type"` - // ID of resource + // id of resource // +optional ID *string `json:"id,omitempty"` - // Name of the resource + // 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. + // 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"` @@ -213,15 +213,15 @@ type AlibabaCloudMachineProviderStatus struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // InstanceID is the instance ID of the machine created in alibabacloud + // 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 + // 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 + // conditions is a set of conditions associated with the Machine to indicate // errors or other status // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` @@ -229,7 +229,7 @@ type AlibabaCloudMachineProviderStatus struct { // 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. + // 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. @@ -242,7 +242,7 @@ type SystemDiskProperties struct { // +optional Category string `json:"category,omitempty"` - // PerformanceLevel is the performance level of the ESSD used as the system disk. + // 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. @@ -256,14 +256,14 @@ type SystemDiskProperties struct { // +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 (-). + // 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. + // 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. @@ -357,7 +357,7 @@ type Tag struct { // 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: + // 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. @@ -365,7 +365,7 @@ type BandwidthProperties struct { // +optional InternetMaxBandwidthIn int64 `json:"internetMaxBandwidthIn,omitempty"` - // InternetMaxBandwidthOut is the maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. + // 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` diff --git a/vendor/github.com/openshift/api/machine/v1/types_aws.go b/vendor/github.com/openshift/api/machine/v1/types_aws.go index bc8a7efce99..5ad2b923fdf 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_aws.go +++ b/vendor/github.com/openshift/api/machine/v1/types_aws.go @@ -8,17 +8,17 @@ package v1 // +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'ARN' ? has(self.arn) : !has(self.arn)",message="arn is required when type is ARN, and forbidden otherwise" // +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Filters' ? has(self.filters) : !has(self.filters)",message="filters is required when type is Filters, and forbidden otherwise" type AWSResourceReference struct { - // Type determines how the reference will fetch the AWS resource. + // type determines how the reference will fetch the AWS resource. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required Type AWSResourceReferenceType `json:"type"` - // ID of resource. + // id of resource. // +optional ID *string `json:"id,omitempty"` - // ARN of resource. + // arn of resource. // +optional ARN *string `json:"arn,omitempty"` - // Filters is a set of filters used to identify a resource. + // filters is a set of filters used to identify a resource. // +optional // +listType=atomic Filters *[]AWSResourceFilter `json:"filters,omitempty"` @@ -41,10 +41,10 @@ const ( // AWSResourceFilter is a filter used to identify an AWS resource type AWSResourceFilter struct { - // Name of the filter. Filter names are case-sensitive. - // +kubebuilder:validation:Required + // name of the filter. Filter names are case-sensitive. + // +required Name string `json:"name"` - // Values includes one or more filter values. Filter values are case-sensitive. + // values includes one or more filter values. Filter values are case-sensitive. // +optional // +listType=atomic Values []string `json:"values,omitempty"` diff --git a/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go b/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go index 8ce5266e555..12b6e5184f4 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go +++ b/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go @@ -58,7 +58,8 @@ type ControlPlaneMachineSetSpec struct { // +openshift:enable:FeatureGate=CPMSMachineNamePrefix // +optional MachineNamePrefix string `json:"machineNamePrefix,omitempty"` - // State defines whether the ControlPlaneMachineSet is Active or Inactive. + + // state defines whether the ControlPlaneMachineSet is Active or Inactive. // When Inactive, the ControlPlaneMachineSet will not take any action on the // state of the Machines within the cluster. // When Active, the ControlPlaneMachineSet will reconcile the Machines and @@ -71,7 +72,7 @@ type ControlPlaneMachineSetSpec struct { // +optional State ControlPlaneMachineSetState `json:"state,omitempty"` - // Replicas defines how many Control Plane Machines should be + // replicas defines how many Control Plane Machines should be // created by this ControlPlaneMachineSet. // This field is immutable and cannot be changed after cluster // installation. @@ -80,10 +81,10 @@ type ControlPlaneMachineSetSpec struct { // +kubebuilder:validation:Enum:=3;5 // +kubebuilder:default:=3 // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="replicas is immutable" - // +kubebuilder:validation:Required + // +required Replicas *int32 `json:"replicas"` - // Strategy defines how the ControlPlaneMachineSet will update + // strategy defines how the ControlPlaneMachineSet will update // Machines when it detects a change to the ProviderSpec. // +kubebuilder:default:={type: RollingUpdate} // +optional @@ -94,12 +95,12 @@ type ControlPlaneMachineSetSpec struct { // It must match the template's labels. // This field is considered immutable after creation of the resource. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="selector is immutable" - // +kubebuilder:validation:Required + // +required Selector metav1.LabelSelector `json:"selector"` - // Template describes the Control Plane Machines that will be created + // template describes the Control Plane Machines that will be created // by this ControlPlaneMachineSet. - // +kubebuilder:validation:Required + // +required Template ControlPlaneMachineSetTemplate `json:"template"` } @@ -129,10 +130,10 @@ const ( // + future version of the Machine API Machine. // +kubebuilder:validation:XValidation:rule="has(self.machineType) && self.machineType == 'machines_v1beta1_machine_openshift_io' ? has(self.machines_v1beta1_machine_openshift_io) : !has(self.machines_v1beta1_machine_openshift_io)",message="machines_v1beta1_machine_openshift_io configuration is required when machineType is machines_v1beta1_machine_openshift_io, and forbidden otherwise" type ControlPlaneMachineSetTemplate struct { - // MachineType determines the type of Machines that should be managed by the ControlPlaneMachineSet. + // machineType determines the type of Machines that should be managed by the ControlPlaneMachineSet. // Currently, the only valid value is machines_v1beta1_machine_openshift_io. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required MachineType ControlPlaneMachineSetMachineType `json:"machineType,omitempty"` // OpenShiftMachineV1Beta1Machine defines the template for creating Machines @@ -154,7 +155,7 @@ const ( // OpenShiftMachineV1Beta1MachineTemplate is a template for the ControlPlaneMachineSet to create // Machines from the v1beta1.machine.openshift.io API group. type OpenShiftMachineV1Beta1MachineTemplate struct { - // FailureDomains is the list of failure domains (sometimes called + // failureDomains is the list of failure domains (sometimes called // availability zones) in which the ControlPlaneMachineSet should balance // the Control Plane Machines. // This will be merged into the ProviderSpec given in the template. @@ -165,16 +166,16 @@ type OpenShiftMachineV1Beta1MachineTemplate struct { // ObjectMeta is the standard object metadata // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata // Labels are required to match the ControlPlaneMachineSet selector. - // +kubebuilder:validation:Required + // +required ObjectMeta ControlPlaneMachineSetTemplateObjectMeta `json:"metadata"` - // Spec contains the desired configuration of the Control Plane Machines. + // spec contains the desired configuration of the Control Plane Machines. // The ProviderSpec within contains platform specific details // for creating the Control Plane Machines. // The ProviderSe should be complete apart from the platform specific // failure domain field. This will be overriden when the Machines // are created based on the FailureDomains field. - // +kubebuilder:validation:Required + // +required Spec machinev1beta1.MachineSpec `json:"spec"` } @@ -191,10 +192,10 @@ type ControlPlaneMachineSetTemplateObjectMeta struct { // +kubebuilder:validation:XValidation:rule="'machine.openshift.io/cluster-api-machine-role' in self && self['machine.openshift.io/cluster-api-machine-role'] == 'master'",message="label 'machine.openshift.io/cluster-api-machine-role' is required, and must have value 'master'" // +kubebuilder:validation:XValidation:rule="'machine.openshift.io/cluster-api-machine-type' in self && self['machine.openshift.io/cluster-api-machine-type'] == 'master'",message="label 'machine.openshift.io/cluster-api-machine-type' is required, and must have value 'master'" // +kubebuilder:validation:XValidation:rule="'machine.openshift.io/cluster-api-cluster' in self",message="label 'machine.openshift.io/cluster-api-cluster' is required" - // +kubebuilder:validation:Required + // +required Labels map[string]string `json:"labels"` - // Annotations is an unstructured key value map stored with a resource that may be + // annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: http://kubernetes.io/docs/user-guide/annotations @@ -205,7 +206,7 @@ type ControlPlaneMachineSetTemplateObjectMeta struct { // ControlPlaneMachineSetStrategy defines the strategy for applying updates to the // Control Plane Machines managed by the ControlPlaneMachineSet. type ControlPlaneMachineSetStrategy struct { - // Type defines the type of update strategy that should be + // type defines the type of update strategy that should be // used when updating Machines owned by the ControlPlaneMachineSet. // Valid values are "RollingUpdate" and "OnDelete". // The current default value is "RollingUpdate". @@ -256,23 +257,23 @@ const ( // +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'VSphere' ? has(self.vsphere) : !has(self.vsphere)",message="vsphere configuration is required when platform is VSphere, and forbidden otherwise" // +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'Nutanix' ? has(self.nutanix) : !has(self.nutanix)",message="nutanix configuration is required when platform is Nutanix, and forbidden otherwise" type FailureDomains struct { - // Platform identifies the platform for which the FailureDomain represents. + // platform identifies the platform for which the FailureDomain represents. // Currently supported values are AWS, Azure, GCP, OpenStack, VSphere and Nutanix. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required Platform configv1.PlatformType `json:"platform"` - // AWS configures failure domain information for the AWS platform. + // aws configures failure domain information for the AWS platform. // +listType=atomic // +optional AWS *[]AWSFailureDomain `json:"aws,omitempty"` - // Azure configures failure domain information for the Azure platform. + // azure configures failure domain information for the Azure platform. // +listType=atomic // +optional Azure *[]AzureFailureDomain `json:"azure,omitempty"` - // GCP configures failure domain information for the GCP platform. + // gcp configures failure domain information for the GCP platform. // +listType=atomic // +optional GCP *[]GCPFailureDomain `json:"gcp,omitempty"` @@ -283,7 +284,7 @@ type FailureDomains struct { // +optional VSphere []VSphereFailureDomain `json:"vsphere,omitempty"` - // OpenStack configures failure domain information for the OpenStack platform. + // openstack configures failure domain information for the OpenStack platform. // +optional // // + --- @@ -305,19 +306,19 @@ type FailureDomains struct { // AWSFailureDomain configures failure domain information for the AWS platform. // +kubebuilder:validation:MinProperties:=1 type AWSFailureDomain struct { - // Subnet is a reference to the subnet to use for this instance. + // subnet is a reference to the subnet to use for this instance. // +optional Subnet *AWSResourceReference `json:"subnet,omitempty"` - // Placement configures the placement information for this instance. + // placement configures the placement information for this instance. // +optional Placement AWSFailureDomainPlacement `json:"placement,omitempty"` } // AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain. type AWSFailureDomainPlacement struct { - // AvailabilityZone is the availability zone of the instance. - // +kubebuilder:validation:Required + // availabilityZone is the availability zone of the instance. + // +required AvailabilityZone string `json:"availabilityZone"` } @@ -325,7 +326,7 @@ type AWSFailureDomainPlacement struct { type AzureFailureDomain struct { // Availability Zone for the virtual machine. // If nil, the virtual machine should be deployed to no zone. - // +kubebuilder:validation:Required + // +required Zone string `json:"zone"` // subnet is the name of the network subnet in which the VM will be created. @@ -338,8 +339,8 @@ type AzureFailureDomain struct { // GCPFailureDomain configures failure domain information for the GCP platform type GCPFailureDomain struct { - // Zone is the zone in which the GCP machine provider will create the VM. - // +kubebuilder:validation:Required + // zone is the zone in which the GCP machine provider will create the VM. + // +required Zone string `json:"zone"` } @@ -349,7 +350,7 @@ type VSphereFailureDomain struct { // Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. // When balancing machines across failure domains, the control plane machine set will inject configuration from the // Infrastructure resource into the machine providerSpec to allocate the machine to a failure domain. - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } @@ -383,7 +384,7 @@ type OpenStackFailureDomain struct { type NutanixFailureDomainReference struct { // name of the failure domain in which the nutanix machine provider will create the VM. // Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 // +kubebuilder:validation:Pattern=`[a-z0-9]([-a-z0-9]*[a-z0-9])?` @@ -416,7 +417,7 @@ type RootVolume struct { // + the control plane with a root volume. This is because the default volume type in Cinder is not guaranteed // + to be available, therefore we prefer the user to be explicit about the volume type to use. // + We apply the same logic in CPMS: if the failure domain specifies a root volume, we require the user to specify a volume type. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 VolumeType string `json:"volumeType"` @@ -424,7 +425,7 @@ type RootVolume struct { // ControlPlaneMachineSetStatus represents the status of the ControlPlaneMachineSet CRD. type ControlPlaneMachineSetStatus struct { - // Conditions represents the observations of the ControlPlaneMachineSet's current state. + // conditions represents the observations of the ControlPlaneMachineSet's current state. // Known .status.conditions.type are: Available, Degraded and Progressing. // +patchMergeKey=type // +patchStrategy=merge @@ -433,27 +434,27 @@ type ControlPlaneMachineSetStatus struct { // +optional Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` - // ObservedGeneration is the most recent generation observed for this + // observedGeneration is the most recent generation observed for this // ControlPlaneMachineSet. It corresponds to the ControlPlaneMachineSets's generation, // which is updated on mutation by the API Server. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // Replicas is the number of Control Plane Machines created by the + // replicas is the number of Control Plane Machines created by the // ControlPlaneMachineSet controller. // Note that during update operations this value may differ from the // desired replica count. // +optional Replicas int32 `json:"replicas,omitempty"` - // ReadyReplicas is the number of Control Plane Machines created by the + // readyReplicas is the number of Control Plane Machines created by the // ControlPlaneMachineSet controller which are ready. // Note that this value may be higher than the desired number of replicas // while rolling updates are in-progress. // +optional ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // UpdatedReplicas is the number of non-terminated Control Plane Machines + // updatedReplicas is the number of non-terminated Control Plane Machines // created by the ControlPlaneMachineSet controller that have the desired // provider spec and are ready. // This value is set to 0 when a change is detected to the desired spec. @@ -464,7 +465,7 @@ type ControlPlaneMachineSetStatus struct { // +optional UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` - // UnavailableReplicas is the number of Control Plane Machines that are + // unavailableReplicas is the number of Control Plane Machines that are // still required before the ControlPlaneMachineSet reaches the desired // available capacity. When this value is non-zero, the number of // ReadyReplicas is less than the desired Replicas. diff --git a/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go b/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go index e5e0ae83055..cc1a355b53b 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go +++ b/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go @@ -23,40 +23,40 @@ type NutanixMachineProviderConfig struct { // of the Prism Central), in which the Machine's VM will be created. // The cluster identifier (uuid or name) can be obtained from the Prism Central console // or using the prism_central API. - // +kubebuilder:validation:Required + // +required Cluster NutanixResourceIdentifier `json:"cluster"` // image is to identify the rhcos image uploaded to the Prism Central (PC) // The image identifier (uuid or name) can be obtained from the Prism Central console // or using the prism_central API. - // +kubebuilder:validation:Required + // +required Image NutanixResourceIdentifier `json:"image"` // subnets holds a list of identifiers (one or more) of the cluster's network subnets // for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be // obtained from the Prism Central console or using the prism_central API. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinItems=1 Subnets []NutanixResourceIdentifier `json:"subnets"` // vcpusPerSocket is the number of vCPUs per socket of the VM - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=1 VCPUsPerSocket int32 `json:"vcpusPerSocket"` // vcpuSockets is the number of vCPU sockets of the VM - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=1 VCPUSockets int32 `json:"vcpuSockets"` // memorySize is the memory size (in Quantity format) of the VM // The minimum memorySize is 2Gi bytes - // +kubebuilder:validation:Required + // +required MemorySize resource.Quantity `json:"memorySize"` // systemDiskSize is size (in Quantity format) of the system disk of the VM // The minimum systemDiskSize is 20Gi bytes - // +kubebuilder:validation:Required + // +required SystemDiskSize resource.Quantity `json:"systemDiskSize"` // bootType indicates the boot type (Legacy, UEFI or SecureBoot) the Machine's VM uses to boot. @@ -96,7 +96,7 @@ type NutanixMachineProviderConfig struct { // credentialsSecret is a local reference to a secret that contains the // credentials data to access Nutanix PC client - // +kubebuilder:validation:Required + // +required CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret"` // failureDomain refers to the name of the FailureDomain with which this Machine is associated. @@ -113,13 +113,13 @@ type NutanixCategory struct { // key is the prism category key name // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:Required + // +required Key string `json:"key"` // value is the prism category value associated with the key // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:Required + // +required Value string `json:"value"` } @@ -151,9 +151,9 @@ const ( // NutanixResourceIdentifier holds the identity of a Nutanix PC resource (cluster, image, subnet, etc.) // +union type NutanixResourceIdentifier struct { - // Type is the identifier type to use for this resource. + // type is the identifier type to use for this resource. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Enum:=uuid;name Type NutanixIdentifierType `json:"type"` @@ -186,7 +186,7 @@ type NutanixGPU struct { // type is the identifier type of the GPU device. // Valid values are Name and DeviceID. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required Type NutanixGPUIdentifierType `json:"type"` // deviceID is the GPU device ID with the integer value. @@ -219,7 +219,7 @@ type NutanixStorageResourceIdentifier struct { // type is the identifier type to use for this resource. // The valid value is "uuid". // +unionDiscriminator - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Enum:=uuid Type NutanixIdentifierType `json:"type"` @@ -279,13 +279,13 @@ type NutanixVMDiskDeviceProperties struct { // deviceType specifies the disk device type. // The valid values are "Disk" and "CDRom", and the default is "Disk". // +kubebuilder:default=Disk - // +kubebuilder:validation:Required + // +required DeviceType NutanixDiskDeviceType `json:"deviceType"` // adapterType is the adapter type of the disk address. // If the deviceType is "Disk", the valid adapterType can be "SCSI", "IDE", "PCI", "SATA" or "SPAPR". // If the deviceType is "CDRom", the valid adapterType can be "IDE" or "SATA". - // +kubebuilder:validation:Required + // +required AdapterType NutanixDiskAdapterType `json:"adapterType,omitempty"` // deviceIndex is the index of the disk address. The valid values are non-negative integers, with the default value 0. @@ -295,7 +295,7 @@ type NutanixVMDiskDeviceProperties struct { // the deviceIndex should start from 1. // +kubebuilder:default=0 // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Required + // +required DeviceIndex int32 `json:"deviceIndex,omitempty"` } @@ -304,7 +304,7 @@ type NutanixVMDisk struct { // diskSize is size (in Quantity format) of the disk attached to the VM. // See https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Format for the Quantity format and example documentation. // The minimum diskSize is 1GB. - // +kubebuilder:validation:Required + // +required DiskSize resource.Quantity `json:"diskSize"` // deviceProperties are the properties of the disk device. diff --git a/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go b/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go index c131139c543..b676a8d5f75 100644 --- a/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go +++ b/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go @@ -142,18 +142,18 @@ type PowerVSMachineProviderConfig struct { // a validation error. // +union type PowerVSResource struct { - // Type identifies the resource type for this entry. + // type identifies the resource type for this entry. // Valid values are ID, Name and RegEx // +kubebuilder:validation:Enum:=ID;Name;RegEx // +optional Type PowerVSResourceType `json:"type,omitempty"` - // ID of resource + // id of resource // +optional ID *string `json:"id,omitempty"` - // Name of resource + // name of resource // +optional Name *string `json:"name,omitempty"` - // Regex to find resource + // regex to find resource // Regex contains the pattern to match to find a resource // +optional RegEx *string `json:"regex,omitempty"` @@ -200,7 +200,7 @@ type PowerVSMachineProviderStatus struct { // referenced secret inside the same namespace. // +structType=atomic type PowerVSSecretReference struct { - // Name of the secret. + // name of the secret. // +optional Name string `json:"name,omitempty"` } @@ -211,7 +211,7 @@ type LoadBalancerReference struct { // The name should be between 1 and 63 characters long and may consist of lowercase alphanumeric characters and hyphens only. // The value must not end with a hyphen. // It is a reference to existing LoadBalancer created by openshift installer component. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Pattern=`^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$` // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 @@ -221,7 +221,7 @@ type LoadBalancerReference struct { // More details about Application LoadBalancer // https://cloud.ibm.com/docs/vpc?topic=vpc-load-balancers-about&interface=ui // Supported values are Application. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Enum:="Application" Type IBMVPCLoadBalancerType `json:"type"` } 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 index 5e460391065..4d96b3552ec 100644 --- 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 @@ -20,15 +20,15 @@ var map_AlibabaCloudMachineProviderConfig = map[string]string{ "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.", + "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.", } @@ -48,9 +48,9 @@ func (AlibabaCloudMachineProviderConfigList) SwaggerDoc() map[string]string { 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).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "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", + "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 { @@ -60,9 +60,9 @@ func (AlibabaCloudMachineProviderStatus) SwaggerDoc() map[string]string { 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.", + "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 { @@ -71,8 +71,8 @@ func (AlibabaResourceReference) SwaggerDoc() map[string]string { 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`", + "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 { @@ -97,10 +97,10 @@ func (DataDiskProperties) SwaggerDoc() map[string]string { 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.", + "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 { @@ -119,8 +119,8 @@ func (Tag) SwaggerDoc() map[string]string { var map_AWSResourceFilter = map[string]string{ "": "AWSResourceFilter is a filter used to identify an AWS resource", - "name": "Name of the filter. Filter names are case-sensitive.", - "values": "Values includes one or more filter values. Filter values are case-sensitive.", + "name": "name of the filter. Filter names are case-sensitive.", + "values": "values includes one or more filter values. Filter values are case-sensitive.", } func (AWSResourceFilter) SwaggerDoc() map[string]string { @@ -129,10 +129,10 @@ func (AWSResourceFilter) SwaggerDoc() map[string]string { var map_AWSResourceReference = map[string]string{ "": "AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. Only one of ID, ARN or Filters may be specified. Specifying more than one will result in a validation error.", - "type": "Type determines how the reference will fetch the AWS resource.", - "id": "ID of resource.", - "arn": "ARN of resource.", - "filters": "Filters is a set of filters used to identify a resource.", + "type": "type determines how the reference will fetch the AWS resource.", + "id": "id of resource.", + "arn": "arn of resource.", + "filters": "filters is a set of filters used to identify a resource.", } func (AWSResourceReference) SwaggerDoc() map[string]string { @@ -141,8 +141,8 @@ func (AWSResourceReference) SwaggerDoc() map[string]string { var map_AWSFailureDomain = map[string]string{ "": "AWSFailureDomain configures failure domain information for the AWS platform.", - "subnet": "Subnet is a reference to the subnet to use for this instance.", - "placement": "Placement configures the placement information for this instance.", + "subnet": "subnet is a reference to the subnet to use for this instance.", + "placement": "placement configures the placement information for this instance.", } func (AWSFailureDomain) SwaggerDoc() map[string]string { @@ -151,7 +151,7 @@ func (AWSFailureDomain) SwaggerDoc() map[string]string { var map_AWSFailureDomainPlacement = map[string]string{ "": "AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain.", - "availabilityZone": "AvailabilityZone is the availability zone of the instance.", + "availabilityZone": "availabilityZone is the availability zone of the instance.", } func (AWSFailureDomainPlacement) SwaggerDoc() map[string]string { @@ -189,11 +189,11 @@ func (ControlPlaneMachineSetList) SwaggerDoc() map[string]string { var map_ControlPlaneMachineSetSpec = map[string]string{ "": "ControlPlaneMachineSet represents the configuration of the ControlPlaneMachineSet.", "machineNamePrefix": "machineNamePrefix is the prefix used when creating machine names. Each machine name will consist of this prefix, followed by a randomly generated string of 5 characters, and the index of the machine. It must be a lowercase RFC 1123 subdomain, consisting of lowercase alphanumeric characters, '-', or '.', and must start and end with an alphanumeric character. The prefix must be between 1 and 245 characters in length. For example, if machineNamePrefix is set to 'control-plane', and three machines are created, their names might be: control-plane-abcde-0, control-plane-fghij-1, control-plane-klmno-2", - "state": "State defines whether the ControlPlaneMachineSet is Active or Inactive. When Inactive, the ControlPlaneMachineSet will not take any action on the state of the Machines within the cluster. When Active, the ControlPlaneMachineSet will reconcile the Machines and will update the Machines as necessary. Once Active, a ControlPlaneMachineSet cannot be made Inactive. To prevent further action please remove the ControlPlaneMachineSet.", - "replicas": "Replicas defines how many Control Plane Machines should be created by this ControlPlaneMachineSet. This field is immutable and cannot be changed after cluster installation. The ControlPlaneMachineSet only operates with 3 or 5 node control planes, 3 and 5 are the only valid values for this field.", - "strategy": "Strategy defines how the ControlPlaneMachineSet will update Machines when it detects a change to the ProviderSpec.", + "state": "state defines whether the ControlPlaneMachineSet is Active or Inactive. When Inactive, the ControlPlaneMachineSet will not take any action on the state of the Machines within the cluster. When Active, the ControlPlaneMachineSet will reconcile the Machines and will update the Machines as necessary. Once Active, a ControlPlaneMachineSet cannot be made Inactive. To prevent further action please remove the ControlPlaneMachineSet.", + "replicas": "replicas defines how many Control Plane Machines should be created by this ControlPlaneMachineSet. This field is immutable and cannot be changed after cluster installation. The ControlPlaneMachineSet only operates with 3 or 5 node control planes, 3 and 5 are the only valid values for this field.", + "strategy": "strategy defines how the ControlPlaneMachineSet will update Machines when it detects a change to the ProviderSpec.", "selector": "Label selector for Machines. Existing Machines selected by this selector will be the ones affected by this ControlPlaneMachineSet. It must match the template's labels. This field is considered immutable after creation of the resource.", - "template": "Template describes the Control Plane Machines that will be created by this ControlPlaneMachineSet.", + "template": "template describes the Control Plane Machines that will be created by this ControlPlaneMachineSet.", } func (ControlPlaneMachineSetSpec) SwaggerDoc() map[string]string { @@ -202,12 +202,12 @@ func (ControlPlaneMachineSetSpec) SwaggerDoc() map[string]string { var map_ControlPlaneMachineSetStatus = map[string]string{ "": "ControlPlaneMachineSetStatus represents the status of the ControlPlaneMachineSet CRD.", - "conditions": "Conditions represents the observations of the ControlPlaneMachineSet's current state. Known .status.conditions.type are: Available, Degraded and Progressing.", - "observedGeneration": "ObservedGeneration is the most recent generation observed for this ControlPlaneMachineSet. It corresponds to the ControlPlaneMachineSets's generation, which is updated on mutation by the API Server.", - "replicas": "Replicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller. Note that during update operations this value may differ from the desired replica count.", - "readyReplicas": "ReadyReplicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller which are ready. Note that this value may be higher than the desired number of replicas while rolling updates are in-progress.", - "updatedReplicas": "UpdatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec and are ready. This value is set to 0 when a change is detected to the desired spec. When the update strategy is RollingUpdate, this will also coincide with starting the process of updating the Machines. When the update strategy is OnDelete, this value will remain at 0 until a user deletes an existing replica and its replacement has become ready.", - "unavailableReplicas": "UnavailableReplicas is the number of Control Plane Machines that are still required before the ControlPlaneMachineSet reaches the desired available capacity. When this value is non-zero, the number of ReadyReplicas is less than the desired Replicas.", + "conditions": "conditions represents the observations of the ControlPlaneMachineSet's current state. Known .status.conditions.type are: Available, Degraded and Progressing.", + "observedGeneration": "observedGeneration is the most recent generation observed for this ControlPlaneMachineSet. It corresponds to the ControlPlaneMachineSets's generation, which is updated on mutation by the API Server.", + "replicas": "replicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller. Note that during update operations this value may differ from the desired replica count.", + "readyReplicas": "readyReplicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller which are ready. Note that this value may be higher than the desired number of replicas while rolling updates are in-progress.", + "updatedReplicas": "updatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec and are ready. This value is set to 0 when a change is detected to the desired spec. When the update strategy is RollingUpdate, this will also coincide with starting the process of updating the Machines. When the update strategy is OnDelete, this value will remain at 0 until a user deletes an existing replica and its replacement has become ready.", + "unavailableReplicas": "unavailableReplicas is the number of Control Plane Machines that are still required before the ControlPlaneMachineSet reaches the desired available capacity. When this value is non-zero, the number of ReadyReplicas is less than the desired Replicas.", } func (ControlPlaneMachineSetStatus) SwaggerDoc() map[string]string { @@ -216,7 +216,7 @@ func (ControlPlaneMachineSetStatus) SwaggerDoc() map[string]string { var map_ControlPlaneMachineSetStrategy = map[string]string{ "": "ControlPlaneMachineSetStrategy defines the strategy for applying updates to the Control Plane Machines managed by the ControlPlaneMachineSet.", - "type": "Type defines the type of update strategy that should be used when updating Machines owned by the ControlPlaneMachineSet. Valid values are \"RollingUpdate\" and \"OnDelete\". The current default value is \"RollingUpdate\".", + "type": "type defines the type of update strategy that should be used when updating Machines owned by the ControlPlaneMachineSet. Valid values are \"RollingUpdate\" and \"OnDelete\". The current default value is \"RollingUpdate\".", } func (ControlPlaneMachineSetStrategy) SwaggerDoc() map[string]string { @@ -225,7 +225,7 @@ func (ControlPlaneMachineSetStrategy) SwaggerDoc() map[string]string { var map_ControlPlaneMachineSetTemplate = map[string]string{ "": "ControlPlaneMachineSetTemplate is a template used by the ControlPlaneMachineSet to create the Machines that it will manage in the future. ", - "machineType": "MachineType determines the type of Machines that should be managed by the ControlPlaneMachineSet. Currently, the only valid value is machines_v1beta1_machine_openshift_io.", + "machineType": "machineType determines the type of Machines that should be managed by the ControlPlaneMachineSet. Currently, the only valid value is machines_v1beta1_machine_openshift_io.", "machines_v1beta1_machine_openshift_io": "OpenShiftMachineV1Beta1Machine defines the template for creating Machines from the v1beta1.machine.openshift.io API group.", } @@ -236,7 +236,7 @@ func (ControlPlaneMachineSetTemplate) SwaggerDoc() map[string]string { var map_ControlPlaneMachineSetTemplateObjectMeta = map[string]string{ "": "ControlPlaneMachineSetTemplateObjectMeta is a subset of the metav1.ObjectMeta struct. It allows users to specify labels and annotations that will be copied onto Machines created from this template.", "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels. This field must contain both the 'machine.openshift.io/cluster-api-machine-role' and 'machine.openshift.io/cluster-api-machine-type' labels, both with a value of 'master'. It must also contain a label with the key 'machine.openshift.io/cluster-api-cluster'.", - "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "annotations": "annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", } func (ControlPlaneMachineSetTemplateObjectMeta) SwaggerDoc() map[string]string { @@ -245,12 +245,12 @@ func (ControlPlaneMachineSetTemplateObjectMeta) SwaggerDoc() map[string]string { var map_FailureDomains = map[string]string{ "": "FailureDomain represents the different configurations required to spread Machines across failure domains on different platforms.", - "platform": "Platform identifies the platform for which the FailureDomain represents. Currently supported values are AWS, Azure, GCP, OpenStack, VSphere and Nutanix.", - "aws": "AWS configures failure domain information for the AWS platform.", - "azure": "Azure configures failure domain information for the Azure platform.", - "gcp": "GCP configures failure domain information for the GCP platform.", + "platform": "platform identifies the platform for which the FailureDomain represents. Currently supported values are AWS, Azure, GCP, OpenStack, VSphere and Nutanix.", + "aws": "aws configures failure domain information for the AWS platform.", + "azure": "azure configures failure domain information for the Azure platform.", + "gcp": "gcp configures failure domain information for the GCP platform.", "vsphere": "vsphere configures failure domain information for the VSphere platform.", - "openstack": "OpenStack configures failure domain information for the OpenStack platform.", + "openstack": "openstack configures failure domain information for the OpenStack platform.", "nutanix": "nutanix configures failure domain information for the Nutanix platform.", } @@ -260,7 +260,7 @@ func (FailureDomains) SwaggerDoc() map[string]string { var map_GCPFailureDomain = map[string]string{ "": "GCPFailureDomain configures failure domain information for the GCP platform", - "zone": "Zone is the zone in which the GCP machine provider will create the VM.", + "zone": "zone is the zone in which the GCP machine provider will create the VM.", } func (GCPFailureDomain) SwaggerDoc() map[string]string { @@ -278,9 +278,9 @@ func (NutanixFailureDomainReference) SwaggerDoc() map[string]string { var map_OpenShiftMachineV1Beta1MachineTemplate = map[string]string{ "": "OpenShiftMachineV1Beta1MachineTemplate is a template for the ControlPlaneMachineSet to create Machines from the v1beta1.machine.openshift.io API group.", - "failureDomains": "FailureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information.", + "failureDomains": "failureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information.", "metadata": "ObjectMeta is the standard object metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Labels are required to match the ControlPlaneMachineSet selector.", - "spec": "Spec contains the desired configuration of the Control Plane Machines. The ProviderSpec within contains platform specific details for creating the Control Plane Machines. The ProviderSe should be complete apart from the platform specific failure domain field. This will be overriden when the Machines are created based on the FailureDomains field.", + "spec": "spec contains the desired configuration of the Control Plane Machines. The ProviderSpec within contains platform specific details for creating the Control Plane Machines. The ProviderSe should be complete apart from the platform specific failure domain field. This will be overriden when the Machines are created based on the FailureDomains field.", } func (OpenShiftMachineV1Beta1MachineTemplate) SwaggerDoc() map[string]string { @@ -373,7 +373,7 @@ func (NutanixMachineProviderStatus) SwaggerDoc() map[string]string { var map_NutanixResourceIdentifier = map[string]string{ "": "NutanixResourceIdentifier holds the identity of a Nutanix PC resource (cluster, image, subnet, etc.)", - "type": "Type is the identifier type to use for this resource.", + "type": "type is the identifier type to use for this resource.", "uuid": "uuid is the UUID of the resource in the PC.", "name": "name is the resource name in the PC", } @@ -468,10 +468,10 @@ func (PowerVSMachineProviderStatus) SwaggerDoc() map[string]string { var map_PowerVSResource = map[string]string{ "": "PowerVSResource is a reference to a specific PowerVS resource by ID, Name or RegEx Only one of ID, Name or RegEx may be specified. Specifying more than one will result in a validation error.", - "type": "Type identifies the resource type for this entry. Valid values are ID, Name and RegEx", - "id": "ID of resource", - "name": "Name of resource", - "regex": "Regex to find resource Regex contains the pattern to match to find a resource", + "type": "type identifies the resource type for this entry. Valid values are ID, Name and RegEx", + "id": "id of resource", + "name": "name of resource", + "regex": "regex to find resource Regex contains the pattern to match to find a resource", } func (PowerVSResource) SwaggerDoc() map[string]string { @@ -480,7 +480,7 @@ func (PowerVSResource) SwaggerDoc() map[string]string { var map_PowerVSSecretReference = map[string]string{ "": "PowerVSSecretReference contains enough information to locate the referenced secret inside the same namespace.", - "name": "Name of the secret.", + "name": "name of the secret.", } func (PowerVSSecretReference) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.go b/vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.go index da5fbc51524..89b55c7b41f 100644 --- a/vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.go +++ b/vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.go @@ -166,9 +166,9 @@ type NetworkParam struct { Filter Filter `json:"filter,omitempty"` // Subnet within a network to use Subnets []SubnetParam `json:"subnets,omitempty"` - // NoAllowedAddressPairs disables creation of allowed address pairs for the network ports + // noAllowedAddressPairs disables creation of allowed address pairs for the network ports NoAllowedAddressPairs bool `json:"noAllowedAddressPairs,omitempty"` - // PortTags allows users to specify a list of tags to add to ports created in a given network + // portTags allows users to specify a list of tags to add to ports created in a given network PortTags []string `json:"portTags,omitempty"` // The virtual network interface card (vNIC) type that is bound to the // neutron port. @@ -177,7 +177,7 @@ type NetworkParam struct { // host to pass and receive virtual network interface (VIF) port-specific // information to the plug-in. Profile map[string]string `json:"profile,omitempty"` - // PortSecurity optionally enables or disables security on ports managed by OpenStack + // portSecurity optionally enables or disables security on ports managed by OpenStack PortSecurity *bool `json:"portSecurity,omitempty"` } @@ -229,10 +229,10 @@ type SubnetParam struct { // Filters for optional network query Filter SubnetFilter `json:"filter,omitempty"` - // PortTags are tags that are added to ports created on this subnet + // portTags are tags that are added to ports created on this subnet PortTags []string `json:"portTags,omitempty"` - // PortSecurity optionally enables or disables security on ports managed by OpenStack + // portSecurity optionally enables or disables security on ports managed by OpenStack PortSecurity *bool `json:"portSecurity,omitempty"` } @@ -379,7 +379,7 @@ type RootVolume struct { type BlockDeviceStorage struct { // type is the type of block device to create. // This can be either "Volume" or "Local". - // +kubebuilder:validation:Required + // +required // +unionDiscriminator Type BlockDeviceType `json:"type"` @@ -414,16 +414,16 @@ type AdditionalBlockDevice struct { // Also, this name will be used for tagging the block device. // Information about the block device tag can be obtained from the OpenStack // metadata API or the config drive. - // +kubebuilder:validation:Required + // +required Name string `json:"name"` // sizeGiB is the size of the block device in gibibytes (GiB). - // +kubebuilder:validation:Required + // +required SizeGiB int `json:"sizeGiB"` // storage specifies the storage type of the block device and // additional storage options. - // +kubebuilder:validation:Required + // +required Storage BlockDeviceStorage `json:"storage"` } diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.go index c8094eb2698..2818d17bb86 100644 --- a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.go @@ -79,11 +79,11 @@ var map_NetworkParam = map[string]string{ "fixedIp": "A fixed IPv4 address for the NIC.", "filter": "Filters for optional network query", "subnets": "Subnet within a network to use", - "noAllowedAddressPairs": "NoAllowedAddressPairs disables creation of allowed address pairs for the network ports", - "portTags": "PortTags allows users to specify a list of tags to add to ports created in a given network", + "noAllowedAddressPairs": "noAllowedAddressPairs disables creation of allowed address pairs for the network ports", + "portTags": "portTags allows users to specify a list of tags to add to ports created in a given network", "vnicType": "The virtual network interface card (vNIC) type that is bound to the neutron port.", "profile": "A dictionary that enables the application running on the specified host to pass and receive virtual network interface (VIF) port-specific information to the plug-in.", - "portSecurity": "PortSecurity optionally enables or disables security on ports managed by OpenStack", + "portSecurity": "portSecurity optionally enables or disables security on ports managed by OpenStack", } func (NetworkParam) SwaggerDoc() map[string]string { @@ -217,8 +217,8 @@ func (SubnetFilter) SwaggerDoc() map[string]string { var map_SubnetParam = map[string]string{ "uuid": "The UUID of the network. Required if you omit the port attribute.", "filter": "Filters for optional network query", - "portTags": "PortTags are tags that are added to ports created on this subnet", - "portSecurity": "PortSecurity optionally enables or disables security on ports managed by OpenStack", + "portTags": "portTags are tags that are added to ports created on this subnet", + "portSecurity": "portSecurity optionally enables or disables security on ports managed by OpenStack", } func (SubnetParam) SwaggerDoc() map[string]string { 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 b2c66b7072b..b34a87886d4 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go @@ -13,38 +13,38 @@ type AWSMachineProviderConfig struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - // AMI is the reference to the AMI from which to create the machine instance. + // ami is the reference to the AMI from which to create the machine instance. AMI AWSResourceReference `json:"ami"` - // InstanceType is the type of instance to create. Example: m4.xlarge + // instanceType is the type of instance to create. Example: m4.xlarge InstanceType string `json:"instanceType"` - // Tags is the set of tags to add to apply to an instance, in addition to the ones + // tags is the set of tags to add to apply to an instance, in addition to the ones // added by default by the actuator. These tags are additive. The actuator will ensure // these tags are present, but will not remove any other tags that may exist on the // instance. // +optional Tags []TagSpecification `json:"tags,omitempty"` - // IAMInstanceProfile is a reference to an IAM role to assign to the instance + // iamInstanceProfile is a reference to an IAM role to assign to the instance // +optional IAMInstanceProfile *AWSResourceReference `json:"iamInstanceProfile,omitempty"` - // UserDataSecret contains a local reference to a secret that contains the + // 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 AWS credentials. Otherwise, defaults to permissions + // credentialsSecret is a reference to the secret with AWS credentials. Otherwise, defaults to permissions // provided by attached IAM role where the actuator is running. // +optional CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` - // KeyName is the name of the KeyPair to use for SSH + // keyName is the name of the KeyPair to use for SSH // +optional KeyName *string `json:"keyName,omitempty"` - // DeviceIndex is the index of the device on the instance for the network interface attachment. + // deviceIndex is the index of the device on the instance for the network interface attachment. // Defaults to 0. DeviceIndex int64 `json:"deviceIndex"` - // PublicIP specifies whether the instance should get a public IP. If not present, + // publicIp specifies whether the instance should get a public IP. If not present, // it should use the default of its subnet. // +optional PublicIP *bool `json:"publicIp,omitempty"` - // NetworkInterfaceType specifies the type of network interface to be used for the primary + // networkInterfaceType specifies the type of network interface to be used for the primary // network interface. // Valid values are "ENA", "EFA", and omitted, which means no opinion and the platform // chooses a good default which may change over time. @@ -54,32 +54,32 @@ type AWSMachineProviderConfig struct { // +kubebuilder:validation:Enum:="ENA";"EFA" // +optional NetworkInterfaceType AWSNetworkInterfaceType `json:"networkInterfaceType,omitempty"` - // SecurityGroups is an array of references to security groups that should be applied to the + // securityGroups is an array of references to security groups that should be applied to the // instance. // +optional SecurityGroups []AWSResourceReference `json:"securityGroups,omitempty"` - // Subnet is a reference to the subnet to use for this instance + // subnet is a reference to the subnet to use for this instance Subnet AWSResourceReference `json:"subnet"` - // Placement specifies where to create the instance in AWS + // placement specifies where to create the instance in AWS Placement Placement `json:"placement"` - // LoadBalancers is the set of load balancers to which the new instance + // loadBalancers is the set of load balancers to which the new instance // should be added once it is created. // +optional LoadBalancers []LoadBalancerReference `json:"loadBalancers,omitempty"` - // BlockDevices is the set of block device mapping associated to this instance, + // blockDevices is the set of block device mapping associated to this instance, // block device without a name will be used as a root device and only one device without a name is allowed // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html // +optional BlockDevices []BlockDeviceMappingSpec `json:"blockDevices,omitempty"` - // SpotMarketOptions allows users to configure instances to be run using AWS Spot instances. + // spotMarketOptions allows users to configure instances to be run using AWS Spot instances. // +optional SpotMarketOptions *SpotMarketOptions `json:"spotMarketOptions,omitempty"` - // MetadataServiceOptions allows users to configure instance metadata service interaction options. + // metadataServiceOptions allows users to configure instance metadata service interaction options. // If nothing specified, default AWS IMDS settings will be applied. // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html // +optional MetadataServiceOptions MetadataServiceOptions `json:"metadataServiceOptions,omitempty"` - // PlacementGroupName specifies the name of the placement group in which to launch the instance. + // placementGroupName specifies the name of the placement group in which to launch the instance. // The placement group must already be created and may use any placement strategy. // When omitted, no placement group is used when creating the EC2 instance. // +optional @@ -194,7 +194,7 @@ const ( // MetadataServiceOptions defines the options available to a user when configuring // Instance Metadata Service (IMDS) Options. type MetadataServiceOptions struct { - // Authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. + // authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. // When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service. // When omitted, this means the user has no opinion and the value is left to the platform to choose a good // default, which is subject to change over time. The current default is optional. @@ -209,26 +209,26 @@ type MetadataServiceOptions struct { // Only one of ID, ARN or Filters may be specified. Specifying more than one will result in // a validation error. type AWSResourceReference struct { - // ID of resource + // id of resource // +optional ID *string `json:"id,omitempty"` - // ARN of resource + // arn of resource // +optional ARN *string `json:"arn,omitempty"` - // Filters is a set of filters used to identify a resource + // filters is a set of filters used to identify a resource // +optional Filters []Filter `json:"filters,omitempty"` } // Placement indicates where to create the instance in AWS type Placement struct { - // Region is the region to use to create the instance + // region is the region to use to create the instance // +optional Region string `json:"region,omitempty"` - // AvailabilityZone is the availability zone of the instance + // availabilityZone is the availability zone of the instance // +optional AvailabilityZone string `json:"availabilityZone,omitempty"` - // Tenancy indicates if instance should run on shared or single-tenant hardware. There are + // tenancy indicates if instance should run on shared or single-tenant hardware. There are // supported 3 options: default, dedicated and host. // +optional Tenancy InstanceTenancy `json:"tenancy,omitempty"` @@ -236,18 +236,18 @@ type Placement struct { // Filter is a filter used to identify an AWS resource type Filter struct { - // Name of the filter. Filter names are case-sensitive. + // name of the filter. Filter names are case-sensitive. Name string `json:"name"` - // Values includes one or more filter values. Filter values are case-sensitive. + // values includes one or more filter values. Filter values are case-sensitive. // +optional Values []string `json:"values,omitempty"` } // TagSpecification is the name/value pair for a tag type TagSpecification struct { - // Name of the tag + // name of the tag Name string `json:"name"` - // Value of the tag + // value of the tag Value string `json:"value"` } @@ -309,13 +309,13 @@ const ( // +openshift:compatibility-gen:level=2 type AWSMachineProviderStatus struct { metav1.TypeMeta `json:",inline"` - // InstanceID is the instance ID of the machine created in AWS + // instanceId is the instance ID of the machine created in AWS // +optional InstanceID *string `json:"instanceId,omitempty"` - // InstanceState is the state of the AWS instance for this machine + // instanceState is the state of the AWS instance for this machine // +optional InstanceState *string `json:"instanceState,omitempty"` - // Conditions is a set of conditions associated with the Machine to indicate + // conditions is a set of conditions associated with the Machine to indicate // errors or other status // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go index 00a9497fd36..db84fa2c9f0 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go @@ -39,32 +39,32 @@ type AzureMachineProviderSpec struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - // UserDataSecret contains a local reference to a secret that contains the + // userDataSecret contains a local reference to a secret that contains the // UserData to apply to the instance // +optional UserDataSecret *corev1.SecretReference `json:"userDataSecret,omitempty"` - // CredentialsSecret is a reference to the secret with Azure credentials. + // credentialsSecret is a reference to the secret with Azure credentials. // +optional CredentialsSecret *corev1.SecretReference `json:"credentialsSecret,omitempty"` - // Location is the region to use to create the instance + // location is the region to use to create the instance // +optional Location string `json:"location,omitempty"` - // VMSize is the size of the VM to create. + // vmSize is the size of the VM to create. // +optional VMSize string `json:"vmSize,omitempty"` - // Image is the OS image to use to create the instance. + // image is the OS image to use to create the instance. Image Image `json:"image"` - // OSDisk represents the parameters for creating the OS disk. + // osDisk represents the parameters for creating the OS disk. OSDisk OSDisk `json:"osDisk"` // DataDisk specifies the parameters that are used to add one or more data disks to the machine. // +optional DataDisks []DataDisk `json:"dataDisks,omitempty"` - // SSHPublicKey is the public key to use to SSH to the virtual machine. + // sshPublicKey is the public key to use to SSH to the virtual machine. // +optional SSHPublicKey string `json:"sshPublicKey,omitempty"` - // PublicIP if true a public IP will be used + // publicIP if true a public IP will be used PublicIP bool `json:"publicIP"` - // Tags is a list of tags to apply to the machine. + // tags is a list of tags to apply to the machine. // +optional Tags map[string]string `json:"tags,omitempty"` // Network Security Group that needs to be attached to the machine's interface. @@ -75,40 +75,40 @@ type AzureMachineProviderSpec struct { // No application security groups will be attached if zero-length. // +optional ApplicationSecurityGroups []string `json:"applicationSecurityGroups,omitempty"` - // Subnet to use for this instance + // subnet to use for this instance Subnet string `json:"subnet"` - // PublicLoadBalancer to use for this instance + // publicLoadBalancer to use for this instance // +optional PublicLoadBalancer string `json:"publicLoadBalancer,omitempty"` // InternalLoadBalancerName to use for this instance // +optional InternalLoadBalancer string `json:"internalLoadBalancer,omitempty"` - // NatRule to set inbound NAT rule of the load balancer + // natRule to set inbound NAT rule of the load balancer // +optional NatRule *int64 `json:"natRule,omitempty"` - // ManagedIdentity to set managed identity name + // managedIdentity to set managed identity name // +optional ManagedIdentity string `json:"managedIdentity,omitempty"` - // Vnet to set virtual network name + // vnet to set virtual network name // +optional Vnet string `json:"vnet,omitempty"` // Availability Zone for the virtual machine. // If nil, the virtual machine should be deployed to no zone // +optional Zone string `json:"zone,omitempty"` - // NetworkResourceGroup is the resource group for the virtual machine's network + // networkResourceGroup is the resource group for the virtual machine's network // +optional NetworkResourceGroup string `json:"networkResourceGroup,omitempty"` - // ResourceGroup is the resource group for the virtual machine + // resourceGroup is the resource group for the virtual machine // +optional ResourceGroup string `json:"resourceGroup,omitempty"` - // SpotVMOptions allows the ability to specify the Machine should use a Spot VM + // spotVMOptions allows the ability to specify the Machine should use a Spot VM // +optional SpotVMOptions *SpotVMOptions `json:"spotVMOptions,omitempty"` - // SecurityProfile specifies the Security profile settings for a virtual machine. + // securityProfile specifies the Security profile settings for a virtual machine. // +optional SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` - // UltraSSDCapability enables or disables Azure UltraSSD capability for a virtual machine. + // ultraSSDCapability enables or disables Azure UltraSSD capability for a virtual machine. // This can be used to allow/disallow binding of Azure UltraSSD to the Machine both as Data Disks or via Persistent Volumes. // This Azure feature is subject to a specific scope and certain limitations. // More informations on this can be found in the official Azure documentation for Ultra Disks: @@ -130,16 +130,16 @@ type AzureMachineProviderSpec struct { // +kubebuilder:validation:Enum:="Enabled";"Disabled" // +optional UltraSSDCapability AzureUltraSSDCapabilityState `json:"ultraSSDCapability,omitempty"` - // AcceleratedNetworking enables or disables Azure accelerated networking feature. + // acceleratedNetworking enables or disables Azure accelerated networking feature. // Set to false by default. If true, then this will depend on whether the requested // VMSize is supported. If set to true with an unsupported VMSize, Azure will return an error. // +optional AcceleratedNetworking bool `json:"acceleratedNetworking,omitempty"` - // AvailabilitySet specifies the availability set to use for this instance. + // availabilitySet specifies the availability set to use for this instance. // Availability set should be precreated, before using this field. // +optional AvailabilitySet string `json:"availabilitySet,omitempty"` - // Diagnostics configures the diagnostics settings for the virtual machine. + // diagnostics configures the diagnostics settings for the virtual machine. // This allows you to configure boot diagnostics such as capturing serial output from // the virtual machine on boot. // This is useful for debugging software based launch issues. @@ -156,7 +156,7 @@ type AzureMachineProviderSpec struct { // SpotVMOptions defines the options relevant to running the Machine on Spot VMs type SpotVMOptions struct { - // MaxPrice defines the maximum price the user is willing to pay for Spot VM instances + // maxPrice defines the maximum price the user is willing to pay for Spot VM instances // +optional MaxPrice *resource.Quantity `json:"maxPrice,omitempty"` } @@ -177,13 +177,13 @@ type AzureDiagnostics struct { // This is useful for debugging software based launch issues. // +union type AzureBootDiagnostics struct { - // StorageAccountType determines if the storage account for storing the diagnostics data + // storageAccountType determines if the storage account for storing the diagnostics data // should be provisioned by Azure (AzureManaged) or by the customer (CustomerManaged). - // +kubebuilder:validation:Required + // +required // +unionDiscriminator StorageAccountType AzureBootDiagnosticsStorageAccountType `json:"storageAccountType"` - // CustomerManaged provides reference to the customer manager storage account. + // customerManaged provides reference to the customer manager storage account. // +optional CustomerManaged *AzureCustomerManagedBootDiagnostics `json:"customerManaged,omitempty"` } @@ -191,12 +191,12 @@ type AzureBootDiagnostics struct { // AzureCustomerManagedBootDiagnostics provides reference to a customer managed // storage account. type AzureCustomerManagedBootDiagnostics struct { - // StorageAccountURI is the URI of the customer managed storage account. + // storageAccountURI is the URI of the customer managed storage account. // The URI typically will be `https://.blob.core.windows.net/` // but may differ if you are using Azure DNS zone endpoints. // You can find the correct endpoint by looking for the Blob Primary Endpoint in the // endpoints tab in the Azure console. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Pattern=`^https://` // +kubebuilder:validation:MaxLength=1024 StorageAccountURI string `json:"storageAccountURI"` @@ -225,13 +225,13 @@ type AzureMachineProviderStatus struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - // VMID is the ID of the virtual machine created in Azure. + // vmId is the ID of the virtual machine created in Azure. // +optional VMID *string `json:"vmId,omitempty"` - // VMState is the provisioning state of the Azure virtual machine. + // vmState is the provisioning state of the Azure virtual machine. // +optional VMState *AzureVMState `json:"vmState,omitempty"` - // Conditions is a set of conditions associated with the Machine to indicate + // conditions is a set of conditions associated with the Machine to indicate // errors or other status. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` @@ -274,23 +274,23 @@ const ( // Image is a mirror of azure sdk compute.ImageReference type Image struct { - // Publisher is the name of the organization that created the image + // publisher is the name of the organization that created the image Publisher string `json:"publisher"` - // Offer specifies the name of a group of related images created by the publisher. + // offer specifies the name of a group of related images created by the publisher. // For example, UbuntuServer, WindowsServer Offer string `json:"offer"` - // SKU specifies an instance of an offer, such as a major release of a distribution. + // sku specifies an instance of an offer, such as a major release of a distribution. // For example, 18.04-LTS, 2019-Datacenter SKU string `json:"sku"` - // Version specifies the version of an image sku. The allowed formats + // version specifies the version of an image sku. The allowed formats // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. // Specify 'latest' to use the latest version of an image available at deploy time. // Even if you use 'latest', the VM image will not automatically update after deploy // time even if a new version becomes available. Version string `json:"version"` - // ResourceID specifies an image to use by ID + // resourceID specifies an image to use by ID ResourceID string `json:"resourceID"` - // Type identifies the source of the image and related information, such as purchase plans. + // type identifies the source of the image and related information, such as purchase plans. // Valid values are "ID", "MarketplaceWithPlan", "MarketplaceNoPlan", and omitted, which // means no opinion and the platform chooses a good default which may change over time. // Currently that default is "MarketplaceNoPlan" if publisher data is supplied, or "ID" if not. @@ -313,16 +313,16 @@ const ( ) type OSDisk struct { - // OSType is the operating system type of the OS disk. Possible values include "Linux" and "Windows". + // osType is the operating system type of the OS disk. Possible values include "Linux" and "Windows". OSType string `json:"osType"` - // ManagedDisk specifies the Managed Disk parameters for the OS disk. + // managedDisk specifies the Managed Disk parameters for the OS disk. ManagedDisk OSDiskManagedDiskParameters `json:"managedDisk"` - // DiskSizeGB is the size in GB to assign to the data disk. + // diskSizeGB is the size in GB to assign to the data disk. DiskSizeGB int32 `json:"diskSizeGB"` - // DiskSettings describe ephemeral disk settings for the os disk. + // diskSettings describe ephemeral disk settings for the os disk. // +optional DiskSettings DiskSettings `json:"diskSettings,omitempty"` - // CachingType specifies the caching requirements. + // cachingType specifies the caching requirements. // Possible values include: 'None', 'ReadOnly', 'ReadWrite'. // Empty value means no opinion and the platform chooses a default, which is subject to change over // time. Currently the default is `None`. @@ -342,43 +342,43 @@ type OSDisk struct { // Once the custom userdata Secret has been created, it can be referenced in the Machine's `.providerSpec.userDataSecret`. // For further guidance and examples, please refer to the official OpenShift docs. type DataDisk struct { - // NameSuffix is the suffix to be appended to the machine name to generate the disk name. + // nameSuffix is the suffix to be appended to the machine name to generate the disk name. // Each disk name will be in format _. // NameSuffix name must start and finish with an alphanumeric character and can only contain letters, numbers, underscores, periods or hyphens. // The overall disk name must not exceed 80 chars in length. // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9](?:[\w\.-]*[a-zA-Z0-9])?$` // +kubebuilder:validation:MaxLength:=78 - // +kubebuilder:validation:Required + // +required NameSuffix string `json:"nameSuffix"` - // DiskSizeGB is the size in GB to assign to the data disk. + // diskSizeGB is the size in GB to assign to the data disk. // +kubebuilder:validation:Minimum=4 - // +kubebuilder:validation:Required + // +required DiskSizeGB int32 `json:"diskSizeGB"` - // ManagedDisk specifies the Managed Disk parameters for the data disk. + // managedDisk specifies the Managed Disk parameters for the data disk. // Empty value means no opinion and the platform chooses a default, which is subject to change over time. // Currently the default is a ManagedDisk with with storageAccountType: "Premium_LRS" and diskEncryptionSet.id: "Default". // +optional ManagedDisk DataDiskManagedDiskParameters `json:"managedDisk,omitempty"` - // Lun Specifies the logical unit number of the data disk. + // lun Specifies the logical unit number of the data disk. // This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. // This value is also needed for referencing the data disks devices within userdata to perform disk initialization through Ignition (e.g. partition/format/mount). // The value must be between 0 and 63. // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=63 - // +kubebuilder:validation:Required + // +required Lun int32 `json:"lun,omitempty"` - // CachingType specifies the caching requirements. + // cachingType specifies the caching requirements. // Empty value means no opinion and the platform chooses a default, which is subject to change over time. // Currently the default is CachingTypeNone. // +optional // +kubebuilder:validation:Enum=None;ReadOnly;ReadWrite CachingType CachingTypeOption `json:"cachingType,omitempty"` - // DeletionPolicy specifies the data disk deletion policy upon Machine deletion. + // deletionPolicy specifies the data disk deletion policy upon Machine deletion. // Possible values are "Delete","Detach". // When "Delete" is used the data disk is deleted when the Machine is deleted. // When "Detach" is used the data disk is detached from the Machine and retained when the Machine is deleted. // +kubebuilder:validation:Enum=Delete;Detach - // +kubebuilder:validation:Required + // +required DeletionPolicy DiskDeletionPolicyType `json:"deletionPolicy"` } @@ -408,7 +408,7 @@ const ( // DiskSettings describe ephemeral disk settings for the os disk. type DiskSettings struct { - // EphemeralStorageLocation enables ephemeral OS when set to 'Local'. + // ephemeralStorageLocation enables ephemeral OS when set to 'Local'. // Possible values include: 'Local'. // See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details. // Empty value means no opinion and the platform chooses a default, which is subject to change over @@ -420,10 +420,10 @@ type DiskSettings struct { // OSDiskManagedDiskParameters is the parameters of a OSDisk managed disk. type OSDiskManagedDiskParameters struct { - // StorageAccountType is the storage account type to use. + // storageAccountType is the storage account type to use. // Possible values include "Standard_LRS", "Premium_LRS". StorageAccountType string `json:"storageAccountType"` - // DiskEncryptionSet is the disk encryption set properties + // diskEncryptionSet is the disk encryption set properties // +optional DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` // securityProfile specifies the security profile for the managed disk. @@ -460,11 +460,11 @@ type VMDiskSecurityProfile struct { // DataDiskManagedDiskParameters is the parameters of a DataDisk managed disk. type DataDiskManagedDiskParameters struct { - // StorageAccountType is the storage account type to use. + // storageAccountType is the storage account type to use. // Possible values include "Standard_LRS", "Premium_LRS" and "UltraSSD_LRS". // +kubebuilder:validation:Enum=Standard_LRS;Premium_LRS;UltraSSD_LRS StorageAccountType StorageAccountType `json:"storageAccountType"` - // DiskEncryptionSet is the disk encryption set properties. + // diskEncryptionSet is the disk encryption set properties. // Empty value means no opinion and the platform chooses a default, which is subject to change over time. // Currently the default is a DiskEncryptionSet with id: "Default". // +optional @@ -486,7 +486,7 @@ const ( // DiskEncryptionSetParameters is the disk encryption set properties type DiskEncryptionSetParameters struct { - // ID is the disk encryption set ID + // id is the disk encryption set ID // Empty value means no opinion and the platform chooses a default, which is subject to change over time. // Currently the default is: "Default". // +optional @@ -514,7 +514,7 @@ type SecuritySettings struct { // securityType specifies the SecurityType of the virtual machine. It has to be set to any specified value to // enable UEFISettings. The default behavior is: UEFISettings will not be enabled unless this property is set. // +kubebuilder:validation:Enum=ConfidentialVM;TrustedLaunch - // +kubebuilder:validation:Required + // +required // +unionDiscriminator SecurityType SecurityTypes `json:"securityType,omitempty"` // confidentialVM specifies the security configuration of the virtual machine. @@ -532,14 +532,14 @@ type SecuritySettings struct { // ConfidentialVM defines the UEFI settings for the virtual machine. type ConfidentialVM struct { // uefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual machine. - // +kubebuilder:validation:Required + // +required UEFISettings UEFISettings `json:"uefiSettings,omitempty"` } // TrustedLaunch defines the UEFI settings for the virtual machine. type TrustedLaunch struct { // uefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual machine. - // +kubebuilder:validation:Required + // +required UEFISettings UEFISettings `json:"uefiSettings,omitempty"` } diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.go index b5bb506192f..fc09a0c47b1 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.go @@ -76,61 +76,61 @@ type GCPMachineProviderSpec struct { // metadata is the standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // UserDataSecret contains a local reference to a secret that contains the + // 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 GCP credentials. + // credentialsSecret is a reference to the secret with GCP credentials. // +optional CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` - // CanIPForward Allows this instance to send and receive packets with non-matching destination or source IPs. + // canIPForward Allows this instance to send and receive packets with non-matching destination or source IPs. // This is required if you plan to use this instance to forward routes. CanIPForward bool `json:"canIPForward"` - // DeletionProtection whether the resource should be protected against deletion. + // deletionProtection whether the resource should be protected against deletion. DeletionProtection bool `json:"deletionProtection"` - // Disks is a list of disks to be attached to the VM. + // disks is a list of disks to be attached to the VM. // +optional Disks []*GCPDisk `json:"disks,omitempty"` - // Labels list of labels to apply to the VM. + // labels list of labels to apply to the VM. // +optional Labels map[string]string `json:"labels,omitempty"` // Metadata key/value pairs to apply to the VM. // +optional Metadata []*GCPMetadata `json:"gcpMetadata,omitempty"` - // NetworkInterfaces is a list of network interfaces to be attached to the VM. + // networkInterfaces is a list of network interfaces to be attached to the VM. // +optional NetworkInterfaces []*GCPNetworkInterface `json:"networkInterfaces,omitempty"` - // ServiceAccounts is a list of GCP service accounts to be used by the VM. + // serviceAccounts is a list of GCP service accounts to be used by the VM. ServiceAccounts []GCPServiceAccount `json:"serviceAccounts"` - // Tags list of network tags to apply to the VM. + // tags list of network tags to apply to the VM. Tags []string `json:"tags,omitempty"` - // TargetPools are used for network TCP/UDP load balancing. A target pool references member instances, + // targetPools are used for network TCP/UDP load balancing. A target pool references member instances, // an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool // +optional TargetPools []string `json:"targetPools,omitempty"` - // MachineType is the machine type to use for the VM. + // machineType is the machine type to use for the VM. MachineType string `json:"machineType"` - // Region is the region in which the GCP machine provider will create the VM. + // region is the region in which the GCP machine provider will create the VM. Region string `json:"region"` - // Zone is the zone in which the GCP machine provider will create the VM. + // zone is the zone in which the GCP machine provider will create the VM. Zone string `json:"zone"` - // ProjectID is the project in which the GCP machine provider will create the VM. + // projectID is the project in which the GCP machine provider will create the VM. // +optional ProjectID string `json:"projectID,omitempty"` - // GPUs is a list of GPUs to be attached to the VM. + // gpus is a list of GPUs to be attached to the VM. // +optional GPUs []GCPGPUConfig `json:"gpus,omitempty"` - // Preemptible indicates if created instance is preemptible. + // preemptible indicates if created instance is preemptible. // +optional Preemptible bool `json:"preemptible,omitempty"` - // OnHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot. + // onHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot. // This is required to be set to "Terminate" if you want to provision machine with attached GPUs. // Otherwise, allowed values are "Migrate" and "Terminate". // If omitted, the platform chooses a default, which is subject to change over time, currently that default is "Migrate". // +kubebuilder:validation:Enum=Migrate;Terminate; // +optional OnHostMaintenance GCPHostMaintenanceType `json:"onHostMaintenance,omitempty"` - // RestartPolicy determines the behavior when an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event (default "Always"). + // restartPolicy determines the behavior when an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event (default "Always"). // Cannot be "Always" with preemptible instances. // Otherwise, allowed values are "Always" and "Never". // If omitted, the platform chooses a default, which is subject to change over time, currently that default is "Always". @@ -139,7 +139,7 @@ type GCPMachineProviderSpec struct { // +optional RestartPolicy GCPRestartPolicyType `json:"restartPolicy,omitempty"` - // ShieldedInstanceConfig is the Shielded VM configuration for the VM + // shieldedInstanceConfig is the Shielded VM configuration for the VM // +optional ShieldedInstanceConfig GCPShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` @@ -169,7 +169,7 @@ type ResourceManagerTag struct { // An OrganizationID can have a maximum of 32 characters and must consist of decimal numbers, and // cannot have leading zeroes. A ProjectID must be 6 to 30 characters in length, can only contain // lowercase letters, numbers, and hyphens, and must start with a letter, and cannot end with a hyphen. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=32 // +kubebuilder:validation:Pattern=`(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)` @@ -178,7 +178,7 @@ type ResourceManagerTag struct { // key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot be empty. // Tag key must begin and end with an alphanumeric character, and must contain only uppercase, lowercase // alphanumeric characters, and the following special characters `._-`. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.-]{0,61}[a-zA-Z0-9])?$` @@ -187,7 +187,7 @@ type ResourceManagerTag struct { // value is the value part of the tag. A tag value can have a maximum of 63 characters and cannot be empty. // Tag value must begin and end with an alphanumeric character, and must contain only uppercase, lowercase // alphanumeric characters, and the following special characters `_-.@%=+:,*#&(){}[]` and spaces. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=63 // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.@%=+:,*#&()\[\]{}\-\s]{0,61}[a-zA-Z0-9])?$` @@ -196,48 +196,48 @@ type ResourceManagerTag struct { // GCPDisk describes disks for GCP. type GCPDisk struct { - // AutoDelete indicates if the disk will be auto-deleted when the instance is deleted (default false). + // autoDelete indicates if the disk will be auto-deleted when the instance is deleted (default false). AutoDelete bool `json:"autoDelete"` - // Boot indicates if this is a boot disk (default false). + // boot indicates if this is a boot disk (default false). Boot bool `json:"boot"` - // SizeGB is the size of the disk (in GB). + // sizeGb is the size of the disk (in GB). SizeGB int64 `json:"sizeGb"` - // Type is the type of the disk (eg: pd-standard). + // type is the type of the disk (eg: pd-standard). Type string `json:"type"` - // Image is the source image to create this disk. + // image is the source image to create this disk. Image string `json:"image"` - // Labels list of labels to apply to the disk. + // labels list of labels to apply to the disk. Labels map[string]string `json:"labels"` - // EncryptionKey is the customer-supplied encryption key of the disk. + // encryptionKey is the customer-supplied encryption key of the disk. // +optional EncryptionKey *GCPEncryptionKeyReference `json:"encryptionKey,omitempty"` } // GCPMetadata describes metadata for GCP. type GCPMetadata struct { - // Key is the metadata key. + // key is the metadata key. Key string `json:"key"` - // Value is the metadata value. + // value is the metadata value. Value *string `json:"value"` } // GCPNetworkInterface describes network interfaces for GCP type GCPNetworkInterface struct { - // PublicIP indicates if true a public IP will be used + // publicIP indicates if true a public IP will be used PublicIP bool `json:"publicIP,omitempty"` - // Network is the network name. + // network is the network name. Network string `json:"network,omitempty"` - // ProjectID is the project in which the GCP machine provider will create the VM. + // projectID is the project in which the GCP machine provider will create the VM. ProjectID string `json:"projectID,omitempty"` - // Subnetwork is the subnetwork name. + // subnetwork is the subnetwork name. Subnetwork string `json:"subnetwork,omitempty"` } // GCPServiceAccount describes service accounts for GCP. type GCPServiceAccount struct { - // Email is the service account email. + // email is the service account email. Email string `json:"email"` - // Scopes list of scopes to be assigned to the service account. + // scopes list of scopes to be assigned to the service account. Scopes []string `json:"scopes"` } @@ -246,7 +246,7 @@ type GCPEncryptionKeyReference struct { // KMSKeyName is the reference KMS key, in the format // +optional KMSKey *GCPKMSKeyReference `json:"kmsKey,omitempty"` - // KMSKeyServiceAccount is the service account being used for the + // kmsKeyServiceAccount is the service account being used for the // encryption request for the given KMS key. If absent, the Compute // Engine default service account is used. // See https://cloud.google.com/compute/docs/access/service-accounts#compute_engine_service_account @@ -257,23 +257,23 @@ type GCPEncryptionKeyReference struct { // GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key type GCPKMSKeyReference struct { - // Name is the name of the customer managed encryption key to be used for the disk encryption. + // name is the name of the customer managed encryption key to be used for the disk encryption. Name string `json:"name"` - // KeyRing is the name of the KMS Key Ring which the KMS Key belongs to. + // keyRing is the name of the KMS Key Ring which the KMS Key belongs to. KeyRing string `json:"keyRing"` - // ProjectID is the ID of the Project in which the KMS Key Ring exists. + // projectID is the ID of the Project in which the KMS Key Ring exists. // Defaults to the VM ProjectID if not set. // +optional ProjectID string `json:"projectID,omitempty"` - // Location is the GCP location in which the Key Ring exists. + // location is the GCP location in which the Key Ring exists. Location string `json:"location"` } // GCPGPUConfig describes type and count of GPUs attached to the instance on GCP. type GCPGPUConfig struct { - // Count is the number of GPUs to be attached to an instance. + // count is the number of GPUs to be attached to an instance. Count int32 `json:"count"` - // Type is the type of GPU to be attached to an instance. + // type is the type of GPU to be attached to an instance. // Supported GPU types are: nvidia-tesla-k80, nvidia-tesla-p100, nvidia-tesla-v100, nvidia-tesla-p4, nvidia-tesla-t4 // +kubebuilder:validation:Pattern=`^nvidia-tesla-(k80|p100|v100|p4|t4)$` Type string `json:"type"` @@ -287,13 +287,13 @@ type GCPMachineProviderStatus struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - // InstanceID is the ID of the instance in GCP + // instanceId is the ID of the instance in GCP // +optional InstanceID *string `json:"instanceId,omitempty"` - // InstanceState is the provisioning state of the GCP Instance. + // instanceState is the provisioning state of the GCP Instance. // +optional InstanceState *string `json:"instanceState,omitempty"` - // Conditions is a set of conditions associated with the Machine to indicate + // conditions is a set of conditions associated with the Machine to indicate // errors or other status // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` @@ -302,14 +302,14 @@ type GCPMachineProviderStatus struct { // GCPShieldedInstanceConfig describes the shielded VM configuration of the instance on GCP. // Shielded VM configuration allow users to enable and disable Secure Boot, vTPM, and Integrity Monitoring. type GCPShieldedInstanceConfig struct { - // SecureBoot Defines whether the instance should have secure boot enabled. + // secureBoot Defines whether the instance should have secure boot enabled. // Secure Boot verify the digital signature of all boot components, and halting the boot process if signature verification fails. // If omitted, the platform chooses a default, which is subject to change over time, currently that default is Disabled. // +kubebuilder:validation:Enum=Enabled;Disabled //+optional SecureBoot SecureBootPolicy `json:"secureBoot,omitempty"` - // VirtualizedTrustedPlatformModule enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline. + // virtualizedTrustedPlatformModule enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline. // The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. // This is required to be set to "Enabled" if IntegrityMonitoring is enabled. // If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled. @@ -317,7 +317,7 @@ type GCPShieldedInstanceConfig struct { // +optional VirtualizedTrustedPlatformModule VirtualizedTrustedPlatformModulePolicy `json:"virtualizedTrustedPlatformModule,omitempty"` - // IntegrityMonitoring determines whether the instance should have integrity monitoring that verify the runtime boot integrity. + // integrityMonitoring determines whether the instance should have integrity monitoring that verify the runtime boot integrity. // Compares the most recent boot measurements to the integrity policy baseline and return // a pair of pass/fail results depending on whether they match or not. // If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled. diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_machine.go b/vendor/github.com/openshift/api/machine/v1beta1/types_machine.go index c8fcb192bd1..9bd3bdd60b1 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_machine.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_machine.go @@ -227,7 +227,7 @@ type MachineSpec struct { // +optional ObjectMeta `json:"metadata,omitempty"` - // LifecycleHooks allow users to pause operations on the machine at + // lifecycleHooks allow users to pause operations on the machine at // certain predefined points within the machine lifecycle. // +optional LifecycleHooks LifecycleHooks `json:"lifecycleHooks,omitempty"` @@ -242,11 +242,11 @@ type MachineSpec struct { // +listType=atomic Taints []corev1.Taint `json:"taints,omitempty"` - // ProviderSpec details Provider-specific configuration to use during node creation. + // providerSpec details Provider-specific configuration to use during node creation. // +optional ProviderSpec ProviderSpec `json:"providerSpec"` - // ProviderID is the identification ID of the machine provided by the provider. + // providerID is the identification ID of the machine provided by the provider. // This field must match the provider ID as seen on the node object corresponding to this machine. // This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler // with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out @@ -277,14 +277,14 @@ type MachineSpec struct { // LifecycleHooks allow users to pause operations on the machine at // certain prefedined points within the machine lifecycle. type LifecycleHooks struct { - // PreDrain hooks prevent the machine from being drained. + // preDrain hooks prevent the machine from being drained. // This also blocks further lifecycle events, such as termination. // +listType=map // +listMapKey=name // +optional PreDrain []LifecycleHook `json:"preDrain,omitempty"` - // PreTerminate hooks prevent the machine from being terminated. + // preTerminate hooks prevent the machine from being terminated. // PreTerminate hooks be actioned after the Machine has been drained. // +listType=map // +listMapKey=name @@ -294,39 +294,39 @@ type LifecycleHooks struct { // LifecycleHook represents a single instance of a lifecycle hook type LifecycleHook struct { - // Name defines a unique name for the lifcycle hook. + // name defines a unique name for the lifcycle hook. // The name should be unique and descriptive, ideally 1-3 words, in CamelCase or // it may be namespaced, eg. foo.example.com/CamelCase. // Names must be unique and should only be managed by a single entity. // +kubebuilder:validation: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])$` // +kubebuilder:validation:MinLength=3 // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Required + // +required Name string `json:"name"` - // Owner defines the owner of the lifecycle hook. + // owner defines the owner of the lifecycle hook. // This should be descriptive enough so that users can identify // who/what is responsible for blocking the lifecycle. // This could be the name of a controller (e.g. clusteroperator/etcd) // or an administrator managing the hook. // +kubebuilder:validation:MinLength=3 // +kubebuilder:validation:MaxLength=512 - // +kubebuilder:validation:Required + // +required Owner string `json:"owner"` } // MachineStatus defines the observed state of Machine // +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="!has(oldSelf.synchronizedGeneration) || (has(self.synchronizedGeneration) && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) || (oldSelf.authoritativeAPI == 'Migrating' && self.authoritativeAPI != 'Migrating')",message="synchronizedGeneration must not decrease unless authoritativeAPI is transitioning from Migrating to another value" type MachineStatus struct { - // NodeRef will point to the corresponding Node if it exists. + // nodeRef will point to the corresponding Node if it exists. // +optional NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` - // LastUpdated identifies when this status was last observed. + // lastUpdated identifies when this status was last observed. // +optional LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - // ErrorReason will be set in the event that there is a terminal problem + // errorReason will be set in the event that there is a terminal problem // reconciling the Machine and will contain a succinct value suitable // for machine interpretation. // @@ -345,7 +345,7 @@ type MachineStatus struct { // +optional ErrorReason *MachineStatusError `json:"errorReason,omitempty"` - // ErrorMessage will be set in the event that there is a terminal problem + // errorMessage will be set in the event that there is a terminal problem // reconciling the Machine and will contain a more verbose string suitable // for logging and human consumption. // @@ -364,7 +364,7 @@ type MachineStatus struct { // +optional ErrorMessage *string `json:"errorMessage,omitempty"` - // ProviderStatus details a Provider-specific status. + // providerStatus details a Provider-specific status. // It is recommended that providers maintain their // own versioned API types that should be // serialized/deserialized from this field. @@ -372,24 +372,24 @@ type MachineStatus struct { // +kubebuilder:validation:XPreserveUnknownFields ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` - // Addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available. + // addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available. // +optional // +listType=atomic Addresses []corev1.NodeAddress `json:"addresses,omitempty"` - // LastOperation describes the last-operation performed by the machine-controller. + // lastOperation describes the last-operation performed by the machine-controller. // This API should be useful as a history in terms of the latest operation performed on the // specific machine. It should also convey the state of the latest-operation for example if // it is still on-going, failed or completed successfully. // +optional LastOperation *LastOperation `json:"lastOperation,omitempty"` - // Phase represents the current phase of machine actuation. + // phase represents the current phase of machine actuation. // One of: Failed, Provisioning, Provisioned, Running, Deleting // +optional Phase *string `json:"phase,omitempty"` - // Conditions defines the current state of the Machine + // conditions defines the current state of the Machine // +listType=map // +listMapKey=type Conditions []Condition `json:"conditions,omitempty"` @@ -415,17 +415,17 @@ type MachineStatus struct { // LastOperation represents the detail of the last performed operation on the MachineObject. type LastOperation struct { - // Description is the human-readable description of the last operation. + // description is the human-readable description of the last operation. Description *string `json:"description,omitempty"` - // LastUpdated is the timestamp at which LastOperation API was last-updated. + // lastUpdated is the timestamp at which LastOperation API was last-updated. LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - // State is the current status of the last performed operation. + // state is the current status of the last performed operation. // E.g. Processing, Failed, Successful etc State *string `json:"state,omitempty"` - // Type is the type of operation which was last performed. + // type is the type of operation which was last performed. // E.g. Create, Delete, Update etc Type *string `json:"type,omitempty"` } diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.go b/vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.go index 912b7dea5db..76c79acb0b0 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.go @@ -64,7 +64,7 @@ type MachineHealthCheckSpec struct { // Note: An empty selector will match all machines. Selector metav1.LabelSelector `json:"selector"` - // UnhealthyConditions contains a list of the conditions that determine + // unhealthyConditions contains a list of the conditions that determine // whether a node is considered unhealthy. The conditions are combined in a // logical OR, i.e. if any of the conditions is met, the node is unhealthy. // @@ -96,7 +96,7 @@ type MachineHealthCheckSpec struct { // +optional NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` - // RemediationTemplate is a reference to a remediation template + // remediationTemplate is a reference to a remediation template // provided by an infrastructure provider. // // This field is completely optional, when filled, the MachineHealthCheck controller @@ -136,13 +136,13 @@ type MachineHealthCheckStatus struct { // +kubebuilder:validation:Minimum=0 CurrentHealthy *int `json:"currentHealthy"` - // RemediationsAllowed is the number of further remediations allowed by this machine health check before + // remediationsAllowed is the number of further remediations allowed by this machine health check before // maxUnhealthy short circuiting will be applied // +kubebuilder:validation:Minimum=0 // +optional RemediationsAllowed int32 `json:"remediationsAllowed"` - // Conditions defines the current state of the MachineHealthCheck + // conditions defines the current state of the MachineHealthCheck // +optional // +listType=map // +listMapKey=type diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go b/vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go index a14d50eb784..a29977f3474 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go @@ -38,25 +38,25 @@ type MachineSet struct { // MachineSetSpec defines the desired state of MachineSet type MachineSetSpec struct { - // Replicas is the number of desired replicas. + // replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. // +kubebuilder:default=1 Replicas *int32 `json:"replicas,omitempty"` - // MinReadySeconds is the minimum number of seconds for which a newly created machine should be ready. + // minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. // Defaults to 0 (machine will be considered available as soon as it is ready) // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` - // DeletePolicy defines the policy used to identify nodes to delete when downscaling. + // deletePolicy defines the policy used to identify nodes to delete when downscaling. // Defaults to "Random". Valid values are "Random, "Newest", "Oldest" // +kubebuilder:validation:Enum=Random;Newest;Oldest DeletePolicy string `json:"deletePolicy,omitempty"` - // Selector is a label query over machines that should match the replica count. + // selector is a label query over machines that should match the replica count. // Label keys and values that must match in order to be controlled by this MachineSet. // It must match the machine template's labels. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors Selector metav1.LabelSelector `json:"selector"` - // Template is the object that describes the machine that will be created if + // template is the object that describes the machine that will be created if // insufficient replicas are detected. // +optional Template MachineTemplateSpec `json:"template,omitempty"` @@ -113,7 +113,7 @@ type MachineTemplateSpec struct { // MachineSetStatus defines the observed state of MachineSet // +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="!has(oldSelf.synchronizedGeneration) || (has(self.synchronizedGeneration) && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) || (oldSelf.authoritativeAPI == 'Migrating' && self.authoritativeAPI != 'Migrating')",message="synchronizedGeneration must not decrease unless authoritativeAPI is transitioning from Migrating to another value" type MachineSetStatus struct { - // Replicas is the most recently observed number of replicas. + // replicas is the most recently observed number of replicas. Replicas int32 `json:"replicas"` // The number of replicas that have labels matching the labels of the machine template of the MachineSet. // +optional @@ -124,7 +124,7 @@ type MachineSetStatus struct { // The number of available replicas (ready for at least minReadySeconds) for this MachineSet. // +optional AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // ObservedGeneration reflects the generation of the most recently observed MachineSet. + // observedGeneration reflects the generation of the most recently observed MachineSet. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` // In the event that there is a terminal problem reconciling the @@ -150,7 +150,7 @@ type MachineSetStatus struct { // +optional ErrorMessage *string `json:"errorMessage,omitempty"` - // Conditions defines the current state of the MachineSet + // conditions defines the current state of the MachineSet // +listType=map // +listMapKey=type Conditions []Condition `json:"conditions,omitempty"` diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_provider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_provider.go index e9de6327836..812358e89fe 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_provider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_provider.go @@ -11,7 +11,7 @@ type ProviderSpec struct { // No more than one of the following may be specified. - // Value is an inlined, serialized representation of the resource + // value is an inlined, serialized representation of the resource // configuration. It is recommended that providers maintain their own // versioned API types that should be serialized/deserialized from this // field, akin to component config. @@ -42,7 +42,7 @@ type ProviderSpec struct { // In future versions, controller-tools@v2 might allow overriding the type and validation for embedded // types. When that happens, this hack should be revisited. type ObjectMeta struct { - // Name must be unique within a namespace. Is required when creating resources, although + // name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name // automatically. Name is primarily intended for creation idempotence and configuration // definition. @@ -51,7 +51,7 @@ type ObjectMeta struct { // +optional Name string `json:"name,omitempty"` - // GenerateName is an optional prefix, used by the server, to generate a unique + // generateName is an optional prefix, used by the server, to generate a unique // name ONLY IF the Name field has not been provided. // If this field is used, the name returned to the client will be different // than the name passed. This value will also be combined with a unique suffix. @@ -69,7 +69,7 @@ type ObjectMeta struct { // +optional GenerateName string `json:"generateName,omitempty"` - // Namespace defines the space within each name must be unique. An empty namespace is + // namespace defines the space within each name must be unique. An empty namespace is // equivalent to the "default" namespace, but "default" is the canonical representation. // Not all objects are required to be scoped to a namespace - the value of this field for // those objects will be empty. @@ -87,7 +87,7 @@ type ObjectMeta struct { // +optional Labels map[string]string `json:"labels,omitempty"` - // Annotations is an unstructured key value map stored with a resource that may be + // annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: http://kubernetes.io/docs/user-guide/annotations @@ -193,18 +193,17 @@ const ( // Condition defines an observation of a Machine API resource operational state. type Condition struct { - // Type of condition in CamelCase or in foo.example.com/CamelCase. + // 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. // +required - // +kubebuilder:validation:Required Type ConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. + // status of the condition, one of True, False, Unknown. // +required Status corev1.ConditionStatus `json:"status"` - // Severity provides an explicit classification of Reason code, so the users or machines can immediately + // severity provides an explicit classification of Reason code, so the users or machines can immediately // understand the current situation and act accordingly. // The Severity field MUST be set only when Status=False. // +optional diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go index 0a0567d630a..50b6e8f5407 100644 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go +++ b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go @@ -14,22 +14,22 @@ type VSphereMachineProviderSpec struct { metav1.TypeMeta `json:",inline"` // +optional metav1.ObjectMeta `json:"metadata,omitempty"` - // UserDataSecret contains a local reference to a secret that contains the + // 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 vSphere credentials. + // credentialsSecret is a reference to the secret with vSphere credentials. // +optional CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` - // Template is the name, inventory path, or instance UUID of the template + // template is the name, inventory path, or instance UUID of the template // used to clone new machines. Template string `json:"template"` - // Workspace describes the workspace to use for the machine. + // workspace describes the workspace to use for the machine. // +optional Workspace *Workspace `json:"workspace,omitempty"` - // Network is the network configuration for this machine's VM. + // network is the network configuration for this machine's VM. Network NetworkSpec `json:"network"` - // NumCPUs is the number of virtual processors in a virtual machine. + // numCPUs is the number of virtual processors in a virtual machine. // Defaults to the analogue property value in the template from which this // machine is cloned. // +optional @@ -40,12 +40,12 @@ type VSphereMachineProviderSpec struct { // machine is cloned. // +optional NumCoresPerSocket int32 `json:"numCoresPerSocket,omitempty"` - // MemoryMiB is the size of a virtual machine's memory, in MiB. + // memoryMiB is the size of a virtual machine's memory, in MiB. // Defaults to the analogue property value in the template from which this // machine is cloned. // +optional MemoryMiB int64 `json:"memoryMiB,omitempty"` - // DiskGiB is the size of a virtual machine's disk, in GiB. + // diskGiB is the size of a virtual machine's disk, in GiB. // Defaults to the analogue property value in the template from which this // machine is cloned. // This parameter will be ignored if 'LinkedClone' CloneMode is set. @@ -57,10 +57,10 @@ type VSphereMachineProviderSpec struct { // +kubebuilder:example="urn:vmomi:InventoryServiceTag:5736bf56-49f5-4667-b38c-b97e09dc9578:GLOBAL" // +optional TagIDs []string `json:"tagIDs,omitempty"` - // Snapshot is the name of the snapshot from which the VM was cloned + // snapshot is the name of the snapshot from which the VM was cloned // +optional Snapshot string `json:"snapshot"` - // CloneMode specifies the type of clone operation. + // cloneMode specifies the type of clone operation. // The LinkedClone mode is only support for templates that have at least // one snapshot. If the template has no snapshots, then CloneMode defaults // to FullClone. @@ -89,7 +89,7 @@ const ( // NetworkSpec defines the virtual machine's network configuration. type NetworkSpec struct { - // Devices defines the virtual machine's network interfaces. + // devices defines the virtual machine's network interfaces. Devices []NetworkDeviceSpec `json:"devices"` } @@ -100,19 +100,19 @@ type AddressesFromPool struct { // This should be a fully qualified domain name, for example, externalipam.controller.io. // +kubebuilder:example=externalipam.controller.io // +kubebuilder:validation:Pattern="^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" - // +kubebuilder:validation:Required + // +required Group string `json:"group"` // resource of the IP address pool type known to an external IPAM controller. // It is normally the plural form of the resource kind in lowercase, for example, // ippools. // +kubebuilder:example=ippools // +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - // +kubebuilder:validation:Required + // +required Resource string `json:"resource"` // name of an IP address pool, for example, pool-config-1. // +kubebuilder:example=pool-config-1 // +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } @@ -175,19 +175,19 @@ type NetworkDeviceSpec struct { // WorkspaceConfig defines a workspace configuration for the vSphere cloud // provider. type Workspace struct { - // Server is the IP address or FQDN of the vSphere endpoint. + // server is the IP address or FQDN of the vSphere endpoint. // +optional Server string `gcfg:"server,omitempty" json:"server,omitempty"` - // Datacenter is the datacenter in which VMs are created/located. + // datacenter is the datacenter in which VMs are created/located. // +optional Datacenter string `gcfg:"datacenter,omitempty" json:"datacenter,omitempty"` - // Folder is the folder in which VMs are created/located. + // folder is the folder in which VMs are created/located. // +optional Folder string `gcfg:"folder,omitempty" json:"folder,omitempty"` - // Datastore is the datastore in which VMs are created/located. + // datastore is the datastore in which VMs are created/located. // +optional Datastore string `gcfg:"default-datastore,omitempty" json:"datastore,omitempty"` - // ResourcePool is the resource pool in which VMs are created/located. + // resourcePool is the resource pool in which VMs are created/located. // +optional ResourcePool string `gcfg:"resourcepool-path,omitempty" json:"resourcePool,omitempty"` // vmGroup is the cluster vm group in which virtual machines will be added for vm host group based zonal. @@ -203,16 +203,16 @@ type Workspace struct { type VSphereMachineProviderStatus struct { metav1.TypeMeta `json:",inline"` - // InstanceID is the ID of the instance in VSphere + // instanceId is the ID of the instance in VSphere // +optional InstanceID *string `json:"instanceId,omitempty"` - // InstanceState is the provisioning state of the VSphere Instance. + // instanceState is the provisioning state of the VSphere Instance. // +optional InstanceState *string `json:"instanceState,omitempty"` - // Conditions is a set of conditions associated with the Machine to indicate + // conditions is a set of conditions associated with the Machine to indicate // errors or other status Conditions []metav1.Condition `json:"conditions,omitempty"` - // TaskRef is a managed object reference to a Task related to the machine. + // taskRef is a managed object reference to a Task related to the machine. // This value is set automatically at runtime and should not be set or // modified by users. // +optional 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 99540dde5e0..e26f79a45ff 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 @@ -13,24 +13,24 @@ package v1beta1 // AUTO-GENERATED FUNCTIONS START HERE var map_AWSMachineProviderConfig = map[string]string{ "": "AWSMachineProviderConfig is the Schema for the awsmachineproviderconfigs API Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "ami": "AMI is the reference to the AMI from which to create the machine instance.", - "instanceType": "InstanceType is the type of instance to create. Example: m4.xlarge", - "tags": "Tags is the set of tags to add to apply to an instance, in addition to the ones added by default by the actuator. These tags are additive. The actuator will ensure these tags are present, but will not remove any other tags that may exist on the instance.", - "iamInstanceProfile": "IAMInstanceProfile is a reference to an IAM role to assign to the instance", - "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 AWS credentials. Otherwise, defaults to permissions provided by attached IAM role where the actuator is running.", - "keyName": "KeyName is the name of the KeyPair to use for SSH", - "deviceIndex": "DeviceIndex is the index of the device on the instance for the network interface attachment. Defaults to 0.", - "publicIp": "PublicIP specifies whether the instance should get a public IP. If not present, it should use the default of its subnet.", - "networkInterfaceType": "NetworkInterfaceType specifies the type of network interface to be used for the primary network interface. Valid values are \"ENA\", \"EFA\", and omitted, which means no opinion and the platform chooses a good default which may change over time. The current default value is \"ENA\". Please visit https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html to learn more about the AWS Elastic Fabric Adapter interface option.", - "securityGroups": "SecurityGroups is an array of references to security groups that should be applied to the instance.", - "subnet": "Subnet is a reference to the subnet to use for this instance", - "placement": "Placement specifies where to create the instance in AWS", - "loadBalancers": "LoadBalancers is the set of load balancers to which the new instance should be added once it is created.", - "blockDevices": "BlockDevices is the set of block device mapping associated to this instance, block device without a name will be used as a root device and only one device without a name is allowed https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html", - "spotMarketOptions": "SpotMarketOptions allows users to configure instances to be run using AWS Spot instances.", - "metadataServiceOptions": "MetadataServiceOptions allows users to configure instance metadata service interaction options. If nothing specified, default AWS IMDS settings will be applied. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", - "placementGroupName": "PlacementGroupName specifies the name of the placement group in which to launch the instance. The placement group must already be created and may use any placement strategy. When omitted, no placement group is used when creating the EC2 instance.", + "ami": "ami is the reference to the AMI from which to create the machine instance.", + "instanceType": "instanceType is the type of instance to create. Example: m4.xlarge", + "tags": "tags is the set of tags to add to apply to an instance, in addition to the ones added by default by the actuator. These tags are additive. The actuator will ensure these tags are present, but will not remove any other tags that may exist on the instance.", + "iamInstanceProfile": "iamInstanceProfile is a reference to an IAM role to assign to the instance", + "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 AWS credentials. Otherwise, defaults to permissions provided by attached IAM role where the actuator is running.", + "keyName": "keyName is the name of the KeyPair to use for SSH", + "deviceIndex": "deviceIndex is the index of the device on the instance for the network interface attachment. Defaults to 0.", + "publicIp": "publicIp specifies whether the instance should get a public IP. If not present, it should use the default of its subnet.", + "networkInterfaceType": "networkInterfaceType specifies the type of network interface to be used for the primary network interface. Valid values are \"ENA\", \"EFA\", and omitted, which means no opinion and the platform chooses a good default which may change over time. The current default value is \"ENA\". Please visit https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html to learn more about the AWS Elastic Fabric Adapter interface option.", + "securityGroups": "securityGroups is an array of references to security groups that should be applied to the instance.", + "subnet": "subnet is a reference to the subnet to use for this instance", + "placement": "placement specifies where to create the instance in AWS", + "loadBalancers": "loadBalancers is the set of load balancers to which the new instance should be added once it is created.", + "blockDevices": "blockDevices is the set of block device mapping associated to this instance, block device without a name will be used as a root device and only one device without a name is allowed https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html", + "spotMarketOptions": "spotMarketOptions allows users to configure instances to be run using AWS Spot instances.", + "metadataServiceOptions": "metadataServiceOptions allows users to configure instance metadata service interaction options. If nothing specified, default AWS IMDS settings will be applied. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", + "placementGroupName": "placementGroupName specifies the name of the placement group in which to launch the instance. The placement group must already be created and may use any placement strategy. When omitted, no placement group is used when creating the EC2 instance.", "placementGroupPartition": "placementGroupPartition is the partition number within the placement group in which to launch the instance. This must be an integer value between 1 and 7. It is only valid if the placement group, referred in `PlacementGroupName` was created with strategy set to partition.", "capacityReservationId": "capacityReservationId specifies the target Capacity Reservation into which the instance should be launched. The field size should be greater than 0 and the field input must start with cr-***", } @@ -49,9 +49,9 @@ func (AWSMachineProviderConfigList) SwaggerDoc() map[string]string { var map_AWSMachineProviderStatus = map[string]string{ "": "AWSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains AWS-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "instanceId": "InstanceID is the instance ID of the machine created in AWS", - "instanceState": "InstanceState is the state of the AWS instance for this machine", - "conditions": "Conditions is a set of conditions associated with the Machine to indicate errors or other status", + "instanceId": "instanceId is the instance ID of the machine created in AWS", + "instanceState": "instanceState is the state of the AWS instance for this machine", + "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", } func (AWSMachineProviderStatus) SwaggerDoc() map[string]string { @@ -60,9 +60,9 @@ func (AWSMachineProviderStatus) SwaggerDoc() map[string]string { var map_AWSResourceReference = map[string]string{ "": "AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. Only one of ID, ARN or Filters may be specified. Specifying more than one will result in a validation error.", - "id": "ID of resource", - "arn": "ARN of resource", - "filters": "Filters is a set of filters used to identify a resource", + "id": "id of resource", + "arn": "arn of resource", + "filters": "filters is a set of filters used to identify a resource", } func (AWSResourceReference) SwaggerDoc() map[string]string { @@ -97,8 +97,8 @@ func (EBSBlockDeviceSpec) SwaggerDoc() map[string]string { var map_Filter = map[string]string{ "": "Filter is a filter used to identify an AWS resource", - "name": "Name of the filter. Filter names are case-sensitive.", - "values": "Values includes one or more filter values. Filter values are case-sensitive.", + "name": "name of the filter. Filter names are case-sensitive.", + "values": "values includes one or more filter values. Filter values are case-sensitive.", } func (Filter) SwaggerDoc() map[string]string { @@ -115,7 +115,7 @@ func (LoadBalancerReference) SwaggerDoc() map[string]string { var map_MetadataServiceOptions = map[string]string{ "": "MetadataServiceOptions defines the options available to a user when configuring Instance Metadata Service (IMDS) Options.", - "authentication": "Authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service. When omitted, this means the user has no opinion and the value is left to the platform to choose a good default, which is subject to change over time. The current default is optional. At this point this field represents `HttpTokens` parameter from `InstanceMetadataOptionsRequest` structure in AWS EC2 API https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", + "authentication": "authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service. When omitted, this means the user has no opinion and the value is left to the platform to choose a good default, which is subject to change over time. The current default is optional. At this point this field represents `HttpTokens` parameter from `InstanceMetadataOptionsRequest` structure in AWS EC2 API https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", } func (MetadataServiceOptions) SwaggerDoc() map[string]string { @@ -124,9 +124,9 @@ func (MetadataServiceOptions) SwaggerDoc() map[string]string { 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.", + "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.", } func (Placement) SwaggerDoc() map[string]string { @@ -144,8 +144,8 @@ func (SpotMarketOptions) SwaggerDoc() map[string]string { var map_TagSpecification = map[string]string{ "": "TagSpecification is the name/value pair for a tag", - "name": "Name of the tag", - "value": "Value of the tag", + "name": "name of the tag", + "value": "value of the tag", } func (TagSpecification) SwaggerDoc() map[string]string { @@ -154,8 +154,8 @@ func (TagSpecification) SwaggerDoc() map[string]string { var map_AzureBootDiagnostics = map[string]string{ "": "AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. This allows you to configure capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", - "storageAccountType": "StorageAccountType determines if the storage account for storing the diagnostics data should be provisioned by Azure (AzureManaged) or by the customer (CustomerManaged).", - "customerManaged": "CustomerManaged provides reference to the customer manager storage account.", + "storageAccountType": "storageAccountType determines if the storage account for storing the diagnostics data should be provisioned by Azure (AzureManaged) or by the customer (CustomerManaged).", + "customerManaged": "customerManaged provides reference to the customer manager storage account.", } func (AzureBootDiagnostics) SwaggerDoc() map[string]string { @@ -164,7 +164,7 @@ func (AzureBootDiagnostics) SwaggerDoc() map[string]string { var map_AzureCustomerManagedBootDiagnostics = map[string]string{ "": "AzureCustomerManagedBootDiagnostics provides reference to a customer managed storage account.", - "storageAccountURI": "StorageAccountURI is the URI of the customer managed storage account. The URI typically will be `https://.blob.core.windows.net/` but may differ if you are using Azure DNS zone endpoints. You can find the correct endpoint by looking for the Blob Primary Endpoint in the endpoints tab in the Azure console.", + "storageAccountURI": "storageAccountURI is the URI of the customer managed storage account. The URI typically will be `https://.blob.core.windows.net/` but may differ if you are using Azure DNS zone endpoints. You can find the correct endpoint by looking for the Blob Primary Endpoint in the endpoints tab in the Azure console.", } func (AzureCustomerManagedBootDiagnostics) SwaggerDoc() map[string]string { @@ -182,33 +182,33 @@ func (AzureDiagnostics) SwaggerDoc() map[string]string { var map_AzureMachineProviderSpec = map[string]string{ "": "AzureMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an Azure virtual machine. It is used by the Azure machine actuator to create a single Machine. Required parameters such as location that are not specified by this configuration, will be defaulted by the actuator. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "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 Azure credentials.", - "location": "Location is the region to use to create the instance", - "vmSize": "VMSize is the size of the VM to create.", - "image": "Image is the OS image to use to create the instance.", - "osDisk": "OSDisk represents the parameters for creating the OS disk.", + "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 Azure credentials.", + "location": "location is the region to use to create the instance", + "vmSize": "vmSize is the size of the VM to create.", + "image": "image is the OS image to use to create the instance.", + "osDisk": "osDisk represents the parameters for creating the OS disk.", "dataDisks": "DataDisk specifies the parameters that are used to add one or more data disks to the machine.", - "sshPublicKey": "SSHPublicKey is the public key to use to SSH to the virtual machine.", - "publicIP": "PublicIP if true a public IP will be used", - "tags": "Tags is a list of tags to apply to the machine.", + "sshPublicKey": "sshPublicKey is the public key to use to SSH to the virtual machine.", + "publicIP": "publicIP if true a public IP will be used", + "tags": "tags is a list of tags to apply to the machine.", "securityGroup": "Network Security Group that needs to be attached to the machine's interface. No security group will be attached if empty.", "applicationSecurityGroups": "Application Security Groups that need to be attached to the machine's interface. No application security groups will be attached if zero-length.", - "subnet": "Subnet to use for this instance", - "publicLoadBalancer": "PublicLoadBalancer to use for this instance", + "subnet": "subnet to use for this instance", + "publicLoadBalancer": "publicLoadBalancer to use for this instance", "internalLoadBalancer": "InternalLoadBalancerName to use for this instance", - "natRule": "NatRule to set inbound NAT rule of the load balancer", - "managedIdentity": "ManagedIdentity to set managed identity name", - "vnet": "Vnet to set virtual network name", + "natRule": "natRule to set inbound NAT rule of the load balancer", + "managedIdentity": "managedIdentity to set managed identity name", + "vnet": "vnet to set virtual network name", "zone": "Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone", - "networkResourceGroup": "NetworkResourceGroup is the resource group for the virtual machine's network", - "resourceGroup": "ResourceGroup is the resource group for the virtual machine", - "spotVMOptions": "SpotVMOptions allows the ability to specify the Machine should use a Spot VM", - "securityProfile": "SecurityProfile specifies the Security profile settings for a virtual machine.", - "ultraSSDCapability": "UltraSSDCapability enables or disables Azure UltraSSD capability for a virtual machine. This can be used to allow/disallow binding of Azure UltraSSD to the Machine both as Data Disks or via Persistent Volumes. This Azure feature is subject to a specific scope and certain limitations. More informations on this can be found in the official Azure documentation for Ultra Disks: (https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd?tabs=azure-portal#ga-scope-and-limitations).\n\nWhen omitted, if at least one Data Disk of type UltraSSD is specified, the platform will automatically enable the capability. If a Perisistent Volume backed by an UltraSSD is bound to a Pod on the Machine, when this field is ommitted, the platform will *not* automatically enable the capability (unless already enabled by the presence of an UltraSSD as Data Disk). This may manifest in the Pod being stuck in `ContainerCreating` phase. This defaulting behaviour may be subject to change in future.\n\nWhen set to \"Enabled\", if the capability is available for the Machine based on the scope and limitations described above, the capability will be set on the Machine. This will thus allow UltraSSD both as Data Disks and Persistent Volumes. If set to \"Enabled\" when the capability can't be available due to scope and limitations, the Machine will go into \"Failed\" state.\n\nWhen set to \"Disabled\", UltraSSDs will not be allowed either as Data Disks nor as Persistent Volumes. In this case if any UltraSSDs are specified as Data Disks on a Machine, the Machine will go into a \"Failed\" state. If instead any UltraSSDs are backing the volumes (via Persistent Volumes) of any Pods scheduled on a Node which is backed by the Machine, the Pod may get stuck in `ContainerCreating` phase.", - "acceleratedNetworking": "AcceleratedNetworking enables or disables Azure accelerated networking feature. Set to false by default. If true, then this will depend on whether the requested VMSize is supported. If set to true with an unsupported VMSize, Azure will return an error.", - "availabilitySet": "AvailabilitySet specifies the availability set to use for this instance. Availability set should be precreated, before using this field.", - "diagnostics": "Diagnostics configures the diagnostics settings for the virtual machine. This allows you to configure boot diagnostics such as capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", + "networkResourceGroup": "networkResourceGroup is the resource group for the virtual machine's network", + "resourceGroup": "resourceGroup is the resource group for the virtual machine", + "spotVMOptions": "spotVMOptions allows the ability to specify the Machine should use a Spot VM", + "securityProfile": "securityProfile specifies the Security profile settings for a virtual machine.", + "ultraSSDCapability": "ultraSSDCapability enables or disables Azure UltraSSD capability for a virtual machine. This can be used to allow/disallow binding of Azure UltraSSD to the Machine both as Data Disks or via Persistent Volumes. This Azure feature is subject to a specific scope and certain limitations. More informations on this can be found in the official Azure documentation for Ultra Disks: (https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd?tabs=azure-portal#ga-scope-and-limitations).\n\nWhen omitted, if at least one Data Disk of type UltraSSD is specified, the platform will automatically enable the capability. If a Perisistent Volume backed by an UltraSSD is bound to a Pod on the Machine, when this field is ommitted, the platform will *not* automatically enable the capability (unless already enabled by the presence of an UltraSSD as Data Disk). This may manifest in the Pod being stuck in `ContainerCreating` phase. This defaulting behaviour may be subject to change in future.\n\nWhen set to \"Enabled\", if the capability is available for the Machine based on the scope and limitations described above, the capability will be set on the Machine. This will thus allow UltraSSD both as Data Disks and Persistent Volumes. If set to \"Enabled\" when the capability can't be available due to scope and limitations, the Machine will go into \"Failed\" state.\n\nWhen set to \"Disabled\", UltraSSDs will not be allowed either as Data Disks nor as Persistent Volumes. In this case if any UltraSSDs are specified as Data Disks on a Machine, the Machine will go into a \"Failed\" state. If instead any UltraSSDs are backing the volumes (via Persistent Volumes) of any Pods scheduled on a Node which is backed by the Machine, the Pod may get stuck in `ContainerCreating` phase.", + "acceleratedNetworking": "acceleratedNetworking enables or disables Azure accelerated networking feature. Set to false by default. If true, then this will depend on whether the requested VMSize is supported. If set to true with an unsupported VMSize, Azure will return an error.", + "availabilitySet": "availabilitySet specifies the availability set to use for this instance. Availability set should be precreated, before using this field.", + "diagnostics": "diagnostics configures the diagnostics settings for the virtual machine. This allows you to configure boot diagnostics such as capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", "capacityReservationGroupID": "capacityReservationGroupID specifies the capacity reservation group resource id that should be used for allocating the virtual machine. The field size should be greater than 0 and the field input must start with '/'. The input for capacityReservationGroupID must be similar to '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}'. The keys which are used should be among 'subscriptions', 'providers' and 'resourcegroups' followed by valid ID or names respectively.", } @@ -218,9 +218,9 @@ func (AzureMachineProviderSpec) SwaggerDoc() map[string]string { var map_AzureMachineProviderStatus = map[string]string{ "": "AzureMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains Azure-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "vmId": "VMID is the ID of the virtual machine created in Azure.", - "vmState": "VMState is the provisioning state of the Azure virtual machine.", - "conditions": "Conditions is a set of conditions associated with the Machine to indicate errors or other status.", + "vmId": "vmId is the ID of the virtual machine created in Azure.", + "vmState": "vmState is the provisioning state of the Azure virtual machine.", + "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status.", } func (AzureMachineProviderStatus) SwaggerDoc() map[string]string { @@ -238,12 +238,12 @@ func (ConfidentialVM) SwaggerDoc() map[string]string { var map_DataDisk = map[string]string{ "": "DataDisk specifies the parameters that are used to add one or more data disks to the machine. A Data Disk is a managed disk that's attached to a virtual machine to store application data. It differs from an OS Disk as it doesn't come with a pre-installed OS, and it cannot contain the boot volume. It is registered as SCSI drive and labeled with the chosen `lun`. e.g. for `lun: 0` the raw disk device will be available at `/dev/disk/azure/scsi1/lun0`.\n\nAs the Data Disk disk device is attached raw to the virtual machine, it will need to be partitioned, formatted with a filesystem and mounted, in order for it to be usable. This can be done by creating a custom userdata Secret with custom Ignition configuration to achieve the desired initialization. At this stage the previously defined `lun` is to be used as the \"device\" key for referencing the raw disk device to be initialized. Once the custom userdata Secret has been created, it can be referenced in the Machine's `.providerSpec.userDataSecret`. For further guidance and examples, please refer to the official OpenShift docs.", - "nameSuffix": "NameSuffix is the suffix to be appended to the machine name to generate the disk name. Each disk name will be in format _. NameSuffix name must start and finish with an alphanumeric character and can only contain letters, numbers, underscores, periods or hyphens. The overall disk name must not exceed 80 chars in length.", - "diskSizeGB": "DiskSizeGB is the size in GB to assign to the data disk.", - "managedDisk": "ManagedDisk specifies the Managed Disk parameters for the data disk. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is a ManagedDisk with with storageAccountType: \"Premium_LRS\" and diskEncryptionSet.id: \"Default\".", - "lun": "Lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. This value is also needed for referencing the data disks devices within userdata to perform disk initialization through Ignition (e.g. partition/format/mount). The value must be between 0 and 63.", - "cachingType": "CachingType specifies the caching requirements. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is CachingTypeNone.", - "deletionPolicy": "DeletionPolicy specifies the data disk deletion policy upon Machine deletion. Possible values are \"Delete\",\"Detach\". When \"Delete\" is used the data disk is deleted when the Machine is deleted. When \"Detach\" is used the data disk is detached from the Machine and retained when the Machine is deleted.", + "nameSuffix": "nameSuffix is the suffix to be appended to the machine name to generate the disk name. Each disk name will be in format _. NameSuffix name must start and finish with an alphanumeric character and can only contain letters, numbers, underscores, periods or hyphens. The overall disk name must not exceed 80 chars in length.", + "diskSizeGB": "diskSizeGB is the size in GB to assign to the data disk.", + "managedDisk": "managedDisk specifies the Managed Disk parameters for the data disk. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is a ManagedDisk with with storageAccountType: \"Premium_LRS\" and diskEncryptionSet.id: \"Default\".", + "lun": "lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. This value is also needed for referencing the data disks devices within userdata to perform disk initialization through Ignition (e.g. partition/format/mount). The value must be between 0 and 63.", + "cachingType": "cachingType specifies the caching requirements. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is CachingTypeNone.", + "deletionPolicy": "deletionPolicy specifies the data disk deletion policy upon Machine deletion. Possible values are \"Delete\",\"Detach\". When \"Delete\" is used the data disk is deleted when the Machine is deleted. When \"Detach\" is used the data disk is detached from the Machine and retained when the Machine is deleted.", } func (DataDisk) SwaggerDoc() map[string]string { @@ -252,8 +252,8 @@ func (DataDisk) SwaggerDoc() map[string]string { var map_DataDiskManagedDiskParameters = map[string]string{ "": "DataDiskManagedDiskParameters is the parameters of a DataDisk managed disk.", - "storageAccountType": "StorageAccountType is the storage account type to use. Possible values include \"Standard_LRS\", \"Premium_LRS\" and \"UltraSSD_LRS\".", - "diskEncryptionSet": "DiskEncryptionSet is the disk encryption set properties. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is a DiskEncryptionSet with id: \"Default\".", + "storageAccountType": "storageAccountType is the storage account type to use. Possible values include \"Standard_LRS\", \"Premium_LRS\" and \"UltraSSD_LRS\".", + "diskEncryptionSet": "diskEncryptionSet is the disk encryption set properties. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is a DiskEncryptionSet with id: \"Default\".", } func (DataDiskManagedDiskParameters) SwaggerDoc() map[string]string { @@ -262,7 +262,7 @@ func (DataDiskManagedDiskParameters) SwaggerDoc() map[string]string { var map_DiskEncryptionSetParameters = map[string]string{ "": "DiskEncryptionSetParameters is the disk encryption set properties", - "id": "ID is the disk encryption set ID Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is: \"Default\".", + "id": "id is the disk encryption set ID Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is: \"Default\".", } func (DiskEncryptionSetParameters) SwaggerDoc() map[string]string { @@ -271,7 +271,7 @@ func (DiskEncryptionSetParameters) SwaggerDoc() map[string]string { var map_DiskSettings = map[string]string{ "": "DiskSettings describe ephemeral disk settings for the os disk.", - "ephemeralStorageLocation": "EphemeralStorageLocation enables ephemeral OS when set to 'Local'. Possible values include: 'Local'. See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is that disks are saved to remote Azure storage.", + "ephemeralStorageLocation": "ephemeralStorageLocation enables ephemeral OS when set to 'Local'. Possible values include: 'Local'. See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is that disks are saved to remote Azure storage.", } func (DiskSettings) SwaggerDoc() map[string]string { @@ -280,12 +280,12 @@ func (DiskSettings) SwaggerDoc() map[string]string { var map_Image = map[string]string{ "": "Image is a mirror of azure sdk compute.ImageReference", - "publisher": "Publisher is the name of the organization that created the image", - "offer": "Offer specifies the name of a group of related images created by the publisher. For example, UbuntuServer, WindowsServer", - "sku": "SKU specifies an instance of an offer, such as a major release of a distribution. For example, 18.04-LTS, 2019-Datacenter", - "version": "Version specifies the version of an image sku. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.", - "resourceID": "ResourceID specifies an image to use by ID", - "type": "Type identifies the source of the image and related information, such as purchase plans. Valid values are \"ID\", \"MarketplaceWithPlan\", \"MarketplaceNoPlan\", and omitted, which means no opinion and the platform chooses a good default which may change over time. Currently that default is \"MarketplaceNoPlan\" if publisher data is supplied, or \"ID\" if not. For more information about purchase plans, see: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage#check-the-purchase-plan-information", + "publisher": "publisher is the name of the organization that created the image", + "offer": "offer specifies the name of a group of related images created by the publisher. For example, UbuntuServer, WindowsServer", + "sku": "sku specifies an instance of an offer, such as a major release of a distribution. For example, 18.04-LTS, 2019-Datacenter", + "version": "version specifies the version of an image sku. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.", + "resourceID": "resourceID specifies an image to use by ID", + "type": "type identifies the source of the image and related information, such as purchase plans. Valid values are \"ID\", \"MarketplaceWithPlan\", \"MarketplaceNoPlan\", and omitted, which means no opinion and the platform chooses a good default which may change over time. Currently that default is \"MarketplaceNoPlan\" if publisher data is supplied, or \"ID\" if not. For more information about purchase plans, see: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage#check-the-purchase-plan-information", } func (Image) SwaggerDoc() map[string]string { @@ -293,11 +293,11 @@ func (Image) SwaggerDoc() map[string]string { } var map_OSDisk = map[string]string{ - "osType": "OSType is the operating system type of the OS disk. Possible values include \"Linux\" and \"Windows\".", - "managedDisk": "ManagedDisk specifies the Managed Disk parameters for the OS disk.", - "diskSizeGB": "DiskSizeGB is the size in GB to assign to the data disk.", - "diskSettings": "DiskSettings describe ephemeral disk settings for the os disk.", - "cachingType": "CachingType specifies the caching requirements. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is `None`.", + "osType": "osType is the operating system type of the OS disk. Possible values include \"Linux\" and \"Windows\".", + "managedDisk": "managedDisk specifies the Managed Disk parameters for the OS disk.", + "diskSizeGB": "diskSizeGB is the size in GB to assign to the data disk.", + "diskSettings": "diskSettings describe ephemeral disk settings for the os disk.", + "cachingType": "cachingType specifies the caching requirements. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is `None`.", } func (OSDisk) SwaggerDoc() map[string]string { @@ -306,8 +306,8 @@ func (OSDisk) SwaggerDoc() map[string]string { var map_OSDiskManagedDiskParameters = map[string]string{ "": "OSDiskManagedDiskParameters is the parameters of a OSDisk managed disk.", - "storageAccountType": "StorageAccountType is the storage account type to use. Possible values include \"Standard_LRS\", \"Premium_LRS\".", - "diskEncryptionSet": "DiskEncryptionSet is the disk encryption set properties", + "storageAccountType": "storageAccountType is the storage account type to use. Possible values include \"Standard_LRS\", \"Premium_LRS\".", + "diskEncryptionSet": "diskEncryptionSet is the disk encryption set properties", "securityProfile": "securityProfile specifies the security profile for the managed disk.", } @@ -338,7 +338,7 @@ func (SecuritySettings) SwaggerDoc() map[string]string { var map_SpotVMOptions = map[string]string{ "": "SpotVMOptions defines the options relevant to running the Machine on Spot VMs", - "maxPrice": "MaxPrice defines the maximum price the user is willing to pay for Spot VM instances", + "maxPrice": "maxPrice defines the maximum price the user is willing to pay for Spot VM instances", } func (SpotVMOptions) SwaggerDoc() map[string]string { @@ -376,13 +376,13 @@ func (VMDiskSecurityProfile) SwaggerDoc() map[string]string { var map_GCPDisk = map[string]string{ "": "GCPDisk describes disks for GCP.", - "autoDelete": "AutoDelete indicates if the disk will be auto-deleted when the instance is deleted (default false).", - "boot": "Boot indicates if this is a boot disk (default false).", - "sizeGb": "SizeGB is the size of the disk (in GB).", - "type": "Type is the type of the disk (eg: pd-standard).", - "image": "Image is the source image to create this disk.", - "labels": "Labels list of labels to apply to the disk.", - "encryptionKey": "EncryptionKey is the customer-supplied encryption key of the disk.", + "autoDelete": "autoDelete indicates if the disk will be auto-deleted when the instance is deleted (default false).", + "boot": "boot indicates if this is a boot disk (default false).", + "sizeGb": "sizeGb is the size of the disk (in GB).", + "type": "type is the type of the disk (eg: pd-standard).", + "image": "image is the source image to create this disk.", + "labels": "labels list of labels to apply to the disk.", + "encryptionKey": "encryptionKey is the customer-supplied encryption key of the disk.", } func (GCPDisk) SwaggerDoc() map[string]string { @@ -392,7 +392,7 @@ func (GCPDisk) SwaggerDoc() map[string]string { var map_GCPEncryptionKeyReference = map[string]string{ "": "GCPEncryptionKeyReference describes the encryptionKey to use for a disk's encryption.", "kmsKey": "KMSKeyName is the reference KMS key, in the format", - "kmsKeyServiceAccount": "KMSKeyServiceAccount is the service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. See https://cloud.google.com/compute/docs/access/service-accounts#compute_engine_service_account for details on the default service account.", + "kmsKeyServiceAccount": "kmsKeyServiceAccount is the service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. See https://cloud.google.com/compute/docs/access/service-accounts#compute_engine_service_account for details on the default service account.", } func (GCPEncryptionKeyReference) SwaggerDoc() map[string]string { @@ -401,8 +401,8 @@ func (GCPEncryptionKeyReference) SwaggerDoc() map[string]string { var map_GCPGPUConfig = map[string]string{ "": "GCPGPUConfig describes type and count of GPUs attached to the instance on GCP.", - "count": "Count is the number of GPUs to be attached to an instance.", - "type": "Type is the type of GPU to be attached to an instance. Supported GPU types are: nvidia-tesla-k80, nvidia-tesla-p100, nvidia-tesla-v100, nvidia-tesla-p4, nvidia-tesla-t4", + "count": "count is the number of GPUs to be attached to an instance.", + "type": "type is the type of GPU to be attached to an instance. Supported GPU types are: nvidia-tesla-k80, nvidia-tesla-p100, nvidia-tesla-v100, nvidia-tesla-p4, nvidia-tesla-t4", } func (GCPGPUConfig) SwaggerDoc() map[string]string { @@ -411,10 +411,10 @@ func (GCPGPUConfig) SwaggerDoc() map[string]string { var map_GCPKMSKeyReference = map[string]string{ "": "GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key", - "name": "Name is the name of the customer managed encryption key to be used for the disk encryption.", - "keyRing": "KeyRing is the name of the KMS Key Ring which the KMS Key belongs to.", - "projectID": "ProjectID is the ID of the Project in which the KMS Key Ring exists. Defaults to the VM ProjectID if not set.", - "location": "Location is the GCP location in which the Key Ring exists.", + "name": "name is the name of the customer managed encryption key to be used for the disk encryption.", + "keyRing": "keyRing is the name of the KMS Key Ring which the KMS Key belongs to.", + "projectID": "projectID is the ID of the Project in which the KMS Key Ring exists. Defaults to the VM ProjectID if not set.", + "location": "location is the GCP location in which the Key Ring exists.", } func (GCPKMSKeyReference) SwaggerDoc() map[string]string { @@ -424,26 +424,26 @@ func (GCPKMSKeyReference) SwaggerDoc() map[string]string { var map_GCPMachineProviderSpec = map[string]string{ "": "GCPMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an GCP virtual machine. It is used by the GCP machine actuator to create a single Machine. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "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 GCP credentials.", - "canIPForward": "CanIPForward Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes.", - "deletionProtection": "DeletionProtection whether the resource should be protected against deletion.", - "disks": "Disks is a list of disks to be attached to the VM.", - "labels": "Labels list of labels to apply to the VM.", + "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 GCP credentials.", + "canIPForward": "canIPForward Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes.", + "deletionProtection": "deletionProtection whether the resource should be protected against deletion.", + "disks": "disks is a list of disks to be attached to the VM.", + "labels": "labels list of labels to apply to the VM.", "gcpMetadata": "Metadata key/value pairs to apply to the VM.", - "networkInterfaces": "NetworkInterfaces is a list of network interfaces to be attached to the VM.", - "serviceAccounts": "ServiceAccounts is a list of GCP service accounts to be used by the VM.", - "tags": "Tags list of network tags to apply to the VM.", - "targetPools": "TargetPools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool", - "machineType": "MachineType is the machine type to use for the VM.", - "region": "Region is the region in which the GCP machine provider will create the VM.", - "zone": "Zone is the zone in which the GCP machine provider will create the VM.", - "projectID": "ProjectID is the project in which the GCP machine provider will create the VM.", - "gpus": "GPUs is a list of GPUs to be attached to the VM.", - "preemptible": "Preemptible indicates if created instance is preemptible.", - "onHostMaintenance": "OnHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot. This is required to be set to \"Terminate\" if you want to provision machine with attached GPUs. Otherwise, allowed values are \"Migrate\" and \"Terminate\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is \"Migrate\".", - "restartPolicy": "RestartPolicy determines the behavior when an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event (default \"Always\"). Cannot be \"Always\" with preemptible instances. Otherwise, allowed values are \"Always\" and \"Never\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is \"Always\". RestartPolicy represents AutomaticRestart in GCP compute api", - "shieldedInstanceConfig": "ShieldedInstanceConfig is the Shielded VM configuration for the VM", + "networkInterfaces": "networkInterfaces is a list of network interfaces to be attached to the VM.", + "serviceAccounts": "serviceAccounts is a list of GCP service accounts to be used by the VM.", + "tags": "tags list of network tags to apply to the VM.", + "targetPools": "targetPools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool", + "machineType": "machineType is the machine type to use for the VM.", + "region": "region is the region in which the GCP machine provider will create the VM.", + "zone": "zone is the zone in which the GCP machine provider will create the VM.", + "projectID": "projectID is the project in which the GCP machine provider will create the VM.", + "gpus": "gpus is a list of GPUs to be attached to the VM.", + "preemptible": "preemptible indicates if created instance is preemptible.", + "onHostMaintenance": "onHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot. This is required to be set to \"Terminate\" if you want to provision machine with attached GPUs. Otherwise, allowed values are \"Migrate\" and \"Terminate\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is \"Migrate\".", + "restartPolicy": "restartPolicy determines the behavior when an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event (default \"Always\"). Cannot be \"Always\" with preemptible instances. Otherwise, allowed values are \"Always\" and \"Never\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is \"Always\". RestartPolicy represents AutomaticRestart in GCP compute api", + "shieldedInstanceConfig": "shieldedInstanceConfig is the Shielded VM configuration for the VM", "confidentialCompute": "confidentialCompute Defines whether the instance should have confidential compute enabled. If enabled OnHostMaintenance is required to be set to \"Terminate\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is false.", "resourceManagerTags": "resourceManagerTags is an optional list of tags to apply to the GCP resources created for the cluster. See https://cloud.google.com/resource-manager/docs/tags/tags-overview for information on tagging GCP resources. GCP supports a maximum of 50 tags per resource.", } @@ -454,9 +454,9 @@ func (GCPMachineProviderSpec) SwaggerDoc() map[string]string { var map_GCPMachineProviderStatus = map[string]string{ "": "GCPMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains GCP-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "instanceId": "InstanceID is the ID of the instance in GCP", - "instanceState": "InstanceState is the provisioning state of the GCP Instance.", - "conditions": "Conditions is a set of conditions associated with the Machine to indicate errors or other status", + "instanceId": "instanceId is the ID of the instance in GCP", + "instanceState": "instanceState is the provisioning state of the GCP Instance.", + "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", } func (GCPMachineProviderStatus) SwaggerDoc() map[string]string { @@ -465,8 +465,8 @@ func (GCPMachineProviderStatus) SwaggerDoc() map[string]string { var map_GCPMetadata = map[string]string{ "": "GCPMetadata describes metadata for GCP.", - "key": "Key is the metadata key.", - "value": "Value is the metadata value.", + "key": "key is the metadata key.", + "value": "value is the metadata value.", } func (GCPMetadata) SwaggerDoc() map[string]string { @@ -475,10 +475,10 @@ func (GCPMetadata) SwaggerDoc() map[string]string { var map_GCPNetworkInterface = map[string]string{ "": "GCPNetworkInterface describes network interfaces for GCP", - "publicIP": "PublicIP indicates if true a public IP will be used", - "network": "Network is the network name.", - "projectID": "ProjectID is the project in which the GCP machine provider will create the VM.", - "subnetwork": "Subnetwork is the subnetwork name.", + "publicIP": "publicIP indicates if true a public IP will be used", + "network": "network is the network name.", + "projectID": "projectID is the project in which the GCP machine provider will create the VM.", + "subnetwork": "subnetwork is the subnetwork name.", } func (GCPNetworkInterface) SwaggerDoc() map[string]string { @@ -487,8 +487,8 @@ func (GCPNetworkInterface) SwaggerDoc() map[string]string { var map_GCPServiceAccount = map[string]string{ "": "GCPServiceAccount describes service accounts for GCP.", - "email": "Email is the service account email.", - "scopes": "Scopes list of scopes to be assigned to the service account.", + "email": "email is the service account email.", + "scopes": "scopes list of scopes to be assigned to the service account.", } func (GCPServiceAccount) SwaggerDoc() map[string]string { @@ -497,9 +497,9 @@ func (GCPServiceAccount) SwaggerDoc() map[string]string { var map_GCPShieldedInstanceConfig = map[string]string{ "": "GCPShieldedInstanceConfig describes the shielded VM configuration of the instance on GCP. Shielded VM configuration allow users to enable and disable Secure Boot, vTPM, and Integrity Monitoring.", - "secureBoot": "SecureBoot Defines whether the instance should have secure boot enabled. Secure Boot verify the digital signature of all boot components, and halting the boot process if signature verification fails. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Disabled.", - "virtualizedTrustedPlatformModule": "VirtualizedTrustedPlatformModule enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline. The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. This is required to be set to \"Enabled\" if IntegrityMonitoring is enabled. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.", - "integrityMonitoring": "IntegrityMonitoring determines whether the instance should have integrity monitoring that verify the runtime boot integrity. Compares the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.", + "secureBoot": "secureBoot Defines whether the instance should have secure boot enabled. Secure Boot verify the digital signature of all boot components, and halting the boot process if signature verification fails. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Disabled.", + "virtualizedTrustedPlatformModule": "virtualizedTrustedPlatformModule enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline. The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. This is required to be set to \"Enabled\" if IntegrityMonitoring is enabled. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.", + "integrityMonitoring": "integrityMonitoring determines whether the instance should have integrity monitoring that verify the runtime boot integrity. Compares the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.", } func (GCPShieldedInstanceConfig) SwaggerDoc() map[string]string { @@ -519,10 +519,10 @@ func (ResourceManagerTag) SwaggerDoc() map[string]string { var map_LastOperation = map[string]string{ "": "LastOperation represents the detail of the last performed operation on the MachineObject.", - "description": "Description is the human-readable description of the last operation.", - "lastUpdated": "LastUpdated is the timestamp at which LastOperation API was last-updated.", - "state": "State is the current status of the last performed operation. E.g. Processing, Failed, Successful etc", - "type": "Type is the type of operation which was last performed. E.g. Create, Delete, Update etc", + "description": "description is the human-readable description of the last operation.", + "lastUpdated": "lastUpdated is the timestamp at which LastOperation API was last-updated.", + "state": "state is the current status of the last performed operation. E.g. Processing, Failed, Successful etc", + "type": "type is the type of operation which was last performed. E.g. Create, Delete, Update etc", } func (LastOperation) SwaggerDoc() map[string]string { @@ -531,8 +531,8 @@ func (LastOperation) SwaggerDoc() map[string]string { var map_LifecycleHook = map[string]string{ "": "LifecycleHook represents a single instance of a lifecycle hook", - "name": "Name defines a unique name for the lifcycle hook. The name should be unique and descriptive, ideally 1-3 words, in CamelCase or it may be namespaced, eg. foo.example.com/CamelCase. Names must be unique and should only be managed by a single entity.", - "owner": "Owner defines the owner of the lifecycle hook. This should be descriptive enough so that users can identify who/what is responsible for blocking the lifecycle. This could be the name of a controller (e.g. clusteroperator/etcd) or an administrator managing the hook.", + "name": "name defines a unique name for the lifcycle hook. The name should be unique and descriptive, ideally 1-3 words, in CamelCase or it may be namespaced, eg. foo.example.com/CamelCase. Names must be unique and should only be managed by a single entity.", + "owner": "owner defines the owner of the lifecycle hook. This should be descriptive enough so that users can identify who/what is responsible for blocking the lifecycle. This could be the name of a controller (e.g. clusteroperator/etcd) or an administrator managing the hook.", } func (LifecycleHook) SwaggerDoc() map[string]string { @@ -541,8 +541,8 @@ func (LifecycleHook) SwaggerDoc() map[string]string { var map_LifecycleHooks = map[string]string{ "": "LifecycleHooks allow users to pause operations on the machine at certain prefedined points within the machine lifecycle.", - "preDrain": "PreDrain hooks prevent the machine from being drained. This also blocks further lifecycle events, such as termination.", - "preTerminate": "PreTerminate hooks prevent the machine from being terminated. PreTerminate hooks be actioned after the Machine has been drained.", + "preDrain": "preDrain hooks prevent the machine from being drained. This also blocks further lifecycle events, such as termination.", + "preTerminate": "preTerminate hooks prevent the machine from being terminated. PreTerminate hooks be actioned after the Machine has been drained.", } func (LifecycleHooks) SwaggerDoc() map[string]string { @@ -570,10 +570,10 @@ func (MachineList) SwaggerDoc() map[string]string { var map_MachineSpec = map[string]string{ "": "MachineSpec defines the desired state of Machine", "metadata": "ObjectMeta will autopopulate the Node created. Use this to indicate what labels, annotations, name prefix, etc., should be used when creating the Node.", - "lifecycleHooks": "LifecycleHooks allow users to pause operations on the machine at certain predefined points within the machine lifecycle.", + "lifecycleHooks": "lifecycleHooks allow users to pause operations on the machine at certain predefined points within the machine lifecycle.", "taints": "The list of the taints to be applied to the corresponding Node in additive manner. This list will not overwrite any other taints added to the Node on an ongoing basis by other entities. These taints should be actively reconciled e.g. if you ask the machine controller to apply a taint and then manually remove the taint the machine controller will put it back) but not have the machine controller remove any taints", - "providerSpec": "ProviderSpec details Provider-specific configuration to use during node creation.", - "providerID": "ProviderID is the identification ID of the machine provided by the provider. This field must match the provider ID as seen on the node object corresponding to this machine. This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a generic out-of-tree provider for autoscaler, this field is required by autoscaler to be able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver and then a comparison is done to find out unregistered machines and are marked for delete. This field will be set by the actuators and consumed by higher level entities like autoscaler that will be interfacing with cluster-api as generic provider.", + "providerSpec": "providerSpec details Provider-specific configuration to use during node creation.", + "providerID": "providerID is the identification ID of the machine provided by the provider. This field must match the provider ID as seen on the node object corresponding to this machine. This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a generic out-of-tree provider for autoscaler, this field is required by autoscaler to be able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver and then a comparison is done to find out unregistered machines and are marked for delete. This field will be set by the actuators and consumed by higher level entities like autoscaler that will be interfacing with cluster-api as generic provider.", "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI and ClusterAPI. When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. Currently the authoritative API determines which controller will manage the resource, this will change in a future release. To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`.", } @@ -583,15 +583,15 @@ func (MachineSpec) SwaggerDoc() map[string]string { var map_MachineStatus = map[string]string{ "": "MachineStatus defines the observed state of Machine", - "nodeRef": "NodeRef will point to the corresponding Node if it exists.", - "lastUpdated": "LastUpdated identifies when this status was last observed.", - "errorReason": "ErrorReason will be set in the event that there is a terminal problem reconciling the Machine and will contain a succinct value suitable for machine interpretation.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.", - "errorMessage": "ErrorMessage will be set in the event that there is a terminal problem reconciling the Machine and will contain a more verbose string suitable for logging and human consumption.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.", - "providerStatus": "ProviderStatus details a Provider-specific status. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field.", - "addresses": "Addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available.", - "lastOperation": "LastOperation describes the last-operation performed by the machine-controller. This API should be useful as a history in terms of the latest operation performed on the specific machine. It should also convey the state of the latest-operation for example if it is still on-going, failed or completed successfully.", - "phase": "Phase represents the current phase of machine actuation. One of: Failed, Provisioning, Provisioned, Running, Deleting", - "conditions": "Conditions defines the current state of the Machine", + "nodeRef": "nodeRef will point to the corresponding Node if it exists.", + "lastUpdated": "lastUpdated identifies when this status was last observed.", + "errorReason": "errorReason will be set in the event that there is a terminal problem reconciling the Machine and will contain a succinct value suitable for machine interpretation.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.", + "errorMessage": "errorMessage will be set in the event that there is a terminal problem reconciling the Machine and will contain a more verbose string suitable for logging and human consumption.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.", + "providerStatus": "providerStatus details a Provider-specific status. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field.", + "addresses": "addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available.", + "lastOperation": "lastOperation describes the last-operation performed by the machine-controller. This API should be useful as a history in terms of the latest operation performed on the specific machine. It should also convey the state of the latest-operation for example if it is still on-going, failed or completed successfully.", + "phase": "phase represents the current phase of machine actuation. One of: Failed, Provisioning, Provisioned, Running, Deleting", + "conditions": "conditions defines the current state of the Machine", "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI, ClusterAPI and Migrating. This value is updated by the migration controller to reflect the authoritative API. Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other.", "synchronizedGeneration": "synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with. This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.", } @@ -623,10 +623,10 @@ func (MachineHealthCheckList) SwaggerDoc() map[string]string { var map_MachineHealthCheckSpec = map[string]string{ "": "MachineHealthCheckSpec defines the desired state of MachineHealthCheck", "selector": "Label selector to match machines whose health will be exercised. Note: An empty selector will match all machines.", - "unhealthyConditions": "UnhealthyConditions contains a list of the conditions that determine whether a node is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the node is unhealthy.", + "unhealthyConditions": "unhealthyConditions contains a list of the conditions that determine whether a node is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the node is unhealthy.", "maxUnhealthy": "Any farther remediation is only allowed if at most \"MaxUnhealthy\" machines selected by \"selector\" are not healthy. Expects either a postive integer value or a percentage value. Percentage values must be positive whole numbers and are capped at 100%. Both 0 and 0% are valid and will block all remediation.", "nodeStartupTimeout": "Machines older than this duration without a node will be considered to have failed and will be remediated. To prevent Machines without Nodes from being removed, disable startup checks by setting this value explicitly to \"0\". Expects an unsigned duration string of decimal numbers each with optional fraction and a unit suffix, eg \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".", - "remediationTemplate": "RemediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis field is completely optional, when filled, the MachineHealthCheck controller creates a new object from the template referenced and hands off remediation of the machine to a controller that lives outside of Machine API Operator.", + "remediationTemplate": "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis field is completely optional, when filled, the MachineHealthCheck controller creates a new object from the template referenced and hands off remediation of the machine to a controller that lives outside of Machine API Operator.", } func (MachineHealthCheckSpec) SwaggerDoc() map[string]string { @@ -637,8 +637,8 @@ var map_MachineHealthCheckStatus = map[string]string{ "": "MachineHealthCheckStatus defines the observed state of MachineHealthCheck", "expectedMachines": "total number of machines counted by this machine health check", "currentHealthy": "total number of machines counted by this machine health check", - "remediationsAllowed": "RemediationsAllowed is the number of further remediations allowed by this machine health check before maxUnhealthy short circuiting will be applied", - "conditions": "Conditions defines the current state of the MachineHealthCheck", + "remediationsAllowed": "remediationsAllowed is the number of further remediations allowed by this machine health check before maxUnhealthy short circuiting will be applied", + "conditions": "conditions defines the current state of the MachineHealthCheck", } func (MachineHealthCheckStatus) SwaggerDoc() map[string]string { @@ -674,11 +674,11 @@ func (MachineSetList) SwaggerDoc() map[string]string { var map_MachineSetSpec = map[string]string{ "": "MachineSetSpec defines the desired state of MachineSet", - "replicas": "Replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1.", - "minReadySeconds": "MinReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)", - "deletePolicy": "DeletePolicy defines the policy used to identify nodes to delete when downscaling. Defaults to \"Random\". Valid values are \"Random, \"Newest\", \"Oldest\"", - "selector": "Selector is a label query over machines that should match the replica count. Label keys and values that must match in order to be controlled by this MachineSet. It must match the machine template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "template": "Template is the object that describes the machine that will be created if insufficient replicas are detected.", + "replicas": "replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1.", + "minReadySeconds": "minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)", + "deletePolicy": "deletePolicy defines the policy used to identify nodes to delete when downscaling. Defaults to \"Random\". Valid values are \"Random, \"Newest\", \"Oldest\"", + "selector": "selector is a label query over machines that should match the replica count. Label keys and values that must match in order to be controlled by this MachineSet. It must match the machine template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", + "template": "template is the object that describes the machine that will be created if insufficient replicas are detected.", "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI and ClusterAPI. When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. Currently the authoritative API determines which controller will manage the resource, this will change in a future release. To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`.", } @@ -688,13 +688,13 @@ func (MachineSetSpec) SwaggerDoc() map[string]string { var map_MachineSetStatus = map[string]string{ "": "MachineSetStatus defines the observed state of MachineSet", - "replicas": "Replicas is the most recently observed number of replicas.", + "replicas": "replicas is the most recently observed number of replicas.", "fullyLabeledReplicas": "The number of replicas that have labels matching the labels of the machine template of the MachineSet.", "readyReplicas": "The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is \"Ready\".", "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this MachineSet.", - "observedGeneration": "ObservedGeneration reflects the generation of the most recently observed MachineSet.", + "observedGeneration": "observedGeneration reflects the generation of the most recently observed MachineSet.", "errorReason": "In the event that there is a terminal problem reconciling the replicas, both ErrorReason and ErrorMessage will be set. ErrorReason will be populated with a succinct value suitable for machine interpretation, while ErrorMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplate's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.", - "conditions": "Conditions defines the current state of the MachineSet", + "conditions": "conditions defines the current state of the MachineSet", "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI, ClusterAPI and Migrating. This value is updated by the migration controller to reflect the authoritative API. Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other.", "synchronizedGeneration": "synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with. This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.", } @@ -715,9 +715,9 @@ func (MachineTemplateSpec) SwaggerDoc() map[string]string { var map_Condition = map[string]string{ "": "Condition defines an observation of a Machine API resource operational state.", - "type": "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.", - "status": "Status of the condition, one of True, False, Unknown.", - "severity": "Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False.", + "type": "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.", + "status": "status of the condition, one of True, False, Unknown.", + "severity": "severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False.", "lastTransitionTime": "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.", "reason": "The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty.", "message": "A human readable message indicating details about the transition. This field may be empty.", @@ -729,11 +729,11 @@ func (Condition) SwaggerDoc() map[string]string { var map_ObjectMeta = map[string]string{ "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta.\n\nObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience.\n\nDuring the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: \"null\"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package.\n\nIn more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable.\n\nIn future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited.", - "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", - "namespace": "Namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", + "name": "name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + "generateName": "generateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", + "namespace": "namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", - "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "annotations": "annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", } @@ -743,7 +743,7 @@ func (ObjectMeta) SwaggerDoc() map[string]string { var map_ProviderSpec = map[string]string{ "": "ProviderSpec defines the configuration to use during node creation.", - "value": "Value is an inlined, serialized representation of the resource configuration. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field, akin to component config.", + "value": "value is an inlined, serialized representation of the resource configuration. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field, akin to component config.", } func (ProviderSpec) SwaggerDoc() map[string]string { @@ -776,7 +776,7 @@ func (NetworkDeviceSpec) SwaggerDoc() map[string]string { var map_NetworkSpec = map[string]string{ "": "NetworkSpec defines the virtual machine's network configuration.", - "devices": "Devices defines the virtual machine's network interfaces.", + "devices": "devices defines the virtual machine's network interfaces.", } func (NetworkSpec) SwaggerDoc() map[string]string { @@ -785,18 +785,18 @@ func (NetworkSpec) SwaggerDoc() map[string]string { var map_VSphereMachineProviderSpec = map[string]string{ "": "VSphereMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an VSphere virtual machine. It is used by the vSphere machine actuator to create a single Machine. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "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 vSphere credentials.", - "template": "Template is the name, inventory path, or instance UUID of the template used to clone new machines.", - "workspace": "Workspace describes the workspace to use for the machine.", - "network": "Network is the network configuration for this machine's VM.", - "numCPUs": "NumCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", + "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 vSphere credentials.", + "template": "template is the name, inventory path, or instance UUID of the template used to clone new machines.", + "workspace": "workspace describes the workspace to use for the machine.", + "network": "network is the network configuration for this machine's VM.", + "numCPUs": "numCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", "numCoresPerSocket": "NumCPUs is the number of cores among which to distribute CPUs in this virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", - "memoryMiB": "MemoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned.", - "diskGiB": "DiskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. This parameter will be ignored if 'LinkedClone' CloneMode is set.", + "memoryMiB": "memoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned.", + "diskGiB": "diskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. This parameter will be ignored if 'LinkedClone' CloneMode is set.", "tagIDs": "tagIDs is an optional set of tags to add to an instance. Specified tagIDs must use URN-notation instead of display names. A maximum of 10 tag IDs may be specified.", - "snapshot": "Snapshot is the name of the snapshot from which the VM was cloned", - "cloneMode": "CloneMode specifies the type of clone operation. The LinkedClone mode is only support for templates that have at least one snapshot. If the template has no snapshots, then CloneMode defaults to FullClone. When LinkedClone mode is enabled the DiskGiB field is ignored as it is not possible to expand disks of linked clones. Defaults to FullClone. When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone.", + "snapshot": "snapshot is the name of the snapshot from which the VM was cloned", + "cloneMode": "cloneMode specifies the type of clone operation. The LinkedClone mode is only support for templates that have at least one snapshot. If the template has no snapshots, then CloneMode defaults to FullClone. When LinkedClone mode is enabled the DiskGiB field is ignored as it is not possible to expand disks of linked clones. Defaults to FullClone. When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone.", } func (VSphereMachineProviderSpec) SwaggerDoc() map[string]string { @@ -805,10 +805,10 @@ func (VSphereMachineProviderSpec) SwaggerDoc() map[string]string { var map_VSphereMachineProviderStatus = map[string]string{ "": "VSphereMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains VSphere-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "instanceId": "InstanceID is the ID of the instance in VSphere", - "instanceState": "InstanceState is the provisioning state of the VSphere Instance.", - "conditions": "Conditions is a set of conditions associated with the Machine to indicate errors or other status", - "taskRef": "TaskRef is a managed object reference to a Task related to the machine. This value is set automatically at runtime and should not be set or modified by users.", + "instanceId": "instanceId is the ID of the instance in VSphere", + "instanceState": "instanceState is the provisioning state of the VSphere Instance.", + "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", + "taskRef": "taskRef is a managed object reference to a Task related to the machine. This value is set automatically at runtime and should not be set or modified by users.", } func (VSphereMachineProviderStatus) SwaggerDoc() map[string]string { @@ -817,11 +817,11 @@ func (VSphereMachineProviderStatus) SwaggerDoc() map[string]string { var map_Workspace = map[string]string{ "": "WorkspaceConfig defines a workspace configuration for the vSphere cloud provider.", - "server": "Server is the IP address or FQDN of the vSphere endpoint.", - "datacenter": "Datacenter is the datacenter in which VMs are created/located.", - "folder": "Folder is the folder in which VMs are created/located.", - "datastore": "Datastore is the datastore in which VMs are created/located.", - "resourcePool": "ResourcePool is the resource pool in which VMs are created/located.", + "server": "server is the IP address or FQDN of the vSphere endpoint.", + "datacenter": "datacenter is the datacenter in which VMs are created/located.", + "folder": "folder is the folder in which VMs are created/located.", + "datastore": "datastore is the datastore in which VMs are created/located.", + "resourcePool": "resourcePool is the resource pool in which VMs are created/located.", "vmGroup": "vmGroup is the cluster vm group in which virtual machines will be added for vm host group based zonal.", } diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go index 01644fcf778..5ba1b9d59a6 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/types.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/types.go @@ -38,8 +38,11 @@ type ControllerConfig struct { // TODO(jkyros): inconsistent historical generation resulted in the controllerconfig CRD being // generated with all fields required, while everything else was generated with optional - // +kubebuilder:validation:Required + // spec contains the desired controller config configuration. + // +required Spec ControllerConfigSpec `json:"spec"` + + // status contains observed information about the controller config. // +optional Status ControllerConfigStatus `json:"status"` } @@ -47,11 +50,11 @@ type ControllerConfig struct { // ControllerConfigSpec is the spec for ControllerConfig resource. type ControllerConfigSpec struct { // clusterDNSIP is the cluster DNS IP address - // +kubebuilder:validation:Required + // +required ClusterDNSIP string `json:"clusterDNSIP"` // cloudProviderConfig is the configuration for the given cloud provider - // +kubebuilder:validation:Required + // +required CloudProviderConfig string `json:"cloudProviderConfig"` // platform is deprecated, use Infra.Status.PlatformStatus.Type instead @@ -65,21 +68,21 @@ type ControllerConfigSpec struct { // TODO: Use string for CA data // kubeAPIServerServingCAData managed Kubelet to API Server Cert... Rotated automatically - // +kubebuilder:validation:Required + // +required KubeAPIServerServingCAData []byte `json:"kubeAPIServerServingCAData"` // rootCAData specifies the root CA data - // +kubebuilder:validation:Required + // +required RootCAData []byte `json:"rootCAData"` - // cloudProvider specifies the cloud provider CA data - // +kubebuilder:validation:Required + // cloudProviderCAData specifies the cloud provider CA data + // +required // +nullable CloudProviderCAData []byte `json:"cloudProviderCAData"` // additionalTrustBundle is a certificate bundle that will be added to the nodes // trusted certificate store. - // +kubebuilder:validation:Required + // +required // +nullable AdditionalTrustBundle []byte `json:"additionalTrustBundle"` @@ -107,44 +110,44 @@ type ControllerConfigSpec struct { InternalRegistryPullSecret []byte `json:"internalRegistryPullSecret"` // images is map of images that are used by the controller to render templates under ./templates/ - // +kubebuilder:validation:Required + // +required Images map[string]string `json:"images"` - // BaseOSContainerImage is the new-format container image for operating system updates. - // +kubebuilder:validation:Required + // baseOSContainerImage is the new-format container image for operating system updates. + // +required BaseOSContainerImage string `json:"baseOSContainerImage"` - // BaseOSExtensionsContainerImage is the matching extensions container for the new-format container + // baseOSExtensionsContainerImage is the matching extensions container for the new-format container // +optional BaseOSExtensionsContainerImage string `json:"baseOSExtensionsContainerImage"` - // OSImageURL is the old-format container image that contains the OS update payload. + // osImageURL is the old-format container image that contains the OS update payload. // +optional OSImageURL string `json:"osImageURL"` // releaseImage is the image used when installing the cluster - // +kubebuilder:validation:Required + // +required ReleaseImage string `json:"releaseImage"` // proxy holds the current proxy configuration for the nodes - // +kubebuilder:validation:Required + // +required // +nullable Proxy *configv1.ProxyStatus `json:"proxy"` // infra holds the infrastructure details // +kubebuilder:validation:EmbeddedResource - // +kubebuilder:validation:Required + // +required // +nullable Infra *configv1.Infrastructure `json:"infra"` // dns holds the cluster dns details // +kubebuilder:validation:EmbeddedResource - // +kubebuilder:validation:Required + // +required // +nullable DNS *configv1.DNS `json:"dns"` // ipFamilies indicates the IP families in use by the cluster network - // +kubebuilder:validation:Required + // +required IPFamilies IPFamiliesType `json:"ipFamilies"` // networkType holds the type of network the cluster is using @@ -155,8 +158,8 @@ type ControllerConfigSpec struct { // +optional NetworkType string `json:"networkType,omitempty"` - // Network contains additional network related information - // +kubebuilder:validation:Required + // network contains additional network related information + // +required // +nullable Network *NetworkInfo `json:"network"` } @@ -164,10 +167,10 @@ type ControllerConfigSpec struct { // ImageRegistryBundle contains information for writing image registry certificates type ImageRegistryBundle struct { // file holds the name of the file where the bundle will be written to disk - // +kubebuilder:validation:Required + // +required File string `json:"file"` // data holds the contents of the bundle that will be written to the file location - // +kubebuilder:validation:Required + // +required Data []byte `json:"data"` } @@ -183,8 +186,8 @@ const ( // Network contains network related configuration type NetworkInfo struct { - // MTUMigration contains the MTU migration configuration. - // +kubebuilder:validation:Required + // mtuMigration contains the MTU migration configuration. + // +required // +nullable MTUMigration *configv1.MTUMigration `json:"mtuMigration"` } @@ -210,11 +213,11 @@ type ControllerConfigStatus struct { // ControllerCertificate contains info about a specific cert. type ControllerCertificate struct { // subject is the cert subject - // +kubebuilder:validation:Required + // +required Subject string `json:"subject"` // signer is the cert Issuer - // +kubebuilder:validation:Required + // +required Signer string `json:"signer"` // notBefore is the lower boundary for validity @@ -226,22 +229,22 @@ type ControllerCertificate struct { NotAfter *metav1.Time `json:"notAfter"` // bundleFile is the larger bundle a cert comes from - // +kubebuilder:validation:Required + // +required BundleFile string `json:"bundleFile"` } // ControllerConfigStatusCondition contains condition information for ControllerConfigStatus type ControllerConfigStatusCondition struct { // type specifies the state of the operator's reconciliation functionality. - // +kubebuilder:validation:Required + // +required Type ControllerConfigStatusConditionType `json:"type"` // status of the condition, one of True, False, Unknown. - // +kubebuilder:validation:Required + // +required Status corev1.ConditionStatus `json:"status"` // lastTransitionTime is the time of the last update to the current status object. - // +kubebuilder:validation:Required + // +required // +nullable LastTransitionTime metav1.Time `json:"lastTransitionTime"` @@ -308,17 +311,17 @@ type MachineConfig struct { // MachineConfigSpec is the spec for MachineConfig type MachineConfigSpec struct { - // OSImageURL specifies the remote location that will be used to + // osImageURL specifies the remote location that will be used to // fetch the OS. // +optional OSImageURL string `json:"osImageURL"` - // BaseOSExtensionsContainerImage specifies the remote location that will be used + // baseOSExtensionsContainerImage specifies the remote location that will be used // to fetch the extensions container matching a new-format OS image // +optional BaseOSExtensionsContainerImage string `json:"baseOSExtensionsContainerImage"` - // Config is a Ignition Config object. + // config is a Ignition Config object. // +optional Config runtime.RawExtension `json:"config"` @@ -383,8 +386,11 @@ type MachineConfigPool struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required + // spec contains the desired machine config pool configuration. + // +required Spec MachineConfigPoolSpec `json:"spec"` + + // status contains observed information about the machine config pool. // +optional Status MachineConfigPoolStatus `json:"status"` } @@ -459,7 +465,7 @@ type PinnedImageSetRef struct { // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } @@ -520,26 +526,26 @@ type MachineConfigPoolStatus struct { // +kubebuilder:validation:XValidation:rule="self.availableMachineCount >= self.readyMachineCount", message="availableMachineCount must be greater than or equal to readyMachineCount" type PoolSynchronizerStatus struct { // poolSynchronizerType describes the type of the pool synchronizer. - // +kubebuilder:validation:Required + // +required PoolSynchronizerType PoolSynchronizerType `json:"poolSynchronizerType"` // machineCount is the number of machines that are managed by the node synchronizer. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=0 MachineCount int64 `json:"machineCount"` // updatedMachineCount is the number of machines that have been updated by the node synchronizer. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=0 UpdatedMachineCount int64 `json:"updatedMachineCount"` // readyMachineCount is the number of machines managed by the node synchronizer that are in a ready state. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=0 ReadyMachineCount int64 `json:"readyMachineCount"` // availableMachineCount is the number of machines managed by the node synchronizer which are available. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=0 AvailableMachineCount int64 `json:"availableMachineCount"` // unavailableMachineCount is the number of machines managed by the node synchronizer but are unavailable. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=0 UnavailableMachineCount int64 `json:"unavailableMachineCount"` // +kubebuilder:validation:XValidation:rule="self >= oldSelf || (self == 0 && oldSelf > 0)", message="observedGeneration must not move backwards except to zero" @@ -563,10 +569,10 @@ const ( // ceryExpiry contains the bundle name and the expiry date type CertExpiry struct { // bundle is the name of the bundle in which the subject certificate resides - // +kubebuilder:validation:Required + // +required Bundle string `json:"bundle"` // subject is the subject of the certificate - // +kubebuilder:validation:Required + // +required Subject string `json:"subject"` // expiry is the date after which the certificate will no longer be valid // +optional @@ -683,8 +689,11 @@ type KubeletConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required + // spec contains the desired kubelet configuration. + // +required Spec KubeletConfigSpec `json:"spec"` + + // status contains observed information about the kubelet configuration. // +optional Status KubeletConfigStatus `json:"status"` } @@ -696,7 +705,7 @@ type KubeletConfigSpec struct { // +optional LogLevel *int32 `json:"logLevel,omitempty"` - // MachineConfigPoolSelector selects which pools the KubeletConfig shoud apply to. + // machineConfigPoolSelector selects which pools the KubeletConfig shoud apply to. // A nil selector will result in no pools being selected. // +optional MachineConfigPoolSelector *metav1.LabelSelector `json:"machineConfigPoolSelector,omitempty"` @@ -792,20 +801,24 @@ type ContainerRuntimeConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required + // spec contains the desired container runtime configuration. + // +required Spec ContainerRuntimeConfigSpec `json:"spec"` + + // status contains observed information about the container runtime configuration. // +optional Status ContainerRuntimeConfigStatus `json:"status"` } // ContainerRuntimeConfigSpec defines the desired state of ContainerRuntimeConfig type ContainerRuntimeConfigSpec struct { - // MachineConfigPoolSelector selects which pools the ContainerRuntimeConfig shoud apply to. + // machineConfigPoolSelector selects which pools the ContainerRuntimeConfig shoud apply to. // A nil selector will result in no pools being selected. // +optional MachineConfigPoolSelector *metav1.LabelSelector `json:"machineConfigPoolSelector,omitempty"` - // +kubebuilder:validation:Required + // containerRuntimeConfig defines the tuneables of the container runtime. + // +required ContainerRuntimeConfig *ContainerRuntimeConfiguration `json:"containerRuntimeConfig,omitempty"` } diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index 96dff59f312..1f3cb129289 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -32,6 +32,7 @@ controllerconfigs.machineconfiguration.openshift.io: - BareMetalLoadBalancer - GCPClusterHostedDNS - GCPLabelsTags + - HighlyAvailableArbiter - NutanixMultiSubnets - VSphereControlPlaneMachineSet - VSphereMultiNetworks diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index 29a3a2a902b..b7d199b8693 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -23,7 +23,9 @@ func (CertExpiry) SwaggerDoc() map[string]string { } var map_ContainerRuntimeConfig = map[string]string{ - "": "ContainerRuntimeConfig describes a customized Container Runtime configuration.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "ContainerRuntimeConfig describes a customized Container Runtime configuration.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "spec": "spec contains the desired container runtime configuration.", + "status": "status contains observed information about the container runtime configuration.", } func (ContainerRuntimeConfig) SwaggerDoc() map[string]string { @@ -53,7 +55,8 @@ func (ContainerRuntimeConfigList) SwaggerDoc() map[string]string { var map_ContainerRuntimeConfigSpec = map[string]string{ "": "ContainerRuntimeConfigSpec defines the desired state of ContainerRuntimeConfig", - "machineConfigPoolSelector": "MachineConfigPoolSelector selects which pools the ContainerRuntimeConfig shoud apply to. A nil selector will result in no pools being selected.", + "machineConfigPoolSelector": "machineConfigPoolSelector selects which pools the ContainerRuntimeConfig shoud apply to. A nil selector will result in no pools being selected.", + "containerRuntimeConfig": "containerRuntimeConfig defines the tuneables of the container runtime.", } func (ContainerRuntimeConfigSpec) SwaggerDoc() map[string]string { @@ -97,7 +100,9 @@ func (ControllerCertificate) SwaggerDoc() map[string]string { } var map_ControllerConfig = map[string]string{ - "": "ControllerConfig describes configuration for MachineConfigController. This is currently only used to drive the MachineConfig objects generated by the TemplateController.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "ControllerConfig describes configuration for MachineConfigController. This is currently only used to drive the MachineConfig objects generated by the TemplateController.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "spec": "spec contains the desired controller config configuration.", + "status": "status contains observed information about the controller config.", } func (ControllerConfig) SwaggerDoc() map[string]string { @@ -120,23 +125,23 @@ var map_ControllerConfigSpec = map[string]string{ "etcdDiscoveryDomain": "etcdDiscoveryDomain is deprecated, use Infra.Status.EtcdDiscoveryDomain instead", "kubeAPIServerServingCAData": "kubeAPIServerServingCAData managed Kubelet to API Server Cert... Rotated automatically", "rootCAData": "rootCAData specifies the root CA data", - "cloudProviderCAData": "cloudProvider specifies the cloud provider CA data", + "cloudProviderCAData": "cloudProviderCAData specifies the cloud provider CA data", "additionalTrustBundle": "additionalTrustBundle is a certificate bundle that will be added to the nodes trusted certificate store.", "imageRegistryBundleUserData": "imageRegistryBundleUserData is Image Registry Data provided by the user", "imageRegistryBundleData": "imageRegistryBundleData is the ImageRegistryData", "pullSecret": "pullSecret is the default pull secret that needs to be installed on all machines.", "internalRegistryPullSecret": "internalRegistryPullSecret is the pull secret for the internal registry, used by rpm-ostree to pull images from the internal registry if present", "images": "images is map of images that are used by the controller to render templates under ./templates/", - "baseOSContainerImage": "BaseOSContainerImage is the new-format container image for operating system updates.", - "baseOSExtensionsContainerImage": "BaseOSExtensionsContainerImage is the matching extensions container for the new-format container", - "osImageURL": "OSImageURL is the old-format container image that contains the OS update payload.", + "baseOSContainerImage": "baseOSContainerImage is the new-format container image for operating system updates.", + "baseOSExtensionsContainerImage": "baseOSExtensionsContainerImage is the matching extensions container for the new-format container", + "osImageURL": "osImageURL is the old-format container image that contains the OS update payload.", "releaseImage": "releaseImage is the image used when installing the cluster", "proxy": "proxy holds the current proxy configuration for the nodes", "infra": "infra holds the infrastructure details", "dns": "dns holds the cluster dns details", "ipFamilies": "ipFamilies indicates the IP families in use by the cluster network", "networkType": "networkType holds the type of network the cluster is using XXX: this is temporary and will be dropped as soon as possible in favor of a better support to start network related services the proper way. Nobody is also changing this once the cluster is up and running the first time, so, disallow regeneration if this changes.", - "network": "Network contains additional network related information", + "network": "network contains additional network related information", } func (ControllerConfigSpec) SwaggerDoc() map[string]string { @@ -178,7 +183,9 @@ func (ImageRegistryBundle) SwaggerDoc() map[string]string { } var map_KubeletConfig = map[string]string{ - "": "KubeletConfig describes a customized Kubelet configuration.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "KubeletConfig describes a customized Kubelet configuration.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "spec": "spec contains the desired kubelet configuration.", + "status": "status contains observed information about the kubelet configuration.", } func (KubeletConfig) SwaggerDoc() map[string]string { @@ -208,7 +215,7 @@ func (KubeletConfigList) SwaggerDoc() map[string]string { var map_KubeletConfigSpec = map[string]string{ "": "KubeletConfigSpec defines the desired state of KubeletConfig", - "machineConfigPoolSelector": "MachineConfigPoolSelector selects which pools the KubeletConfig shoud apply to. A nil selector will result in no pools being selected.", + "machineConfigPoolSelector": "machineConfigPoolSelector selects which pools the KubeletConfig shoud apply to. A nil selector will result in no pools being selected.", "kubeletConfig": "kubeletConfig fields are defined in kubernetes upstream. Please refer to the types defined in the version/commit used by OpenShift of the upstream kubernetes. It's important to note that, since the fields of the kubelet configuration are directly fetched from upstream the validation of those values is handled directly by the kubelet. Please refer to the upstream version of the relevant kubernetes for the valid values of these fields. Invalid values of the kubelet configuration fields may render cluster nodes unusable.", "tlsSecurityProfile": "If unset, the default is based on the apiservers.config.openshift.io/cluster resource. Note that only Old and Intermediate profiles are currently supported, and the maximum available minTLSVersion is VersionTLS12.", } @@ -244,7 +251,9 @@ func (MachineConfigList) SwaggerDoc() map[string]string { } var map_MachineConfigPool = map[string]string{ - "": "MachineConfigPool describes a pool of MachineConfigs.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "": "MachineConfigPool describes a pool of MachineConfigs.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "spec": "spec contains the desired machine config pool configuration.", + "status": "status contains observed information about the machine config pool.", } func (MachineConfigPool) SwaggerDoc() map[string]string { @@ -315,9 +324,9 @@ func (MachineConfigPoolStatusConfiguration) SwaggerDoc() map[string]string { var map_MachineConfigSpec = map[string]string{ "": "MachineConfigSpec is the spec for MachineConfig", - "osImageURL": "OSImageURL specifies the remote location that will be used to fetch the OS.", - "baseOSExtensionsContainerImage": "BaseOSExtensionsContainerImage specifies the remote location that will be used to fetch the extensions container matching a new-format OS image", - "config": "Config is a Ignition Config object.", + "osImageURL": "osImageURL specifies the remote location that will be used to fetch the OS.", + "baseOSExtensionsContainerImage": "baseOSExtensionsContainerImage specifies the remote location that will be used to fetch the extensions container matching a new-format OS image", + "config": "config is a Ignition Config object.", "kernelArguments": "kernelArguments contains a list of kernel arguments to be added", "extensions": "extensions contains a list of additional features that can be enabled on host", "fips": "fips controls FIPS mode", @@ -330,7 +339,7 @@ func (MachineConfigSpec) SwaggerDoc() map[string]string { var map_NetworkInfo = map[string]string{ "": "Network contains network related configuration", - "mtuMigration": "MTUMigration contains the MTU migration configuration.", + "mtuMigration": "mtuMigration contains the MTU migration configuration.", } func (NetworkInfo) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go index 98b3c48f713..050b5f683e9 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineconfignode.go @@ -40,7 +40,7 @@ type MachineConfigNode struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec describes the configuration of the machine config node. - // +kubebuilder:validation:Required + // +required Spec MachineConfigNodeSpec `json:"spec"` // status describes the last observed state of this machine config node. @@ -70,25 +70,25 @@ type MCOObjectReference struct { // and must be at most 253 characters in length. // +kubebuilder:validation:MaxLength:=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } // MachineConfigNodeSpec describes the MachineConfigNode we are managing. type MachineConfigNodeSpec struct { // node contains a reference to the node for this machine config node. - // +kubebuilder:validation:Required + // +required Node MCOObjectReference `json:"node"` // pool contains a reference to the machine config pool that this machine config node's // referenced node belongs to. - // +kubebuilder:validation:Required + // +required Pool MCOObjectReference `json:"pool"` // configVersion holds the desired config version for the node targeted by this machine config node resource. // The desired version represents the machine config the node will attempt to update to. This gets set before the machine config operator validates // the new machine config against the current machine config. - // +kubebuilder:validation:Required + // +required ConfigVersion MachineConfigNodeSpecMachineConfigVersion `json:"configVersion"` // pinnedImageSets holds the desired pinned image sets that this node should pin and pull. @@ -109,13 +109,13 @@ type MachineConfigNodeStatus struct { Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // observedGeneration represents the generation observed by the controller. // This field is updated when the controller observes a change to the desiredConfig in the configVersion of the machine config node spec. - // +kubebuilder:validation:Required + // +required ObservedGeneration int64 `json:"observedGeneration,omitempty"` // configVersion describes the current and desired machine config for this node. // The current version represents the current machine config for the node and is updated after a successful update. // The desired version represents the machine config the node will attempt to update to. // This desired machine config has been compared to the current machine config and has been validated by the machine config operator as one that is valid and that exists. - // +kubebuilder:validation:Required + // +required ConfigVersion MachineConfigNodeStatusMachineConfigVersion `json:"configVersion"` // pinnedImageSets describes the current and desired pinned image sets for this node. // The current version is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. @@ -137,7 +137,7 @@ type MachineConfigNodeStatusPinnedImageSet struct { // and must be at most 253 characters in length. // +kubebuilder:validation:MaxLength:=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Name string `json:"name"` // currentGeneration is the generation of the pinned image set that has most recently been successfully pulled and pinned on this node. // +optional @@ -180,7 +180,7 @@ type MachineConfigNodeStatusMachineConfigVersion struct { // and must be at most 253 characters in length. // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Desired string `json:"desired"` } @@ -198,7 +198,7 @@ type MachineConfigNodeSpecMachineConfigVersion struct { // and must be at most 253 characters in length. // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Desired string `json:"desired"` } @@ -209,7 +209,7 @@ type MachineConfigNodeSpecPinnedImageSet struct { // and must be at most 253 characters in length. // +kubebuilder:validation:MaxLength:=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosbuild.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosbuild.go index 82ae150c825..d65fd4bce05 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosbuild.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosbuild.go @@ -29,7 +29,7 @@ type MachineOSBuild struct { // spec describes the configuration of the machine os build // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="machineOSBuildSpec is immutable once set" - // +kubebuilder:validation:Required + // +required Spec MachineOSBuildSpec `json:"spec"` // status describes the lst observed state of this machine os build @@ -54,17 +54,17 @@ type MachineOSBuildList struct { type MachineOSBuildSpec struct { // configGeneration tracks which version of MachineOSConfig this build is based off of // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Required + // +required ConfigGeneration int64 `json:"configGeneration"` // desiredConfig is the desired config we want to build an image for. - // +kubebuilder:validation:Required + // +required DesiredConfig RenderedMachineConfigReference `json:"desiredConfig"` // machineOSConfig is the config object which the build is based off of - // +kubebuilder:validation:Required + // +required MachineOSConfig MachineOSConfigReference `json:"machineOSConfig"` // version tracks the newest MachineOSBuild for each MachineOSConfig // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Required + // +required Version int64 `json:"version"` // renderedImagePushspec is set from the MachineOSConfig // The format of the image pullspec is: @@ -73,7 +73,7 @@ type MachineOSBuildSpec struct { // +kubebuilder:validation:MaxLength=447 // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[1].matches('^([a-zA-Z0-9-./:])+$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image reference must end with a valid :, where '' is 64 characters long and '' is any valid string Or it must be a valid .svc followed by a port, repository, image name, and tag." // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme. Or it must be a valid .svc followed by a port, repository, image name, and tag." - // +kubebuilder:validation:Required + // +required RenderedImagePushspec string `json:"renderedImagePushspec"` } @@ -95,7 +95,7 @@ type MachineOSBuildStatus struct { RelatedObjects []ObjectReference `json:"relatedObjects,omitempty"` // buildStart describes when the build started. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="buildStart is immutable once set" - // +kubebuilder:validation:Required + // +required BuildStart *metav1.Time `json:"buildStart"` // buildEnd describes when the build ended. // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="buildEnd is immutable once set" @@ -111,7 +111,7 @@ type MachineOSBuildStatus struct { // +union // +kubebuilder:validation:XValidation:rule="has(self.imageBuilderType) && self.imageBuilderType == 'PodImageBuilder' ? true : !has(self.buildPod)",message="buildPod is required when imageBuilderType is PodImageBuilder, and forbidden otherwise" type MachineOSBuilderReference struct { - // ImageBuilderType describes the image builder set in the MachineOSConfig + // imageBuilderType describes the image builder set in the MachineOSConfig // +unionDiscriminator ImageBuilderType MachineOSImageBuilderType `json:"imageBuilderType"` @@ -143,29 +143,29 @@ type RenderedMachineConfigReference struct { // name is the name of the rendered MachineConfig object. // +kubebuilder:validation:MaxLength:=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } // ObjectReference contains enough information to let you inspect or modify the referred object. type ObjectReference struct { // group of the referent. - // +kubebuilder:validation:Required + // +required Group string `json:"group"` // resource of the referent. - // +kubebuilder:validation:Required + // +required Resource string `json:"resource"` // namespace of the referent. // +optional Namespace string `json:"namespace,omitempty"` // name of the referent. - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } // MachineOSConfigReference refers to the MachineOSConfig this build is based off of type MachineOSConfigReference struct { // name of the MachineOSConfig - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosconfig.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosconfig.go index 35863517a54..1d9f36c36be 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosconfig.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_machineosconfig.go @@ -23,7 +23,7 @@ type MachineOSConfig struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec describes the configuration of the machineosconfig - // +kubebuilder:validation:Required + // +required Spec MachineOSConfigSpec `json:"spec"` // status describes the status of the machineosconfig @@ -47,10 +47,10 @@ type MachineOSConfigList struct { // MachineOSConfigSpec describes user-configurable options as well as information about a build process. type MachineOSConfigSpec struct { // machineConfigPool is the pool which the build is for - // +kubebuilder:validation:Required + // +required MachineConfigPool MachineConfigPoolReference `json:"machineConfigPool"` // buildInputs is where user input options for the build live - // +kubebuilder:validation:Required + // +required BuildInputs BuildInputs `json:"buildInputs"` // buildOutputs is where user input options for the build live // +optional @@ -68,7 +68,7 @@ type MachineOSConfigStatus struct { Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // observedGeneration represents the generation observed by the controller. // this field is updated when the user changes the configuration in BuildSettings or the MCP this object is associated with. - // +kubebuilder:validation:Required + // +required ObservedGeneration int64 `json:"observedGeneration,omitempty"` // currentImagePullspec is the fully qualified image pull spec used by the MCO to pull down the new OSImage. This must include sha256. // +kubebuilder:validation:MinLength=1 @@ -105,10 +105,10 @@ type BuildInputs struct { BaseOSImagePullspec string `json:"baseOSImagePullspec,omitempty"` // baseImagePullSecret is the secret used to pull the base image. // must live in the openshift-machine-config-operator namespace - // +kubebuilder:validation:Required + // +required BaseImagePullSecret ImageSecretObjectReference `json:"baseImagePullSecret"` // machineOSImageBuilder describes which image builder will be used in each build triggered by this MachineOSConfig - // +kubebuilder:validation:Required + // +required ImageBuilder *MachineOSImageBuilder `json:"imageBuilder"` // renderedImagePushSecret is the secret used to connect to a user registry. // the final image push and pull secrets should be separate for security concerns. If the final image push secret is somehow exfiltrated, @@ -116,7 +116,7 @@ type BuildInputs struct { // that only gives someone to pull images from the image repository. It's basically the principle of least permissions. // this push secret will be used only by the MachineConfigController pod to push the image to the final destination. Not all nodes will need to push this image, most of them // will only need to pull the image in order to use it. - // +kubebuilder:validation:Required + // +required RenderedImagePushSecret ImageSecretObjectReference `json:"renderedImagePushSecret"` // renderedImagePushspec describes the location of the final image. // the MachineOSConfig object will use the in cluster image registry configuration. @@ -127,7 +127,7 @@ type BuildInputs struct { // +kubebuilder:validation:MaxLength=447 // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[1].matches('^([a-zA-Z0-9-./:])+$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image reference must end with a valid :, where '' is 64 characters long and '' is any valid string Or it must be a valid .svc followed by a port, repository, image name, and tag." // +kubebuilder:validation:XValidation:rule=`((self.split(':').size() == 2 && self.split(':')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$')) || self.matches('^[^.]+\\.[^.]+\\.svc:\\d+\\/[^\\/]+\\/[^\\/]+:[^\\/]+$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme. Or it must be a valid .svc followed by a port, repository, image name, and tag." - // +kubebuilder:validation:Required + // +required RenderedImagePushspec string `json:"renderedImagePushspec"` // releaseVersion is associated with the base OS Image. This is the version of Openshift that the Base Image is associated with. // This field is populated from the machine-config-osimageurl configmap in the openshift-machine-config-operator namespace. @@ -178,7 +178,7 @@ type MachineOSContainerfile struct { // +optional ContainerfileArch ContainerfileArch `json:"containerfileArch"` // content is the custom content to be built - // +kubebuilder:validation:Required + // +required Content string `json:"content"` } @@ -207,7 +207,7 @@ type MachineConfigPoolReference struct { // name of the MachineConfigPool object. // +kubebuilder:validation:MaxLength:=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } @@ -215,7 +215,7 @@ type MachineConfigPoolReference struct { type ImageSecretObjectReference struct { // name is the name of the secret used to push or pull this MachineOSConfig object. // this secret must be in the openshift-machine-config-operator namespace. - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go index 2718d98deb8..9d097311ddc 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/types_pinnedimageset.go @@ -25,7 +25,7 @@ type PinnedImageSet struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec describes the configuration of this pinned image set. - // +kubebuilder:validation:Required + // +required Spec PinnedImageSetSpec `json:"spec"` // status describes the last observed state of this pinned image set. @@ -58,7 +58,7 @@ type PinnedImageSetSpec struct { // ] // // These image references should all be by digest, tags aren't allowed. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=500 // +listType=map @@ -71,7 +71,7 @@ type PinnedImageRef struct { // // The format of the image ref is: // host[:port][/namespace]/name@sha256: - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=447 // +kubebuilder:validation:XValidation:rule=`self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$')`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go index a51ffee1426..f2592eaf731 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1alpha1/zz_generated.swagger_doc_generated.go @@ -148,7 +148,7 @@ func (MachineOSBuildStatus) SwaggerDoc() map[string]string { var map_MachineOSBuilderReference = map[string]string{ "": "MachineOSBuilderReference describes which ImageBuilder backend to use for this build/", - "imageBuilderType": "ImageBuilderType describes the image builder set in the MachineOSConfig", + "imageBuilderType": "imageBuilderType describes the image builder set in the MachineOSConfig", "buildPod": "relatedObjects is a list of objects that are related to the build process.", } diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go index f04b6846aee..284dfe54dd9 100644 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ b/vendor/github.com/openshift/api/operator/v1/types.go @@ -16,7 +16,6 @@ type MyOperatorResource struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata"` - // +kubebuilder:validation:Required // +required Spec MyOperatorResourceSpec `json:"spec"` Status MyOperatorResourceStatus `json:"status"` @@ -145,19 +144,19 @@ type OperatorStatus struct { // GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. type GenerationStatus struct { // group is the group of the thing you're tracking - // +kubebuilder:validation:Required + // +required Group string `json:"group"` // resource is the resource type of the thing you're tracking - // +kubebuilder:validation:Required + // +required Resource string `json:"resource"` // namespace is where the thing you're tracking is - // +kubebuilder:validation:Required + // +required Namespace string `json:"namespace"` // name is the name of the thing you're tracking - // +kubebuilder:validation:Required + // +required Name string `json:"name"` // TODO: Add validation for lastGeneration. The value for this field should generally increase, except when the associated @@ -194,21 +193,18 @@ type OperatorCondition struct { // useful (see .node.status.conditions), the ability to deconflict is important. // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) // +required - // +kubebuilder:validation:Required // +kubebuilder:validation: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])$` // +kubebuilder:validation:MaxLength=316 Type string `json:"type" protobuf:"bytes,1,opt,name=type"` // status of the condition, one of True, False, Unknown. // +required - // +kubebuilder:validation:Required // +kubebuilder:validation:Enum=True;False;Unknown Status ConditionStatus `json:"status"` // 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. // +required - // +kubebuilder:validation:Required // +kubebuilder:validation:Type=string // +kubebuilder:validation:Format=date-time LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` @@ -256,16 +252,19 @@ type StaticPodOperatorStatus struct { // +listType=map // +listMapKey=nodeName // +optional + // +kubebuilder:validation:XValidation:rule="size(self.filter(status, status.?targetRevision.orValue(0) != 0)) <= 1",message="no more than 1 node status may have a nonzero targetRevision" NodeStatuses []NodeStatus `json:"nodeStatuses,omitempty"` } // NodeStatus provides information about the current state of a particular node managed by this operator. +// +kubebuilder:validation:XValidation:rule="has(self.currentRevision) || !has(oldSelf.currentRevision)",message="cannot be unset once set",fieldPath=".currentRevision" type NodeStatus struct { // nodeName is the name of the node - // +kubebuilder:validation:Required + // +required NodeName string `json:"nodeName"` // currentRevision is the generation of the most recently successful deployment + // +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="must only increase" CurrentRevision int32 `json:"currentRevision"` // targetRevision is the generation of the deployment we're trying to apply TargetRevision int32 `json:"targetRevision,omitempty"` diff --git a/vendor/github.com/openshift/api/operator/v1/types_authentication.go b/vendor/github.com/openshift/api/operator/v1/types_authentication.go index 58d8748d970..bf103f19bbb 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_authentication.go +++ b/vendor/github.com/openshift/api/operator/v1/types_authentication.go @@ -25,7 +25,6 @@ type Authentication struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required // +required Spec AuthenticationSpec `json:"spec,omitempty"` // +optional @@ -37,7 +36,7 @@ type AuthenticationSpec struct { } type AuthenticationStatus struct { - // OAuthAPIServer holds status specific only to oauth-apiserver + // oauthAPIServer holds status specific only to oauth-apiserver // +optional OAuthAPIServer OAuthAPIServerStatus `json:"oauthAPIServer,omitempty"` @@ -45,7 +44,7 @@ type AuthenticationStatus struct { } type OAuthAPIServerStatus struct { - // LatestAvailableRevision is the latest revision used as suffix of revisioned + // latestAvailableRevision is the latest revision used as suffix of revisioned // secrets like encryption-config. A new revision causes a new deployment of pods. // +optional // +kubebuilder:validation:Minimum=0 diff --git a/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go b/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go index 9666b279222..b6ef52e9377 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go +++ b/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go @@ -25,7 +25,6 @@ type CloudCredential struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required // +required Spec CloudCredentialSpec `json:"spec"` // +optional @@ -60,7 +59,7 @@ const ( // CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator. type CloudCredentialSpec struct { OperatorSpec `json:",inline"` - // CredentialsMode allows informing CCO that it should not attempt to dynamically + // credentialsMode allows informing CCO that it should not attempt to dynamically // determine the root cloud credentials capabilities, and it should just run in // the specified mode. // It also allows putting the operator into "manual" mode if desired. diff --git a/vendor/github.com/openshift/api/operator/v1/types_config.go b/vendor/github.com/openshift/api/operator/v1/types_config.go index e7c6d59dbb2..f0d190e6db3 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_config.go +++ b/vendor/github.com/openshift/api/operator/v1/types_config.go @@ -26,7 +26,6 @@ type Config struct { metav1.ObjectMeta `json:"metadata"` // spec is the specification of the desired behavior of the Config Operator. - // +kubebuilder:validation:Required // +required Spec ConfigSpec `json:"spec"` @@ -56,6 +55,6 @@ type ConfigList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []Config `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_console.go b/vendor/github.com/openshift/api/operator/v1/types_console.go index aa39b2f950f..68d9daa4501 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_console.go +++ b/vendor/github.com/openshift/api/operator/v1/types_console.go @@ -26,7 +26,6 @@ type Console struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required // +required Spec ConsoleSpec `json:"spec,omitempty"` // +optional @@ -128,7 +127,7 @@ type CapabilityVisibility struct { // Disabling the capability in the console UI is represented by the "Disabled" value. // +unionDiscriminator // +kubebuilder:validation:Enum:="Enabled";"Disabled" - // +kubebuilder:validation:Required + // +required State CapabilityState `json:"state"` } @@ -137,10 +136,10 @@ type Capability struct { // name is the unique name of a capability. // Available capabilities are LightspeedButton and GettingStartedBanner. // +kubebuilder:validation:Enum:="LightspeedButton";"GettingStartedBanner" - // +kubebuilder:validation:Required + // +required Name ConsoleCapabilityName `json:"name"` // visibility defines the visibility state of the capability. - // +kubebuilder:validation:Required + // +required Visibility CapabilityVisibility `json:"visibility"` } @@ -184,21 +183,17 @@ type ConsoleCustomization struct { // +optional CustomLogoFile configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"` // developerCatalog allows to configure the shown developer catalog categories (filters) and types (sub-catalogs). - // +kubebuilder:validation:Optional // +optional DeveloperCatalog DeveloperConsoleCatalogCustomization `json:"developerCatalog,omitempty"` // projectAccess allows customizing the available list of ClusterRoles in the Developer perspective // Project access page which can be used by a project admin to specify roles to other users and // restrict access within the project. If set, the list will replace the default ClusterRole options. - // +kubebuilder:validation:Optional // +optional ProjectAccess ProjectAccess `json:"projectAccess,omitempty"` // quickStarts allows customization of available ConsoleQuickStart resources in console. - // +kubebuilder:validation:Optional // +optional QuickStarts QuickStarts `json:"quickStarts,omitempty"` // addPage allows customizing actions on the Add page in developer perspective. - // +kubebuilder:validation:Optional // +optional AddPage AddPage `json:"addPage,omitempty"` // perspectives allows enabling/disabling of perspective(s) that user can see in the Perspective switcher dropdown. @@ -212,7 +207,6 @@ type ConsoleCustomization struct { type ProjectAccess struct { // availableClusterRoles is the list of ClusterRole names that are assignable to users // through the project access tab. - // +kubebuilder:validation:Optional // +optional AvailableClusterRoles []string `json:"availableClusterRoles,omitempty"` } @@ -235,7 +229,7 @@ type DeveloperConsoleCatalogTypes struct { // +kubebuilder:validation:Enum:="Enabled";"Disabled"; // +kubebuilder:default:="Enabled" // +default="Enabled" - // +kubebuilder:validation:Required + // +required State CatalogTypesState `json:"state,omitempty"` // enabled is a list of developer catalog types (sub-catalogs IDs) that will be shown to users. // Types (sub-catalogs) are added via console plugins, the available types (sub-catalog IDs) are available @@ -259,7 +253,6 @@ type DeveloperConsoleCatalogTypes struct { // DeveloperConsoleCatalogCustomization allow cluster admin to configure developer catalog. type DeveloperConsoleCatalogCustomization struct { // categories which are shown in the developer catalog. - // +kubebuilder:validation:Optional // +optional Categories []DeveloperConsoleCatalogCategory `json:"categories,omitempty"` // types allows enabling or disabling of sub-catalog types that user can see in the Developer catalog. @@ -270,23 +263,20 @@ type DeveloperConsoleCatalogCustomization struct { // DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category. type DeveloperConsoleCatalogCategoryMeta struct { - // ID is an identifier used in the URL to enable deep linking in console. + // id is an identifier used in the URL to enable deep linking in console. // ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=32 // +kubebuilder:validation:Pattern=`^[A-Za-z0-9-_]+$` // +required ID string `json:"id"` // label defines a category display label. It is required and must have 1-64 characters. - // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=64 // +required Label string `json:"label"` // tags is a list of strings that will match the category. A selected category // show all items which has at least one overlapping tag between category and item. - // +kubebuilder:validation:Optional // +optional Tags []string `json:"tags,omitempty"` } @@ -296,7 +286,6 @@ type DeveloperConsoleCatalogCategory struct { // defines top level category ID, label and filter tags. DeveloperConsoleCatalogCategoryMeta `json:",inline"` // subcategories defines a list of child categories. - // +kubebuilder:validation:Optional // +optional Subcategories []DeveloperConsoleCatalogCategoryMeta `json:"subcategories,omitempty"` } @@ -304,7 +293,6 @@ type DeveloperConsoleCatalogCategory struct { // QuickStarts allow cluster admins to customize available ConsoleQuickStart resources. type QuickStarts struct { // disabled is a list of ConsoleQuickStart resource names that are not shown to users. - // +kubebuilder:validation:Optional // +optional Disabled []string `json:"disabled,omitempty"` } @@ -313,7 +301,6 @@ type QuickStarts struct { type AddPage struct { // disabledActions is a list of actions that are not shown to users. // Each action in the list is represented by its ID. - // +kubebuilder:validation:Optional // +kubebuilder:validation:MinItems=1 // +optional DisabledActions []string `json:"disabledActions,omitempty"` @@ -350,7 +337,7 @@ type PerspectiveVisibility struct { // state defines the perspective is enabled or disabled or access review check is required. // +unionDiscriminator // +kubebuilder:validation:Enum:="Enabled";"Disabled";"AccessReview" - // +kubebuilder:validation:Required + // +required State PerspectiveState `json:"state"` // accessReview defines required and missing access review checks. // +optional @@ -365,10 +352,10 @@ type Perspective struct { // Example: "dev", "admin". // The available perspective ids can be found in the code snippet section next to the yaml editor. // Incorrect or unknown ids will be ignored. - // +kubebuilder:validation:Required + // +required ID string `json:"id"` // visibility defines the state of perspective along with access review checks if needed for that perspective. - // +kubebuilder:validation:Required + // +required Visibility PerspectiveVisibility `json:"visibility"` // pinnedResources defines the list of default pinned resources that users will see on the perspective navigation if they have not customized these pinned resources themselves. // The list of available Kubernetes resources could be read via `kubectl api-resources`. @@ -386,20 +373,20 @@ type PinnedResourceReference struct { // This value should consist of only lowercase alphanumeric characters, hyphens and periods. // Example: "", "apps", "build.openshift.io", etc. // +kubebuilder:validation:Pattern:="^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" - // +kubebuilder:validation:Required + // +required Group string `json:"group"` // version is the API Version of the Resource. // This value should consist of only lowercase alphanumeric characters. // Example: "v1", "v1beta1", etc. // +kubebuilder:validation:Pattern:="^[a-z0-9]+$" - // +kubebuilder:validation:Required + // +required Version string `json:"version"` // resource is the type that is being referenced. // It is normally the plural form of the resource kind in lowercase. // This value should consist of only lowercase alphanumeric characters and hyphens. // Example: "deployments", "deploymentconfigs", "pods", etc. // +kubebuilder:validation:Pattern:="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - // +kubebuilder:validation:Required + // +required Resource string `json:"resource"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go index fa81ea7d79f..731323750a4 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go @@ -36,7 +36,6 @@ type ClusterCSIDriver struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ClusterCSIDriverSpec `json:"spec"` @@ -95,7 +94,7 @@ const ( // ClusterCSIDriverSpec is the desired behavior of CSI driver operator type ClusterCSIDriverSpec struct { OperatorSpec `json:",inline"` - // StorageClassState determines if CSI operator should create and manage storage classes. + // storageClassState determines if CSI operator should create and manage storage classes. // If this field value is empty or Managed - CSI operator will continuously reconcile // storage class and create if necessary. // If this field value is Unmanaged - CSI operator will not reconcile any previously created @@ -135,7 +134,7 @@ type CSIDriverConfigSpec struct { // driverConfig is being applied to. // Valid values are: AWS, Azure, GCP, IBMCloud, vSphere and omitted. // Consumers should treat unknown values as a NO-OP. - // +kubebuilder:validation:Required + // +required // +unionDiscriminator DriverType CSIDriverType `json:"driverType"` @@ -155,7 +154,7 @@ type CSIDriverConfigSpec struct { // +optional IBMCloud *IBMCloudCSIDriverConfigSpec `json:"ibmcloud,omitempty"` - // vsphere is used to configure the vsphere CSI driver. + // vSphere is used to configure the vsphere CSI driver. // +optional VSphere *VSphereCSIDriverConfigSpec `json:"vSphere,omitempty"` } @@ -198,7 +197,7 @@ type AWSEFSVolumeMetrics struct { // RecursiveWalk means the AWS EFS CSI Driver will recursively scan volumes to collect metrics. // This process may result in high CPU and memory usage, depending on the volume size. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required State AWSEFSVolumeMetricsState `json:"state"` // recursiveWalk provides additional configuration for collecting volume metrics in the AWS EFS CSI Driver @@ -240,7 +239,7 @@ type AzureDiskEncryptionSet struct { // 5. The second, third, and fourth groups should be 4 characters long. // 6. The fifth group should be 12 characters long. // An Example SubscrionID: f2007bbf-f802-4a47-9336-cf7c6b89b378 - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength:=36 // +kubebuilder:validation:Pattern:=`^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$` SubscriptionID string `json:"subscriptionID"` @@ -250,7 +249,7 @@ type AzureDiskEncryptionSet struct { // underscores (_), parentheses, hyphens and periods. // The value should not end in a period and be at most 90 characters in // length. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength:=90 // +kubebuilder:validation:Pattern:=`^[\w\.\-\(\)]*[\w\-\(\)]$` ResourceGroup string `json:"resourceGroup"` @@ -258,7 +257,7 @@ type AzureDiskEncryptionSet struct { // name is the name of the disk encryption set that will be set on the default storage class. // The value should consist of only alphanumberic characters, // underscores (_), hyphens, and be at most 80 characters in length. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength:=80 // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9\_-]+$` Name string `json:"name"` @@ -281,7 +280,7 @@ type GCPKMSKeyReference struct { // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9\_-]+$` // +kubebuilder:validation:MinLength:=1 // +kubebuilder:validation:MaxLength:=63 - // +kubebuilder:validation:Required + // +required Name string `json:"name"` // keyRing is the name of the KMS Key Ring which the KMS Key belongs to. @@ -291,7 +290,7 @@ type GCPKMSKeyReference struct { // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9\_-]+$` // +kubebuilder:validation:MinLength:=1 // +kubebuilder:validation:MaxLength:=63 - // +kubebuilder:validation:Required + // +required KeyRing string `json:"keyRing"` // projectID is the ID of the Project in which the KMS Key Ring exists. @@ -300,7 +299,7 @@ type GCPKMSKeyReference struct { // +kubebuilder:validation:Pattern:=`^[a-z][a-z0-9-]+[a-z0-9]$` // +kubebuilder:validation:MinLength:=6 // +kubebuilder:validation:MaxLength:=30 - // +kubebuilder:validation:Required + // +required ProjectID string `json:"projectID"` // location is the GCP location in which the Key Ring exists. @@ -323,7 +322,7 @@ type GCPCSIDriverConfigSpec struct { type IBMCloudCSIDriverConfigSpec struct { // encryptionKeyCRN is the IBM Cloud CRN of the customer-managed root key to use // for disk encryption of volumes for the default storage classes. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength:=154 // +kubebuilder:validation:MinLength:=144 // +kubebuilder:validation:Pattern:=`^crn:v[0-9]+:bluemix:(public|private):(kms|hs-crypto):[a-z-]+:a/[0-9a-f]+:[0-9a-f-]{36}:key:[0-9a-f-]{36}$` diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go b/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go index f96384819c4..d6d283d3652 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go +++ b/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go @@ -25,7 +25,6 @@ type CSISnapshotController struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec CSISnapshotControllerSpec `json:"spec"` diff --git a/vendor/github.com/openshift/api/operator/v1/types_dns.go b/vendor/github.com/openshift/api/operator/v1/types_dns.go index 3d7cbb6c00a..25880478684 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_dns.go +++ b/vendor/github.com/openshift/api/operator/v1/types_dns.go @@ -226,7 +226,7 @@ type DNSOverTLSConfig struct { // // + --- // + Inspired by the DNS1123 patterns in Kubernetes: https://github.com/kubernetes/kubernetes/blob/7c46f40bdf89a437ecdbc01df45e235b5f6d9745/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L178-L218 - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=253 // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` ServerName string `json:"serverName"` @@ -319,7 +319,7 @@ type ForwardPlugin struct { // * At least one upstream should be specified. // * the default policy is Sequential type UpstreamResolvers struct { - // Upstreams is a list of resolvers to forward name queries for the "." domain. + // upstreams is a list of resolvers to forward name queries for the "." domain. // Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream // returns an error during the exchange, another resolver is tried from Upstreams. The // Upstreams are selected in the order specified in Policy. @@ -332,7 +332,7 @@ type UpstreamResolvers struct { // +kubebuilder:default={{"type":"SystemResolvConf"}} Upstreams []Upstream `json:"upstreams"` - // Policy is used to determine the order in which upstream servers are selected for querying. + // policy is used to determine the order in which upstream servers are selected for querying. // Any one of the following values may be specified: // // * "Random" picks a random upstream server for each query. @@ -381,31 +381,28 @@ type UpstreamResolvers struct { // with an IP address or IP:port if the upstream listens on a port other than 53. type Upstream struct { - // Type defines whether this upstream contains an IP/IP:port resolver or the local /etc/resolv.conf. + // type defines whether this upstream contains an IP/IP:port resolver or the local /etc/resolv.conf. // Type accepts 2 possible values: SystemResolvConf or Network. // // * When SystemResolvConf is used, the Upstream structure does not require any further fields to be defined: // /etc/resolv.conf will be used // * When Network is used, the Upstream structure must contain at least an Address // - // +kubebuilder:validation:Required // +required Type UpstreamType `json:"type"` - // Address must be defined when Type is set to Network. It will be ignored otherwise. + // address must be defined when Type is set to Network. It will be ignored otherwise. // It must be a valid ipv4 or ipv6 address. // // +optional - // +kubebuilder:validation:Optional Address string `json:"address,omitempty"` - // Port may be defined when Type is set to Network. It will be ignored otherwise. + // port may be defined when Type is set to Network. It will be ignored otherwise. // Port must be between 65535 // // +optional // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:validation:Optional // +kubebuilder:default=53 Port uint32 `json:"port,omitempty"` } @@ -483,7 +480,6 @@ type DNSStatus struct { // // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies // - // +kubebuilder:validation:Required // +required ClusterIP string `json:"clusterIP"` @@ -494,7 +490,6 @@ type DNSStatus struct { // // More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service // - // +kubebuilder:validation:Required // +required ClusterDomain string `json:"clusterDomain"` diff --git a/vendor/github.com/openshift/api/operator/v1/types_etcd.go b/vendor/github.com/openshift/api/operator/v1/types_etcd.go index 71345d7d786..375ec5fb7fd 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_etcd.go +++ b/vendor/github.com/openshift/api/operator/v1/types_etcd.go @@ -24,7 +24,6 @@ type Etcd struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata"` - // +kubebuilder:validation:Required // +required Spec EtcdSpec `json:"spec"` // +optional @@ -39,7 +38,6 @@ type EtcdSpec struct { // Valid values are "", "Standard" and "Slower". // "" means no opinion and the platform is left to choose a reasonable default // which is subject to change without notice. - // +kubebuilder:validation:Optional // +openshift:enable:FeatureGate=HardwareSpeed // +optional HardwareSpeed ControlPlaneHardwareSpeed `json:"controlPlaneHardwareSpeed"` @@ -93,6 +91,6 @@ type EtcdList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []Etcd `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingress.go b/vendor/github.com/openshift/api/operator/v1/types_ingress.go index 1f566434564..6304c956361 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_ingress.go +++ b/vendor/github.com/openshift/api/operator/v1/types_ingress.go @@ -397,7 +397,6 @@ type LoadBalancerStrategy struct { // scope indicates the scope at which the load balancer is exposed. // Possible values are "External" and "Internal". // - // +kubebuilder:validation:Required // +required Scope LoadBalancerScope `json:"scope"` @@ -434,7 +433,7 @@ type LoadBalancerStrategy struct { // Valid values are: Managed and Unmanaged. // // +kubebuilder:default:="Managed" - // +kubebuilder:validation:Required + // +required // +default="Managed" DNSManagementPolicy LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"` } @@ -464,7 +463,6 @@ type ProviderLoadBalancerParameters struct { // "OpenStack", and "VSphere". // // +unionDiscriminator - // +kubebuilder:validation:Required // +required Type LoadBalancerProviderType `json:"type"` @@ -544,7 +542,6 @@ type AWSLoadBalancerParameters struct { // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb // // +unionDiscriminator - // +kubebuilder:validation:Required // +required Type AWSLoadBalancerType `json:"type"` @@ -713,7 +710,6 @@ type AWSClassicLoadBalancerParameters struct { // means no opinion, in which case a default value is used. The default // value for this field is 60s. This default is subject to change. // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Format=duration // +optional ConnectionIdleTimeout metav1.Duration `json:"connectionIdleTimeout,omitempty"` @@ -828,7 +824,6 @@ type HostNetworkStrategy struct { // The empty string specifies the default, which is TCP without PROXY // protocol. Note that the default is subject to change. // - // +kubebuilder:validation:Optional // +optional Protocol IngressControllerProtocol `json:"protocol,omitempty"` @@ -836,7 +831,6 @@ type HostNetworkStrategy struct { // HTTP requests. This field should be set when port 80 is already in use. // The value should not coincide with the NodePort range of the cluster. // When the value is 0 or is not specified it defaults to 80. - // +kubebuilder:validation:Optional // +kubebuilder:validation:Maximum=65535 // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=80 @@ -847,7 +841,6 @@ type HostNetworkStrategy struct { // HTTPS requests. This field should be set when port 443 is already in use. // The value should not coincide with the NodePort range of the cluster. // When the value is 0 or is not specified it defaults to 443. - // +kubebuilder:validation:Optional // +kubebuilder:validation:Maximum=65535 // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=443 @@ -868,7 +861,6 @@ type HostNetworkStrategy struct { // a threshold of two successful or failed requests to become healthy or // unhealthy respectively, are well-tested values. When the value is 0 or // is not specified it defaults to 1936. - // +kubebuilder:validation:Optional // +kubebuilder:validation:Maximum=65535 // +kubebuilder:validation:Minimum=0 // +kubebuilder:default=1936 @@ -904,7 +896,6 @@ type PrivateStrategy struct { // The empty string specifies the default, which is TCP without PROXY // protocol. Note that the default is subject to change. // - // +kubebuilder:validation:Optional // +optional Protocol IngressControllerProtocol `json:"protocol,omitempty"` } @@ -936,7 +927,6 @@ type NodePortStrategy struct { // The empty string specifies the default, which is TCP without PROXY // protocol. Note that the default is subject to change. // - // +kubebuilder:validation:Optional // +optional Protocol IngressControllerProtocol `json:"protocol,omitempty"` } @@ -1004,7 +994,6 @@ type EndpointPublishingStrategy struct { // field of the managed NodePort Service will preserved. // // +unionDiscriminator - // +kubebuilder:validation:Required // +required Type EndpointPublishingStrategyType `json:"type"` @@ -1054,7 +1043,6 @@ type ClientTLS struct { // edge-terminated and reencrypt TLS routes; it cannot check // certificates for cleartext HTTP or passthrough TLS routes. // - // +kubebuilder:validation:Required // +required ClientCertificatePolicy ClientCertificatePolicy `json:"clientCertificatePolicy"` @@ -1063,7 +1051,6 @@ type ClientTLS struct { // certificate. The administrator must create this configmap in the // openshift-config namespace. // - // +kubebuilder:validation:Required // +required ClientCA configv1.ConfigMapNameReference `json:"clientCA"` @@ -1167,14 +1154,12 @@ type SyslogLoggingDestinationParameters struct { // address is the IP address of the syslog endpoint that receives log // messages. // - // +kubebuilder:validation:Required // +required Address string `json:"address"` // port is the UDP port number of the syslog endpoint that receives log // messages. // - // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=65535 // +required @@ -1184,7 +1169,6 @@ type SyslogLoggingDestinationParameters struct { // // If this field is empty, the facility is "local1". // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Enum=kern;user;mail;daemon;auth;syslog;lpr;news;uucp;cron;auth2;ftp;ntp;audit;alert;cron2;local0;local1;local2;local3;local4;local5;local6;local7 // +optional Facility string `json:"facility,omitempty"` @@ -1244,7 +1228,6 @@ type LoggingDestination struct { // that the administrator has configured a custom syslog instance. // // +unionDiscriminator - // +kubebuilder:validation:Required // +required Type LoggingDestinationType `json:"type"` @@ -1267,7 +1250,6 @@ type IngressControllerCaptureHTTPHeader struct { // name specifies a header name. Its value must be a valid HTTP header // name as defined in RFC 2616 section 4.2. // - // +kubebuilder:validation:Required // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" // +required Name string `json:"name"` @@ -1277,7 +1259,6 @@ type IngressControllerCaptureHTTPHeader struct { // log message. Note that the ingress controller may impose a separate // bound on the total length of HTTP headers in a request. // - // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=1 // +required MaxLength int `json:"maxLength"` @@ -1331,7 +1312,6 @@ type IngressControllerCaptureHTTPCookie struct { // controller may impose a separate bound on the total length of HTTP // headers in a request. // - // +kubebuilder:validation:Required // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=1024 // +required @@ -1351,7 +1331,6 @@ type IngressControllerCaptureHTTPCookieUnion struct { // matching cookie is captured. // // +unionDiscriminator - // +kubebuilder:validation:Required // +required MatchType CookieMatchType `json:"matchType,omitempty"` @@ -1389,7 +1368,6 @@ const ( type AccessLogging struct { // destination is where access logs go. // - // +kubebuilder:validation:Required // +required Destination LoggingDestination `json:"destination"` @@ -1646,7 +1624,7 @@ type IngressControllerHTTPHeader struct { // Strict-Transport-Security, Proxy, Host, Cookie, Set-Cookie. // It must be no more than 255 characters in length. // Header name must be unique. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" @@ -1657,7 +1635,7 @@ type IngressControllerHTTPHeader struct { // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'set-cookie'",message="set-cookie header may not be modified via header actions" Name string `json:"name"` // action specifies actions to perform on headers, such as setting or deleting headers. - // +kubebuilder:validation:Required + // +required Action IngressControllerHTTPHeaderActionUnion `json:"action"` } @@ -1671,7 +1649,7 @@ type IngressControllerHTTPHeaderActionUnion struct { // Delete allows you to delete HTTP request and response headers. // +unionDiscriminator // +kubebuilder:validation:Enum:=Set;Delete - // +kubebuilder:validation:Required + // +required Type IngressControllerHTTPHeaderActionType `json:"type"` // set specifies how the HTTP header should be set. @@ -1704,7 +1682,7 @@ type IngressControllerSetHTTPHeader struct { // + --- // + Note: This limit was selected as most common web servers have a limit of 16384 characters or some lower limit. // + See . - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=16384 Value string `json:"value"` @@ -1725,7 +1703,6 @@ type IngressControllerTuningOptions struct { // headerBufferBytes values that are too large could cause the // IngressController to use significantly more memory than necessary. // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=16384 // +optional HeaderBufferBytes int32 `json:"headerBufferBytes,omitempty"` @@ -1745,7 +1722,6 @@ type IngressControllerTuningOptions struct { // large could cause the IngressController to use significantly more memory // than necessary. // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=4096 // +optional HeaderBufferMaxRewriteBytes int32 `json:"headerBufferMaxRewriteBytes,omitempty"` @@ -1763,7 +1739,6 @@ type IngressControllerTuningOptions struct { // Reducing the number of threads may cause the ingress controller to // perform poorly. // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=64 // +optional @@ -1773,7 +1748,6 @@ type IngressControllerTuningOptions struct { // waiting for a client response. // // If unset, the default timeout is 30s - // +kubebuilder:validation:Optional // +kubebuilder:validation:Format=duration // +optional ClientTimeout *metav1.Duration `json:"clientTimeout,omitempty"` @@ -1783,7 +1757,6 @@ type IngressControllerTuningOptions struct { // connection. // // If unset, the default timeout is 1s - // +kubebuilder:validation:Optional // +kubebuilder:validation:Format=duration // +optional ClientFinTimeout *metav1.Duration `json:"clientFinTimeout,omitempty"` @@ -1792,7 +1765,6 @@ type IngressControllerTuningOptions struct { // waiting for a server/backend response. // // If unset, the default timeout is 30s - // +kubebuilder:validation:Optional // +kubebuilder:validation:Format=duration // +optional ServerTimeout *metav1.Duration `json:"serverTimeout,omitempty"` @@ -1802,7 +1774,6 @@ type IngressControllerTuningOptions struct { // connection. // // If unset, the default timeout is 1s - // +kubebuilder:validation:Optional // +kubebuilder:validation:Format=duration // +optional ServerFinTimeout *metav1.Duration `json:"serverFinTimeout,omitempty"` @@ -1811,12 +1782,11 @@ type IngressControllerTuningOptions struct { // websockets) will be held open while the tunnel is idle. // // If unset, the default timeout is 1h - // +kubebuilder:validation:Optional // +kubebuilder:validation:Format=duration // +optional TunnelTimeout *metav1.Duration `json:"tunnelTimeout,omitempty"` - // ConnectTimeout defines the maximum time to wait for + // connectTimeout defines the maximum time to wait for // a connection attempt to a server/backend to succeed. // // This field expects an unsigned duration string of decimal numbers, each with optional @@ -1827,7 +1797,6 @@ type IngressControllerTuningOptions struct { // to choose a reasonable default. This default is subject to change over time. // The current default is 5s. // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ // +kubebuilder:validation:Type:=string // +optional @@ -1841,7 +1810,6 @@ type IngressControllerTuningOptions struct { // matching certificate could be used. // // If unset, the default inspect delay is 5s - // +kubebuilder:validation:Optional // +kubebuilder:validation:Format=duration // +optional TLSInspectDelay *metav1.Duration `json:"tlsInspectDelay,omitempty"` @@ -1867,7 +1835,6 @@ type IngressControllerTuningOptions struct { // Currently the minimum allowed value is 1s and the maximum allowed value is // 2147483647ms (24.85 days). Both are subject to change over time. // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ // +kubebuilder:validation:Type:=string // +optional @@ -1914,7 +1881,6 @@ type IngressControllerTuningOptions struct { // processes in router containers with the following metric: // 'container_memory_working_set_bytes{container="router",namespace="openshift-ingress"}/container_processes{container="router",namespace="openshift-ingress"}'. // - // +kubebuilder:validation:Optional // +optional MaxConnections int32 `json:"maxConnections,omitempty"` @@ -1945,7 +1911,6 @@ type IngressControllerTuningOptions struct { // be reloaded less frequently, and newly created routes will not be served until the // subsequent reload. // - // +kubebuilder:validation:Optional // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ // +kubebuilder:validation:Type:=string // +optional diff --git a/vendor/github.com/openshift/api/operator/v1/types_insights.go b/vendor/github.com/openshift/api/operator/v1/types_insights.go index 56e2b51c14c..ed59bb438b7 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_insights.go +++ b/vendor/github.com/openshift/api/operator/v1/types_insights.go @@ -25,7 +25,7 @@ type InsightsOperator struct { metav1.ObjectMeta `json:"metadata"` // spec is the specification of the desired behavior of the Insights. - // +kubebuilder:validation:Required + // +required Spec InsightsOperatorSpec `json:"spec"` // status is the most recently observed status of the Insights operator. @@ -58,7 +58,7 @@ type GatherStatus struct { // lastGatherDuration is the total time taken to process // all gatherers during the last gather event. // +optional - // +kubebuilder:validation:Pattern="^0|([1-9][0-9]*(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" + // +kubebuilder:validation:Pattern="^(0|([0-9]+(?:\\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$" // +kubebuilder:validation:Type=string LastGatherDuration metav1.Duration `json:"lastGatherDuration,omitempty"` // gatherers is a list of active gatherers (and their statuses) in the last gathering. @@ -85,25 +85,25 @@ type InsightsReport struct { // healthCheck represents an Insights health check attributes. type HealthCheck struct { // description provides basic description of the healtcheck. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=2048 // +kubebuilder:validation:MinLength=10 Description string `json:"description"` // totalRisk of the healthcheck. Indicator of the total risk posed // by the detected issue; combination of impact and likelihood. The values can be from 1 to 4, // and the higher the number, the more important the issue. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Minimum=1 // +kubebuilder:validation:Maximum=4 TotalRisk int32 `json:"totalRisk"` // advisorURI provides the URL link to the Insights Advisor. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Pattern=`^https:\/\/\S+` AdvisorURI string `json:"advisorURI"` // state determines what the current state of the health check is. // Health check is enabled by default and can be disabled // by the user in the Insights advisor user interface. - // +kubebuilder:validation:Required + // +required State HealthCheckState `json:"state"` } @@ -124,18 +124,18 @@ const ( type GathererStatus struct { // conditions provide details on the status of each gatherer. // +listType=atomic - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinItems=1 Conditions []metav1.Condition `json:"conditions"` // name is the name of the gatherer. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MaxLength=256 // +kubebuilder:validation:MinLength=5 Name string `json:"name"` // lastGatherDuration represents the time spent gathering. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^([1-9][0-9]*(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" + // +kubebuilder:validation:Pattern="^(([0-9]+(?:\\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$" LastGatherDuration metav1.Duration `json:"lastGatherDuration"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go index 5c9d43a2a21..ce00b4b62cf 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go @@ -26,7 +26,6 @@ type KubeAPIServer struct { metav1.ObjectMeta `json:"metadata"` // spec is the specification of the desired behavior of the Kubernetes API Server - // +kubebuilder:validation:Required // +required Spec KubeAPIServerSpec `json:"spec"` @@ -78,6 +77,6 @@ type KubeAPIServerList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []KubeAPIServer `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go index 93ab209a0d5..ee104aa5065 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go @@ -25,7 +25,6 @@ type KubeControllerManager struct { metav1.ObjectMeta `json:"metadata"` // spec is the specification of the desired behavior of the Kubernetes Controller Manager - // +kubebuilder:validation:Required // +required Spec KubeControllerManagerSpec `json:"spec"` @@ -63,6 +62,6 @@ type KubeControllerManagerList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []KubeControllerManager `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubestorageversionmigrator.go b/vendor/github.com/openshift/api/operator/v1/types_kubestorageversionmigrator.go index 470dc5097da..f3add49101c 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_kubestorageversionmigrator.go +++ b/vendor/github.com/openshift/api/operator/v1/types_kubestorageversionmigrator.go @@ -24,7 +24,6 @@ type KubeStorageVersionMigrator struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata"` - // +kubebuilder:validation:Required // +required Spec KubeStorageVersionMigratorSpec `json:"spec"` // +optional @@ -52,6 +51,6 @@ type KubeStorageVersionMigratorList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []KubeStorageVersionMigrator `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go b/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go index 8bd41eb69d7..88b89f81884 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go +++ b/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go @@ -25,7 +25,7 @@ type MachineConfiguration struct { metav1.ObjectMeta `json:"metadata"` // spec is the specification of the desired behavior of the Machine Config Operator - // +kubebuilder:validation:Required + // +required Spec MachineConfigurationSpec `json:"spec"` // status is the most recently observed status of the Machine Config Operator @@ -111,7 +111,7 @@ type MachineConfigurationList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []MachineConfiguration `json:"items"` } @@ -131,17 +131,17 @@ type MachineManager struct { // resource is the machine management resource's type. // The only current valid value is machinesets. // machinesets means that the machine manager will only register resources of the kind MachineSet. - // +kubebuilder:validation:Required + // +required Resource MachineManagerMachineSetsResourceType `json:"resource"` // apiGroup is name of the APIGroup that the machine management resource belongs to. // The only current valid value is machine.openshift.io. // machine.openshift.io means that the machine manager will only register resources that belong to OpenShift machine API group. - // +kubebuilder:validation:Required + // +required APIGroup MachineManagerMachineSetsAPIGroupType `json:"apiGroup"` // selection allows granular control of the machine management resources that will be registered for boot image updates. - // +kubebuilder:validation:Required + // +required Selection MachineManagerSelector `json:"selection"` } @@ -153,7 +153,7 @@ type MachineManagerSelector struct { // All means that every resource matched by the machine manager will be updated. // Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. // +unionDiscriminator - // +kubebuilder:validation:Required + // +required Mode MachineManagerSelectorMode `json:"mode"` // partial provides label selector(s) that can be used to match machine management resources. @@ -165,7 +165,7 @@ type MachineManagerSelector struct { // PartialSelector provides label selector(s) that can be used to match machine management resources. type PartialSelector struct { // machineResourceSelector is a label selector that can be used to select machine resources like MachineSets. - // +kubebuilder:validation:Required + // +required MachineResourceSelector *metav1.LabelSelector `json:"machineResourceSelector,omitempty"` } @@ -255,7 +255,7 @@ type NodeDisruptionPolicyClusterStatus struct { type NodeDisruptionPolicySpecFile struct { // path is the location of a file being managed through a MachineConfig. // The Actions in the policy will apply to changes to the file at this path. - // +kubebuilder:validation:Required + // +required Path string `json:"path"` // actions represents the series of commands to be executed on changes to the file at // the corresponding file path. Actions will be applied in the order that @@ -264,7 +264,7 @@ type NodeDisruptionPolicySpecFile struct { // Valid actions are Reboot, Drain, Reload, DaemonReload and None. // The Reboot action and the None action cannot be used in conjunction with any of the other actions. // This list supports a maximum of 10 entries. - // +kubebuilder:validation:Required + // +required // +listType=atomic // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" @@ -276,7 +276,7 @@ type NodeDisruptionPolicySpecFile struct { type NodeDisruptionPolicyStatusFile struct { // path is the location of a file being managed through a MachineConfig. // The Actions in the policy will apply to changes to the file at this path. - // +kubebuilder:validation:Required + // +required Path string `json:"path"` // actions represents the series of commands to be executed on changes to the file at // the corresponding file path. Actions will be applied in the order that @@ -285,7 +285,7 @@ type NodeDisruptionPolicyStatusFile struct { // Valid actions are Reboot, Drain, Reload, DaemonReload and None. // The Reboot action and the None action cannot be used in conjunction with any of the other actions. // This list supports a maximum of 10 entries. - // +kubebuilder:validation:Required + // +required // +listType=atomic // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" @@ -300,7 +300,7 @@ type NodeDisruptionPolicySpecUnit struct { // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +kubebuilder:validation:Required + // +required Name NodeDisruptionPolicyServiceName `json:"name"` // actions represents the series of commands to be executed on changes to the file at @@ -310,7 +310,7 @@ type NodeDisruptionPolicySpecUnit struct { // Valid actions are Reboot, Drain, Reload, DaemonReload and None. // The Reboot action and the None action cannot be used in conjunction with any of the other actions. // This list supports a maximum of 10 entries. - // +kubebuilder:validation:Required + // +required // +listType=atomic // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" @@ -325,7 +325,7 @@ type NodeDisruptionPolicyStatusUnit struct { // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +kubebuilder:validation:Required + // +required Name NodeDisruptionPolicyServiceName `json:"name"` // actions represents the series of commands to be executed on changes to the file at @@ -335,7 +335,7 @@ type NodeDisruptionPolicyStatusUnit struct { // Valid actions are Reboot, Drain, Reload, DaemonReload and None. // The Reboot action and the None action cannot be used in conjunction with any of the other actions. // This list supports a maximum of 10 entries. - // +kubebuilder:validation:Required + // +required // +listType=atomic // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" @@ -352,7 +352,7 @@ type NodeDisruptionPolicySpecSSHKey struct { // Valid actions are Reboot, Drain, Reload, DaemonReload and None. // The Reboot action and the None action cannot be used in conjunction with any of the other actions. // This list supports a maximum of 10 entries. - // +kubebuilder:validation:Required + // +required // +listType=atomic // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" @@ -369,7 +369,7 @@ type NodeDisruptionPolicyStatusSSHKey struct { // Valid actions are Reboot, Drain, Reload, DaemonReload and None. // The Reboot action and the None action cannot be used in conjunction with any of the other actions. // This list supports a maximum of 10 entries. - // +kubebuilder:validation:Required + // +required // +listType=atomic // +kubebuilder:validation:MaxItems=10 // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" @@ -386,7 +386,7 @@ type NodeDisruptionPolicySpecAction struct { // reload/restart requires a corresponding service target specified in the reload/restart field. // Other values require no further configuration // +unionDiscriminator - // +kubebuilder:validation:Required + // +required Type NodeDisruptionPolicySpecActionType `json:"type"` // reload specifies the service to reload, only valid if type is reload // +optional @@ -405,7 +405,7 @@ type NodeDisruptionPolicyStatusAction struct { // reload/restart requires a corresponding service target specified in the reload/restart field. // Other values require no further configuration // +unionDiscriminator - // +kubebuilder:validation:Required + // +required Type NodeDisruptionPolicyStatusActionType `json:"type"` // reload specifies the service to reload, only valid if type is reload // +optional @@ -421,7 +421,7 @@ type ReloadService struct { // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +kubebuilder:validation:Required + // +required ServiceName NodeDisruptionPolicyServiceName `json:"serviceName"` } @@ -431,7 +431,7 @@ type RestartService struct { // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +kubebuilder:validation:Required + // +required ServiceName NodeDisruptionPolicyServiceName `json:"serviceName"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_network.go b/vendor/github.com/openshift/api/operator/v1/types_network.go index 9b1588bc25a..ba2f3b4712f 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_network.go +++ b/vendor/github.com/openshift/api/operator/v1/types_network.go @@ -54,7 +54,7 @@ type NetworkList struct { // NetworkSpec is the top-level network configuration object. // +kubebuilder:validation:XValidation:rule="!has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.gatewayConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding) || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == oldSelf.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == 'Restricted' || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == 'Global'",message="invalid value for IPForwarding, valid values are 'Restricted' or 'Global'" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=AdditionalRoutingCapabilities,rule="(has(self.additionalRoutingCapabilities) && ('FRR' in self.additionalRoutingCapabilities.providers)) || !has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements) || self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements != 'Enabled'",message="Route advertisements cannot be Enabled if 'FRR' routing capability provider is not available" +// +openshift:validation:FeatureGateAwareXValidation:featureGate=RouteAdvertisements,rule="(has(self.additionalRoutingCapabilities) && ('FRR' in self.additionalRoutingCapabilities.providers)) || !has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements) || self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements != 'Enabled'",message="Route advertisements cannot be Enabled if 'FRR' routing capability provider is not available" type NetworkSpec struct { OperatorSpec `json:",inline"` @@ -250,7 +250,7 @@ type DefaultNetworkDefinition struct { // All NetworkTypes are supported except for NetworkTypeRaw Type NetworkType `json:"type"` - // openShiftSDNConfig was previously used to configure the openshift-sdn plugin. + // openshiftSDNConfig was previously used to configure the openshift-sdn plugin. // DEPRECATED: OpenShift SDN is no longer supported. // +optional OpenShiftSDNConfig *OpenShiftSDNConfig `json:"openshiftSDNConfig,omitempty"` @@ -267,7 +267,7 @@ type SimpleMacvlanConfig struct { // +optional Master string `json:"master,omitempty"` - // IPAMConfig configures IPAM module will be used for IP Address Management (IPAM). + // ipamConfig configures IPAM module will be used for IP Address Management (IPAM). // +optional IPAMConfig *IPAMConfig `json:"ipamConfig,omitempty"` @@ -284,19 +284,19 @@ type SimpleMacvlanConfig struct { // StaticIPAMAddresses provides IP address and Gateway for static IPAM addresses type StaticIPAMAddresses struct { - // Address is the IP address in CIDR format + // address is the IP address in CIDR format // +optional Address string `json:"address"` - // Gateway is IP inside of subnet to designate as the gateway + // gateway is IP inside of subnet to designate as the gateway // +optional Gateway string `json:"gateway,omitempty"` } // StaticIPAMRoutes provides Destination/Gateway pairs for static IPAM routes type StaticIPAMRoutes struct { - // Destination points the IP route destination + // destination points the IP route destination Destination string `json:"destination"` - // Gateway is the route's next-hop IP address + // gateway is the route's next-hop IP address // If unset, a default gateway is assumed (as determined by the CNI plugin). // +optional Gateway string `json:"gateway,omitempty"` @@ -304,14 +304,14 @@ type StaticIPAMRoutes struct { // StaticIPAMDNS provides DNS related information for static IPAM type StaticIPAMDNS struct { - // Nameservers points DNS servers for IP lookup + // nameservers points DNS servers for IP lookup // +optional // +listType=atomic Nameservers []string `json:"nameservers,omitempty"` - // Domain configures the domainname the local domain used for short hostname lookups + // domain configures the domainname the local domain used for short hostname lookups // +optional Domain string `json:"domain,omitempty"` - // Search configures priority ordered search domains for short hostname lookups + // search configures priority ordered search domains for short hostname lookups // +optional // +listType=atomic Search []string `json:"search,omitempty"` @@ -319,26 +319,26 @@ type StaticIPAMDNS struct { // StaticIPAMConfig contains configurations for static IPAM (IP Address Management) type StaticIPAMConfig struct { - // Addresses configures IP address for the interface + // addresses configures IP address for the interface // +optional // +listType=atomic Addresses []StaticIPAMAddresses `json:"addresses,omitempty"` - // Routes configures IP routes for the interface + // routes configures IP routes for the interface // +optional // +listType=atomic Routes []StaticIPAMRoutes `json:"routes,omitempty"` - // DNS configures DNS for the interface + // dns configures DNS for the interface // +optional DNS *StaticIPAMDNS `json:"dns,omitempty"` } // IPAMConfig contains configurations for IPAM (IP Address Management) type IPAMConfig struct { - // Type is the type of IPAM module will be used for IP Address Management(IPAM). + // type is the type of IPAM module will be used for IP Address Management(IPAM). // The supported values are IPAMTypeDHCP, IPAMTypeStatic Type IPAMType `json:"type"` - // StaticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic + // staticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic // +optional StaticIPAMConfig *StaticIPAMConfig `json:"staticIPAMConfig,omitempty"` } @@ -353,7 +353,7 @@ type AdditionalNetworkDefinition struct { // name is the name of the network. This will be populated in the resulting CRD // This must be unique. - // +kubebuilder:validation:Required + // +required Name string `json:"name"` // namespace is the namespace of the network. This will be populated in the resulting CRD @@ -364,7 +364,7 @@ type AdditionalNetworkDefinition struct { // NetworkAttachmentDefinition CRD RawCNIConfig string `json:"rawCNIConfig,omitempty"` - // SimpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan + // simpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan // +optional SimpleMacvlanConfig *SimpleMacvlanConfig `json:"simpleMacvlanConfig,omitempty"` } @@ -410,7 +410,7 @@ type OVNKubernetesConfig struct { // +kubebuilder:validation:Minimum=1 // +optional GenevePort *uint32 `json:"genevePort,omitempty"` - // HybridOverlayConfig configures an additional overlay network for peers that are + // hybridOverlayConfig configures an additional overlay network for peers that are // not using OVN. // +optional HybridOverlayConfig *HybridOverlayConfig `json:"hybridOverlayConfig,omitempty"` @@ -540,10 +540,10 @@ type IPv6OVNKubernetesConfig struct { } type HybridOverlayConfig struct { - // HybridClusterNetwork defines a network space given to nodes on an additional overlay network. + // hybridClusterNetwork defines a network space given to nodes on an additional overlay network. // +listType=atomic HybridClusterNetwork []ClusterNetworkEntry `json:"hybridClusterNetwork"` - // HybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. + // hybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. // Default is 4789 // +optional HybridOverlayVXLANPort *uint32 `json:"hybridOverlayVXLANPort,omitempty"` @@ -577,14 +577,14 @@ const ( // GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides type GatewayConfig struct { - // RoutingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port + // routingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port // into the host before sending it out. If this is not set, traffic will always egress directly // from OVN to outside without touching the host stack. Setting this to true means hardware // offload will not be supported. Default is false if GatewayConfig is specified. // +kubebuilder:default:=false // +optional RoutingViaHost bool `json:"routingViaHost,omitempty"` - // IPForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex). + // ipForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex). // By default this is set to Restricted, and Kubernetes related traffic is still forwarded appropriately, but other // IP traffic will not be routed by the OCP node. If there is a desire to allow the host to forward traffic across // OVN-Kubernetes managed interfaces, then set this field to "Global". @@ -862,7 +862,7 @@ type AdditionalRoutingCapabilities struct { // is currrently "FRR" which provides FRR routing capabilities through the // deployment of FRR. // +listType=atomic - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=1 // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))" diff --git a/vendor/github.com/openshift/api/operator/v1/types_olm.go b/vendor/github.com/openshift/api/operator/v1/types_olm.go index 1ce349d357f..07c94ece2e2 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_olm.go +++ b/vendor/github.com/openshift/api/operator/v1/types_olm.go @@ -56,6 +56,6 @@ type OLMList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []OLM `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go index cd2c8a588f5..a96e033cb7b 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go @@ -25,7 +25,6 @@ type OpenShiftAPIServer struct { metav1.ObjectMeta `json:"metadata"` // spec is the specification of the desired behavior of the OpenShift API Server. - // +kubebuilder:validation:Required // +required Spec OpenShiftAPIServerSpec `json:"spec"` @@ -55,6 +54,6 @@ type OpenShiftAPIServerList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []OpenShiftAPIServer `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go index 8e8929a903e..8a553a05790 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go @@ -24,7 +24,6 @@ type OpenShiftControllerManager struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata"` - // +kubebuilder:validation:Required // +required Spec OpenShiftControllerManagerSpec `json:"spec"` // +optional @@ -52,6 +51,6 @@ type OpenShiftControllerManagerList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []OpenShiftControllerManager `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go index 448c458c199..cfb04e8d94f 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go +++ b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go @@ -25,7 +25,6 @@ type KubeScheduler struct { metav1.ObjectMeta `json:"metadata"` // spec is the specification of the desired behavior of the Kubernetes Scheduler - // +kubebuilder:validation:Required // +required Spec KubeSchedulerSpec `json:"spec"` @@ -55,6 +54,6 @@ type KubeSchedulerList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []KubeScheduler `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go b/vendor/github.com/openshift/api/operator/v1/types_serviceca.go index e4d8d1d7ad9..48534d4c63b 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go +++ b/vendor/github.com/openshift/api/operator/v1/types_serviceca.go @@ -25,7 +25,6 @@ type ServiceCA struct { metav1.ObjectMeta `json:"metadata"` //spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ServiceCASpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. @@ -54,6 +53,6 @@ type ServiceCAList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []ServiceCA `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go index 006b8bb99de..e058c065a67 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go @@ -20,7 +20,6 @@ type ServiceCatalogAPIServer struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:Required // +required Spec ServiceCatalogAPIServerSpec `json:"spec"` // +optional @@ -49,6 +48,6 @@ type ServiceCatalogAPIServerList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []ServiceCatalogAPIServer `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go index 859965408b5..4fe2aa46a32 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go +++ b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go @@ -20,7 +20,6 @@ type ServiceCatalogControllerManager struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ObjectMeta `json:"metadata"` - // +kubebuilder:validation:Required // +required Spec ServiceCatalogControllerManagerSpec `json:"spec"` // +optional @@ -49,6 +48,6 @@ type ServiceCatalogControllerManagerList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []ServiceCatalogControllerManager `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1/types_storage.go b/vendor/github.com/openshift/api/operator/v1/types_storage.go index aa48b0c84f2..69691a83ade 100644 --- a/vendor/github.com/openshift/api/operator/v1/types_storage.go +++ b/vendor/github.com/openshift/api/operator/v1/types_storage.go @@ -25,7 +25,6 @@ type Storage struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec StorageSpec `json:"spec"` @@ -47,7 +46,7 @@ const ( type StorageSpec struct { OperatorSpec `json:",inline"` - // VSphereStorageDriver indicates the storage driver to use on VSphere clusters. + // vsphereStorageDriver indicates the storage driver to use on VSphere clusters. // Once this field is set to CSIWithMigrationDriver, it can not be changed. // If this is empty, the platform will choose a good default, // which may change over time without notice. diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go index 3c00fe2f032..dace7ed4f29 100644 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go @@ -128,7 +128,7 @@ func (AuthenticationList) SwaggerDoc() map[string]string { } var map_AuthenticationStatus = map[string]string{ - "oauthAPIServer": "OAuthAPIServer holds status specific only to oauth-apiserver", + "oauthAPIServer": "oauthAPIServer holds status specific only to oauth-apiserver", } func (AuthenticationStatus) SwaggerDoc() map[string]string { @@ -136,7 +136,7 @@ func (AuthenticationStatus) SwaggerDoc() map[string]string { } var map_OAuthAPIServerStatus = map[string]string{ - "latestAvailableRevision": "LatestAvailableRevision is the latest revision used as suffix of revisioned secrets like encryption-config. A new revision causes a new deployment of pods.", + "latestAvailableRevision": "latestAvailableRevision is the latest revision used as suffix of revisioned secrets like encryption-config. A new revision causes a new deployment of pods.", } func (OAuthAPIServerStatus) SwaggerDoc() map[string]string { @@ -163,7 +163,7 @@ func (CloudCredentialList) SwaggerDoc() map[string]string { var map_CloudCredentialSpec = map[string]string{ "": "CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator.", - "credentialsMode": "CredentialsMode allows informing CCO that it should not attempt to dynamically determine the root cloud credentials capabilities, and it should just run in the specified mode. It also allows putting the operator into \"manual\" mode if desired. Leaving the field in default mode runs CCO so that the cluster's cloud credentials will be dynamically probed for capabilities (on supported clouds/platforms). Supported modes:\n AWS/Azure/GCP: \"\" (Default), \"Mint\", \"Passthrough\", \"Manual\"\n Others: Do not set value as other platforms only support running in \"Passthrough\"", + "credentialsMode": "credentialsMode allows informing CCO that it should not attempt to dynamically determine the root cloud credentials capabilities, and it should just run in the specified mode. It also allows putting the operator into \"manual\" mode if desired. Leaving the field in default mode runs CCO so that the cluster's cloud credentials will be dynamically probed for capabilities (on supported clouds/platforms). Supported modes:\n AWS/Azure/GCP: \"\" (Default), \"Mint\", \"Passthrough\", \"Manual\"\n Others: Do not set value as other platforms only support running in \"Passthrough\"", } func (CloudCredentialSpec) SwaggerDoc() map[string]string { @@ -192,7 +192,7 @@ func (Config) SwaggerDoc() map[string]string { var map_ConfigList = map[string]string{ "": "ConfigList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (ConfigList) SwaggerDoc() map[string]string { @@ -314,7 +314,7 @@ func (DeveloperConsoleCatalogCategory) SwaggerDoc() map[string]string { var map_DeveloperConsoleCatalogCategoryMeta = map[string]string{ "": "DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category.", - "id": "ID is an identifier used in the URL to enable deep linking in console. ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters.", + "id": "id is an identifier used in the URL to enable deep linking in console. ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters.", "label": "label defines a category display label. It is required and must have 1-64 characters.", "tags": "tags is a list of strings that will match the category. A selected category show all items which has at least one overlapping tag between category and item.", } @@ -480,7 +480,7 @@ var map_CSIDriverConfigSpec = map[string]string{ "azure": "azure is used to configure the Azure CSI driver.", "gcp": "gcp is used to configure the GCP CSI driver.", "ibmcloud": "ibmcloud is used to configure the IBM Cloud CSI driver.", - "vSphere": "vsphere is used to configure the vsphere CSI driver.", + "vSphere": "vSphere is used to configure the vsphere CSI driver.", } func (CSIDriverConfigSpec) SwaggerDoc() map[string]string { @@ -509,7 +509,7 @@ func (ClusterCSIDriverList) SwaggerDoc() map[string]string { var map_ClusterCSIDriverSpec = map[string]string{ "": "ClusterCSIDriverSpec is the desired behavior of CSI driver operator", - "storageClassState": "StorageClassState determines if CSI operator should create and manage storage classes. If this field value is empty or Managed - CSI operator will continuously reconcile storage class and create if necessary. If this field value is Unmanaged - CSI operator will not reconcile any previously created storage class. If this field value is Removed - CSI operator will delete the storage class it created previously. When omitted, this means the user has no opinion and the platform chooses a reasonable default, which is subject to change over time. The current default behaviour is Managed.", + "storageClassState": "storageClassState determines if CSI operator should create and manage storage classes. If this field value is empty or Managed - CSI operator will continuously reconcile storage class and create if necessary. If this field value is Unmanaged - CSI operator will not reconcile any previously created storage class. If this field value is Removed - CSI operator will delete the storage class it created previously. When omitted, this means the user has no opinion and the platform chooses a reasonable default, which is subject to change over time. The current default behaviour is Managed.", "driverConfig": "driverConfig can be used to specify platform specific driver configuration. When omitted, this means no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time.", } @@ -714,9 +714,9 @@ func (Server) SwaggerDoc() map[string]string { var map_Upstream = map[string]string{ "": "Upstream can either be of type SystemResolvConf, or of type Network.\n\n - For an Upstream of type SystemResolvConf, no further fields are necessary:\n The upstream will be configured to use /etc/resolv.conf.\n - For an Upstream of type Network, a NetworkResolver field needs to be defined\n with an IP address or IP:port if the upstream listens on a port other than 53.", - "type": "Type defines whether this upstream contains an IP/IP:port resolver or the local /etc/resolv.conf. Type accepts 2 possible values: SystemResolvConf or Network.\n\n* When SystemResolvConf is used, the Upstream structure does not require any further fields to be defined:\n /etc/resolv.conf will be used\n* When Network is used, the Upstream structure must contain at least an Address", - "address": "Address must be defined when Type is set to Network. It will be ignored otherwise. It must be a valid ipv4 or ipv6 address.", - "port": "Port may be defined when Type is set to Network. It will be ignored otherwise. Port must be between 65535", + "type": "type defines whether this upstream contains an IP/IP:port resolver or the local /etc/resolv.conf. Type accepts 2 possible values: SystemResolvConf or Network.\n\n* When SystemResolvConf is used, the Upstream structure does not require any further fields to be defined:\n /etc/resolv.conf will be used\n* When Network is used, the Upstream structure must contain at least an Address", + "address": "address must be defined when Type is set to Network. It will be ignored otherwise. It must be a valid ipv4 or ipv6 address.", + "port": "port may be defined when Type is set to Network. It will be ignored otherwise. Port must be between 65535", } func (Upstream) SwaggerDoc() map[string]string { @@ -725,8 +725,8 @@ func (Upstream) SwaggerDoc() map[string]string { var map_UpstreamResolvers = map[string]string{ "": "UpstreamResolvers defines a schema for configuring the CoreDNS forward plugin in the specific case of the default (\".\") server. It defers from ForwardPlugin in the default values it accepts: * At least one upstream should be specified. * the default policy is Sequential", - "upstreams": "Upstreams is a list of resolvers to forward name queries for the \".\" domain. Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream returns an error during the exchange, another resolver is tried from Upstreams. The Upstreams are selected in the order specified in Policy.\n\nA maximum of 15 upstreams is allowed per ForwardPlugin. If no Upstreams are specified, /etc/resolv.conf is used by default", - "policy": "Policy is used to determine the order in which upstream servers are selected for querying. Any one of the following values may be specified:\n\n* \"Random\" picks a random upstream server for each query. * \"RoundRobin\" picks upstream servers in a round-robin order, moving to the next server for each new query. * \"Sequential\" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query.\n\nThe default value is \"Sequential\"", + "upstreams": "upstreams is a list of resolvers to forward name queries for the \".\" domain. Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream returns an error during the exchange, another resolver is tried from Upstreams. The Upstreams are selected in the order specified in Policy.\n\nA maximum of 15 upstreams is allowed per ForwardPlugin. If no Upstreams are specified, /etc/resolv.conf is used by default", + "policy": "policy is used to determine the order in which upstream servers are selected for querying. Any one of the following values may be specified:\n\n* \"Random\" picks a random upstream server for each query. * \"RoundRobin\" picks upstream servers in a round-robin order, moving to the next server for each new query. * \"Sequential\" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query.\n\nThe default value is \"Sequential\"", "transportConfig": "transportConfig is used to configure the transport type, server name, and optional custom CA or CA bundle to use when forwarding DNS requests to an upstream resolver.\n\nThe default value is \"\" (empty) which results in a standard cleartext connection being used when forwarding DNS requests to an upstream resolver.", "protocolStrategy": "protocolStrategy specifies the protocol to use for upstream DNS requests. Valid values for protocolStrategy are \"TCP\" and omitted. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is to use the protocol of the original client request. \"TCP\" specifies that the platform should use TCP for all upstream DNS requests, even if the client request uses UDP. \"TCP\" is useful for UDP-specific issues such as those created by non-compliant upstream resolvers, but may consume more bandwidth or increase DNS response time. Note that protocolStrategy only affects the protocol of DNS requests that CoreDNS makes to upstream resolvers. It does not affect the protocol of DNS requests between clients and CoreDNS.", } @@ -747,7 +747,7 @@ func (Etcd) SwaggerDoc() map[string]string { var map_EtcdList = map[string]string{ "": "KubeAPISOperatorConfigList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (EtcdList) SwaggerDoc() map[string]string { @@ -1071,7 +1071,7 @@ var map_IngressControllerTuningOptions = map[string]string{ "serverTimeout": "serverTimeout defines how long a connection will be held open while waiting for a server/backend response.\n\nIf unset, the default timeout is 30s", "serverFinTimeout": "serverFinTimeout defines how long a connection will be held open while waiting for the server/backend response to the client closing the connection.\n\nIf unset, the default timeout is 1s", "tunnelTimeout": "tunnelTimeout defines how long a tunnel connection (including websockets) will be held open while the tunnel is idle.\n\nIf unset, the default timeout is 1h", - "connectTimeout": "ConnectTimeout defines the maximum time to wait for a connection attempt to a server/backend to succeed.\n\nThis field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, e.g. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\" U+00B5 or \"μs\" U+03BC), \"ms\", \"s\", \"m\", \"h\".\n\nWhen omitted, this means the user has no opinion and the platform is left to choose a reasonable default. This default is subject to change over time. The current default is 5s.", + "connectTimeout": "connectTimeout defines the maximum time to wait for a connection attempt to a server/backend to succeed.\n\nThis field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, e.g. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\" U+00B5 or \"μs\" U+03BC), \"ms\", \"s\", \"m\", \"h\".\n\nWhen omitted, this means the user has no opinion and the platform is left to choose a reasonable default. This default is subject to change over time. The current default is 5s.", "tlsInspectDelay": "tlsInspectDelay defines how long the router can hold data to find a matching route.\n\nSetting this too short can cause the router to fall back to the default certificate for edge-terminated or reencrypt routes even when a better matching certificate could be used.\n\nIf unset, the default inspect delay is 5s", "healthCheckInterval": "healthCheckInterval defines how long the router waits between two consecutive health checks on its configured backends. This value is applied globally as a default for all routes, but may be overridden per-route by the route annotation \"router.openshift.io/haproxy.health.check.interval\".\n\nExpects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, eg \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\" U+00B5 or \"μs\" U+03BC), \"ms\", \"s\", \"m\", \"h\".\n\nSetting this to less than 5s can cause excess traffic due to too frequent TCP health checks and accompanying SYN packet storms. Alternatively, setting this too high can result in increased latency, due to backend servers that are no longer available, but haven't yet been detected as such.\n\nAn empty or zero healthCheckInterval means no opinion and IngressController chooses a default, which is subject to change over time. Currently the default healthCheckInterval value is 5s.\n\nCurrently the minimum allowed value is 1s and the maximum allowed value is 2147483647ms (24.85 days). Both are subject to change over time.", "maxConnections": "maxConnections defines the maximum number of simultaneous connections that can be established per HAProxy process. Increasing this value allows each ingress controller pod to handle more connections but at the cost of additional system resources being consumed.\n\nPermitted values are: empty, 0, -1, and the range 2000-2000000.\n\nIf this field is empty or 0, the IngressController will use the default value of 50000, but the default is subject to change in future releases.\n\nIf the value is -1 then HAProxy will dynamically compute a maximum value based on the available ulimits in the running container. Selecting -1 (i.e., auto) will result in a large value being computed (~520000 on OpenShift >=4.10 clusters) and therefore each HAProxy process will incur significant memory usage compared to the current default of 50000.\n\nSetting a value that is greater than the current operating system limit will prevent the HAProxy process from starting.\n\nIf you choose a discrete value (e.g., 750000) and the router pod is migrated to a new node, there's no guarantee that that new node has identical ulimits configured. In such a scenario the pod would fail to start. If you have nodes with different ulimits configured (e.g., different tuned profiles) and you choose a discrete value then the guidance is to use -1 and let the value be computed dynamically at runtime.\n\nYou can monitor memory usage for router containers with the following metric: 'container_memory_working_set_bytes{container=\"router\",namespace=\"openshift-ingress\"}'.\n\nYou can monitor memory usage of individual HAProxy processes in router containers with the following metric: 'container_memory_working_set_bytes{container=\"router\",namespace=\"openshift-ingress\"}/container_processes{container=\"router\",namespace=\"openshift-ingress\"}'.", @@ -1264,7 +1264,7 @@ func (KubeAPIServer) SwaggerDoc() map[string]string { var map_KubeAPIServerList = map[string]string{ "": "KubeAPIServerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (KubeAPIServerList) SwaggerDoc() map[string]string { @@ -1302,7 +1302,7 @@ func (KubeControllerManager) SwaggerDoc() map[string]string { var map_KubeControllerManagerList = map[string]string{ "": "KubeControllerManagerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (KubeControllerManagerList) SwaggerDoc() map[string]string { @@ -1329,7 +1329,7 @@ func (KubeStorageVersionMigrator) SwaggerDoc() map[string]string { var map_KubeStorageVersionMigratorList = map[string]string{ "": "KubeStorageVersionMigratorList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (KubeStorageVersionMigratorList) SwaggerDoc() map[string]string { @@ -1350,7 +1350,7 @@ func (MachineConfiguration) SwaggerDoc() map[string]string { var map_MachineConfigurationList = map[string]string{ "": "MachineConfigurationList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (MachineConfigurationList) SwaggerDoc() map[string]string { @@ -1545,7 +1545,7 @@ var map_AdditionalNetworkDefinition = map[string]string{ "name": "name is the name of the network. This will be populated in the resulting CRD This must be unique.", "namespace": "namespace is the namespace of the network. This will be populated in the resulting CRD If not given the network will be created in the default namespace.", "rawCNIConfig": "rawCNIConfig is the raw CNI configuration json to create in the NetworkAttachmentDefinition CRD", - "simpleMacvlanConfig": "SimpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan", + "simpleMacvlanConfig": "simpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan", } func (AdditionalNetworkDefinition) SwaggerDoc() map[string]string { @@ -1572,7 +1572,7 @@ func (ClusterNetworkEntry) SwaggerDoc() map[string]string { var map_DefaultNetworkDefinition = map[string]string{ "": "DefaultNetworkDefinition represents a single network plugin's configuration. type must be specified, along with exactly one \"Config\" that matches the type.", "type": "type is the type of network All NetworkTypes are supported except for NetworkTypeRaw", - "openshiftSDNConfig": "openShiftSDNConfig was previously used to configure the openshift-sdn plugin. DEPRECATED: OpenShift SDN is no longer supported.", + "openshiftSDNConfig": "openshiftSDNConfig was previously used to configure the openshift-sdn plugin. DEPRECATED: OpenShift SDN is no longer supported.", "ovnKubernetesConfig": "ovnKubernetesConfig configures the ovn-kubernetes plugin.", } @@ -1611,8 +1611,8 @@ func (FeaturesMigration) SwaggerDoc() map[string]string { var map_GatewayConfig = map[string]string{ "": "GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides", - "routingViaHost": "RoutingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port into the host before sending it out. If this is not set, traffic will always egress directly from OVN to outside without touching the host stack. Setting this to true means hardware offload will not be supported. Default is false if GatewayConfig is specified.", - "ipForwarding": "IPForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex). By default this is set to Restricted, and Kubernetes related traffic is still forwarded appropriately, but other IP traffic will not be routed by the OCP node. If there is a desire to allow the host to forward traffic across OVN-Kubernetes managed interfaces, then set this field to \"Global\". The supported values are \"Restricted\" and \"Global\".", + "routingViaHost": "routingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port into the host before sending it out. If this is not set, traffic will always egress directly from OVN to outside without touching the host stack. Setting this to true means hardware offload will not be supported. Default is false if GatewayConfig is specified.", + "ipForwarding": "ipForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex). By default this is set to Restricted, and Kubernetes related traffic is still forwarded appropriately, but other IP traffic will not be routed by the OCP node. If there is a desire to allow the host to forward traffic across OVN-Kubernetes managed interfaces, then set this field to \"Global\". The supported values are \"Restricted\" and \"Global\".", "ipv4": "ipv4 allows users to configure IP settings for IPv4 connections. When omitted, this means no opinion and the default configuration is used. Check individual members fields within ipv4 for details of default values.", "ipv6": "ipv6 allows users to configure IP settings for IPv6 connections. When omitted, this means no opinion and the default configuration is used. Check individual members fields within ipv6 for details of default values.", } @@ -1622,8 +1622,8 @@ func (GatewayConfig) SwaggerDoc() map[string]string { } var map_HybridOverlayConfig = map[string]string{ - "hybridClusterNetwork": "HybridClusterNetwork defines a network space given to nodes on an additional overlay network.", - "hybridOverlayVXLANPort": "HybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. Default is 4789", + "hybridClusterNetwork": "hybridClusterNetwork defines a network space given to nodes on an additional overlay network.", + "hybridOverlayVXLANPort": "hybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. Default is 4789", } func (HybridOverlayConfig) SwaggerDoc() map[string]string { @@ -1632,8 +1632,8 @@ func (HybridOverlayConfig) SwaggerDoc() map[string]string { var map_IPAMConfig = map[string]string{ "": "IPAMConfig contains configurations for IPAM (IP Address Management)", - "type": "Type is the type of IPAM module will be used for IP Address Management(IPAM). The supported values are IPAMTypeDHCP, IPAMTypeStatic", - "staticIPAMConfig": "StaticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic", + "type": "type is the type of IPAM module will be used for IP Address Management(IPAM). The supported values are IPAMTypeDHCP, IPAMTypeStatic", + "staticIPAMConfig": "staticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic", } func (IPAMConfig) SwaggerDoc() map[string]string { @@ -1782,7 +1782,7 @@ var map_OVNKubernetesConfig = map[string]string{ "": "ovnKubernetesConfig contains the configuration parameters for networks using the ovn-kubernetes network project", "mtu": "mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400", "genevePort": "geneve port is the UDP port to be used by geneve encapulation. Default is 6081", - "hybridOverlayConfig": "HybridOverlayConfig configures an additional overlay network for peers that are not using OVN.", + "hybridOverlayConfig": "hybridOverlayConfig configures an additional overlay network for peers that are not using OVN.", "ipsecConfig": "ipsecConfig enables and configures IPsec for pods on the pod network within the cluster.", "policyAuditConfig": "policyAuditConfig is the configuration for network policy audit events. If unset, reported defaults are used.", "gatewayConfig": "gatewayConfig holds the configuration for node gateway options.", @@ -1845,7 +1845,7 @@ func (SFlowConfig) SwaggerDoc() map[string]string { var map_SimpleMacvlanConfig = map[string]string{ "": "SimpleMacvlanConfig contains configurations for macvlan interface.", "master": "master is the host interface to create the macvlan interface from. If not specified, it will be default route interface", - "ipamConfig": "IPAMConfig configures IPAM module will be used for IP Address Management (IPAM).", + "ipamConfig": "ipamConfig configures IPAM module will be used for IP Address Management (IPAM).", "mode": "mode is the macvlan mode: bridge, private, vepa, passthru. The default is bridge", "mtu": "mtu is the mtu to use for the macvlan interface. if unset, host's kernel will select the value.", } @@ -1856,8 +1856,8 @@ func (SimpleMacvlanConfig) SwaggerDoc() map[string]string { var map_StaticIPAMAddresses = map[string]string{ "": "StaticIPAMAddresses provides IP address and Gateway for static IPAM addresses", - "address": "Address is the IP address in CIDR format", - "gateway": "Gateway is IP inside of subnet to designate as the gateway", + "address": "address is the IP address in CIDR format", + "gateway": "gateway is IP inside of subnet to designate as the gateway", } func (StaticIPAMAddresses) SwaggerDoc() map[string]string { @@ -1866,9 +1866,9 @@ func (StaticIPAMAddresses) SwaggerDoc() map[string]string { var map_StaticIPAMConfig = map[string]string{ "": "StaticIPAMConfig contains configurations for static IPAM (IP Address Management)", - "addresses": "Addresses configures IP address for the interface", - "routes": "Routes configures IP routes for the interface", - "dns": "DNS configures DNS for the interface", + "addresses": "addresses configures IP address for the interface", + "routes": "routes configures IP routes for the interface", + "dns": "dns configures DNS for the interface", } func (StaticIPAMConfig) SwaggerDoc() map[string]string { @@ -1877,9 +1877,9 @@ func (StaticIPAMConfig) SwaggerDoc() map[string]string { var map_StaticIPAMDNS = map[string]string{ "": "StaticIPAMDNS provides DNS related information for static IPAM", - "nameservers": "Nameservers points DNS servers for IP lookup", - "domain": "Domain configures the domainname the local domain used for short hostname lookups", - "search": "Search configures priority ordered search domains for short hostname lookups", + "nameservers": "nameservers points DNS servers for IP lookup", + "domain": "domain configures the domainname the local domain used for short hostname lookups", + "search": "search configures priority ordered search domains for short hostname lookups", } func (StaticIPAMDNS) SwaggerDoc() map[string]string { @@ -1888,8 +1888,8 @@ func (StaticIPAMDNS) SwaggerDoc() map[string]string { var map_StaticIPAMRoutes = map[string]string{ "": "StaticIPAMRoutes provides Destination/Gateway pairs for static IPAM routes", - "destination": "Destination points the IP route destination", - "gateway": "Gateway is the route's next-hop IP address If unset, a default gateway is assumed (as determined by the CNI plugin).", + "destination": "destination points the IP route destination", + "gateway": "gateway is the route's next-hop IP address If unset, a default gateway is assumed (as determined by the CNI plugin).", } func (StaticIPAMRoutes) SwaggerDoc() map[string]string { @@ -1910,7 +1910,7 @@ func (OLM) SwaggerDoc() map[string]string { var map_OLMList = map[string]string{ "": "OLMList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (OLMList) SwaggerDoc() map[string]string { @@ -1931,7 +1931,7 @@ func (OpenShiftAPIServer) SwaggerDoc() map[string]string { var map_OpenShiftAPIServerList = map[string]string{ "": "OpenShiftAPIServerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (OpenShiftAPIServerList) SwaggerDoc() map[string]string { @@ -1950,7 +1950,7 @@ func (OpenShiftControllerManager) SwaggerDoc() map[string]string { var map_OpenShiftControllerManagerList = map[string]string{ "": "OpenShiftControllerManagerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (OpenShiftControllerManagerList) SwaggerDoc() map[string]string { @@ -1971,7 +1971,7 @@ func (KubeScheduler) SwaggerDoc() map[string]string { var map_KubeSchedulerList = map[string]string{ "": "KubeSchedulerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (KubeSchedulerList) SwaggerDoc() map[string]string { @@ -1992,7 +1992,7 @@ func (ServiceCA) SwaggerDoc() map[string]string { var map_ServiceCAList = map[string]string{ "": "ServiceCAList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (ServiceCAList) SwaggerDoc() map[string]string { @@ -2011,7 +2011,7 @@ func (ServiceCatalogAPIServer) SwaggerDoc() map[string]string { var map_ServiceCatalogAPIServerList = map[string]string{ "": "ServiceCatalogAPIServerList is a collection of items DEPRECATED: will be removed in 4.6\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (ServiceCatalogAPIServerList) SwaggerDoc() map[string]string { @@ -2030,7 +2030,7 @@ func (ServiceCatalogControllerManager) SwaggerDoc() map[string]string { var map_ServiceCatalogControllerManagerList = map[string]string{ "": "ServiceCatalogControllerManagerList is a collection of items DEPRECATED: will be removed in 4.6\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (ServiceCatalogControllerManagerList) SwaggerDoc() map[string]string { @@ -2059,7 +2059,7 @@ func (StorageList) SwaggerDoc() map[string]string { var map_StorageSpec = map[string]string{ "": "StorageSpec is the specification of the desired behavior of the cluster storage operator.", - "vsphereStorageDriver": "VSphereStorageDriver indicates the storage driver to use on VSphere clusters. Once this field is set to CSIWithMigrationDriver, it can not be changed. If this is empty, the platform will choose a good default, which may change over time without notice. The current default is CSIWithMigrationDriver and may not be changed. DEPRECATED: This field will be removed in a future release.", + "vsphereStorageDriver": "vsphereStorageDriver indicates the storage driver to use on VSphere clusters. Once this field is set to CSIWithMigrationDriver, it can not be changed. If this is empty, the platform will choose a good default, which may change over time without notice. The current default is CSIWithMigrationDriver and may not be changed. DEPRECATED: This field will be removed in a future release.", } func (StorageSpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types.go b/vendor/github.com/openshift/api/operator/v1alpha1/types.go index 4d5a207e6aa..932e8c58346 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types.go @@ -149,7 +149,7 @@ type OperatorStatus struct { type GenericOperatorConfig struct { metav1.TypeMeta `json:",inline"` - // ServingInfo is the HTTP serving information for the controller's endpoints + // servingInfo is the HTTP serving information for the controller's endpoints ServingInfo configv1.HTTPServingInfo `json:"servingInfo,omitempty"` // leaderElection provides information to elect a leader. Only override this if you have a specific need diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterversion.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterversion.go new file mode 100644 index 00000000000..ec9cfea9f6a --- /dev/null +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterversion.go @@ -0,0 +1,76 @@ +package v1alpha1 + +import ( + operatorv1 "github.com/openshift/api/operator/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterVersionOperator holds cluster-wide information about the Cluster Version Operator. +// +// 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 +// +openshift:file-pattern=cvoRunLevel=0000_00,operatorName=cluster-version-operator,operatorOrdering=01 +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:path=clusterversionoperators,scope=Cluster +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2044 +// +openshift:enable:FeatureGate=ClusterVersionOperatorConfiguration +// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="ClusterVersionOperator is a singleton; the .metadata.name field must be 'cluster'" +type ClusterVersionOperator struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ObjectMeta `json:"metadata"` + + // spec is the specification of the desired behavior of the Cluster Version Operator. + // +required + Spec ClusterVersionOperatorSpec `json:"spec"` + + // status is the most recently observed status of the Cluster Version Operator. + // +optional + Status ClusterVersionOperatorStatus `json:"status"` +} + +// ClusterVersionOperatorSpec is the specification of the desired behavior of the Cluster Version Operator. +type ClusterVersionOperatorSpec struct { + // operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a + // simple way to manage coarse grained logging choices that operators have to interpret for themselves. + // + // Valid values are: "Normal", "Debug", "Trace", "TraceAll". + // Defaults to "Normal". + // +optional + // +kubebuilder:default=Normal + OperatorLogLevel operatorv1.LogLevel `json:"operatorLogLevel,omitempty"` +} + +// ClusterVersionOperatorStatus defines the observed status of the Cluster Version Operator. +type ClusterVersionOperatorStatus struct { + // observedGeneration represents the most recent generation observed by the operator and specifies the version of + // the spec field currently being synced. + // +optional + // +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="observedGeneration must only increase" + ObservedGeneration int64 `json:"observedGeneration,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// ClusterVersionOperatorList is a collection of ClusterVersionOperators. +// +// 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 ClusterVersionOperatorList struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard list's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ListMeta `json:"metadata"` + + // items is a list of ClusterVersionOperators. + // +optional + Items []ClusterVersionOperator `json:"items,omitempty"` +} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go index 2654f570083..3c6f344b1ed 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go @@ -23,22 +23,19 @@ type EtcdBackup struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec EtcdBackupSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. - // +kubebuilder:validation:Optional // +optional Status EtcdBackupStatus `json:"status"` } type EtcdBackupSpec struct { - // PVCName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the + // pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the // etcd backup file would be saved // The PVC itself must always be created in the "openshift-etcd" namespace // If the PVC is left unspecified "" then the platform will choose a reasonable default location to save the backup. // In the future this would be backups saved across the control-plane master nodes. - // +kubebuilder:validation:Optional // +optional // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="pvcName is immutable once set" PVCName string `json:"pvcName"` @@ -56,7 +53,7 @@ type EtcdBackupStatus struct { // backupJob is the reference to the Job that executes the backup. // Optional - // +kubebuilder:validation:Optional + // +optional BackupJob *BackupJobReference `json:"backupJob"` } @@ -67,13 +64,13 @@ type BackupJobReference struct { // this is always expected to be "openshift-etcd" since the user provided PVC // is also required to be in "openshift-etcd" // Required - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:Pattern:=`^openshift-etcd$` Namespace string `json:"namespace"` // name is the name of the Job. // Required - // +kubebuilder:validation:Required + // +required Name string `json:"name"` } diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go index 0830ed7448a..d4f7e17e67c 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go @@ -25,7 +25,6 @@ type ImageContentSourcePolicy struct { metav1.ObjectMeta `json:"metadata,omitempty"` // spec holds user settable values for configuration - // +kubebuilder:validation:Required // +required Spec ImageContentSourcePolicySpec `json:"spec"` } diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_olm.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_olm.go index 748834ca99d..41d160a2054 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_olm.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/types_olm.go @@ -31,7 +31,7 @@ type OLM struct { metav1.ObjectMeta `json:"metadata"` //spec holds user settable values for configuration - // +kubebuilder:validation:Required + // +required Spec OLMSpec `json:"spec"` // status holds observed values from the cluster. They may not be overridden. // +optional @@ -59,6 +59,6 @@ type OLMList struct { // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata"` - // Items contains the items + // items contains the items Items []OLM `json:"items"` } diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go index 08ef2811a5c..f8daa0576b1 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go @@ -26,6 +26,99 @@ func (in *BackupJobReference) DeepCopy() *BackupJobReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVersionOperator) DeepCopyInto(out *ClusterVersionOperator) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperator. +func (in *ClusterVersionOperator) DeepCopy() *ClusterVersionOperator { + if in == nil { + return nil + } + out := new(ClusterVersionOperator) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterVersionOperator) 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 *ClusterVersionOperatorList) DeepCopyInto(out *ClusterVersionOperatorList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]ClusterVersionOperator, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperatorList. +func (in *ClusterVersionOperatorList) DeepCopy() *ClusterVersionOperatorList { + if in == nil { + return nil + } + out := new(ClusterVersionOperatorList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterVersionOperatorList) 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 *ClusterVersionOperatorSpec) DeepCopyInto(out *ClusterVersionOperatorSpec) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperatorSpec. +func (in *ClusterVersionOperatorSpec) DeepCopy() *ClusterVersionOperatorSpec { + if in == nil { + return nil + } + out := new(ClusterVersionOperatorSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterVersionOperatorStatus) DeepCopyInto(out *ClusterVersionOperatorStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperatorStatus. +func (in *ClusterVersionOperatorStatus) DeepCopy() *ClusterVersionOperatorStatus { + if in == nil { + return nil + } + out := new(ClusterVersionOperatorStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DelegatedAuthentication) DeepCopyInto(out *DelegatedAuthentication) { *out = *in diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml index 53d8ff23c32..0d595be801b 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml @@ -1,3 +1,26 @@ +clusterversionoperators.operator.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/2044 + CRDName: clusterversionoperators.operator.openshift.io + Capability: "" + Category: "" + FeatureGates: + - ClusterVersionOperatorConfiguration + FilenameOperatorName: cluster-version-operator + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_00" + GroupName: operator.openshift.io + HasStatus: true + KindName: ClusterVersionOperator + Labels: {} + PluralName: clusterversionoperators + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - ClusterVersionOperatorConfiguration + Version: v1alpha1 + etcdbackups.operator.openshift.io: Annotations: {} ApprovedPRNumber: https://github.com/openshift/api/pull/1482 diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go index c8cce688f4c..9060bf99815 100644 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go @@ -44,7 +44,7 @@ func (GenerationHistory) SwaggerDoc() map[string]string { var map_GenericOperatorConfig = map[string]string{ "": "GenericOperatorConfig provides information to configure an operator\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.", - "servingInfo": "ServingInfo is the HTTP serving information for the controller's endpoints", + "servingInfo": "servingInfo is the HTTP serving information for the controller's endpoints", "leaderElection": "leaderElection provides information to elect a leader. Only override this if you have a specific need", "authentication": "authentication allows configuration of authentication for the endpoints", "authorization": "authorization allows configuration of authentication for the endpoints", @@ -135,6 +135,45 @@ func (VersionAvailability) SwaggerDoc() map[string]string { return map_VersionAvailability } +var map_ClusterVersionOperator = map[string]string{ + "": "ClusterVersionOperator holds cluster-wide information about the Cluster Version Operator.\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.", + "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec is the specification of the desired behavior of the Cluster Version Operator.", + "status": "status is the most recently observed status of the Cluster Version Operator.", +} + +func (ClusterVersionOperator) SwaggerDoc() map[string]string { + return map_ClusterVersionOperator +} + +var map_ClusterVersionOperatorList = map[string]string{ + "": "ClusterVersionOperatorList is a collection of ClusterVersionOperators.\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.", + "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "items": "items is a list of ClusterVersionOperators.", +} + +func (ClusterVersionOperatorList) SwaggerDoc() map[string]string { + return map_ClusterVersionOperatorList +} + +var map_ClusterVersionOperatorSpec = map[string]string{ + "": "ClusterVersionOperatorSpec is the specification of the desired behavior of the Cluster Version Operator.", + "operatorLogLevel": "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", +} + +func (ClusterVersionOperatorSpec) SwaggerDoc() map[string]string { + return map_ClusterVersionOperatorSpec +} + +var map_ClusterVersionOperatorStatus = map[string]string{ + "": "ClusterVersionOperatorStatus defines the observed status of the Cluster Version Operator.", + "observedGeneration": "observedGeneration represents the most recent generation observed by the operator and specifies the version of the spec field currently being synced.", +} + +func (ClusterVersionOperatorStatus) SwaggerDoc() map[string]string { + return map_ClusterVersionOperatorStatus +} + var map_BackupJobReference = map[string]string{ "": "BackupJobReference holds a reference to the batch/v1 Job created to run the etcd backup", "namespace": "namespace is the namespace of the Job. this is always expected to be \"openshift-etcd\" since the user provided PVC is also required to be in \"openshift-etcd\" Required", @@ -164,7 +203,7 @@ func (EtcdBackupList) SwaggerDoc() map[string]string { } var map_EtcdBackupSpec = map[string]string{ - "pvcName": "PVCName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the etcd backup file would be saved The PVC itself must always be created in the \"openshift-etcd\" namespace If the PVC is left unspecified \"\" then the platform will choose a reasonable default location to save the backup. In the future this would be backups saved across the control-plane master nodes.", + "pvcName": "pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the etcd backup file would be saved The PVC itself must always be created in the \"openshift-etcd\" namespace If the PVC is left unspecified \"\" then the platform will choose a reasonable default location to save the backup. In the future this would be backups saved across the control-plane master nodes.", } func (EtcdBackupSpec) SwaggerDoc() map[string]string { @@ -232,7 +271,7 @@ func (OLM) SwaggerDoc() map[string]string { var map_OLMList = map[string]string{ "": "OLMList is a collection of items\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.", "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "Items contains the items", + "items": "items contains the items", } func (OLMList) 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 2a79b9a5a03..d6e1845b401 100644 --- a/vendor/github.com/openshift/api/route/v1/generated.proto +++ b/vendor/github.com/openshift/api/route/v1/generated.proto @@ -74,7 +74,7 @@ message RouteHTTPHeader { // Strict-Transport-Security, Proxy, Cookie, Set-Cookie. // It must be no more than 255 characters in length. // Header name must be unique. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" @@ -85,7 +85,7 @@ message RouteHTTPHeader { optional string name = 1; // action specifies actions to perform on headers, such as setting or deleting headers. - // +kubebuilder:validation:Required + // +required optional RouteHTTPHeaderActionUnion action = 2; } @@ -99,7 +99,7 @@ message RouteHTTPHeaderActionUnion { // Delete allows you to delete HTTP request and response headers. // +unionDiscriminator // +kubebuilder:validation:Enum:=Set;Delete - // +kubebuilder:validation:Required + // +required optional string type = 1; // set defines the HTTP header that should be set: added if it doesn't exist or replaced if it does. @@ -192,13 +192,13 @@ message RouteHTTPHeaders { // RouteIngress holds information about the places where a route is exposed. message RouteIngress { - // Host is the host string under which the route is exposed; this value is required + // host is the host string under which the route is exposed; this value is required optional string host = 1; // Name is a name chosen by the router to identify itself; this value is required optional string routerName = 2; - // Conditions is the state of the route, may be empty. + // conditions is the state of the route, may be empty. // +listType=map // +listMapKey=type repeated RouteIngressCondition conditions = 3; @@ -214,11 +214,11 @@ message RouteIngress { // RouteIngressCondition contains details for the current condition of this route on a particular // router. message RouteIngressCondition { - // Type is the type of the condition. + // type is the type of the condition. // Currently only Admitted or UnservableInFutureVersions. optional string type = 1; - // Status is the status of the condition. + // status is the status of the condition. // Can be True, False, Unknown. optional string status = 2; @@ -267,7 +267,7 @@ message RouteSetHTTPHeader { // + --- // + Note: This limit was selected as most common web servers have a limit of 16384 characters or some lower limit. // + See . - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=16384 optional string value = 1; diff --git a/vendor/github.com/openshift/api/route/v1/types.go b/vendor/github.com/openshift/api/route/v1/types.go index 9416199946c..8fc25087738 100644 --- a/vendor/github.com/openshift/api/route/v1/types.go +++ b/vendor/github.com/openshift/api/route/v1/types.go @@ -251,7 +251,7 @@ type RouteHTTPHeader struct { // Strict-Transport-Security, Proxy, Cookie, Set-Cookie. // It must be no more than 255 characters in length. // Header name must be unique. - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" @@ -262,7 +262,7 @@ type RouteHTTPHeader struct { Name string `json:"name" protobuf:"bytes,1,opt,name=name"` // action specifies actions to perform on headers, such as setting or deleting headers. - // +kubebuilder:validation:Required + // +required Action RouteHTTPHeaderActionUnion `json:"action" protobuf:"bytes,2,opt,name=action"` } @@ -276,7 +276,7 @@ type RouteHTTPHeaderActionUnion struct { // Delete allows you to delete HTTP request and response headers. // +unionDiscriminator // +kubebuilder:validation:Enum:=Set;Delete - // +kubebuilder:validation:Required + // +required Type RouteHTTPHeaderActionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RouteHTTPHeaderActionType"` // set defines the HTTP header that should be set: added if it doesn't exist or replaced if it does. @@ -299,7 +299,7 @@ type RouteSetHTTPHeader struct { // + --- // + Note: This limit was selected as most common web servers have a limit of 16384 characters or some lower limit. // + See . - // +kubebuilder:validation:Required + // +required // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=16384 Value string `json:"value" protobuf:"bytes,1,opt,name=value"` @@ -359,11 +359,11 @@ type RouteStatus struct { // RouteIngress holds information about the places where a route is exposed. type RouteIngress struct { - // Host is the host string under which the route is exposed; this value is required + // host is the host string under which the route is exposed; this value is required Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` // Name is a name chosen by the router to identify itself; this value is required RouterName string `json:"routerName,omitempty" protobuf:"bytes,2,opt,name=routerName"` - // Conditions is the state of the route, may be empty. + // conditions is the state of the route, may be empty. // +listType=map // +listMapKey=type Conditions []RouteIngressCondition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` @@ -389,10 +389,10 @@ const ( // RouteIngressCondition contains details for the current condition of this route on a particular // router. type RouteIngressCondition struct { - // Type is the type of the condition. + // type is the type of the condition. // Currently only Admitted or UnservableInFutureVersions. Type RouteIngressConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RouteIngressConditionType"` - // Status is the status of the condition. + // status is the status of the condition. // Can be True, False, Unknown. Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` // (brief) reason for the condition's last transition, and is usually a machine and human 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 56a4e23e3d5..1d59f103350 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 @@ -72,9 +72,9 @@ func (RouteHTTPHeaders) SwaggerDoc() map[string]string { var map_RouteIngress = map[string]string{ "": "RouteIngress holds information about the places where a route is exposed.", - "host": "Host is the host string under which the route is exposed; this value is required", + "host": "host is the host string under which the route is exposed; this value is required", "routerName": "Name is a name chosen by the router to identify itself; this value is required", - "conditions": "Conditions is the state of the route, may be empty.", + "conditions": "conditions is the state of the route, may be empty.", "wildcardPolicy": "Wildcard policy is the wildcard policy that was allowed where this route is exposed.", "routerCanonicalHostname": "CanonicalHostname is the external host name for the router that can be used as a CNAME for the host requested for this route. This value is optional and may not be set in all cases.", } @@ -85,8 +85,8 @@ 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 Admitted or UnservableInFutureVersions.", - "status": "Status is the status of the condition. Can be True, False, Unknown.", + "type": "type is the type of the condition. Currently only Admitted or UnservableInFutureVersions.", + "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.", "lastTransitionTime": "RFC 3339 date and time when this condition last transitioned", diff --git a/vendor/go.uber.org/mock/AUTHORS b/vendor/go.uber.org/mock/AUTHORS new file mode 100644 index 00000000000..660b8ccc8ae --- /dev/null +++ b/vendor/go.uber.org/mock/AUTHORS @@ -0,0 +1,12 @@ +# This is the official list of GoMock authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Alex Reece +Google Inc. diff --git a/vendor/go.uber.org/mock/LICENSE b/vendor/go.uber.org/mock/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/vendor/go.uber.org/mock/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/vendor/go.uber.org/mock/gomock/call.go b/vendor/go.uber.org/mock/gomock/call.go new file mode 100644 index 00000000000..e1fe222afc8 --- /dev/null +++ b/vendor/go.uber.org/mock/gomock/call.go @@ -0,0 +1,506 @@ +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gomock + +import ( + "fmt" + "reflect" + "strconv" + "strings" +) + +// Call represents an expected call to a mock. +type Call struct { + t TestHelper // for triggering test failures on invalid call setup + + receiver any // the receiver of the method call + method string // the name of the method + methodType reflect.Type // the type of the method + args []Matcher // the args + origin string // file and line number of call setup + + preReqs []*Call // prerequisite calls + + // Expectations + minCalls, maxCalls int + + numCalls int // actual number made + + // actions are called when this Call is called. Each action gets the args and + // can set the return values by returning a non-nil slice. Actions run in the + // order they are created. + actions []func([]any) []any +} + +// newCall creates a *Call. It requires the method type in order to support +// unexported methods. +func newCall(t TestHelper, receiver any, method string, methodType reflect.Type, args ...any) *Call { + t.Helper() + + // TODO: check arity, types. + mArgs := make([]Matcher, len(args)) + for i, arg := range args { + if m, ok := arg.(Matcher); ok { + mArgs[i] = m + } else if arg == nil { + // Handle nil specially so that passing a nil interface value + // will match the typed nils of concrete args. + mArgs[i] = Nil() + } else { + mArgs[i] = Eq(arg) + } + } + + // callerInfo's skip should be updated if the number of calls between the user's test + // and this line changes, i.e. this code is wrapped in another anonymous function. + // 0 is us, 1 is RecordCallWithMethodType(), 2 is the generated recorder, and 3 is the user's test. + origin := callerInfo(3) + actions := []func([]any) []any{func([]any) []any { + // Synthesize the zero value for each of the return args' types. + rets := make([]any, methodType.NumOut()) + for i := 0; i < methodType.NumOut(); i++ { + rets[i] = reflect.Zero(methodType.Out(i)).Interface() + } + return rets + }} + return &Call{ + t: t, receiver: receiver, method: method, methodType: methodType, + args: mArgs, origin: origin, minCalls: 1, maxCalls: 1, actions: actions, + } +} + +// AnyTimes allows the expectation to be called 0 or more times +func (c *Call) AnyTimes() *Call { + c.minCalls, c.maxCalls = 0, 1e8 // close enough to infinity + return c +} + +// MinTimes requires the call to occur at least n times. If AnyTimes or MaxTimes have not been called or if MaxTimes +// was previously called with 1, MinTimes also sets the maximum number of calls to infinity. +func (c *Call) MinTimes(n int) *Call { + c.minCalls = n + if c.maxCalls == 1 { + c.maxCalls = 1e8 + } + return c +} + +// MaxTimes limits the number of calls to n times. If AnyTimes or MinTimes have not been called or if MinTimes was +// previously called with 1, MaxTimes also sets the minimum number of calls to 0. +func (c *Call) MaxTimes(n int) *Call { + c.maxCalls = n + if c.minCalls == 1 { + c.minCalls = 0 + } + return c +} + +// DoAndReturn declares the action to run when the call is matched. +// The return values from this function are returned by the mocked function. +// It takes an any argument to support n-arity functions. +// The anonymous function must match the function signature mocked method. +func (c *Call) DoAndReturn(f any) *Call { + // TODO: Check arity and types here, rather than dying badly elsewhere. + v := reflect.ValueOf(f) + + c.addAction(func(args []any) []any { + c.t.Helper() + ft := v.Type() + if c.methodType.NumIn() != ft.NumIn() { + if ft.IsVariadic() { + c.t.Fatalf("wrong number of arguments in DoAndReturn func for %T.%v The function signature must match the mocked method, a variadic function cannot be used.", + c.receiver, c.method) + } else { + c.t.Fatalf("wrong number of arguments in DoAndReturn func for %T.%v: got %d, want %d [%s]", + c.receiver, c.method, ft.NumIn(), c.methodType.NumIn(), c.origin) + } + return nil + } + vArgs := make([]reflect.Value, len(args)) + for i := 0; i < len(args); i++ { + if args[i] != nil { + vArgs[i] = reflect.ValueOf(args[i]) + } else { + // Use the zero value for the arg. + vArgs[i] = reflect.Zero(ft.In(i)) + } + } + vRets := v.Call(vArgs) + rets := make([]any, len(vRets)) + for i, ret := range vRets { + rets[i] = ret.Interface() + } + return rets + }) + return c +} + +// Do declares the action to run when the call is matched. The function's +// return values are ignored to retain backward compatibility. To use the +// return values call DoAndReturn. +// It takes an any argument to support n-arity functions. +// The anonymous function must match the function signature mocked method. +func (c *Call) Do(f any) *Call { + // TODO: Check arity and types here, rather than dying badly elsewhere. + v := reflect.ValueOf(f) + + c.addAction(func(args []any) []any { + c.t.Helper() + ft := v.Type() + if c.methodType.NumIn() != ft.NumIn() { + if ft.IsVariadic() { + c.t.Fatalf("wrong number of arguments in Do func for %T.%v The function signature must match the mocked method, a variadic function cannot be used.", + c.receiver, c.method) + } else { + c.t.Fatalf("wrong number of arguments in Do func for %T.%v: got %d, want %d [%s]", + c.receiver, c.method, ft.NumIn(), c.methodType.NumIn(), c.origin) + } + return nil + } + vArgs := make([]reflect.Value, len(args)) + for i := 0; i < len(args); i++ { + if args[i] != nil { + vArgs[i] = reflect.ValueOf(args[i]) + } else { + // Use the zero value for the arg. + vArgs[i] = reflect.Zero(ft.In(i)) + } + } + v.Call(vArgs) + return nil + }) + return c +} + +// Return declares the values to be returned by the mocked function call. +func (c *Call) Return(rets ...any) *Call { + c.t.Helper() + + mt := c.methodType + if len(rets) != mt.NumOut() { + c.t.Fatalf("wrong number of arguments to Return for %T.%v: got %d, want %d [%s]", + c.receiver, c.method, len(rets), mt.NumOut(), c.origin) + } + for i, ret := range rets { + if got, want := reflect.TypeOf(ret), mt.Out(i); got == want { + // Identical types; nothing to do. + } else if got == nil { + // Nil needs special handling. + switch want.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + // ok + default: + c.t.Fatalf("argument %d to Return for %T.%v is nil, but %v is not nillable [%s]", + i, c.receiver, c.method, want, c.origin) + } + } else if got.AssignableTo(want) { + // Assignable type relation. Make the assignment now so that the generated code + // can return the values with a type assertion. + v := reflect.New(want).Elem() + v.Set(reflect.ValueOf(ret)) + rets[i] = v.Interface() + } else { + c.t.Fatalf("wrong type of argument %d to Return for %T.%v: %v is not assignable to %v [%s]", + i, c.receiver, c.method, got, want, c.origin) + } + } + + c.addAction(func([]any) []any { + return rets + }) + + return c +} + +// Times declares the exact number of times a function call is expected to be executed. +func (c *Call) Times(n int) *Call { + c.minCalls, c.maxCalls = n, n + return c +} + +// SetArg declares an action that will set the nth argument's value, +// indirected through a pointer. Or, in the case of a slice and map, SetArg +// will copy value's elements/key-value pairs into the nth argument. +func (c *Call) SetArg(n int, value any) *Call { + c.t.Helper() + + mt := c.methodType + // TODO: This will break on variadic methods. + // We will need to check those at invocation time. + if n < 0 || n >= mt.NumIn() { + c.t.Fatalf("SetArg(%d, ...) called for a method with %d args [%s]", + n, mt.NumIn(), c.origin) + } + // Permit setting argument through an interface. + // In the interface case, we don't (nay, can't) check the type here. + at := mt.In(n) + switch at.Kind() { + case reflect.Ptr: + dt := at.Elem() + if vt := reflect.TypeOf(value); !vt.AssignableTo(dt) { + c.t.Fatalf("SetArg(%d, ...) argument is a %v, not assignable to %v [%s]", + n, vt, dt, c.origin) + } + case reflect.Interface, reflect.Slice, reflect.Map: + // nothing to do + default: + c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice non-map type %v [%s]", + n, at, c.origin) + } + + c.addAction(func(args []any) []any { + v := reflect.ValueOf(value) + switch reflect.TypeOf(args[n]).Kind() { + case reflect.Slice: + setSlice(args[n], v) + case reflect.Map: + setMap(args[n], v) + default: + reflect.ValueOf(args[n]).Elem().Set(v) + } + return nil + }) + return c +} + +// isPreReq returns true if other is a direct or indirect prerequisite to c. +func (c *Call) isPreReq(other *Call) bool { + for _, preReq := range c.preReqs { + if other == preReq || preReq.isPreReq(other) { + return true + } + } + return false +} + +// After declares that the call may only match after preReq has been exhausted. +func (c *Call) After(preReq *Call) *Call { + c.t.Helper() + + if c == preReq { + c.t.Fatalf("A call isn't allowed to be its own prerequisite") + } + if preReq.isPreReq(c) { + c.t.Fatalf("Loop in call order: %v is a prerequisite to %v (possibly indirectly).", c, preReq) + } + + c.preReqs = append(c.preReqs, preReq) + return c +} + +// Returns true if the minimum number of calls have been made. +func (c *Call) satisfied() bool { + return c.numCalls >= c.minCalls +} + +// Returns true if the maximum number of calls have been made. +func (c *Call) exhausted() bool { + return c.numCalls >= c.maxCalls +} + +func (c *Call) String() string { + args := make([]string, len(c.args)) + for i, arg := range c.args { + args[i] = arg.String() + } + arguments := strings.Join(args, ", ") + return fmt.Sprintf("%T.%v(%s) %s", c.receiver, c.method, arguments, c.origin) +} + +// Tests if the given call matches the expected call. +// If yes, returns nil. If no, returns error with message explaining why it does not match. +func (c *Call) matches(args []any) error { + if !c.methodType.IsVariadic() { + if len(args) != len(c.args) { + return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: %d", + c.origin, len(args), len(c.args)) + } + + for i, m := range c.args { + if !m.Matches(args[i]) { + return fmt.Errorf( + "expected call at %s doesn't match the argument at index %d.\nGot: %v\nWant: %v", + c.origin, i, formatGottenArg(m, args[i]), m, + ) + } + } + } else { + if len(c.args) < c.methodType.NumIn()-1 { + return fmt.Errorf("expected call at %s has the wrong number of matchers. Got: %d, want: %d", + c.origin, len(c.args), c.methodType.NumIn()-1) + } + if len(c.args) != c.methodType.NumIn() && len(args) != len(c.args) { + return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: %d", + c.origin, len(args), len(c.args)) + } + if len(args) < len(c.args)-1 { + return fmt.Errorf("expected call at %s has the wrong number of arguments. Got: %d, want: greater than or equal to %d", + c.origin, len(args), len(c.args)-1) + } + + for i, m := range c.args { + if i < c.methodType.NumIn()-1 { + // Non-variadic args + if !m.Matches(args[i]) { + return fmt.Errorf("expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", + c.origin, strconv.Itoa(i), formatGottenArg(m, args[i]), m) + } + continue + } + // The last arg has a possibility of a variadic argument, so let it branch + + // sample: Foo(a int, b int, c ...int) + if i < len(c.args) && i < len(args) { + if m.Matches(args[i]) { + // Got Foo(a, b, c) want Foo(matcherA, matcherB, gomock.Any()) + // Got Foo(a, b, c) want Foo(matcherA, matcherB, someSliceMatcher) + // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC) + // Got Foo(a, b) want Foo(matcherA, matcherB) + // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD) + continue + } + } + + // The number of actual args don't match the number of matchers, + // or the last matcher is a slice and the last arg is not. + // If this function still matches it is because the last matcher + // matches all the remaining arguments or the lack of any. + // Convert the remaining arguments, if any, into a slice of the + // expected type. + vArgsType := c.methodType.In(c.methodType.NumIn() - 1) + vArgs := reflect.MakeSlice(vArgsType, 0, len(args)-i) + for _, arg := range args[i:] { + vArgs = reflect.Append(vArgs, reflect.ValueOf(arg)) + } + if m.Matches(vArgs.Interface()) { + // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, gomock.Any()) + // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, someSliceMatcher) + // Got Foo(a, b) want Foo(matcherA, matcherB, gomock.Any()) + // Got Foo(a, b) want Foo(matcherA, matcherB, someEmptySliceMatcher) + break + } + // Wrong number of matchers or not match. Fail. + // Got Foo(a, b) want Foo(matcherA, matcherB, matcherC, matcherD) + // Got Foo(a, b, c) want Foo(matcherA, matcherB, matcherC, matcherD) + // Got Foo(a, b, c, d) want Foo(matcherA, matcherB, matcherC, matcherD, matcherE) + // Got Foo(a, b, c, d, e) want Foo(matcherA, matcherB, matcherC, matcherD) + // Got Foo(a, b, c) want Foo(matcherA, matcherB) + + return fmt.Errorf("expected call at %s doesn't match the argument at index %s.\nGot: %v\nWant: %v", + c.origin, strconv.Itoa(i), formatGottenArg(m, args[i:]), c.args[i]) + } + } + + // Check that all prerequisite calls have been satisfied. + for _, preReqCall := range c.preReqs { + if !preReqCall.satisfied() { + return fmt.Errorf("expected call at %s doesn't have a prerequisite call satisfied:\n%v\nshould be called before:\n%v", + c.origin, preReqCall, c) + } + } + + // Check that the call is not exhausted. + if c.exhausted() { + return fmt.Errorf("expected call at %s has already been called the max number of times", c.origin) + } + + return nil +} + +// dropPrereqs tells the expected Call to not re-check prerequisite calls any +// longer, and to return its current set. +func (c *Call) dropPrereqs() (preReqs []*Call) { + preReqs = c.preReqs + c.preReqs = nil + return +} + +func (c *Call) call() []func([]any) []any { + c.numCalls++ + return c.actions +} + +// InOrder declares that the given calls should occur in order. +// It panics if the type of any of the arguments isn't *Call or a generated +// mock with an embedded *Call. +func InOrder(args ...any) { + calls := make([]*Call, 0, len(args)) + for i := 0; i < len(args); i++ { + if call := getCall(args[i]); call != nil { + calls = append(calls, call) + continue + } + panic(fmt.Sprintf( + "invalid argument at position %d of type %T, InOrder expects *gomock.Call or generated mock types with an embedded *gomock.Call", + i, + args[i], + )) + } + for i := 1; i < len(calls); i++ { + calls[i].After(calls[i-1]) + } +} + +// getCall checks if the parameter is a *Call or a generated struct +// that wraps a *Call and returns the *Call pointer - if neither, it returns nil. +func getCall(arg any) *Call { + if call, ok := arg.(*Call); ok { + return call + } + t := reflect.ValueOf(arg) + if t.Kind() != reflect.Ptr && t.Kind() != reflect.Interface { + return nil + } + t = t.Elem() + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if !f.CanInterface() { + continue + } + if call, ok := f.Interface().(*Call); ok { + return call + } + } + return nil +} + +func setSlice(arg any, v reflect.Value) { + va := reflect.ValueOf(arg) + for i := 0; i < v.Len(); i++ { + va.Index(i).Set(v.Index(i)) + } +} + +func setMap(arg any, v reflect.Value) { + va := reflect.ValueOf(arg) + for _, e := range va.MapKeys() { + va.SetMapIndex(e, reflect.Value{}) + } + for _, e := range v.MapKeys() { + va.SetMapIndex(e, v.MapIndex(e)) + } +} + +func (c *Call) addAction(action func([]any) []any) { + c.actions = append(c.actions, action) +} + +func formatGottenArg(m Matcher, arg any) string { + got := fmt.Sprintf("%v (%T)", arg, arg) + if gs, ok := m.(GotFormatter); ok { + got = gs.Got(arg) + } + return got +} diff --git a/vendor/go.uber.org/mock/gomock/callset.go b/vendor/go.uber.org/mock/gomock/callset.go new file mode 100644 index 00000000000..f5cc592d6f4 --- /dev/null +++ b/vendor/go.uber.org/mock/gomock/callset.go @@ -0,0 +1,164 @@ +// Copyright 2011 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gomock + +import ( + "bytes" + "errors" + "fmt" + "sync" +) + +// callSet represents a set of expected calls, indexed by receiver and method +// name. +type callSet struct { + // Calls that are still expected. + expected map[callSetKey][]*Call + expectedMu *sync.Mutex + // Calls that have been exhausted. + exhausted map[callSetKey][]*Call + // when set to true, existing call expectations are overridden when new call expectations are made + allowOverride bool +} + +// callSetKey is the key in the maps in callSet +type callSetKey struct { + receiver any + fname string +} + +func newCallSet() *callSet { + return &callSet{ + expected: make(map[callSetKey][]*Call), + expectedMu: &sync.Mutex{}, + exhausted: make(map[callSetKey][]*Call), + } +} + +func newOverridableCallSet() *callSet { + return &callSet{ + expected: make(map[callSetKey][]*Call), + expectedMu: &sync.Mutex{}, + exhausted: make(map[callSetKey][]*Call), + allowOverride: true, + } +} + +// Add adds a new expected call. +func (cs callSet) Add(call *Call) { + key := callSetKey{call.receiver, call.method} + + cs.expectedMu.Lock() + defer cs.expectedMu.Unlock() + + m := cs.expected + if call.exhausted() { + m = cs.exhausted + } + if cs.allowOverride { + m[key] = make([]*Call, 0) + } + + m[key] = append(m[key], call) +} + +// Remove removes an expected call. +func (cs callSet) Remove(call *Call) { + key := callSetKey{call.receiver, call.method} + + cs.expectedMu.Lock() + defer cs.expectedMu.Unlock() + + calls := cs.expected[key] + for i, c := range calls { + if c == call { + // maintain order for remaining calls + cs.expected[key] = append(calls[:i], calls[i+1:]...) + cs.exhausted[key] = append(cs.exhausted[key], call) + break + } + } +} + +// FindMatch searches for a matching call. Returns error with explanation message if no call matched. +func (cs callSet) FindMatch(receiver any, method string, args []any) (*Call, error) { + key := callSetKey{receiver, method} + + cs.expectedMu.Lock() + defer cs.expectedMu.Unlock() + + // Search through the expected calls. + expected := cs.expected[key] + var callsErrors bytes.Buffer + for _, call := range expected { + err := call.matches(args) + if err != nil { + _, _ = fmt.Fprintf(&callsErrors, "\n%v", err) + } else { + return call, nil + } + } + + // If we haven't found a match then search through the exhausted calls so we + // get useful error messages. + exhausted := cs.exhausted[key] + for _, call := range exhausted { + if err := call.matches(args); err != nil { + _, _ = fmt.Fprintf(&callsErrors, "\n%v", err) + continue + } + _, _ = fmt.Fprintf( + &callsErrors, "all expected calls for method %q have been exhausted", method, + ) + } + + if len(expected)+len(exhausted) == 0 { + _, _ = fmt.Fprintf(&callsErrors, "there are no expected calls of the method %q for that receiver", method) + } + + return nil, errors.New(callsErrors.String()) +} + +// Failures returns the calls that are not satisfied. +func (cs callSet) Failures() []*Call { + cs.expectedMu.Lock() + defer cs.expectedMu.Unlock() + + failures := make([]*Call, 0, len(cs.expected)) + for _, calls := range cs.expected { + for _, call := range calls { + if !call.satisfied() { + failures = append(failures, call) + } + } + } + return failures +} + +// Satisfied returns true in case all expected calls in this callSet are satisfied. +func (cs callSet) Satisfied() bool { + cs.expectedMu.Lock() + defer cs.expectedMu.Unlock() + + for _, calls := range cs.expected { + for _, call := range calls { + if !call.satisfied() { + return false + } + } + } + + return true +} diff --git a/vendor/go.uber.org/mock/gomock/controller.go b/vendor/go.uber.org/mock/gomock/controller.go new file mode 100644 index 00000000000..674c3298c40 --- /dev/null +++ b/vendor/go.uber.org/mock/gomock/controller.go @@ -0,0 +1,326 @@ +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gomock + +import ( + "context" + "fmt" + "reflect" + "runtime" + "sync" +) + +// A TestReporter is something that can be used to report test failures. It +// is satisfied by the standard library's *testing.T. +type TestReporter interface { + Errorf(format string, args ...any) + Fatalf(format string, args ...any) +} + +// TestHelper is a TestReporter that has the Helper method. It is satisfied +// by the standard library's *testing.T. +type TestHelper interface { + TestReporter + Helper() +} + +// cleanuper is used to check if TestHelper also has the `Cleanup` method. A +// common pattern is to pass in a `*testing.T` to +// `NewController(t TestReporter)`. In Go 1.14+, `*testing.T` has a cleanup +// method. This can be utilized to call `Finish()` so the caller of this library +// does not have to. +type cleanuper interface { + Cleanup(func()) +} + +// A Controller represents the top-level control of a mock ecosystem. It +// defines the scope and lifetime of mock objects, as well as their +// expectations. It is safe to call Controller's methods from multiple +// goroutines. Each test should create a new Controller. +// +// func TestFoo(t *testing.T) { +// ctrl := gomock.NewController(t) +// // .. +// } +// +// func TestBar(t *testing.T) { +// t.Run("Sub-Test-1", st) { +// ctrl := gomock.NewController(st) +// // .. +// }) +// t.Run("Sub-Test-2", st) { +// ctrl := gomock.NewController(st) +// // .. +// }) +// }) +type Controller struct { + // T should only be called within a generated mock. It is not intended to + // be used in user code and may be changed in future versions. T is the + // TestReporter passed in when creating the Controller via NewController. + // If the TestReporter does not implement a TestHelper it will be wrapped + // with a nopTestHelper. + T TestHelper + mu sync.Mutex + expectedCalls *callSet + finished bool +} + +// NewController returns a new Controller. It is the preferred way to create a Controller. +// +// Passing [*testing.T] registers cleanup function to automatically call [Controller.Finish] +// when the test and all its subtests complete. +func NewController(t TestReporter, opts ...ControllerOption) *Controller { + h, ok := t.(TestHelper) + if !ok { + h = &nopTestHelper{t} + } + ctrl := &Controller{ + T: h, + expectedCalls: newCallSet(), + } + for _, opt := range opts { + opt.apply(ctrl) + } + if c, ok := isCleanuper(ctrl.T); ok { + c.Cleanup(func() { + ctrl.T.Helper() + ctrl.finish(true, nil) + }) + } + + return ctrl +} + +// ControllerOption configures how a Controller should behave. +type ControllerOption interface { + apply(*Controller) +} + +type overridableExpectationsOption struct{} + +// WithOverridableExpectations allows for overridable call expectations +// i.e., subsequent call expectations override existing call expectations +func WithOverridableExpectations() overridableExpectationsOption { + return overridableExpectationsOption{} +} + +func (o overridableExpectationsOption) apply(ctrl *Controller) { + ctrl.expectedCalls = newOverridableCallSet() +} + +type cancelReporter struct { + t TestHelper + cancel func() +} + +func (r *cancelReporter) Errorf(format string, args ...any) { + r.t.Errorf(format, args...) +} + +func (r *cancelReporter) Fatalf(format string, args ...any) { + defer r.cancel() + r.t.Fatalf(format, args...) +} + +func (r *cancelReporter) Helper() { + r.t.Helper() +} + +// WithContext returns a new Controller and a Context, which is cancelled on any +// fatal failure. +func WithContext(ctx context.Context, t TestReporter) (*Controller, context.Context) { + h, ok := t.(TestHelper) + if !ok { + h = &nopTestHelper{t: t} + } + + ctx, cancel := context.WithCancel(ctx) + return NewController(&cancelReporter{t: h, cancel: cancel}), ctx +} + +type nopTestHelper struct { + t TestReporter +} + +func (h *nopTestHelper) Errorf(format string, args ...any) { + h.t.Errorf(format, args...) +} + +func (h *nopTestHelper) Fatalf(format string, args ...any) { + h.t.Fatalf(format, args...) +} + +func (h nopTestHelper) Helper() {} + +// RecordCall is called by a mock. It should not be called by user code. +func (ctrl *Controller) RecordCall(receiver any, method string, args ...any) *Call { + ctrl.T.Helper() + + recv := reflect.ValueOf(receiver) + for i := 0; i < recv.Type().NumMethod(); i++ { + if recv.Type().Method(i).Name == method { + return ctrl.RecordCallWithMethodType(receiver, method, recv.Method(i).Type(), args...) + } + } + ctrl.T.Fatalf("gomock: failed finding method %s on %T", method, receiver) + panic("unreachable") +} + +// RecordCallWithMethodType is called by a mock. It should not be called by user code. +func (ctrl *Controller) RecordCallWithMethodType(receiver any, method string, methodType reflect.Type, args ...any) *Call { + ctrl.T.Helper() + + call := newCall(ctrl.T, receiver, method, methodType, args...) + + ctrl.mu.Lock() + defer ctrl.mu.Unlock() + ctrl.expectedCalls.Add(call) + + return call +} + +// Call is called by a mock. It should not be called by user code. +func (ctrl *Controller) Call(receiver any, method string, args ...any) []any { + ctrl.T.Helper() + + // Nest this code so we can use defer to make sure the lock is released. + actions := func() []func([]any) []any { + ctrl.T.Helper() + ctrl.mu.Lock() + defer ctrl.mu.Unlock() + + expected, err := ctrl.expectedCalls.FindMatch(receiver, method, args) + if err != nil { + // callerInfo's skip should be updated if the number of calls between the user's test + // and this line changes, i.e. this code is wrapped in another anonymous function. + // 0 is us, 1 is controller.Call(), 2 is the generated mock, and 3 is the user's test. + origin := callerInfo(3) + stringArgs := make([]string, len(args)) + for i, arg := range args { + stringArgs[i] = getString(arg) + } + ctrl.T.Fatalf("Unexpected call to %T.%v(%v) at %s because: %s", receiver, method, stringArgs, origin, err) + } + + // Two things happen here: + // * the matching call no longer needs to check prerequisite calls, + // * and the prerequisite calls are no longer expected, so remove them. + preReqCalls := expected.dropPrereqs() + for _, preReqCall := range preReqCalls { + ctrl.expectedCalls.Remove(preReqCall) + } + + actions := expected.call() + if expected.exhausted() { + ctrl.expectedCalls.Remove(expected) + } + return actions + }() + + var rets []any + for _, action := range actions { + if r := action(args); r != nil { + rets = r + } + } + + return rets +} + +// Finish checks to see if all the methods that were expected to be called were called. +// It is not idempotent and therefore can only be invoked once. +// +// Note: If you pass a *testing.T into [NewController], you no longer +// need to call ctrl.Finish() in your test methods. +func (ctrl *Controller) Finish() { + // If we're currently panicking, probably because this is a deferred call. + // This must be recovered in the deferred function. + err := recover() + ctrl.finish(false, err) +} + +// Satisfied returns whether all expected calls bound to this Controller have been satisfied. +// Calling Finish is then guaranteed to not fail due to missing calls. +func (ctrl *Controller) Satisfied() bool { + ctrl.mu.Lock() + defer ctrl.mu.Unlock() + return ctrl.expectedCalls.Satisfied() +} + +func (ctrl *Controller) finish(cleanup bool, panicErr any) { + ctrl.T.Helper() + + ctrl.mu.Lock() + defer ctrl.mu.Unlock() + + if ctrl.finished { + if _, ok := isCleanuper(ctrl.T); !ok { + ctrl.T.Fatalf("Controller.Finish was called more than once. It has to be called exactly once.") + } + return + } + ctrl.finished = true + + // Short-circuit, pass through the panic. + if panicErr != nil { + panic(panicErr) + } + + // Check that all remaining expected calls are satisfied. + failures := ctrl.expectedCalls.Failures() + for _, call := range failures { + ctrl.T.Errorf("missing call(s) to %v", call) + } + if len(failures) != 0 { + if !cleanup { + ctrl.T.Fatalf("aborting test due to missing call(s)") + return + } + ctrl.T.Errorf("aborting test due to missing call(s)") + } +} + +// callerInfo returns the file:line of the call site. skip is the number +// of stack frames to skip when reporting. 0 is callerInfo's call site. +func callerInfo(skip int) string { + if _, file, line, ok := runtime.Caller(skip + 1); ok { + return fmt.Sprintf("%s:%d", file, line) + } + return "unknown file" +} + +// isCleanuper checks it if t's base TestReporter has a Cleanup method. +func isCleanuper(t TestReporter) (cleanuper, bool) { + tr := unwrapTestReporter(t) + c, ok := tr.(cleanuper) + return c, ok +} + +// unwrapTestReporter unwraps TestReporter to the base implementation. +func unwrapTestReporter(t TestReporter) TestReporter { + tr := t + switch nt := t.(type) { + case *cancelReporter: + tr = nt.t + if h, check := tr.(*nopTestHelper); check { + tr = h.t + } + case *nopTestHelper: + tr = nt.t + default: + // not wrapped + } + return tr +} diff --git a/vendor/go.uber.org/mock/gomock/doc.go b/vendor/go.uber.org/mock/gomock/doc.go new file mode 100644 index 00000000000..696dda38820 --- /dev/null +++ b/vendor/go.uber.org/mock/gomock/doc.go @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// 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 gomock is a mock framework for Go. +// +// Standard usage: +// +// (1) Define an interface that you wish to mock. +// type MyInterface interface { +// SomeMethod(x int64, y string) +// } +// (2) Use mockgen to generate a mock from the interface. +// (3) Use the mock in a test: +// func TestMyThing(t *testing.T) { +// mockCtrl := gomock.NewController(t) +// mockObj := something.NewMockMyInterface(mockCtrl) +// mockObj.EXPECT().SomeMethod(4, "blah") +// // pass mockObj to a real object and play with it. +// } +// +// By default, expected calls are not enforced to run in any particular order. +// Call order dependency can be enforced by use of InOrder and/or Call.After. +// Call.After can create more varied call order dependencies, but InOrder is +// often more convenient. +// +// The following examples create equivalent call order dependencies. +// +// Example of using Call.After to chain expected call order: +// +// firstCall := mockObj.EXPECT().SomeMethod(1, "first") +// secondCall := mockObj.EXPECT().SomeMethod(2, "second").After(firstCall) +// mockObj.EXPECT().SomeMethod(3, "third").After(secondCall) +// +// Example of using InOrder to declare expected call order: +// +// gomock.InOrder( +// mockObj.EXPECT().SomeMethod(1, "first"), +// mockObj.EXPECT().SomeMethod(2, "second"), +// mockObj.EXPECT().SomeMethod(3, "third"), +// ) +// +// The standard TestReporter most users will pass to `NewController` is a +// `*testing.T` from the context of the test. Note that this will use the +// standard `t.Error` and `t.Fatal` methods to report what happened in the test. +// In some cases this can leave your testing package in a weird state if global +// state is used since `t.Fatal` is like calling panic in the middle of a +// function. In these cases it is recommended that you pass in your own +// `TestReporter`. +package gomock diff --git a/vendor/go.uber.org/mock/gomock/matchers.go b/vendor/go.uber.org/mock/gomock/matchers.go new file mode 100644 index 00000000000..d52495f39e5 --- /dev/null +++ b/vendor/go.uber.org/mock/gomock/matchers.go @@ -0,0 +1,447 @@ +// Copyright 2010 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package gomock + +import ( + "fmt" + "reflect" + "regexp" + "strings" +) + +// A Matcher is a representation of a class of values. +// It is used to represent the valid or expected arguments to a mocked method. +type Matcher interface { + // Matches returns whether x is a match. + Matches(x any) bool + + // String describes what the matcher matches. + String() string +} + +// WantFormatter modifies the given Matcher's String() method to the given +// Stringer. This allows for control on how the "Want" is formatted when +// printing . +func WantFormatter(s fmt.Stringer, m Matcher) Matcher { + type matcher interface { + Matches(x any) bool + } + + return struct { + matcher + fmt.Stringer + }{ + matcher: m, + Stringer: s, + } +} + +// StringerFunc type is an adapter to allow the use of ordinary functions as +// a Stringer. If f is a function with the appropriate signature, +// StringerFunc(f) is a Stringer that calls f. +type StringerFunc func() string + +// String implements fmt.Stringer. +func (f StringerFunc) String() string { + return f() +} + +// GotFormatter is used to better print failure messages. If a matcher +// implements GotFormatter, it will use the result from Got when printing +// the failure message. +type GotFormatter interface { + // Got is invoked with the received value. The result is used when + // printing the failure message. + Got(got any) string +} + +// GotFormatterFunc type is an adapter to allow the use of ordinary +// functions as a GotFormatter. If f is a function with the appropriate +// signature, GotFormatterFunc(f) is a GotFormatter that calls f. +type GotFormatterFunc func(got any) string + +// Got implements GotFormatter. +func (f GotFormatterFunc) Got(got any) string { + return f(got) +} + +// GotFormatterAdapter attaches a GotFormatter to a Matcher. +func GotFormatterAdapter(s GotFormatter, m Matcher) Matcher { + return struct { + GotFormatter + Matcher + }{ + GotFormatter: s, + Matcher: m, + } +} + +type anyMatcher struct{} + +func (anyMatcher) Matches(any) bool { + return true +} + +func (anyMatcher) String() string { + return "is anything" +} + +type condMatcher[T any] struct { + fn func(x T) bool +} + +func (c condMatcher[T]) Matches(x any) bool { + typed, ok := x.(T) + if !ok { + return false + } + return c.fn(typed) +} + +func (c condMatcher[T]) String() string { + return "adheres to a custom condition" +} + +type eqMatcher struct { + x any +} + +func (e eqMatcher) Matches(x any) bool { + // In case, some value is nil + if e.x == nil || x == nil { + return reflect.DeepEqual(e.x, x) + } + + // Check if types assignable and convert them to common type + x1Val := reflect.ValueOf(e.x) + x2Val := reflect.ValueOf(x) + + if x1Val.Type().AssignableTo(x2Val.Type()) { + x1ValConverted := x1Val.Convert(x2Val.Type()) + return reflect.DeepEqual(x1ValConverted.Interface(), x2Val.Interface()) + } + + return false +} + +func (e eqMatcher) String() string { + return fmt.Sprintf("is equal to %s (%T)", getString(e.x), e.x) +} + +type nilMatcher struct{} + +func (nilMatcher) Matches(x any) bool { + if x == nil { + return true + } + + v := reflect.ValueOf(x) + switch v.Kind() { + case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, + reflect.Ptr, reflect.Slice: + return v.IsNil() + } + + return false +} + +func (nilMatcher) String() string { + return "is nil" +} + +type notMatcher struct { + m Matcher +} + +func (n notMatcher) Matches(x any) bool { + return !n.m.Matches(x) +} + +func (n notMatcher) String() string { + return "not(" + n.m.String() + ")" +} + +type regexMatcher struct { + regex *regexp.Regexp +} + +func (m regexMatcher) Matches(x any) bool { + switch t := x.(type) { + case string: + return m.regex.MatchString(t) + case []byte: + return m.regex.Match(t) + default: + return false + } +} + +func (m regexMatcher) String() string { + return "matches regex " + m.regex.String() +} + +type assignableToTypeOfMatcher struct { + targetType reflect.Type +} + +func (m assignableToTypeOfMatcher) Matches(x any) bool { + return reflect.TypeOf(x).AssignableTo(m.targetType) +} + +func (m assignableToTypeOfMatcher) String() string { + return "is assignable to " + m.targetType.Name() +} + +type anyOfMatcher struct { + matchers []Matcher +} + +func (am anyOfMatcher) Matches(x any) bool { + for _, m := range am.matchers { + if m.Matches(x) { + return true + } + } + return false +} + +func (am anyOfMatcher) String() string { + ss := make([]string, 0, len(am.matchers)) + for _, matcher := range am.matchers { + ss = append(ss, matcher.String()) + } + return strings.Join(ss, " | ") +} + +type allMatcher struct { + matchers []Matcher +} + +func (am allMatcher) Matches(x any) bool { + for _, m := range am.matchers { + if !m.Matches(x) { + return false + } + } + return true +} + +func (am allMatcher) String() string { + ss := make([]string, 0, len(am.matchers)) + for _, matcher := range am.matchers { + ss = append(ss, matcher.String()) + } + return strings.Join(ss, "; ") +} + +type lenMatcher struct { + i int +} + +func (m lenMatcher) Matches(x any) bool { + v := reflect.ValueOf(x) + switch v.Kind() { + case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == m.i + default: + return false + } +} + +func (m lenMatcher) String() string { + return fmt.Sprintf("has length %d", m.i) +} + +type inAnyOrderMatcher struct { + x any +} + +func (m inAnyOrderMatcher) Matches(x any) bool { + given, ok := m.prepareValue(x) + if !ok { + return false + } + wanted, ok := m.prepareValue(m.x) + if !ok { + return false + } + + if given.Len() != wanted.Len() { + return false + } + + usedFromGiven := make([]bool, given.Len()) + foundFromWanted := make([]bool, wanted.Len()) + for i := 0; i < wanted.Len(); i++ { + wantedMatcher := Eq(wanted.Index(i).Interface()) + for j := 0; j < given.Len(); j++ { + if usedFromGiven[j] { + continue + } + if wantedMatcher.Matches(given.Index(j).Interface()) { + foundFromWanted[i] = true + usedFromGiven[j] = true + break + } + } + } + + missingFromWanted := 0 + for _, found := range foundFromWanted { + if !found { + missingFromWanted++ + } + } + extraInGiven := 0 + for _, used := range usedFromGiven { + if !used { + extraInGiven++ + } + } + + return extraInGiven == 0 && missingFromWanted == 0 +} + +func (m inAnyOrderMatcher) prepareValue(x any) (reflect.Value, bool) { + xValue := reflect.ValueOf(x) + switch xValue.Kind() { + case reflect.Slice, reflect.Array: + return xValue, true + default: + return reflect.Value{}, false + } +} + +func (m inAnyOrderMatcher) String() string { + return fmt.Sprintf("has the same elements as %v", m.x) +} + +// Constructors + +// All returns a composite Matcher that returns true if and only all of the +// matchers return true. +func All(ms ...Matcher) Matcher { return allMatcher{ms} } + +// Any returns a matcher that always matches. +func Any() Matcher { return anyMatcher{} } + +// Cond returns a matcher that matches when the given function returns true +// after passing it the parameter to the mock function. +// This is particularly useful in case you want to match over a field of a custom struct, or dynamic logic. +// +// Example usage: +// +// Cond(func(x int){return x == 1}).Matches(1) // returns true +// Cond(func(x int){return x == 2}).Matches(1) // returns false +func Cond[T any](fn func(x T) bool) Matcher { return condMatcher[T]{fn} } + +// AnyOf returns a composite Matcher that returns true if at least one of the +// matchers returns true. +// +// Example usage: +// +// AnyOf(1, 2, 3).Matches(2) // returns true +// AnyOf(1, 2, 3).Matches(10) // returns false +// AnyOf(Nil(), Len(2)).Matches(nil) // returns true +// AnyOf(Nil(), Len(2)).Matches("hi") // returns true +// AnyOf(Nil(), Len(2)).Matches("hello") // returns false +func AnyOf(xs ...any) Matcher { + ms := make([]Matcher, 0, len(xs)) + for _, x := range xs { + if m, ok := x.(Matcher); ok { + ms = append(ms, m) + } else { + ms = append(ms, Eq(x)) + } + } + return anyOfMatcher{ms} +} + +// Eq returns a matcher that matches on equality. +// +// Example usage: +// +// Eq(5).Matches(5) // returns true +// Eq(5).Matches(4) // returns false +func Eq(x any) Matcher { return eqMatcher{x} } + +// Len returns a matcher that matches on length. This matcher returns false if +// is compared to a type that is not an array, chan, map, slice, or string. +func Len(i int) Matcher { + return lenMatcher{i} +} + +// Nil returns a matcher that matches if the received value is nil. +// +// Example usage: +// +// var x *bytes.Buffer +// Nil().Matches(x) // returns true +// x = &bytes.Buffer{} +// Nil().Matches(x) // returns false +func Nil() Matcher { return nilMatcher{} } + +// Not reverses the results of its given child matcher. +// +// Example usage: +// +// Not(Eq(5)).Matches(4) // returns true +// Not(Eq(5)).Matches(5) // returns false +func Not(x any) Matcher { + if m, ok := x.(Matcher); ok { + return notMatcher{m} + } + return notMatcher{Eq(x)} +} + +// Regex checks whether parameter matches the associated regex. +// +// Example usage: +// +// Regex("[0-9]{2}:[0-9]{2}").Matches("23:02") // returns true +// Regex("[0-9]{2}:[0-9]{2}").Matches([]byte{'2', '3', ':', '0', '2'}) // returns true +// Regex("[0-9]{2}:[0-9]{2}").Matches("hello world") // returns false +// Regex("[0-9]{2}").Matches(21) // returns false as it's not a valid type +func Regex(regexStr string) Matcher { + return regexMatcher{regex: regexp.MustCompile(regexStr)} +} + +// AssignableToTypeOf is a Matcher that matches if the parameter to the mock +// function is assignable to the type of the parameter to this function. +// +// Example usage: +// +// var s fmt.Stringer = &bytes.Buffer{} +// AssignableToTypeOf(s).Matches(time.Second) // returns true +// AssignableToTypeOf(s).Matches(99) // returns false +// +// var ctx = reflect.TypeOf((*context.Context)(nil)).Elem() +// AssignableToTypeOf(ctx).Matches(context.Background()) // returns true +func AssignableToTypeOf(x any) Matcher { + if xt, ok := x.(reflect.Type); ok { + return assignableToTypeOfMatcher{xt} + } + return assignableToTypeOfMatcher{reflect.TypeOf(x)} +} + +// InAnyOrder is a Matcher that returns true for collections of the same elements ignoring the order. +// +// Example usage: +// +// InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 3, 2}) // returns true +// InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 2}) // returns false +func InAnyOrder(x any) Matcher { + return inAnyOrderMatcher{x} +} diff --git a/vendor/go.uber.org/mock/gomock/string.go b/vendor/go.uber.org/mock/gomock/string.go new file mode 100644 index 00000000000..ec4ca7e4d38 --- /dev/null +++ b/vendor/go.uber.org/mock/gomock/string.go @@ -0,0 +1,36 @@ +package gomock + +import ( + "fmt" + "reflect" +) + +// getString is a safe way to convert a value to a string for printing results +// If the value is a a mock, getString avoids calling the mocked String() method, +// which avoids potential deadlocks +func getString(x any) string { + if isGeneratedMock(x) { + return fmt.Sprintf("%T", x) + } + if s, ok := x.(fmt.Stringer); ok { + return s.String() + } + return fmt.Sprintf("%v", x) +} + +// isGeneratedMock checks if the given type has a "isgomock" field, +// indicating it is a generated mock. +func isGeneratedMock(x any) bool { + typ := reflect.TypeOf(x) + if typ == nil { + return false + } + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + } + if typ.Kind() != reflect.Struct { + return false + } + _, isgomock := typ.FieldByName("isgomock") + return isgomock +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 12fac2ae613..52c62fb7b17 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1092,7 +1092,7 @@ github.com/opencontainers/image-spec/specs-go/v1 # github.com/opencontainers/runtime-spec v1.2.0 ## explicit github.com/opencontainers/runtime-spec/specs-go -# github.com/openshift/api v0.0.0-20241203091751-58d4ac495429 +# github.com/openshift/api v0.0.0-20241216151652-de9de05a8e43 ## explicit; go 1.22.0 github.com/openshift/api/annotations github.com/openshift/api/config/v1 @@ -1222,7 +1222,7 @@ github.com/openshift/hive/apis/hive/v1/openstack github.com/openshift/hive/apis/hive/v1/ovirt github.com/openshift/hive/apis/hive/v1/vsphere github.com/openshift/hive/apis/scheme -# github.com/openshift/library-go v0.0.0-20241210171208-85e36bca7246 +# github.com/openshift/library-go v0.0.0-20241216140520-201d816c66f0 ## explicit; go 1.22.0 github.com/openshift/library-go/pkg/config/clusteroperator/v1helpers github.com/openshift/library-go/pkg/config/clusterstatus @@ -1493,6 +1493,9 @@ go.starlark.net/resolve go.starlark.net/starlark go.starlark.net/starlarkstruct go.starlark.net/syntax +# go.uber.org/mock v0.5.0 +## explicit; go 1.22 +go.uber.org/mock/gomock # go.uber.org/multierr v1.11.0 ## explicit; go 1.19 go.uber.org/multierr