forked from mkieboom/openshift-mapr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapr-k8s-busybox-secure-dynamic-part1-volumedriver.yaml
94 lines (84 loc) · 2.55 KB
/
mapr-k8s-busybox-secure-dynamic-part1-volumedriver.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# MapR Volume Driver Plugin for Kubernetes
# Using the MapR Volume Driver Plugin for dynamic provisioning
# Provisioning: dynamic
# Container: busybox
# MapR Apps Namespace
---
apiVersion: v1
kind: Namespace
metadata:
name: mapr-apps
labels:
name: mapr-apps
# MapR Apps ServiceAccount
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: mapr-apps-sa
namespace: mapr-apps
# Secret to authenticate with MapR Converged Data Platform
---
apiVersion: v1
kind: Secret
metadata:
name: mapr-provisioner-secrets
namespace: mapr-apps
type: Opaque
data:
# base64 encoding: "echo -n '<username/password>' | base64" eg:
# echo -n 'mapr' | base64
MAPR_CLUSTER_USER: "bWFwcg=="
MAPR_CLUSTER_PASSWORD: "bWFwcg=="
# Ticket to authenticate with MapR Converged Data Platform
---
apiVersion: v1
kind: Secret
metadata:
name: mapr-ticket-secret
namespace: mapr-apps
type: Opaque
data:
# To create a Ticket, login onto the MapR cluster and execute following:
# 1. maprlogin password -user mapr
# 2. echo -n $(cat /tmp/maprticket_####) | base64 -w 0
# 3. Copy the base64 encoded ticket into the CONTAINER_TICKET line, eg:
CONTAINER_TICKET: ZGVtby5tYXByLmNvbSBxSkxrVEhoeGtFRlUxU2p3a29NcUN4ZVhra1hPS2JwTVphNllTQ3FpaENnYlRhVkQyOEUrTTJhSng4dWljdlp1aHozR1pOS2pCNW8wRmFjRlVWRGVvVEZYVzhXdElTUG5DOEp2Q01zZG1PcEFIZ2V6eWdrekU5V1ZwaGVoT2RMcWFyaVdGVmtZSjEwVngzNG85RFFzM0U5YmdFWFZ0bVJNQ2JiREd6THpJbzVvVDBpTkU5OUlhT2dySnN3RE9SYmd6bFRBRjBzVVlHK05iL09mUkVWNUV1SFpKZk13M3NxMUY3MjI1bjJHN3hBZkhCQXFGb0dDSGhoNnhvVm45MmNEZHZJTGk4anVkU1ZMSzd0SFpFZzRZUFJXazdZUU0rdz0=
# StorageClass for MapR Converged Data Platform
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: maprfs-sc-busybox-secure-dynamic
namespace: mapr-apps
provisioner: mapr.com/maprfs
parameters:
# Configure below MapR cluster details to reflect your MapR cluster configuration
restServers: "172.18.14.32:8443"
cldbHosts: "172.18.14.32"
cluster: "demo.mapr.com"
securityType: "secure"
ticketSecretName: "mapr-ticket-secret"
ticketSecretNamespace: "mapr-apps"
maprSecretName: "mapr-provisioner-secrets"
maprSecretNamespace: "mapr-apps"
namePrefix: "busybox"
mountPrefix: "/busybox"
reclaimPolicy: "Retain"
advisoryquota: "100M"
type: "rw"
mount: "1"
# PersistentVolumeClaim for MapR Converged Data Platform
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: maprfs-pvc-busybox-secure-dynamic
namespace: mapr-apps
spec:
accessModes:
- ReadWriteOnce
storageClassName: maprfs-sc-busybox-secure-dynamic
resources:
requests:
storage: 300M