-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathlocal-crd-under-test.yaml
61 lines (61 loc) · 1.7 KB
/
local-crd-under-test.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: crdexamples.redhat-best-practices-for-k8s.com
spec:
group: redhat-best-practices-for-k8s.com
names:
kind: CrdExample
plural: crdexamples
listKind: CrdExampleList
singular: crdexample
scope: Namespaced
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
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
owner:
type: string
description: "The name of the owner of CRD object example."
address:
type: string
description: "Example address field."
replicas:
type: integer
description: "The number of example instances of the CrdExample CRD."
status:
type: object
properties:
replicas:
type: integer
subresources:
status: {}
additionalPrinterColumns:
- name: Owner
jsonPath: .spec.owner
type: string
- name: Replicas
jsonPath: .spec.replicas
type: integer
- name: Age
jsonPath: .metadata.creationTimestamp
type: date
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: tnf
name: crdexample-role
rules:
- apiGroups: ["redhat-best-practices-for-k8s.com"]
resources: ["crdexamples"]
verbs: ["get", "watch", "list"]