Created
October 29, 2018 13:25
-
-
Save kerin/9b42cd9d788e7593ef5e242af60db4f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################# | |
# This example first defines some necessary namespace and RBAC security objects. | |
# The actual Ceph Cluster CRD example can be found at the bottom of this example. | |
################################################################################# | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: rook-ceph | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: rook-ceph-cluster | |
namespace: rook-ceph | |
--- | |
kind: Role | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: rook-ceph-cluster | |
namespace: rook-ceph | |
rules: | |
- apiGroups: [""] | |
resources: ["configmaps"] | |
verbs: [ "get", "list", "watch", "create", "update", "delete" ] | |
--- | |
# Allow the operator to create resources in this cluster's namespace | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: rook-ceph-cluster-mgmt | |
namespace: rook-ceph | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: rook-ceph-cluster-mgmt | |
subjects: | |
- kind: ServiceAccount | |
name: rook-ceph-system | |
namespace: rook-ceph-system | |
--- | |
# Allow the pods in this namespace to work with configmaps | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
metadata: | |
name: rook-ceph-cluster | |
namespace: rook-ceph | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: rook-ceph-cluster | |
subjects: | |
- kind: ServiceAccount | |
name: rook-ceph-cluster | |
namespace: rook-ceph | |
--- | |
################################################################################# | |
# The Ceph Cluster CRD example | |
################################################################################# | |
apiVersion: ceph.rook.io/v1beta1 | |
kind: Cluster | |
metadata: | |
name: rook-ceph | |
namespace: rook-ceph | |
spec: | |
dataDirHostPath: /var/lib/rook | |
dashboard: | |
enabled: true | |
storage: | |
useAllNodes: true | |
useAllDevices: false | |
config: | |
storeType: bluestore | |
databaseSizeMB: "1024" | |
journalSizeMB: "1024" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment