Skip to content

Commit cfc2663

Browse files
First upload. Create CRD and example use.
0 parents  commit cfc2663

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

cluster.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: kind.x-k8s.io/v1alpha4
2+
kind: Cluster
3+
name: testing-cluster
4+
nodes:
5+
- role: control-plane
6+
kubeadmConfigPatches:
7+
- |
8+
kind: InitConfiguration
9+
nodeRegistration:
10+
kubeletExtraArgs:
11+
node-labels: "ingress-ready=true"
12+
extraPortMappings:
13+
- containerPort: 80
14+
hostPort: 80
15+
protocol: TCP
16+
- containerPort: 443
17+
hostPort: 443
18+
protocol: TCP

crd-use.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: patrickdap.com/v1
2+
kind: Todo
3+
metadata:
4+
name: first-todo
5+
namespace: default
6+
spec:
7+
name: Buy groceries

crd.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apiVersion: apiextensions.k8s.io/v1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: todos.patrickdap.com
5+
spec:
6+
group: patrickdap.com
7+
versions:
8+
- name: v1
9+
served: true
10+
storage: true
11+
schema:
12+
openAPIV3Schema:
13+
type: object
14+
properties:
15+
apiVersion:
16+
type: string
17+
kind:
18+
type: string
19+
metadata:
20+
type: object
21+
spec:
22+
type: object
23+
properties:
24+
name:
25+
type: string
26+
scope: Namespaced
27+
names:
28+
plural: todos
29+
singular: todo
30+
kind: Todo
31+
shortNames:
32+
- td

0 commit comments

Comments
 (0)