diff --git a/api/swagger-spec/autoscaling_v1.json b/api/swagger-spec/autoscaling_v1.json index 9c78c1a8976..f66a5d8b96e 100644 --- a/api/swagger-spec/autoscaling_v1.json +++ b/api/swagger-spec/autoscaling_v1.json @@ -1169,9 +1169,6 @@ "v1.DeleteOptions": { "id": "v1.DeleteOptions", "description": "DeleteOptions may be provided when deleting an API object", - "required": [ - "gracePeriodSeconds" - ], "properties": { "kind": { "type": "string", @@ -1185,9 +1182,27 @@ "type": "integer", "format": "int64", "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately." + }, + "preconditions": { + "$ref": "v1.Preconditions", + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned." } } }, + "v1.Preconditions": { + "id": "v1.Preconditions", + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "$ref": "types.UID", + "description": "Specifies the target UID." + } + } + }, + "types.UID": { + "id": "types.UID", + "properties": {} + }, "unversioned.APIResourceList": { "id": "unversioned.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", diff --git a/api/swagger-spec/batch_v1.json b/api/swagger-spec/batch_v1.json index 23b8a391ade..43e4df182b3 100644 --- a/api/swagger-spec/batch_v1.json +++ b/api/swagger-spec/batch_v1.json @@ -2410,9 +2410,6 @@ "v1.DeleteOptions": { "id": "v1.DeleteOptions", "description": "DeleteOptions may be provided when deleting an API object", - "required": [ - "gracePeriodSeconds" - ], "properties": { "kind": { "type": "string", @@ -2426,9 +2423,27 @@ "type": "integer", "format": "int64", "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately." + }, + "preconditions": { + "$ref": "v1.Preconditions", + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned." } } }, + "v1.Preconditions": { + "id": "v1.Preconditions", + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "$ref": "types.UID", + "description": "Specifies the target UID." + } + } + }, + "types.UID": { + "id": "types.UID", + "properties": {} + }, "unversioned.APIResourceList": { "id": "unversioned.APIResourceList", "description": "APIResourceList is a list of APIResource, it is used to expose the name of the resources supported in a specific group and version, and if the resource is namespaced.", diff --git a/api/swagger-spec/extensions_v1beta1.json b/api/swagger-spec/extensions_v1beta1.json index 45e532ae6a2..35a6a1b0e39 100644 --- a/api/swagger-spec/extensions_v1beta1.json +++ b/api/swagger-spec/extensions_v1beta1.json @@ -7783,9 +7783,6 @@ "v1.DeleteOptions": { "id": "v1.DeleteOptions", "description": "DeleteOptions may be provided when deleting an API object", - "required": [ - "gracePeriodSeconds" - ], "properties": { "kind": { "type": "string", @@ -7799,9 +7796,27 @@ "type": "integer", "format": "int64", "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately." + }, + "preconditions": { + "$ref": "v1.Preconditions", + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned." } } }, + "v1.Preconditions": { + "id": "v1.Preconditions", + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "$ref": "types.UID", + "description": "Specifies the target UID." + } + } + }, + "types.UID": { + "id": "types.UID", + "properties": {} + }, "v1beta1.DeploymentList": { "id": "v1beta1.DeploymentList", "description": "DeploymentList is a list of Deployments.", diff --git a/api/swagger-spec/v1.json b/api/swagger-spec/v1.json index 806dd57199b..0b99b992750 100644 --- a/api/swagger-spec/v1.json +++ b/api/swagger-spec/v1.json @@ -15118,9 +15118,6 @@ "v1.DeleteOptions": { "id": "v1.DeleteOptions", "description": "DeleteOptions may be provided when deleting an API object", - "required": [ - "gracePeriodSeconds" - ], "properties": { "kind": { "type": "string", @@ -15134,9 +15131,27 @@ "type": "integer", "format": "int64", "description": "The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately." + }, + "preconditions": { + "$ref": "v1.Preconditions", + "description": "Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned." } } }, + "v1.Preconditions": { + "id": "v1.Preconditions", + "description": "Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.", + "properties": { + "uid": { + "$ref": "types.UID", + "description": "Specifies the target UID." + } + } + }, + "types.UID": { + "id": "types.UID", + "properties": {} + }, "v1.EndpointsList": { "id": "v1.EndpointsList", "description": "EndpointsList is a list of endpoints.", diff --git a/cmd/genconversion/conversion.go b/cmd/genconversion/conversion.go index a9445bc7f22..dcaa66d80d1 100644 --- a/cmd/genconversion/conversion.go +++ b/cmd/genconversion/conversion.go @@ -97,6 +97,7 @@ func main() { generator := kruntime.NewConversionGenerator(api.Scheme, versionPath) apiShort := generator.AddImport(path.Join(pkgBase, "api")) generator.AddImport(path.Join(pkgBase, "api/resource")) + generator.AddImport(path.Join(pkgBase, "types")) // TODO(wojtek-t): Change the overwrites to a flag. generator.OverwritePackage(gv.Version, "") for _, knownType := range api.Scheme.KnownTypes(gv) { diff --git a/cmd/libs/go2idl/.import-restrictions b/cmd/libs/go2idl/.import-restrictions index 937fec69fe8..371604f6de7 100644 --- a/cmd/libs/go2idl/.import-restrictions +++ b/cmd/libs/go2idl/.import-restrictions @@ -4,7 +4,8 @@ "SelectorRegexp": "k8s[.]io", "AllowedPrefixes": [ "k8s.io/kubernetes/cmd/libs/go2idl", - "k8s.io/kubernetes/third_party" + "k8s.io/kubernetes/third_party", + "k8s.io/kubernetes/pkg/util/sets" ] } ] diff --git a/cmd/libs/go2idl/generator/execute.go b/cmd/libs/go2idl/generator/execute.go index bb9bbb440f2..3c03221c4e3 100644 --- a/cmd/libs/go2idl/generator/execute.go +++ b/cmd/libs/go2idl/generator/execute.go @@ -286,7 +286,7 @@ func (c *Context) ExecutePackage(outDir string, p Package) error { } } if len(errors) > 0 { - return fmt.Errorf("errors in package %q:\n%v\n", p.Name(), strings.Join(errs2strings(errors), "\n")) + return fmt.Errorf("errors in package %q:\n%v\n", p.Path(), strings.Join(errs2strings(errors), "\n")) } return nil } diff --git a/cmd/libs/go2idl/import-boss/main.go b/cmd/libs/go2idl/import-boss/main.go index 7d10171ebc6..5efc2d9bdb2 100644 --- a/cmd/libs/go2idl/import-boss/main.go +++ b/cmd/libs/go2idl/import-boss/main.go @@ -74,7 +74,6 @@ func main() { "k8s.io/kubernetes/cmd/", "k8s.io/kubernetes/plugin/", } - arguments.OutputBase = "" arguments.Recursive = true // arguments.VerifyOnly = true diff --git a/docs/api-reference/autoscaling/v1/definitions.html b/docs/api-reference/autoscaling/v1/definitions.html index 5eb07515795..c172d092c22 100755 --- a/docs/api-reference/autoscaling/v1/definitions.html +++ b/docs/api-reference/autoscaling/v1/definitions.html @@ -428,10 +428,17 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
gracePeriodSeconds
The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
true
false
integer (int64)
preconditions
Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned.
false
Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
+Name | +Description | +Required | +Schema | +Default | +
---|---|---|---|---|
uid |
+Specifies the target UID. |
+false |
++ | + |