Last active
October 3, 2018 22:24
-
-
Save jtfogarty/f882e51c091cce848ebb27bf3ca6f042 to your computer and use it in GitHub Desktop.
This file contains 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
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 |
This file contains 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
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