Created
November 16, 2022 17:26
-
-
Save komuw/8bd2b6e9e1c01ee24aa68984a8cb2751 to your computer and use it in GitHub Desktop.
fake crd status/health
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
apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: | |
# name must match the spec fields below, and be in the form: <plural>.<group> | |
name: komucrontabs.stable.example.com | |
spec: | |
# group name to use for REST API: /apis/<group>/<version> | |
group: stable.example.com | |
# list of versions supported by this CustomResourceDefinition | |
versions: | |
- name: v1 | |
# Each version can be enabled/disabled by Served flag. | |
served: true | |
# One and only one version must be marked as the storage version. | |
storage: true | |
subresources: | |
status: {} | |
additionalPrinterColumns: | |
- name: Image | |
jsonPath: .spec.image | |
description: The image of redis cluster | |
type: string | |
- name: Status | |
jsonPath: .spec.somestate | |
description: somestate | |
type: string | |
schema: | |
openAPIV3Schema: | |
type: object | |
properties: | |
spec: | |
type: object | |
properties: | |
cronSpec: | |
type: string | |
image: | |
type: string | |
replicas: | |
type: integer | |
somestate: | |
type: string | |
default: Healthy | |
# either Namespaced or Cluster | |
scope: Namespaced | |
names: | |
# plural name to be used in the URL: /apis/<group>/<version>/<plural> | |
plural: komucrontabs | |
# singular name to be used as an alias on the CLI and for display | |
singular: komucrontab | |
# kind is normally the CamelCased singular type. Your resource manifests use this. | |
kind: KomuCronTab | |
# shortNames allow shorter string to match your resource on the CLI | |
shortNames: | |
- kct | |
--- | |
apiVersion: "stable.example.com/v1" | |
kind: KomuCronTab | |
metadata: | |
name: my-new-cron-object | |
spec: | |
cronSpec: "* * * * */5" | |
image: redis:5.0.4-alpine |
Author
komuw
commented
Nov 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment