Skip to content

Commit 9712efc

Browse files
authored
CRD sample
1 parent b18284d commit 9712efc

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

resourcedefinition.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
# name must match the spec fields below, and be in the form: <plural>.<group>
5+
name: crontabs.stable.example.com
6+
spec:
7+
# group name to use for REST API: /apis/<group>/<version>
8+
group: stable.example.com
9+
# list of versions supported by this CustomResourceDefinition
10+
versions:
11+
- name: v1
12+
# Each version can be enabled/disabled by Served flag.
13+
served: true
14+
# One and only one version must be marked as the storage version.
15+
storage: true
16+
schema:
17+
openAPIV3Schema:
18+
type: object
19+
properties:
20+
spec:
21+
type: object
22+
properties:
23+
cronSpec:
24+
type: string
25+
image:
26+
type: string
27+
replicas:
28+
type: integer
29+
# either Namespaced or Cluster
30+
scope: Namespaced
31+
names:
32+
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
33+
plural: crontabs
34+
# singular name to be used as an alias on the CLI and for display
35+
singular: crontab
36+
# kind is normally the CamelCased singular type. Your resource manifests use this.
37+
kind: CronTab
38+
# shortNames allow shorter string to match your resource on the CLI
39+
shortNames:
40+
- ct

0 commit comments

Comments
 (0)