From 8f54ac27245a33b6a646ff25ecbd2238104e30b7 Mon Sep 17 00:00:00 2001 From: Jorge Morales Pou Date: Tue, 30 Jul 2019 18:39:09 +0200 Subject: [PATCH 1/2] Updating readiness and liveness probes initialDelay for slow platforms --- openshift/gogs-persistent-template.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openshift/gogs-persistent-template.yaml b/openshift/gogs-persistent-template.yaml index c870e08..c437869 100644 --- a/openshift/gogs-persistent-template.yaml +++ b/openshift/gogs-persistent-template.yaml @@ -81,7 +81,7 @@ objects: - -i - -c - psql -h 127.0.0.1 -U ${POSTGRESQL_USER} -q -d ${POSTGRESQL_DATABASE} -c 'SELECT 1' - initialDelaySeconds: 5 + initialDelaySeconds: 30 timeoutSeconds: 1 failureThreshold: 10 resources: @@ -187,7 +187,7 @@ objects: path: / port: 3000 scheme: HTTP - initialDelaySeconds: 3 + initialDelaySeconds: 40 timeoutSeconds: 1 periodSeconds: 20 successThreshold: 1 @@ -197,7 +197,7 @@ objects: path: / port: 3000 scheme: HTTP - initialDelaySeconds: 20 + initialDelaySeconds: 40 timeoutSeconds: 1 periodSeconds: 10 successThreshold: 1 From 30b0fc78dd1f982e64ac97daee7d6eb9dff7122f Mon Sep 17 00:00:00 2001 From: Siamak Sadeghianfar Date: Thu, 10 Oct 2019 08:37:05 -0400 Subject: [PATCH 2/2] parameterized psql version for ocp 4 --- openshift/gogs-persistent-template.yaml | 5 +++- openshift/gogs-template.yaml | 37 +++++++++++++++++++++---- 2 files changed, 35 insertions(+), 7 deletions(-) diff --git a/openshift/gogs-persistent-template.yaml b/openshift/gogs-persistent-template.yaml index c870e08..01a234a 100644 --- a/openshift/gogs-persistent-template.yaml +++ b/openshift/gogs-persistent-template.yaml @@ -101,7 +101,7 @@ objects: - postgresql from: kind: ImageStreamTag - name: postgresql:9.5 + name: postgresql:${DATABASE_VERSION} namespace: openshift type: ImageChange - type: ConfigChange @@ -338,6 +338,9 @@ parameters: - displayName: Shared Buffer Amount name: DATABASE_SHARED_BUFFERS value: 12MB +- displayName: Database version (PostgreSQL) + name: DATABASE_VERSION + value: "9.5" - name: GOGS_VERSION displayName: Gogs Version description: 'Version of the Gogs container image to be used (check the available version https://hub.docker.com/r/openshiftdemos/gogs/tags)' diff --git a/openshift/gogs-template.yaml b/openshift/gogs-template.yaml index 9a3b288..929ef97 100644 --- a/openshift/gogs-template.yaml +++ b/openshift/gogs-template.yaml @@ -9,7 +9,6 @@ objects: - kind: ServiceAccount apiVersion: v1 metadata: - creationTimestamp: null labels: app: ${APPLICATION_NAME} name: ${APPLICATION_NAME} @@ -95,7 +94,7 @@ objects: - postgresql from: kind: ImageStreamTag - name: postgresql:9.5 + name: postgresql:${DATABASE_VERSION} namespace: openshift type: ImageChange - type: ConfigChange @@ -114,13 +113,15 @@ objects: port: 3000 protocol: TCP targetPort: 3000 + - name: 10022-tcp + port: 10022 + protocol: TCP + targetPort: 10022 selector: app: ${APPLICATION_NAME} deploymentconfig: ${APPLICATION_NAME} sessionAffinity: None type: ClusterIP - status: - loadBalancer: {} - kind: Route apiVersion: v1 id: ${APPLICATION_NAME}-http @@ -132,6 +133,23 @@ objects: name: ${APPLICATION_NAME} spec: host: ${HOSTNAME} + port: + targetPort: 3000-tcp + to: + name: ${APPLICATION_NAME} +- kind: Route + apiVersion: v1 + id: ${APPLICATION_NAME}-ssh + metadata: + annotations: + description: Route for application's ssh service. + labels: + app: ${APPLICATION_NAME} + name: ${APPLICATION_NAME}-ssh + spec: + host: secure${HOSTNAME} + port: + targetPort: 10022-tcp to: name: ${APPLICATION_NAME} - kind: DeploymentConfig @@ -169,6 +187,8 @@ objects: ports: - containerPort: 3000 protocol: TCP + - containerPort: 10022 + protocol: TCP resources: {} terminationMessagePath: /dev/termination-log volumeMounts: @@ -260,7 +280,9 @@ objects: [server] ROOT_URL=http://${HOSTNAME} - SSH_DOMAIN=${HOSTNAME} + SSH_DOMAIN=secure${HOSTNAME} + START_SSH_SERVER=true + SSH_LISTEN_PORT=10022 [security] INSTALL_LOCK = ${INSTALL_LOCK} @@ -299,10 +321,13 @@ parameters: - displayName: Shared Buffer Amount name: DATABASE_SHARED_BUFFERS value: 12MB +- displayName: Database version (PostgreSQL) + name: DATABASE_VERSION + value: "9.5" - name: GOGS_VERSION displayName: Gogs Version description: 'Version of the Gogs container image to be used (check the available version https://hub.docker.com/r/openshiftdemos/gogs/tags)' - value: "0.9.97" + value: "0.11.34" required: true - name: INSTALL_LOCK displayName: Installation lock