Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRA: structured parameters #123516

Merged
merged 18 commits into from Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions api/api-rules/violation_exceptions.list
Expand Up @@ -51,6 +51,13 @@ API rule violation: names_match,k8s.io/api/core/v1,RBDVolumeSource,RadosUser
API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,CephFS
API rule violation: names_match,k8s.io/api/core/v1,VolumeSource,StorageOS
API rule violation: names_match,k8s.io/api/networking/v1alpha1,ServiceCIDRSpec,CIDRs
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,BoolValue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have violations in new APIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because there's a conflict in the Go code between the String field and the required String method. We could have renamed just that one field to Str (or something like it), but doing it consistently for all fields seemed better.

API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,IntSliceValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,IntValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,QuantityValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,StringSliceValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,StringValue
API rule violation: names_match,k8s.io/api/resource/v1alpha2,NamedResourcesAttributeValue,VersionValue
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Ref
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,Schema
API rule violation: names_match,k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1,JSONSchemaProps,XEmbeddedResource
Expand Down
60 changes: 60 additions & 0 deletions api/discovery/aggregated_v2beta1.json
Expand Up @@ -1926,6 +1926,26 @@
"watch"
]
},
{
"resource": "resourceclaimparameters",
"responseKind": {
"group": "",
"kind": "ResourceClaimParameters",
"version": ""
},
"scope": "Namespaced",
"singularResource": "resourceclaimparameters",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
},
{
"resource": "resourceclaims",
"responseKind": {
Expand Down Expand Up @@ -2000,6 +2020,46 @@
"update",
"watch"
]
},
{
"resource": "resourceclassparameters",
"responseKind": {
"group": "",
"kind": "ResourceClassParameters",
"version": ""
},
"scope": "Namespaced",
"singularResource": "resourceclassparameters",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
},
{
"resource": "resourceslices",
"responseKind": {
"group": "",
"kind": "ResourceSlice",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we update the KEP to capture the name change and other deviations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, absolutely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"version": ""
},
"scope": "Cluster",
"singularResource": "resourceslice",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
}
],
"version": "v1alpha2"
Expand Down
51 changes: 51 additions & 0 deletions api/discovery/apis__resource.k8s.io__v1alpha2.json
Expand Up @@ -31,6 +31,23 @@
"update"
]
},
{
"kind": "ResourceClaimParameters",
"name": "resourceclaimparameters",
"namespaced": true,
"singularName": "resourceclaimparameters",
"storageVersionHash": "DWM408h+ZHE=",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
},
{
"kind": "ResourceClaim",
"name": "resourceclaims",
Expand Down Expand Up @@ -92,6 +109,40 @@
"update",
"watch"
]
},
{
"kind": "ResourceClassParameters",
"name": "resourceclassparameters",
"namespaced": true,
"singularName": "resourceclassparameters",
"storageVersionHash": "MDq5XoTnXWQ=",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
},
{
"kind": "ResourceSlice",
"name": "resourceslices",
"namespaced": false,
"singularName": "resourceslice",
"storageVersionHash": "IECvOcO76kw=",
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
}
]
}