-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: properly render required fields and empty object bodies
- Loading branch information
Showing
19 changed files
with
212 additions
and
69 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
controller-gen.kubebuilder.io/version: v0.9.2 | ||
creationTimestamp: null | ||
name: krokcommands.delivery.krok.app | ||
spec: | ||
group: delivery.krok.app | ||
names: | ||
kind: KrokCommand | ||
listKind: KrokCommandList | ||
plural: krokcommands | ||
singular: krokcommand | ||
scope: Namespaced | ||
versions: | ||
- name: v1alpha1 | ||
schema: | ||
openAPIV3Schema: | ||
description: KrokCommand is the Schema for the krokcommands 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: KrokCommandSpec defines the desired state of KrokCommand | ||
properties: | ||
commandHasOutputToWrite: | ||
description: CommandHasOutputToWrite if defined, it signals the underlying | ||
Job, to put its output into a generated and created secret. | ||
type: boolean | ||
dependencies: | ||
description: Dependencies defines a list of command names that this | ||
command depends on. | ||
items: | ||
type: string | ||
type: array | ||
enabled: | ||
description: Enabled defines if this command can be executed or not. | ||
type: boolean | ||
complex: | ||
type: object | ||
example: {key: "value"} | ||
image: | ||
description: 'Image defines the image name and tag of the command | ||
example: krok-hook/slack-notification:v0.0.1' | ||
type: string | ||
example: krok-hook/slack-notification:v0.0.1 | ||
platforms: | ||
description: Platforms holds all the platforms which this command | ||
supports. | ||
items: | ||
type: string | ||
type: array | ||
readInputFromSecret: | ||
description: ReadInputFromSecret if defined, the command will take | ||
a list of key/value pairs in a secret and apply them as arguments | ||
to the command. | ||
properties: | ||
name: | ||
type: string | ||
namespace: | ||
type: string | ||
required: | ||
- name | ||
- namespace | ||
type: object | ||
schedule: | ||
description: 'Schedule of the command. example: 0 * * * * // follows | ||
cron job syntax.' | ||
type: string | ||
type: object | ||
status: | ||
description: KrokCommandStatus defines the observed state of KrokCommand | ||
type: object | ||
type: object | ||
served: true | ||
storage: true | ||
subresources: | ||
status: {} |
5 changes: 5 additions & 0 deletions
5
pkg/testdata/sample_crd_minimal_no_required_fields_golden.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,5 @@ | ||
apiVersion: delivery.krok.app/v1alpha1 | ||
kind: KrokCommand | ||
metadata: {} | ||
spec: {} | ||
status: {} |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ kind: KrokCommand | |
metadata: {} | ||
spec: | ||
image: string | ||
status: {} |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ kind: KrokCommand | |
metadata: {} | ||
spec: | ||
image: "krok-hook/slack-notification:v0.0.1" | ||
status: {} |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ kind: Bootstrap | |
metadata: {} | ||
spec: | ||
source: {} | ||
status: {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 | |
kind: AWSCluster | ||
metadata: {} | ||
spec: {} | ||
status: | ||
ready: false |
Oops, something went wrong.