Skip to content

Commit

Permalink
evaluate k8s custom resources
Browse files Browse the repository at this point in the history
  • Loading branch information
kmova committed Aug 2, 2017
1 parent 53ee8c0 commit 077df99
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions k8s-crd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

Explore ways to extend the k8s api with custom resources and custom resource definition.
22 changes: 22 additions & 0 deletions k8s-crd/sb-crd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
# name must match the spec fields below, and be in the form: <plural>.<group>
name: storagebackends.openebs.io
spec:
# group name to use for REST API: /apis/<group>/<version>
group: openebs.io
# version name to use for REST API: /apis/<group>/<version>
version: v1alpha1
# either Namespaced or Cluster
scope: Namespaced
names:
# plural name to be used in the URL: /apis/<group>/<version>/<plural>
plural: storagebackends
# singular name to be used as an alias on the CLI and for display
singular: storagebackend
# kind is normally the CamelCased singular type. Your resource manifests use this.
kind: StorageBackend
# shortNames allow shorter string to match your resource on the CLI
shortNames:
- sb
8 changes: 8 additions & 0 deletions k8s-crd/sb-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: "openebs.io/v1alpha1"
kind: StorageBackend
metadata:
name: my-new-storage-backend
type: local
spec:
disk: "/dev/sdc"
format: "ext4"

0 comments on commit 077df99

Please sign in to comment.