-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask.yaml
46 lines (46 loc) · 1.17 KB
/
task.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
# 名字必需与下面的 spec group字段匹配,并且格式为 '<名称的复数形式>.<组名>'
name: tasks.api.practice.com
labels:
version: "0.1"
spec:
group: api.practice.com
versions:
- name: v1alpha1
# 是否有效
served: true
#是否是存储版本
storage: true
additionalPrinterColumns:
- name: Status
type: string
jsonPath: .status.status
- name: Start
type: string
jsonPath: .status.startAt
- name: Duration
type: string
jsonPath: .status.duration
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
# 没有任何内容会被修剪,哪怕不被识别
x-kubernetes-preserve-unknown-fields: true
subresources:
status: {}
names:
# 复数名
plural: tasks
# 单数名
singular: task
kind: Task
listKind: TaskList
# kind的简称,就像service的简称是svc
shortNames:
- ta
scope: Namespaced