Skip to content

Instantly share code, notes, and snippets.

@jtfogarty
Last active October 3, 2018 22:24
Show Gist options
  • Save jtfogarty/f882e51c091cce848ebb27bf3ca6f042 to your computer and use it in GitHub Desktop.
Save jtfogarty/f882e51c091cce848ebb27bf3ca6f042 to your computer and use it in GitHub Desktop.
apiVersion: ceph.rook.io/v1beta1
kind: Filesystem
metadata:
name: myfs
namespace: rook-ceph
spec:
metadataPool:
replicated:
size: 3
dataPools:
- erasureCoded:
dataChunks: 2
codingChunks: 1
metadataServer:
activeCount: 1
activeStandby: true
pvc_mount = os.environ.get('NOTEBOOK_PVC_MOUNT')
if pvc_mount and pvc_mount != 'null':
c.KubeSpawner.user_storage_pvc_ensure = True
c.KubeSpawner.storage_pvc_ensure = True
# How much disk space do we want?
c.KubeSpawner.user_storage_capacity = '10Gi'
c.KubeSpawner.storage_capacity = '10Gi'
c.KubeSpawner.pvc_name_template = 'claim-{username}{servername}'
volumes.append(
{
'name': 'volume-{username}{servername}',
'persistentVolumeClaim': {
'claimName': 'claim-{username}{servername}'
}
}
)
volume_mounts.append(
{
'mountPath': pvc_mount,
'name': 'volume-{username}{servername}'
}
)
volume_mounts.append(
{
'mountPath': pvc_mount + '/data',
'name': 'fs-store'
}
)
volumes.append(
{
'flexVolume': {
'driver': 'ceph.rook.io/rook',
'fsType': 'ceph',
'options':{'clusterName': 'rook', 'clusterNamespace': 'rook-ceph','fsName': 'myfs'}
'fsname': 'myfs',
},'name': 'fs-store'
}
)
c.KubeSpawner.volumes = volumes
c.KubeSpawner.volume_mounts = volume_mounts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment