Skip to content

Commit

Permalink
fix: Mark unique added version as served and stored
Browse files Browse the repository at this point in the history
Since we are providing a single version, it makes sense to enable it
and to mark it as the default when persisting custom resources to storage
  • Loading branch information
manusa committed Dec 18, 2020
1 parent 8409803 commit 396a75b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static CustomResourceDefinitionBuilder v1beta1CRDFromCustomResourceType(C
.withNewSpec()
.withGroup(instance.getGroup())
.withVersion(version) // also set version to the first (and only) versions item
.addNewVersion().withName(version).endVersion()
.addNewVersion().withName(version).withServed(true).withStorage(true).endVersion()
.withScope(instance.getScope())
.withNewNames()
.withKind(instance.getKind())
Expand All @@ -94,7 +94,7 @@ public static io.fabric8.kubernetes.api.model.apiextensions.v1.CustomResourceDef
.endMetadata()
.withNewSpec()
.withGroup(instance.getGroup())
.addNewVersion().withName(instance.getVersion()).endVersion()
.addNewVersion().withName(instance.getVersion()).withServed(true).withStorage(true).endVersion()
.withScope(instance.getScope())
.withNewNames()
.withKind(instance.getKind())
Expand Down

0 comments on commit 396a75b

Please sign in to comment.