-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scorecard,generate-csv: consider api "group" while checking for known…
… types Comparing only "kind" of the resource might lead to conflict where two resources might have same kind but in different api groups. For example an operator could provide a custom resource with name "Deployment" in it's own group. On generating csv for this operator might not consider the provided CR for filling 'alm-examples'.
- Loading branch information
Showing
6 changed files
with
125 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
entries: | ||
- description: > | ||
Fix bug that occurs to fill the example in the process to generate the CSV when the Operator API has Kinds named as core types by starting to check its groups. | ||
kind: "bugfix" | ||
breaking: false |
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
57 changes: 57 additions & 0 deletions
57
...tdata/non-standard-layout/config/crds-with-core-types/foo.example.com_deployment_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,57 @@ | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: deployment.foo.example.com | ||
spec: | ||
group: foo.example.com | ||
names: | ||
kind: Deployment | ||
listKind: DeploymentList | ||
plural: deployments | ||
singular: deployment | ||
scope: Namespaced | ||
subresources: | ||
status: {} | ||
validation: | ||
openAPIV3Schema: | ||
description: Schema for the deployments API | ||
properties: | ||
apiVersion: | ||
description: 'APIVersion defines the versioned schema of this representation | ||
of an object. Servers should convert recognized schemas to the latest | ||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' | ||
type: string | ||
kind: | ||
description: 'Kind is a string value representing the REST resource this | ||
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: | ||
type: object | ||
spec: | ||
description: DeploymentSpec defines the desired state of the Foo Deployment | ||
properties: | ||
size: | ||
description: Size is the size of the Foo deployment nodes | ||
format: int32 | ||
type: integer | ||
required: | ||
- size | ||
type: object | ||
status: | ||
description: DeploymentStatus defines the observed state of the Foo Deployment | ||
properties: | ||
nodes: | ||
description: Nodes are the names of the Foo pods | ||
items: | ||
type: string | ||
type: array | ||
required: | ||
- nodes | ||
type: object | ||
type: object | ||
version: v1alpha1 | ||
versions: | ||
- name: v1alpha1 | ||
served: true | ||
storage: true |
7 changes: 7 additions & 0 deletions
7
...n-standard-layout/config/crds-with-core-types/foo.example.com_v1alpha1_deployment_cr.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,7 @@ | ||
apiVersion: foo.example.com/v1alpha1 | ||
kind: Deployment | ||
metadata: | ||
name: example-foo-deployment | ||
spec: | ||
# Add fields here | ||
size: 3 |
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