Skip to content

Commit 897a020

Browse files
authored
Merge pull request #48 from ContainerSolutions/custom-resource-definition
Custom resource definition
2 parents f63018f + 03d3d0d commit 897a020

File tree

1 file changed

+42
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)