瀏覽代碼

Merge pull request #1865 from InfoSec812/InfoSec812-openshift-route-parameterized

Update OpenShift template to add Route and parameterize
Lauri Ojansivu 7 年之前
父節點
當前提交
3e7247891d
共有 1 個文件被更改,包括 35 次插入2 次删除
  1. 35 2
      openshift/wekan.yml

+ 35 - 2
openshift/wekan.yml

@@ -147,7 +147,7 @@ objects:
           - name: MONGO_URL
           - name: MONGO_URL
             value: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}:27017/${MONGODB_DATABASE}
             value: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}:27017/${MONGODB_DATABASE}
           - name: ROOT_URL
           - name: ROOT_URL
-            value: http://localhost
+            value: https://${FQDN}/
           - name: PORT
           - name: PORT
             value: "8080"
             value: "8080"
           ports:
           ports:
@@ -272,12 +272,45 @@ objects:
         from:
         from:
           kind: ImageStreamTag
           kind: ImageStreamTag
           name: mongodb:${MONGODB_VERSION}
           name: mongodb:${MONGODB_VERSION}
-          namespace: "${NAMESPACE}"
+          namespace: "openshift"
         lastTriggeredImage: ''
         lastTriggeredImage: ''
       type: ImageChange
       type: ImageChange
     - type: ConfigChange
     - type: ConfigChange
   status: {}
   status: {}
+- apiVersion: route.openshift.io/v1
+  kind: Route
+  metadata:
+    labels:
+      app: wekan
+      service: wekan
+      template: wekan-mongodb-persistent-template
+    name: wekan
+    namespace: ${NAMESPACE}
+  spec:
+    host: ${FQDN}
+    port:
+      targetPort: wekan
+    tls:
+      termination: edge
+    to:
+      kind: Service
+      name: wekan
+      weight: 100
+    wildcardPolicy: None
+  status:
+    ingress:
+      - conditions:
+          - lastTransitionTime: '2018-08-28T14:45:21Z'
+            status: 'True'
+            type: Admitted
+        host: ${FQDN}
+        routerName: router
+        wildcardPolicy: None
 parameters:
 parameters:
+- description: The Fully Qualified Hostname (FQDN) of the application
+  displayName: FQDN
+  name: FQDN
+  required: true
 - description: Maximum amount of memory the container can use.
 - description: Maximum amount of memory the container can use.
   displayName: Memory Limit
   displayName: Memory Limit
   name: MEMORY_LIMIT
   name: MEMORY_LIMIT