From 51ffcb739c1ebf9872aa3f45a905b087ae9e0f48 Mon Sep 17 00:00:00 2001 From: Russell Teague Date: Tue, 25 Apr 2017 10:20:39 -0400 Subject: Standardize all Origin versioning on 3.6 --- .../files/v1.6/deploy-heketi-template.yml | 115 ------------------ .../files/v1.6/glusterfs-registry-service.yml | 10 -- .../files/v1.6/glusterfs-template.yml | 128 --------------------- .../files/v1.6/heketi-template.yml | 113 ------------------ .../files/v3.6/deploy-heketi-template.yml | 115 ++++++++++++++++++ .../files/v3.6/glusterfs-registry-service.yml | 10 ++ .../files/v3.6/glusterfs-template.yml | 128 +++++++++++++++++++++ .../files/v3.6/heketi-template.yml | 113 ++++++++++++++++++ .../v1.6/glusterfs-registry-endpoints.yml.j2 | 11 -- .../templates/v1.6/topology.json.j2 | 39 ------- .../v3.6/glusterfs-registry-endpoints.yml.j2 | 11 ++ .../templates/v3.6/topology.json.j2 | 39 +++++++ 12 files changed, 416 insertions(+), 416 deletions(-) delete mode 100644 roles/openshift_storage_glusterfs/files/v1.6/deploy-heketi-template.yml delete mode 100644 roles/openshift_storage_glusterfs/files/v1.6/glusterfs-registry-service.yml delete mode 100644 roles/openshift_storage_glusterfs/files/v1.6/glusterfs-template.yml delete mode 100644 roles/openshift_storage_glusterfs/files/v1.6/heketi-template.yml create mode 100644 roles/openshift_storage_glusterfs/files/v3.6/deploy-heketi-template.yml create mode 100644 roles/openshift_storage_glusterfs/files/v3.6/glusterfs-registry-service.yml create mode 100644 roles/openshift_storage_glusterfs/files/v3.6/glusterfs-template.yml create mode 100644 roles/openshift_storage_glusterfs/files/v3.6/heketi-template.yml delete mode 100644 roles/openshift_storage_glusterfs/templates/v1.6/glusterfs-registry-endpoints.yml.j2 delete mode 100644 roles/openshift_storage_glusterfs/templates/v1.6/topology.json.j2 create mode 100644 roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-registry-endpoints.yml.j2 create mode 100644 roles/openshift_storage_glusterfs/templates/v3.6/topology.json.j2 (limited to 'roles/openshift_storage_glusterfs') diff --git a/roles/openshift_storage_glusterfs/files/v1.6/deploy-heketi-template.yml b/roles/openshift_storage_glusterfs/files/v1.6/deploy-heketi-template.yml deleted file mode 100644 index c9945be13..000000000 --- a/roles/openshift_storage_glusterfs/files/v1.6/deploy-heketi-template.yml +++ /dev/null @@ -1,115 +0,0 @@ ---- -kind: Template -apiVersion: v1 -metadata: - name: deploy-heketi - labels: - glusterfs: heketi-template - deploy-heketi: support - annotations: - description: Bootstrap Heketi installation - tags: glusterfs,heketi,installation -labels: - template: deploy-heketi -objects: -- kind: Service - apiVersion: v1 - metadata: - name: deploy-heketi - labels: - glusterfs: deploy-heketi-service - deploy-heketi: support - annotations: - description: Exposes Heketi service - spec: - ports: - - name: deploy-heketi - port: 8080 - targetPort: 8080 - selector: - name: deploy-heketi -- kind: Route - apiVersion: v1 - metadata: - name: deploy-heketi - labels: - glusterfs: deploy-heketi-route - deploy-heketi: support - spec: - to: - kind: Service - name: deploy-heketi -- kind: DeploymentConfig - apiVersion: v1 - metadata: - name: deploy-heketi - labels: - glusterfs: deploy-heketi-dc - deploy-heketi: support - annotations: - description: Defines how to deploy Heketi - spec: - replicas: 1 - selector: - name: deploy-heketi - triggers: - - type: ConfigChange - strategy: - type: Recreate - template: - metadata: - name: deploy-heketi - labels: - name: deploy-heketi - glusterfs: deploy-heketi-pod - deploy-heketi: support - spec: - serviceAccountName: heketi-service-account - containers: - - name: deploy-heketi - image: ${IMAGE_NAME}:${IMAGE_VERSION} - env: - - name: HEKETI_USER_KEY - value: ${HEKETI_USER_KEY} - - name: HEKETI_ADMIN_KEY - value: ${HEKETI_ADMIN_KEY} - - name: HEKETI_EXECUTOR - value: kubernetes - - name: HEKETI_FSTAB - value: /var/lib/heketi/fstab - - name: HEKETI_SNAPSHOT_LIMIT - value: '14' - - name: HEKETI_KUBE_GLUSTER_DAEMONSET - value: '1' - ports: - - containerPort: 8080 - volumeMounts: - - name: db - mountPath: /var/lib/heketi - readinessProbe: - timeoutSeconds: 3 - initialDelaySeconds: 3 - httpGet: - path: /hello - port: 8080 - livenessProbe: - timeoutSeconds: 3 - initialDelaySeconds: 30 - httpGet: - path: /hello - port: 8080 - volumes: - - name: db -parameters: -- name: HEKETI_USER_KEY - displayName: Heketi User Secret - description: Set secret for those creating volumes as type _user_ -- name: HEKETI_ADMIN_KEY - displayName: Heketi Administrator Secret - description: Set secret for administration of the Heketi service as user _admin_ -- name: IMAGE_NAME - displayName: GlusterFS container name - required: True -- name: IMAGE_VERSION - displayName: GlusterFS container versiona - required: True diff --git a/roles/openshift_storage_glusterfs/files/v1.6/glusterfs-registry-service.yml b/roles/openshift_storage_glusterfs/files/v1.6/glusterfs-registry-service.yml deleted file mode 100644 index 3f8d8f507..000000000 --- a/roles/openshift_storage_glusterfs/files/v1.6/glusterfs-registry-service.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: glusterfs-registry-endpoints -spec: - ports: - - port: 1 -status: - loadBalancer: {} diff --git a/roles/openshift_storage_glusterfs/files/v1.6/glusterfs-template.yml b/roles/openshift_storage_glusterfs/files/v1.6/glusterfs-template.yml deleted file mode 100644 index c66705752..000000000 --- a/roles/openshift_storage_glusterfs/files/v1.6/glusterfs-template.yml +++ /dev/null @@ -1,128 +0,0 @@ ---- -kind: Template -apiVersion: v1 -metadata: - name: glusterfs - labels: - glusterfs: template - annotations: - description: GlusterFS DaemonSet template - tags: glusterfs -objects: -- kind: DaemonSet - apiVersion: extensions/v1beta1 - metadata: - name: glusterfs - labels: - glusterfs: daemonset - annotations: - description: GlusterFS DaemonSet - tags: glusterfs - spec: - selector: - matchLabels: - glusterfs-node: pod - template: - metadata: - name: glusterfs - labels: - glusterfs-node: pod - spec: - nodeSelector: - storagenode: glusterfs - hostNetwork: true - containers: - - name: glusterfs - image: ${IMAGE_NAME}:${IMAGE_VERSION} - imagePullPolicy: IfNotPresent - volumeMounts: - - name: glusterfs-heketi - mountPath: "/var/lib/heketi" - - name: glusterfs-run - mountPath: "/run" - - name: glusterfs-lvm - mountPath: "/run/lvm" - - name: glusterfs-etc - mountPath: "/etc/glusterfs" - - name: glusterfs-logs - mountPath: "/var/log/glusterfs" - - name: glusterfs-config - mountPath: "/var/lib/glusterd" - - name: glusterfs-dev - mountPath: "/dev" - - name: glusterfs-misc - mountPath: "/var/lib/misc/glusterfsd" - - name: glusterfs-cgroup - mountPath: "/sys/fs/cgroup" - readOnly: true - - name: glusterfs-ssl - mountPath: "/etc/ssl" - readOnly: true - securityContext: - capabilities: {} - privileged: true - readinessProbe: - timeoutSeconds: 3 - initialDelaySeconds: 100 - exec: - command: - - "/bin/bash" - - "-c" - - systemctl status glusterd.service - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - livenessProbe: - timeoutSeconds: 3 - initialDelaySeconds: 100 - exec: - command: - - "/bin/bash" - - "-c" - - systemctl status glusterd.service - periodSeconds: 10 - successThreshold: 1 - failureThreshold: 3 - resources: {} - terminationMessagePath: "/dev/termination-log" - volumes: - - name: glusterfs-heketi - hostPath: - path: "/var/lib/heketi" - - name: glusterfs-run - emptyDir: {} - - name: glusterfs-lvm - hostPath: - path: "/run/lvm" - - name: glusterfs-etc - hostPath: - path: "/etc/glusterfs" - - name: glusterfs-logs - hostPath: - path: "/var/log/glusterfs" - - name: glusterfs-config - hostPath: - path: "/var/lib/glusterd" - - name: glusterfs-dev - hostPath: - path: "/dev" - - name: glusterfs-misc - hostPath: - path: "/var/lib/misc/glusterfsd" - - name: glusterfs-cgroup - hostPath: - path: "/sys/fs/cgroup" - - name: glusterfs-ssl - hostPath: - path: "/etc/ssl" - restartPolicy: Always - terminationGracePeriodSeconds: 30 - dnsPolicy: ClusterFirst - securityContext: {} -parameters: -- name: IMAGE_NAME - displayName: GlusterFS container name - required: True -- name: IMAGE_VERSION - displayName: GlusterFS container versiona - required: True diff --git a/roles/openshift_storage_glusterfs/files/v1.6/heketi-template.yml b/roles/openshift_storage_glusterfs/files/v1.6/heketi-template.yml deleted file mode 100644 index df045c170..000000000 --- a/roles/openshift_storage_glusterfs/files/v1.6/heketi-template.yml +++ /dev/null @@ -1,113 +0,0 @@ ---- -kind: Template -apiVersion: v1 -metadata: - name: heketi - labels: - glusterfs: heketi-template - annotations: - description: Heketi service deployment template - tags: glusterfs,heketi -labels: - template: heketi -objects: -- kind: Service - apiVersion: v1 - metadata: - name: heketi - labels: - glusterfs: heketi-service - annotations: - description: Exposes Heketi service - spec: - ports: - - name: heketi - port: 8080 - targetPort: 8080 - selector: - glusterfs: heketi-pod -- kind: Route - apiVersion: v1 - metadata: - name: heketi - labels: - glusterfs: heketi-route - spec: - to: - kind: Service - name: heketi -- kind: DeploymentConfig - apiVersion: v1 - metadata: - name: heketi - labels: - glusterfs: heketi-dc - annotations: - description: Defines how to deploy Heketi - spec: - replicas: 1 - selector: - glusterfs: heketi-pod - triggers: - - type: ConfigChange - strategy: - type: Recreate - template: - metadata: - name: heketi - labels: - glusterfs: heketi-pod - spec: - serviceAccountName: heketi-service-account - containers: - - name: heketi - image: ${IMAGE_NAME}:${IMAGE_VERSION} - imagePullPolicy: IfNotPresent - env: - - name: HEKETI_USER_KEY - value: ${HEKETI_USER_KEY} - - name: HEKETI_ADMIN_KEY - value: ${HEKETI_ADMIN_KEY} - - name: HEKETI_EXECUTOR - value: kubernetes - - name: HEKETI_FSTAB - value: /var/lib/heketi/fstab - - name: HEKETI_SNAPSHOT_LIMIT - value: '14' - - name: HEKETI_KUBE_GLUSTER_DAEMONSET - value: '1' - ports: - - containerPort: 8080 - volumeMounts: - - name: db - mountPath: /var/lib/heketi - readinessProbe: - timeoutSeconds: 3 - initialDelaySeconds: 3 - httpGet: - path: /hello - port: 8080 - livenessProbe: - timeoutSeconds: 3 - initialDelaySeconds: 30 - httpGet: - path: /hello - port: 8080 - volumes: - - name: db - glusterfs: - endpoints: heketi-storage-endpoints - path: heketidbstorage -parameters: -- name: HEKETI_USER_KEY - displayName: Heketi User Secret - description: Set secret for those creating volumes as type _user_ -- name: HEKETI_ADMIN_KEY - displayName: Heketi Administrator Secret - description: Set secret for administration of the Heketi service as user _admin_ -- name: IMAGE_NAME - displayName: GlusterFS container name - required: True -- name: IMAGE_VERSION - displayName: GlusterFS container versiona - required: True diff --git a/roles/openshift_storage_glusterfs/files/v3.6/deploy-heketi-template.yml b/roles/openshift_storage_glusterfs/files/v3.6/deploy-heketi-template.yml new file mode 100644 index 000000000..c9945be13 --- /dev/null +++ b/roles/openshift_storage_glusterfs/files/v3.6/deploy-heketi-template.yml @@ -0,0 +1,115 @@ +--- +kind: Template +apiVersion: v1 +metadata: + name: deploy-heketi + labels: + glusterfs: heketi-template + deploy-heketi: support + annotations: + description: Bootstrap Heketi installation + tags: glusterfs,heketi,installation +labels: + template: deploy-heketi +objects: +- kind: Service + apiVersion: v1 + metadata: + name: deploy-heketi + labels: + glusterfs: deploy-heketi-service + deploy-heketi: support + annotations: + description: Exposes Heketi service + spec: + ports: + - name: deploy-heketi + port: 8080 + targetPort: 8080 + selector: + name: deploy-heketi +- kind: Route + apiVersion: v1 + metadata: + name: deploy-heketi + labels: + glusterfs: deploy-heketi-route + deploy-heketi: support + spec: + to: + kind: Service + name: deploy-heketi +- kind: DeploymentConfig + apiVersion: v1 + metadata: + name: deploy-heketi + labels: + glusterfs: deploy-heketi-dc + deploy-heketi: support + annotations: + description: Defines how to deploy Heketi + spec: + replicas: 1 + selector: + name: deploy-heketi + triggers: + - type: ConfigChange + strategy: + type: Recreate + template: + metadata: + name: deploy-heketi + labels: + name: deploy-heketi + glusterfs: deploy-heketi-pod + deploy-heketi: support + spec: + serviceAccountName: heketi-service-account + containers: + - name: deploy-heketi + image: ${IMAGE_NAME}:${IMAGE_VERSION} + env: + - name: HEKETI_USER_KEY + value: ${HEKETI_USER_KEY} + - name: HEKETI_ADMIN_KEY + value: ${HEKETI_ADMIN_KEY} + - name: HEKETI_EXECUTOR + value: kubernetes + - name: HEKETI_FSTAB + value: /var/lib/heketi/fstab + - name: HEKETI_SNAPSHOT_LIMIT + value: '14' + - name: HEKETI_KUBE_GLUSTER_DAEMONSET + value: '1' + ports: + - containerPort: 8080 + volumeMounts: + - name: db + mountPath: /var/lib/heketi + readinessProbe: + timeoutSeconds: 3 + initialDelaySeconds: 3 + httpGet: + path: /hello + port: 8080 + livenessProbe: + timeoutSeconds: 3 + initialDelaySeconds: 30 + httpGet: + path: /hello + port: 8080 + volumes: + - name: db +parameters: +- name: HEKETI_USER_KEY + displayName: Heketi User Secret + description: Set secret for those creating volumes as type _user_ +- name: HEKETI_ADMIN_KEY + displayName: Heketi Administrator Secret + description: Set secret for administration of the Heketi service as user _admin_ +- name: IMAGE_NAME + displayName: GlusterFS container name + required: True +- name: IMAGE_VERSION + displayName: GlusterFS container versiona + required: True diff --git a/roles/openshift_storage_glusterfs/files/v3.6/glusterfs-registry-service.yml b/roles/openshift_storage_glusterfs/files/v3.6/glusterfs-registry-service.yml new file mode 100644 index 000000000..3f8d8f507 --- /dev/null +++ b/roles/openshift_storage_glusterfs/files/v3.6/glusterfs-registry-service.yml @@ -0,0 +1,10 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: glusterfs-registry-endpoints +spec: + ports: + - port: 1 +status: + loadBalancer: {} diff --git a/roles/openshift_storage_glusterfs/files/v3.6/glusterfs-template.yml b/roles/openshift_storage_glusterfs/files/v3.6/glusterfs-template.yml new file mode 100644 index 000000000..c66705752 --- /dev/null +++ b/roles/openshift_storage_glusterfs/files/v3.6/glusterfs-template.yml @@ -0,0 +1,128 @@ +--- +kind: Template +apiVersion: v1 +metadata: + name: glusterfs + labels: + glusterfs: template + annotations: + description: GlusterFS DaemonSet template + tags: glusterfs +objects: +- kind: DaemonSet + apiVersion: extensions/v1beta1 + metadata: + name: glusterfs + labels: + glusterfs: daemonset + annotations: + description: GlusterFS DaemonSet + tags: glusterfs + spec: + selector: + matchLabels: + glusterfs-node: pod + template: + metadata: + name: glusterfs + labels: + glusterfs-node: pod + spec: + nodeSelector: + storagenode: glusterfs + hostNetwork: true + containers: + - name: glusterfs + image: ${IMAGE_NAME}:${IMAGE_VERSION} + imagePullPolicy: IfNotPresent + volumeMounts: + - name: glusterfs-heketi + mountPath: "/var/lib/heketi" + - name: glusterfs-run + mountPath: "/run" + - name: glusterfs-lvm + mountPath: "/run/lvm" + - name: glusterfs-etc + mountPath: "/etc/glusterfs" + - name: glusterfs-logs + mountPath: "/var/log/glusterfs" + - name: glusterfs-config + mountPath: "/var/lib/glusterd" + - name: glusterfs-dev + mountPath: "/dev" + - name: glusterfs-misc + mountPath: "/var/lib/misc/glusterfsd" + - name: glusterfs-cgroup + mountPath: "/sys/fs/cgroup" + readOnly: true + - name: glusterfs-ssl + mountPath: "/etc/ssl" + readOnly: true + securityContext: + capabilities: {} + privileged: true + readinessProbe: + timeoutSeconds: 3 + initialDelaySeconds: 100 + exec: + command: + - "/bin/bash" + - "-c" + - systemctl status glusterd.service + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + livenessProbe: + timeoutSeconds: 3 + initialDelaySeconds: 100 + exec: + command: + - "/bin/bash" + - "-c" + - systemctl status glusterd.service + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + resources: {} + terminationMessagePath: "/dev/termination-log" + volumes: + - name: glusterfs-heketi + hostPath: + path: "/var/lib/heketi" + - name: glusterfs-run + emptyDir: {} + - name: glusterfs-lvm + hostPath: + path: "/run/lvm" + - name: glusterfs-etc + hostPath: + path: "/etc/glusterfs" + - name: glusterfs-logs + hostPath: + path: "/var/log/glusterfs" + - name: glusterfs-config + hostPath: + path: "/var/lib/glusterd" + - name: glusterfs-dev + hostPath: + path: "/dev" + - name: glusterfs-misc + hostPath: + path: "/var/lib/misc/glusterfsd" + - name: glusterfs-cgroup + hostPath: + path: "/sys/fs/cgroup" + - name: glusterfs-ssl + hostPath: + path: "/etc/ssl" + restartPolicy: Always + terminationGracePeriodSeconds: 30 + dnsPolicy: ClusterFirst + securityContext: {} +parameters: +- name: IMAGE_NAME + displayName: GlusterFS container name + required: True +- name: IMAGE_VERSION + displayName: GlusterFS container versiona + required: True diff --git a/roles/openshift_storage_glusterfs/files/v3.6/heketi-template.yml b/roles/openshift_storage_glusterfs/files/v3.6/heketi-template.yml new file mode 100644 index 000000000..df045c170 --- /dev/null +++ b/roles/openshift_storage_glusterfs/files/v3.6/heketi-template.yml @@ -0,0 +1,113 @@ +--- +kind: Template +apiVersion: v1 +metadata: + name: heketi + labels: + glusterfs: heketi-template + annotations: + description: Heketi service deployment template + tags: glusterfs,heketi +labels: + template: heketi +objects: +- kind: Service + apiVersion: v1 + metadata: + name: heketi + labels: + glusterfs: heketi-service + annotations: + description: Exposes Heketi service + spec: + ports: + - name: heketi + port: 8080 + targetPort: 8080 + selector: + glusterfs: heketi-pod +- kind: Route + apiVersion: v1 + metadata: + name: heketi + labels: + glusterfs: heketi-route + spec: + to: + kind: Service + name: heketi +- kind: DeploymentConfig + apiVersion: v1 + metadata: + name: heketi + labels: + glusterfs: heketi-dc + annotations: + description: Defines how to deploy Heketi + spec: + replicas: 1 + selector: + glusterfs: heketi-pod + triggers: + - type: ConfigChange + strategy: + type: Recreate + template: + metadata: + name: heketi + labels: + glusterfs: heketi-pod + spec: + serviceAccountName: heketi-service-account + containers: + - name: heketi + image: ${IMAGE_NAME}:${IMAGE_VERSION} + imagePullPolicy: IfNotPresent + env: + - name: HEKETI_USER_KEY + value: ${HEKETI_USER_KEY} + - name: HEKETI_ADMIN_KEY + value: ${HEKETI_ADMIN_KEY} + - name: HEKETI_EXECUTOR + value: kubernetes + - name: HEKETI_FSTAB + value: /var/lib/heketi/fstab + - name: HEKETI_SNAPSHOT_LIMIT + value: '14' + - name: HEKETI_KUBE_GLUSTER_DAEMONSET + value: '1' + ports: + - containerPort: 8080 + volumeMounts: + - name: db + mountPath: /var/lib/heketi + readinessProbe: + timeoutSeconds: 3 + initialDelaySeconds: 3 + httpGet: + path: /hello + port: 8080 + livenessProbe: + timeoutSeconds: 3 + initialDelaySeconds: 30 + httpGet: + path: /hello + port: 8080 + volumes: + - name: db + glusterfs: + endpoints: heketi-storage-endpoints + path: heketidbstorage +parameters: +- name: HEKETI_USER_KEY + displayName: Heketi User Secret + description: Set secret for those creating volumes as type _user_ +- name: HEKETI_ADMIN_KEY + displayName: Heketi Administrator Secret + description: Set secret for administration of the Heketi service as user _admin_ +- name: IMAGE_NAME + displayName: GlusterFS container name + required: True +- name: IMAGE_VERSION + displayName: GlusterFS container versiona + required: True diff --git a/roles/openshift_storage_glusterfs/templates/v1.6/glusterfs-registry-endpoints.yml.j2 b/roles/openshift_storage_glusterfs/templates/v1.6/glusterfs-registry-endpoints.yml.j2 deleted file mode 100644 index d72d085c9..000000000 --- a/roles/openshift_storage_glusterfs/templates/v1.6/glusterfs-registry-endpoints.yml.j2 +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -kind: Endpoints -metadata: - name: glusterfs-registry-endpoints -subsets: -- addresses: -{% for node in groups.oo_glusterfs_to_config %} - - ip: {{ hostvars[node].glusterfs_ip | default(hostvars[node].openshift.common.ip) }} -{% endfor %} - ports: - - port: 1 diff --git a/roles/openshift_storage_glusterfs/templates/v1.6/topology.json.j2 b/roles/openshift_storage_glusterfs/templates/v1.6/topology.json.j2 deleted file mode 100644 index eb5b4544f..000000000 --- a/roles/openshift_storage_glusterfs/templates/v1.6/topology.json.j2 +++ /dev/null @@ -1,39 +0,0 @@ -{ - "clusters": [ -{%- set clusters = {} -%} -{%- for node in groups.oo_glusterfs_to_config -%} - {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%} - {%- if cluster in clusters -%} - {%- set _dummy = clusters[cluster].append(node) -%} - {%- else -%} - {%- set _dummy = clusters.update({cluster: [ node, ]}) -%} - {%- endif -%} -{%- endfor -%} -{%- for cluster in clusters -%} - { - "nodes": [ -{%- for node in clusters[cluster] -%} - { - "node": { - "hostnames": { - "manage": [ - "{{ hostvars[node].glusterfs_hostname | default(hostvars[node].openshift.common.hostname) }}" - ], - "storage": [ - "{{ hostvars[node].glusterfs_ip | default(hostvars[node].openshift.common.ip) }}" - ] - }, - "zone": {{ hostvars[node].glusterfs_zone | default(1) }} - }, - "devices": [ -{%- for device in hostvars[node].glusterfs_devices -%} - "{{ device }}"{% if not loop.last %},{% endif %} -{%- endfor -%} - ] - }{% if not loop.last %},{% endif %} -{%- endfor -%} - ] - }{% if not loop.last %},{% endif %} -{%- endfor -%} - ] -} diff --git a/roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-registry-endpoints.yml.j2 b/roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-registry-endpoints.yml.j2 new file mode 100644 index 000000000..d72d085c9 --- /dev/null +++ b/roles/openshift_storage_glusterfs/templates/v3.6/glusterfs-registry-endpoints.yml.j2 @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Endpoints +metadata: + name: glusterfs-registry-endpoints +subsets: +- addresses: +{% for node in groups.oo_glusterfs_to_config %} + - ip: {{ hostvars[node].glusterfs_ip | default(hostvars[node].openshift.common.ip) }} +{% endfor %} + ports: + - port: 1 diff --git a/roles/openshift_storage_glusterfs/templates/v3.6/topology.json.j2 b/roles/openshift_storage_glusterfs/templates/v3.6/topology.json.j2 new file mode 100644 index 000000000..eb5b4544f --- /dev/null +++ b/roles/openshift_storage_glusterfs/templates/v3.6/topology.json.j2 @@ -0,0 +1,39 @@ +{ + "clusters": [ +{%- set clusters = {} -%} +{%- for node in groups.oo_glusterfs_to_config -%} + {%- set cluster = hostvars[node].glusterfs_cluster if 'glusterfs_cluster' in node else '1' -%} + {%- if cluster in clusters -%} + {%- set _dummy = clusters[cluster].append(node) -%} + {%- else -%} + {%- set _dummy = clusters.update({cluster: [ node, ]}) -%} + {%- endif -%} +{%- endfor -%} +{%- for cluster in clusters -%} + { + "nodes": [ +{%- for node in clusters[cluster] -%} + { + "node": { + "hostnames": { + "manage": [ + "{{ hostvars[node].glusterfs_hostname | default(hostvars[node].openshift.common.hostname) }}" + ], + "storage": [ + "{{ hostvars[node].glusterfs_ip | default(hostvars[node].openshift.common.ip) }}" + ] + }, + "zone": {{ hostvars[node].glusterfs_zone | default(1) }} + }, + "devices": [ +{%- for device in hostvars[node].glusterfs_devices -%} + "{{ device }}"{% if not loop.last %},{% endif %} +{%- endfor -%} + ] + }{% if not loop.last %},{% endif %} +{%- endfor -%} + ] + }{% if not loop.last %},{% endif %} +{%- endfor -%} + ] +} -- cgit v1.2.1