summaryrefslogtreecommitdiffstats
path: root/roles/openshift_storage_glusterfs/files/v3.6/gluster-s3-template.yml
blob: 896a1b226bb8a7db526bd49a063a2e909d2eef7a (plain)
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
kind: Template
apiVersion: v1
metadata:
  name: gluster-s3
  labels:
    glusterfs: s3-template
    gluster-s3: template
  annotations:
    description: Gluster S3 service template
    tags: glusterfs,heketi,gluster-s3
objects:
- kind: Service
  apiVersion: v1
  metadata:
    name: gluster-s3-${CLUSTER_NAME}-${S3_ACCOUNT}-service
    labels:
      glusterfs: s3-${CLUSTER_NAME}-${S3_ACCOUNT}-service
      gluster-s3: ${CLUSTER_NAME}-${S3_ACCOUNT}-service
  spec:
    ports:
    - protocol: TCP
      port: 8080
      targetPort: 8080
    selector:
      glusterfs: s3-pod
    type: ClusterIP
    sessionAffinity: None
  status:
    loadBalancer: {}
- kind: Route
  apiVersion: v1
  metadata:
    name: gluster-s3-${CLUSTER_NAME}-${S3_ACCOUNT}-route
    labels:
      glusterfs: s3-${CLUSTER_NAME}-${S3_ACCOUNT}-route
      gluster-s3: ${CLUSTER_NAME}-${S3_ACCOUNT}-route
  spec:
    to:
      kind: Service
      name: gluster-s3-${CLUSTER_NAME}-${S3_ACCOUNT}-service
- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: gluster-s3-${CLUSTER_NAME}-${S3_ACCOUNT}-dc
    labels:
      glusterfs: s3-${CLUSTER_NAME}-${S3_ACCOUNT}-dc
      gluster-s3: ${CLUSTER_NAME}-${S3_ACCOUNT}-dc
    annotations:
      openshift.io/scc: privileged
      description: Defines how to deploy gluster s3 object storage
  spec:
    replicas: 1
    selector:
      glusterfs: s3-${CLUSTER_NAME}-${S3_ACCOUNT}-pod
    template:
      metadata:
        name: gluster-${CLUSTER_NAME}-${S3_ACCOUNT}-s3
        labels:
          glusterfs: s3-${CLUSTER_NAME}-${S3_ACCOUNT}-pod
          gluster-s3: ${CLUSTER_NAME}-${S3_ACCOUNT}-pod
      spec:
        containers:
        - name: gluster-s3
          image: ${IMAGE_NAME}:${IMAGE_VERSION}
          imagePullPolicy: IfNotPresent
          ports:
          - name: gluster
            containerPort: 8080
            protocol: TCP
          env:
          - name: S3_ACCOUNT
            value: "${S3_ACCOUNT}"
          - name: S3_USER
            value: "${S3_USER}"
          - name: S3_PASSWORD
            value: "${S3_PASSWORD}"
          resources: {}
          volumeMounts:
          - name: gluster-vol1
            mountPath: "/mnt/gluster-object/${S3_ACCOUNT}"
          - name: gluster-vol2
            mountPath: "/mnt/gluster-object/gsmetadata"
          - name: glusterfs-cgroup
            readOnly: true
            mountPath: "/sys/fs/cgroup"
          terminationMessagePath: "/dev/termination-log"
          securityContext:
            privileged: true
        volumes:
        - name: glusterfs-cgroup
          hostPath:
            path: "/sys/fs/cgroup"
        - name: gluster-vol1
          persistentVolumeClaim:
            claimName: ${PVC}
        - name: gluster-vol2
          persistentVolumeClaim:
            claimName: ${META_PVC}
        restartPolicy: Always
        terminationGracePeriodSeconds: 30
        dnsPolicy: ClusterFirst
        serviceAccountName: default
        serviceAccount: default
        securityContext: {}
parameters:
- name: IMAGE_NAME
  displayName: glusterblock provisioner container image name
  required: True
- name: IMAGE_VERSION
  displayName: glusterblock provisioner container image version
  required: True
- name: CLUSTER_NAME
  displayName: GlusterFS cluster name
  description: A unique name to identify which heketi service manages this cluster, useful for running multiple heketi instances
  value: storage
- name: S3_ACCOUNT
  displayName: S3 Account Name
  description: S3 storage account which will provide storage on GlusterFS volumes
  required: true
- name: S3_USER
  displayName: S3 User
  description: S3 user who can access the S3 storage account
  required: true
- name: S3_PASSWORD
  displayName: S3 User Password
  description: Password for the S3 user
  required: true
- name: PVC
  displayName: Primary GlusterFS-backed PVC
  description: GlusterFS-backed PVC for object storage
  value: gluster-s3-claim
- name: META_PVC
  displayName: Metadata GlusterFS-backed PVC
  description: GlusterFS-backed PVC for object storage metadata
  value: gluster-s3-meta-claim
- name: CLUSTER_NAME
  displayName: GlusterFS cluster name
  description: A unique name to identify which heketi service manages this cluster, useful for running multiple heketi instances
  value: storage