-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #44 from dinhxuanvu/crd-version-validation
fix(crd): Fix CRD validation falsely error on unused CRD versions
- Loading branch information
Showing
5 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
pkg/validation/internal/testdata/valid_bundle_2/test-operator.clusterserviceversion.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: ClusterServiceVersion | ||
metadata: | ||
annotations: | ||
capabilities: Basic Install | ||
name: test-operator.v0.0.1 | ||
namespace: placeholder | ||
spec: | ||
apiservicedefinitions: {} | ||
customresourcedefinitions: | ||
owned: | ||
- description: Test is the Schema for the tests API | ||
kind: Test | ||
name: tests.test.example.com | ||
version: v1alpha1 | ||
- description: TestTwo is the Schema for the tests API | ||
kind: TestTwo | ||
name: TestTwos.test.example.com | ||
version: v1beta1 | ||
installModes: | ||
- supported: true | ||
type: OwnNamespace | ||
- supported: true | ||
type: SingleNamespace | ||
- supported: false | ||
type: MultiNamespace | ||
- supported: true | ||
type: AllNamespaces | ||
keywords: | ||
- test-operator | ||
links: | ||
- name: Test Operator | ||
url: https://test-operator.domain | ||
maintainers: | ||
- email: your@email.com | ||
name: Maintainer Name | ||
maturity: alpha | ||
provider: | ||
name: Provider Name | ||
url: https://your.domain | ||
version: 0.0.1 |
19 changes: 19 additions & 0 deletions
19
pkg/validation/internal/testdata/valid_bundle_2/test.example.com_tests_v1_crd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: tests.test.example.com | ||
spec: | ||
group: test.example.com | ||
names: | ||
kind: Test | ||
listKind: TestList | ||
plural: tests | ||
singular: test | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true | ||
- name: v1beta1 | ||
served: true | ||
storage: false |
20 changes: 20 additions & 0 deletions
20
pkg/validation/internal/testdata/valid_bundle_2/test.example.com_testtwos_v1beta1_crd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: testtwos.test.example.com | ||
spec: | ||
group: test.example.com | ||
names: | ||
kind: TestTwo | ||
listKind: TestTwoList | ||
plural: testtwos | ||
singular: testtwo | ||
scope: Namespaced | ||
version: v1beta1 | ||
versions: | ||
- name: v1beta1 | ||
served: true | ||
storage: true | ||
- name: v1alpha1 | ||
served: true | ||
storage: false |