File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ class CustomResourceDefinition extends KubeObject<KubeCRD> {
9797 let version = this . spec . version ;
9898 const name = this . spec . names . plural as string ;
9999
100+ // Assign the 1st storage version if no version is specified,
101+ // or the 1st served version if no storage version is specified.
100102 if ( ! version && this . spec . versions . length > 0 ) {
101103 for ( const versionItem of this . spec . versions ) {
102104 if ( ! ! versionItem . storage ) {
@@ -147,6 +149,7 @@ export interface CRClassArgs {
147149 customResourceDefinition : CustomResourceDefinition ;
148150}
149151
152+ /** @deprecated Use the version of the function that receives an object as its argument. */
150153export function makeCustomResourceClass (
151154 args : [ group : string , version : string , pluralName : string ] [ ] ,
152155 isNamespaced : boolean
@@ -164,6 +167,7 @@ export function makeCustomResourceClass(
164167 apiInfoArgs = args . apiInfo . map ( info => [ info . group , info . version , args . pluralName ] ) ;
165168 }
166169
170+ // Used for tests
167171 if ( import . meta. env . UNDER_TEST || import . meta. env . STORYBOOK ) {
168172 const knownClass = ( ResourceClasses as Record < string , KubeObjectClass > ) [ apiInfoArgs [ 0 ] [ 2 ] ] ;
169173 if ( ! ! knownClass ) {
You can’t perform that action at this time.
0 commit comments