diff --git a/cmd/openshift-tests/images.go b/cmd/openshift-tests/images.go index 3c97963f3663..7dd1a2a8905d 100644 --- a/cmd/openshift-tests/images.go +++ b/cmd/openshift-tests/images.go @@ -201,7 +201,7 @@ func pulledInvalidImages(fromRepository string) ginkgo.JUnitForEventsFunc { // used to test pull secrets against an authenticated registry // TODO: will not work for a disconnected test environment and should be emulated by launching // an authenticated registry in a pod on cluster - "registry.redhat.io/rhscl/nodejs-10-rhel7:latest", + "registry.redhat.io/ubi8/nodejs-14:latest", ) if len(fromRepository) > 0 { allowedPrefixes.Insert(fromRepository) diff --git a/examples/db-templates/README.md b/examples/db-templates/README.md index 13701b1ad92e..7604bed6bda4 100644 --- a/examples/db-templates/README.md +++ b/examples/db-templates/README.md @@ -37,12 +37,12 @@ your current project. Instantiate a new database service with this command: Replace `/path/to/template.json` with an appropriate path, that can be either a local path or an URL. Example: - $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mongodb-ephemeral-template.json + $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mariadb-ephemeral-template.json The parameters listed in the output above can be tweaked by specifying values in the command line with the `-p` option: - $ oc new-app examples/db-templates/mongodb-ephemeral-template.json -p DATABASE_SERVICE_NAME=mydb -p MONGODB_USER=default + $ oc new-app examples/db-templates/mariadb-ephemeral-template.json -p DATABASE_SERVICE_NAME=mydb -p MYSQL_USER=default Note that the persistent template requires an existing persistent volume, otherwise the deployment won't ever succeed. @@ -59,8 +59,8 @@ later. Create the template with this command: Replace `/path/to/template.json` with an appropriate path, that can be either a local path or an URL. Example: - $ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mongodb-ephemeral-template.json - template "mongodb-ephemeral" created + $ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/db-templates/mariadb-ephemeral-template.json + template "mariadb-ephemeral" created The new template is now available to use in the Web Console or with `oc new-app`. @@ -70,8 +70,6 @@ new-app`. * [MariaDB](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mariadb/templates/mariadb-ephemeral.json) - For more information see the [product documentation](https://docs.openshift.org/latest/using_images/db_images/mariadb.html). * [MariaDB Persistent](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mariadb/templates/mariadb-persistent.json) - For more information see the [product documentation](https://docs.openshift.org/latest/using_images/db_images/mariadb.html). -* [MongoDB](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mongodb/templates/mongodb-ephemeral.json) - For more information see the [product documentation](https://docs.openshift.org/latest/using_images/db_images/mongodb.html). -* [MongoDB Persistent](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mongodb/templates/mongodb-persistent.json) - For more information see the [product documentation](https://docs.openshift.org/latest/using_images/db_images/mongodb.html). * [MySQL](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mysql/templates/mysql-ephemeral.json) - For more information see the [product documentation](https://docs.openshift.org/latest/using_images/db_images/mysql.html). * [MySQL Persistent](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mysql/templates/mysql-persistent.json) - For more information see the [product documentation](https://docs.openshift.org/latest/using_images/db_images/mysql.html). * [PostgreSQL](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/postgresql/templates/postgresql-ephemeral.json) - For more information see the [product documentation](https://docs.openshift.org/latest/using_images/db_images/postgresql.html). diff --git a/examples/db-templates/mariadb-ephemeral-template.json b/examples/db-templates/mariadb-ephemeral-template.json index 59e6444db503..b3cc99ff1481 100644 --- a/examples/db-templates/mariadb-ephemeral-template.json +++ b/examples/db-templates/mariadb-ephemeral-template.json @@ -1,258 +1,264 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mariadb-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md", - "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mariadb" - }, - "name": "mariadb-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mariadb", - "port": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mariadb", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mariadb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mariadb:${MARIADB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mariadb" - }, - { - "description": "Username for MariaDB user that will be used for accessing the database.", - "displayName": "MariaDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MariaDB connection user.", - "displayName": "MariaDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MariaDB root user.", - "displayName": "MariaDB root Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MariaDB database accessed.", - "displayName": "MariaDB Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of MariaDB image to be used (10.2 or latest).", - "displayName": "Version of MariaDB Image", - "name": "MARIADB_VERSION", - "required": true, - "value": "10.2" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mariadb-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-mariadb", + "openshift.io/display-name": "MariaDB (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md", + "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mariadb" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mariadb", + "port": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mariadb", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mariadb" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mariadb:${MARIADB_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mariadb", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MariaDB Connection Username", + "description": "Username for MariaDB user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MariaDB Connection Password", + "description": "Password for the MariaDB connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MariaDB root Password", + "description": "Password for the MariaDB root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MariaDB Database Name", + "description": "Name of the MariaDB database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "MARIADB_VERSION", + "displayName": "Version of MariaDB Image", + "description": "Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest).", + "value": "10.3-el8", + "required": true + } + ], + "labels": { + "template": "mariadb-ephemeral-template" + } } \ No newline at end of file diff --git a/examples/db-templates/mariadb-persistent-template.json b/examples/db-templates/mariadb-persistent-template.json index 8ec145ca48de..9af30abbe8c4 100644 --- a/examples/db-templates/mariadb-persistent-template.json +++ b/examples/db-templates/mariadb-persistent-template.json @@ -1,282 +1,288 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mariadb-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MariaDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB", - "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md", - "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mariadb" - }, - "name": "mariadb-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mariadb", - "port": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mariadb", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mariadb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mariadb:${MARIADB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mariadb" - }, - { - "description": "Username for MariaDB user that will be used for accessing the database.", - "displayName": "MariaDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MariaDB connection user.", - "displayName": "MariaDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MariaDB root user.", - "displayName": "MariaDB root Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MariaDB database accessed.", - "displayName": "MariaDB Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of MariaDB image to be used (10.2 or latest).", - "displayName": "Version of MariaDB Image", - "name": "MARIADB_VERSION", - "required": true, - "value": "10.2" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mariadb-persistent", + "creationTimestamp": null, + "annotations": { + "description": "MariaDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-mariadb", + "openshift.io/display-name": "MariaDB", + "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md", + "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mariadb" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mariadb", + "port": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mariadb", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mariadb" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mariadb:${MARIADB_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mariadb", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MariaDB Connection Username", + "description": "Username for MariaDB user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MariaDB Connection Password", + "description": "Password for the MariaDB connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MariaDB root Password", + "description": "Password for the MariaDB root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MariaDB Database Name", + "description": "Name of the MariaDB database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "MARIADB_VERSION", + "displayName": "Version of MariaDB Image", + "description": "Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest).", + "value": "10.3-el8", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + } + ], + "labels": { + "template": "mariadb-persistent-template" + } } \ No newline at end of file diff --git a/examples/db-templates/mongodb-ephemeral-template.json b/examples/db-templates/mongodb-ephemeral-template.json deleted file mode 100644 index d9bb5ff88c9e..000000000000 --- a/examples/db-templates/mongodb-ephemeral-template.json +++ /dev/null @@ -1,277 +0,0 @@ -{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mongodb-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MONGODB_USER}\n Password: ${MONGODB_PASSWORD}\n Database Name: ${MONGODB_DATABASE}\n Connection URL: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}/${MONGODB_DATABASE}\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.", - "metadata": { - "annotations": { - "description": "MongoDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mongodb.html", - "openshift.io/long-description": "This template provides a standalone MongoDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mongodb" - }, - "name": "mongodb-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}", - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-admin-password": "${MONGODB_ADMIN_PASSWORD}", - "database-name": "${MONGODB_DATABASE}", - "database-password": "${MONGODB_PASSWORD}", - "database-user": "${MONGODB_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mongodb://{.spec.clusterIP}:{.spec.ports[?(.name==\"mongo\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongo", - "nodePort": 0, - "port": 27017, - "protocol": "TCP", - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MONGODB_USER", - "required": true - }, - { - "description": "Password for the MongoDB connection user.", - "displayName": "MongoDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_PASSWORD", - "required": true - }, - { - "description": "Name of the MongoDB database accessed.", - "displayName": "MongoDB Database Name", - "name": "MONGODB_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "MongoDB Admin Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_ADMIN_PASSWORD", - "required": true - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - } - ] -} \ No newline at end of file diff --git a/examples/db-templates/mongodb-persistent-template.json b/examples/db-templates/mongodb-persistent-template.json deleted file mode 100644 index 3160e6fa8ee1..000000000000 --- a/examples/db-templates/mongodb-persistent-template.json +++ /dev/null @@ -1,301 +0,0 @@ -{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mongodb-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MONGODB_USER}\n Password: ${MONGODB_PASSWORD}\n Database Name: ${MONGODB_DATABASE}\n Connection URL: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}/${MONGODB_DATABASE}\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.", - "metadata": { - "annotations": { - "description": "MongoDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mongodb.html", - "openshift.io/long-description": "This template provides a standalone MongoDB server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mongodb" - }, - "name": "mongodb-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}", - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-admin-password": "${MONGODB_ADMIN_PASSWORD}", - "database-name": "${MONGODB_DATABASE}", - "database-password": "${MONGODB_PASSWORD}", - "database-user": "${MONGODB_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mongodb://{.spec.clusterIP}:{.spec.ports[?(.name==\"mongo\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongo", - "nodePort": 0, - "port": 27017, - "protocol": "TCP", - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MONGODB_USER", - "required": true - }, - { - "description": "Password for the MongoDB connection user.", - "displayName": "MongoDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_PASSWORD", - "required": true - }, - { - "description": "Name of the MongoDB database accessed.", - "displayName": "MongoDB Database Name", - "name": "MONGODB_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "MongoDB Admin Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_ADMIN_PASSWORD", - "required": true - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - } - ] -} \ No newline at end of file diff --git a/examples/db-templates/mysql-ephemeral-template.json b/examples/db-templates/mysql-ephemeral-template.json index e74e3828ccb0..e6fceb3789d5 100644 --- a/examples/db-templates/mysql-ephemeral-template.json +++ b/examples/db-templates/mysql-ephemeral-template.json @@ -1,277 +1,283 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mysql-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MySQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", - "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mysql" - }, - "name": "mysql-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "nodePort": 0, - "port": 3306, - "protocol": "TCP", - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:${MYSQL_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Username for MySQL user that will be used for accessing the database.", - "displayName": "MySQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MySQL connection user.", - "displayName": "MySQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MySQL root user.", - "displayName": "MySQL root user Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MySQL database accessed.", - "displayName": "MySQL Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of MySQL image to be used (5.7, or latest).", - "displayName": "Version of MySQL Image", - "name": "MYSQL_VERSION", - "required": true, - "value": "5.7" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mysql-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "MySQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", + "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mysql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "nodePort": 0, + "port": 3306, + "protocol": "TCP", + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mysql", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MySQL Connection Username", + "description": "Username for MySQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MySQL Connection Password", + "description": "Password for the MySQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MySQL root user Password", + "description": "Password for the MySQL root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MySQL Database Name", + "description": "Name of the MySQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "Version of MySQL Image", + "description": "Version of MySQL image to be used (8.0-el7, 8.0-el8, or latest).", + "value": "8.0-el8", + "required": true + } + ], + "labels": { + "template": "mysql-ephemeral-template" + } } \ No newline at end of file diff --git a/examples/db-templates/mysql-persistent-template.json b/examples/db-templates/mysql-persistent-template.json index 8252bd3e0421..6e36f9871dc9 100644 --- a/examples/db-templates/mysql-persistent-template.json +++ b/examples/db-templates/mysql-persistent-template.json @@ -1,282 +1,288 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mysql-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MySQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", - "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mysql" - }, - "name": "mysql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:${MYSQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Username for MySQL user that will be used for accessing the database.", - "displayName": "MySQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MySQL connection user.", - "displayName": "MySQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MySQL root user.", - "displayName": "MySQL root user Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MySQL database accessed.", - "displayName": "MySQL Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of MySQL image to be used (5.7, or latest).", - "displayName": "Version of MySQL Image", - "name": "MYSQL_VERSION", - "required": true, - "value": "5.7" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mysql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "MySQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", + "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mysql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mysql", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MySQL Connection Username", + "description": "Username for MySQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MySQL Connection Password", + "description": "Password for the MySQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MySQL root user Password", + "description": "Password for the MySQL root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MySQL Database Name", + "description": "Name of the MySQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "Version of MySQL Image", + "description": "Version of MySQL image to be used (8.0-el7, 8.0-el8, or latest).", + "value": "8.0-el8", + "required": true + } + ], + "labels": { + "template": "mysql-persistent-template" + } } \ No newline at end of file diff --git a/examples/db-templates/postgresql-ephemeral-template.json b/examples/db-templates/postgresql-ephemeral-template.json index c0fac24e5ca0..b617550118af 100644 --- a/examples/db-templates/postgresql-ephemeral-template.json +++ b/examples/db-templates/postgresql-ephemeral-template.json @@ -1,258 +1,259 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "postgresql-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", - "metadata": { - "annotations": { - "description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", - "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,postgresql" - }, - "name": "postgresql-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${POSTGRESQL_DATABASE}", - "database-password": "${POSTGRESQL_PASSWORD}", - "database-user": "${POSTGRESQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "nodePort": 0, - "port": 5432, - "protocol": "TCP", - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Username for PostgreSQL user that will be used for accessing the database.", - "displayName": "PostgreSQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "POSTGRESQL_USER", - "required": true - }, - { - "description": "Password for the PostgreSQL connection user.", - "displayName": "PostgreSQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "POSTGRESQL_PASSWORD", - "required": true - }, - { - "description": "Name of the PostgreSQL database accessed.", - "displayName": "PostgreSQL Database Name", - "name": "POSTGRESQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "postgresql-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", + "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,postgresql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${POSTGRESQL_DATABASE}", + "database-password": "${POSTGRESQL_PASSWORD}", + "database-user": "${POSTGRESQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "nodePort": 0, + "port": 5432, + "protocol": "TCP", + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "postgresql", + "required": true + }, + { + "name": "POSTGRESQL_USER", + "displayName": "PostgreSQL Connection Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "POSTGRESQL_PASSWORD", + "displayName": "PostgreSQL Connection Password", + "description": "Password for the PostgreSQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "POSTGRESQL_DATABASE", + "displayName": "PostgreSQL Database Name", + "description": "Name of the PostgreSQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).", + "value": "10-el8", + "required": true + } + ], + "labels": { + "template": "postgresql-ephemeral-template" + } } \ No newline at end of file diff --git a/examples/db-templates/postgresql-persistent-template.json b/examples/db-templates/postgresql-persistent-template.json index 48e51c89d386..e3f752ca1f93 100644 --- a/examples/db-templates/postgresql-persistent-template.json +++ b/examples/db-templates/postgresql-persistent-template.json @@ -1,282 +1,283 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "postgresql-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", - "metadata": { - "annotations": { - "description": "PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", - "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,postgresql" - }, - "name": "postgresql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${POSTGRESQL_DATABASE}", - "database-password": "${POSTGRESQL_PASSWORD}", - "database-user": "${POSTGRESQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "nodePort": 0, - "port": 5432, - "protocol": "TCP", - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Username for PostgreSQL user that will be used for accessing the database.", - "displayName": "PostgreSQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "POSTGRESQL_USER", - "required": true - }, - { - "description": "Password for the PostgreSQL connection user.", - "displayName": "PostgreSQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "POSTGRESQL_PASSWORD", - "required": true - }, - { - "description": "Name of the PostgreSQL database accessed.", - "displayName": "PostgreSQL Database Name", - "name": "POSTGRESQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "postgresql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", + "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,postgresql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${POSTGRESQL_DATABASE}", + "database-password": "${POSTGRESQL_PASSWORD}", + "database-user": "${POSTGRESQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "nodePort": 0, + "port": 5432, + "protocol": "TCP", + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "postgresql", + "required": true + }, + { + "name": "POSTGRESQL_USER", + "displayName": "PostgreSQL Connection Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "POSTGRESQL_PASSWORD", + "displayName": "PostgreSQL Connection Password", + "description": "Password for the PostgreSQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "POSTGRESQL_DATABASE", + "displayName": "PostgreSQL Database Name", + "description": "Name of the PostgreSQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).", + "value": "10-el8", + "required": true + } + ], + "labels": { + "template": "postgresql-persistent-template" + } } \ No newline at end of file diff --git a/examples/db-templates/redis-ephemeral-template.json b/examples/db-templates/redis-ephemeral-template.json index 7a4ea8f7c671..e9af758bdd32 100644 --- a/examples/db-templates/redis-ephemeral-template.json +++ b/examples/db-templates/redis-ephemeral-template.json @@ -1,221 +1,222 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "redis-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.", - "metadata": { - "annotations": { - "description": "Redis in-memory data structure store, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-redis", - "openshift.io/display-name": "Redis (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/3.2", - "openshift.io/long-description": "This template provides a standalone Redis server. The data is not stored on persistent storage, so any restart of the service will result in all data being lost.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,redis" - }, - "name": "redis-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-password": "{.data['database-password']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-password": "${REDIS_PASSWORD}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "redis", - "nodePort": 0, - "port": 6379, - "protocol": "TCP", - "targetPort": 6379 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "REDIS_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 6379 - }, - "timeoutSeconds": 1 - }, - "name": "redis", - "ports": [ - { - "containerPort": 6379, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/redis/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "redis" - ], - "from": { - "kind": "ImageStreamTag", - "name": "redis:${REDIS_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "redis" - }, - { - "description": "Password for the Redis connection user.", - "displayName": "Redis Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "REDIS_PASSWORD", - "required": true - }, - { - "description": "Version of Redis image to be used (3.2 or latest).", - "displayName": "Version of Redis Image", - "name": "REDIS_VERSION", - "required": true, - "value": "3.2" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "redis-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "Redis in-memory data structure store, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/5", + "openshift.io/long-description": "This template provides a standalone Redis server. The data is not stored on persistent storage, so any restart of the service will result in all data being lost.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,redis" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-password": "{.data['database-password']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-password": "${REDIS_PASSWORD}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "redis", + "nodePort": 0, + "port": 6379, + "protocol": "TCP", + "targetPort": 6379 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "REDIS_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 6379 + }, + "timeoutSeconds": 1 + }, + "name": "redis", + "ports": [ + { + "containerPort": 6379, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/redis/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "redis" + ], + "from": { + "kind": "ImageStreamTag", + "name": "redis:${REDIS_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "redis", + "required": true + }, + { + "name": "REDIS_PASSWORD", + "displayName": "Redis Connection Password", + "description": "Password for the Redis connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "REDIS_VERSION", + "displayName": "Version of Redis Image", + "description": "Version of Redis image to be used (5-el7, 5-el8, or latest).", + "value": "5-el8", + "required": true + } + ], + "labels": { + "template": "redis-ephemeral-template" + } } \ No newline at end of file diff --git a/examples/db-templates/redis-persistent-template.json b/examples/db-templates/redis-persistent-template.json index 4de772667387..68ee70a6c55e 100644 --- a/examples/db-templates/redis-persistent-template.json +++ b/examples/db-templates/redis-persistent-template.json @@ -1,245 +1,246 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "redis-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.", - "metadata": { - "annotations": { - "description": "Redis in-memory data structure store, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-redis", - "openshift.io/display-name": "Redis", - "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/3.2", - "openshift.io/long-description": "This template provides a standalone Redis server. The data is stored on persistent storage.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,redis" - }, - "name": "redis-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-password": "{.data['database-password']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-password": "${REDIS_PASSWORD}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "redis", - "nodePort": 0, - "port": 6379, - "protocol": "TCP", - "targetPort": 6379 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "REDIS_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 6379 - }, - "timeoutSeconds": 1 - }, - "name": "redis", - "ports": [ - { - "containerPort": 6379, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/redis/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "redis" - ], - "from": { - "kind": "ImageStreamTag", - "name": "redis:${REDIS_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "redis" - }, - { - "description": "Password for the Redis connection user.", - "displayName": "Redis Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "REDIS_PASSWORD", - "required": true - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of Redis image to be used (3.2 or latest).", - "displayName": "Version of Redis Image", - "name": "REDIS_VERSION", - "required": true, - "value": "3.2" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "redis-persistent", + "creationTimestamp": null, + "annotations": { + "description": "Redis in-memory data structure store, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis", + "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/5", + "openshift.io/long-description": "This template provides a standalone Redis server. The data is stored on persistent storage.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,redis" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-password": "{.data['database-password']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-password": "${REDIS_PASSWORD}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "redis", + "nodePort": 0, + "port": 6379, + "protocol": "TCP", + "targetPort": 6379 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "REDIS_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 6379 + }, + "timeoutSeconds": 1 + }, + "name": "redis", + "ports": [ + { + "containerPort": 6379, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/redis/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "redis" + ], + "from": { + "kind": "ImageStreamTag", + "name": "redis:${REDIS_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "redis", + "required": true + }, + { + "name": "REDIS_PASSWORD", + "displayName": "Redis Connection Password", + "description": "Password for the Redis connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "REDIS_VERSION", + "displayName": "Version of Redis Image", + "description": "Version of Redis image to be used (5-el7, 5-el8, or latest).", + "value": "5-el8", + "required": true + } + ], + "labels": { + "template": "redis-persistent-template" + } } \ No newline at end of file diff --git a/examples/examples_test.go b/examples/examples_test.go index 5040e5593815..ef9a25133f4c 100644 --- a/examples/examples_test.go +++ b/examples/examples_test.go @@ -73,12 +73,10 @@ func TestExampleObjectSchemas(t *testing.T) { "../examples/db-templates": { "mysql-persistent-template": &templatev1.Template{}, "postgresql-persistent-template": &templatev1.Template{}, - "mongodb-persistent-template": &templatev1.Template{}, "mariadb-persistent-template": &templatev1.Template{}, "redis-persistent-template": &templatev1.Template{}, "mysql-ephemeral-template": &templatev1.Template{}, "postgresql-ephemeral-template": &templatev1.Template{}, - "mongodb-ephemeral-template": &templatev1.Template{}, "mariadb-ephemeral-template": &templatev1.Template{}, "redis-ephemeral-template": &templatev1.Template{}, }, diff --git a/examples/image-streams/README.md b/examples/image-streams/README.md index 02b179068e8c..c22e8f709a00 100644 --- a/examples/image-streams/README.md +++ b/examples/image-streams/README.md @@ -5,47 +5,44 @@ Imagestreams provide an abstraction for images located in a registry. By refere of referencing a image registry/repository:tag directly, your resources can be triggered when the underlying image changes, as well as control when image updates are rolled out. -* [.NET Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/dotnet/imagestreams/dotnet-centos7.json) -* [.NET RHEL7](https://raw.githubusercontent.com/openshift/library/master/official/dotnet/imagestreams/dotnet-rhel7.json) +* [.NET Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/dotnet/imagestreams/dotnet-centos.json) +* [.NET RHEL7](https://raw.githubusercontent.com/openshift/library/master/official/dotnet/imagestreams/dotnet-rhel.json) -* [HTTPD Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/httpd/imagestreams/httpd-centos7.json) -* [HTTPD RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/httpd/imagestreams/httpd-rhel7.json) +* [HTTPD Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/httpd/imagestreams/httpd-centos.json) +* [HTTPD RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/httpd/imagestreams/httpd-rhel.json) -* [Jenkins Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/jenkins/imagestreams/jenkins-centos7.json) -* [Jenkins RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/jenkins/imagestreams/jenkins-rhel7.json) +* [Jenkins Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/jenkins/imagestreams/jenkins-centos.json) +* [Jenkins RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/jenkins/imagestreams/jenkins-rhel.json) -* [MariaDB Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/mariadb/imagestreams/mariadb-centos7.json) -* [MariaDB RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mariadb/imagestreams/mariadb-rhel7.json) +* [MariaDB Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/mariadb/imagestreams/mariadb-centos.json) +* [MariaDB RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mariadb/imagestreams/mariadb-rhel.json) -* [MongoDB Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/mongodb/imagestreams/mongodb-centos7.json) -* [MongoDB RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mongodb/imagestreams/mongodb-rhel7.json) +* [MySQL Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/mysql/imagestreams/mysql-centos.json) +* [MySQL RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mysql/imagestreams/mysql-rhel.json) -* [MySQL Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/mysql/imagestreams/mysql-centos7.json) -* [MySQL RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/mysql/imagestreams/mysql-rhel7.json) +* [Nginx Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/nginx/imagestreams/nginx-centos.json) +* [Nginx RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nginx/imagestreams/nginx-rhel.json) -* [Nginx Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/nginx/imagestreams/nginx-centos7.json) -* [Nginx RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nginx/imagestreams/nginx-rhel7.json) +* [NodeJS Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/nodejs/imagestreams/nodejs-centos.json) +* [NodeJS RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nodejs/imagestreams/nodejs-rhel.json) -* [NodeJS Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/nodejs/imagestreams/nodejs-centos7.json) -* [NodeJS RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nodejs/imagestreams/nodejs-rhel7.json) +* [Perl Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/perl/imagestreams/perl-centos.json) +* [Perl RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/perl/imagestreams/perl-rhel.json) -* [Perl Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/perl/imagestreams/perl-centos7.json) -* [Perl RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/perl/imagestreams/perl-rhel7.json) +* [PHP Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/php/imagestreams/php-centos.json) +* [PHP RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/php/imagestreams/php-rhel.json) -* [PHP Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/php/imagestreams/php-centos7.json) -* [PHP RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/php/imagestreams/php-rhel7.json) +* [Python Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/python/imagestreams/python-centos.json) +* [Python RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/python/imagestreams/python-rhel.json) -* [Python Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/python/imagestreams/python-centos7.json) -* [Python RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/python/imagestreams/python-rhel7.json) +* [PostgreSQL Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/postgresql/imagestreams/postgresql-centos.json) +* [PostgreSQL RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/postgresql/imagestreams/postgresql-rhel.json) -* [PostgreSQL Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/postgresql/imagestreams/postgresql-centos7.json) -* [PostgreSQL RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/postgresql/imagestreams/postgresql-rhel7.json) +* [Redis Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/redis/imagestreams/redis-centos.json) +* [Redis RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/redis/imagestreams/redis-rhel.json) -* [Redis Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/redis/imagestreams/redis-centos7.json) -* [Redis RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/redis/imagestreams/redis-rhel7.json) - -* [Ruby Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/ruby/imagestreams/ruby-centos7.json) -* [Ruby RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/ruby/imagestreams/ruby-rhel7.json) +* [Ruby Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/ruby/imagestreams/ruby-centos.json) +* [Ruby RHEL7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/ruby/imagestreams/ruby-rhel.json) * [Wildfly Centos7](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/community/wildfly/imagestreams/wildfly-centos7.json) diff --git a/examples/image-streams/image-streams-centos7.json b/examples/image-streams/image-streams-centos7.json index 8953b5291c31..4e80d11c0dc7 100644 --- a/examples/image-streams/image-streams-centos7.json +++ b/examples/image-streams/image-streams-centos7.json @@ -3,89 +3,251 @@ "apiVersion": "v1", "items": [ { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "dotnet", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": ".NET Core" - }, - "name": "dotnet" + "openshift.io/display-name": ".NET" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run .NET Core applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET Core available on OpenShift, including major versions updates.", + "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/5.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core (Latest)", + "openshift.io/display-name": ".NET (Latest)", "sampleContextDir": "app", - "sampleRef": "dotnetcore-3.1", - "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git", + "sampleRef": "dotnet-5.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet", - "tags": "builder,.net,dotnet,dotnetcore" + "tags": "builder,.net,dotnet,dotnetcore,hidden" }, "from": { "kind": "ImageStreamTag", - "name": "3.1" + "name": "5.0-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "5.0-ubi8", "annotations": { - "description": "Build and run .NET Core 2.2 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/blob/master/2.2/build/README.md.", + "description": "Build and run .NET 5 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/5.0/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core 2.2", + "openshift.io/display-name": ".NET 5 (UBI 8)", "sampleContextDir": "app", - "sampleRef": "dotnetcore-2.2", - "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git", - "supports": "dotnet:2.2,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21", - "version": "2.2" + "sampleRef": "dotnet-5.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:5.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet50", + "version": "5.0" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-50:5.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "5.0", + "annotations": { + "description": "Build and run .NET 5 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/5.0/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET 5 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-5.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:5.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet50,hidden", + "version": "5.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/dotnet/dotnet-22-centos7:latest" + "name": "registry.access.redhat.com/ubi8/dotnet-50:5.0" }, - "name": "2.2" + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } }, { + "name": "3.1-ubi8", "annotations": { - "description": "Build and run .NET Core 3.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/blob/master/3.1/build/README.md.", + "description": "Build and run .NET Core 3.1 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/3.1/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core 3.1", + "openshift.io/display-name": ".NET Core 3.1 (UBI 8)", "sampleContextDir": "app", "sampleRef": "dotnetcore-3.1", - "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet:3.1,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21", + "tags": "builder,.net,dotnet,dotnetcore,dotnet31", + "version": "3.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-31:3.1" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.1-el7", + "annotations": { + "description": "Build and run .NET Core 3.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/3.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 3.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-3.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:3.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet31", + "version": "3.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.centos.org/dotnet/dotnet-31-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.1", + "annotations": { + "description": "Build and run .NET Core 3.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/3.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 3.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-3.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:3.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet31,hidden", "version": "3.1" }, "from": { "kind": "DockerImage", "name": "registry.centos.org/dotnet/dotnet-31-centos7:latest" }, - "name": "3.1" + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.1-ubi8", + "annotations": { + "description": "Build and run .NET Core 2.1 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 2.1 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-2.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:2.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet21", + "version": "2.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-21:2.1" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.1-el7", + "annotations": { + "description": "Build and run .NET Core 2.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 2.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-2.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:2.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21", + "version": "2.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.centos.org/dotnet/dotnet-21-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.1", + "annotations": { + "description": "Build and run .NET Core 2.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 2.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-2.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:2.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21,hidden", + "version": "2.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.centos.org/dotnet/dotnet-21-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "httpd", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Apache HTTP Server (httpd)" - }, - "name": "httpd" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major versions updates.", + "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major version updates.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -95,18 +257,42 @@ }, "from": { "kind": "ImageStreamTag", - "name": "2.4" + "name": "2.4-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.4-el8", + "annotations": { + "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", + "iconClass": "icon-apache", + "openshift.io/display-name": "Apache HTTP Server 2.4 (CentOS 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/httpd-ex.git", + "supports": "httpd", + "tags": "builder,httpd", + "version": "2.4" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/centos/httpd-24-centos8:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "2.4-el7", "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", "iconClass": "icon-apache", - "openshift.io/display-name": "Apache HTTP Server 2.4", + "openshift.io/display-name": "Apache HTTP Server 2.4 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", @@ -115,30 +301,61 @@ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/httpd-24-centos7:latest" + "name": "quay.io/centos7/httpd-24-centos7:latest" }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { "name": "2.4", + "annotations": { + "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", + "iconClass": "icon-apache", + "openshift.io/display-name": "Apache HTTP Server 2.4", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/httpd-ex.git", + "supports": "httpd", + "tags": "builder,httpd,hidden", + "version": "2.4" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/httpd-24-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "jenkins", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Jenkins" - }, - "name": "jenkins" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a Jenkins server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.", + "description": "Provides a Jenkins server on CentOS. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -148,14 +365,16 @@ "kind": "ImageStreamTag", "name": "2" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "2", "annotations": { - "description": "Provides a Jenkins v2.x server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.", + "description": "Provides a Jenkins v2.x server on CentOS. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins 2.X", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -166,28 +385,37 @@ "kind": "DockerImage", "name": "quay.io/openshift/origin-jenkins:v4.0" }, - "name": "2", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "mariadb", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "MariaDB" - }, - "name": "mariadb" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a MariaDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major versions updates.", + "description": "Provides a MariaDB database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major version updates.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -195,240 +423,288 @@ }, "from": { "kind": "ImageStreamTag", - "name": "10.2" + "name": "10.3-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "10.3-el8", "annotations": { - "description": "Provides a MariaDB 10.1 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.1/README.md.", + "description": "Provides a MariaDB 10.3 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB 10.1", + "openshift.io/display-name": "MariaDB 10.3 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", - "version": "10.1" + "version": "10.3" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mariadb-101-centos7:latest" + "name": "docker.io/centos/mariadb-103-centos8:latest" }, - "name": "10.1", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "10.3-el7", "annotations": { - "description": "Provides a MariaDB 10.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/README.md.", + "description": "Provides a MariaDB 10.3 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB 10.2", + "openshift.io/display-name": "MariaDB 10.3 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", - "version": "10.2" + "version": "10.3" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/mariadb-103-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10.3", + "annotations": { + "description": "Provides a MariaDB 10.3 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", + "iconClass": "icon-mariadb", + "openshift.io/display-name": "MariaDB 10.3", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "database,mariadb,hidden", + "version": "10.3" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mariadb-102-centos7:latest" + "name": "quay.io/centos7/mariadb-103-centos7:latest" }, - "name": "10.2", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "mysql", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": "MongoDB" - }, - "name": "mongodb" + "openshift.io/display-name": "MySQL" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a MongoDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MongoDB available on OpenShift, including major versions updates.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB (Latest)", + "description": "Provides a MySQL database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major version updates.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "database,mongodb" + "tags": "mysql" }, "from": { "kind": "ImageStreamTag", - "name": "3.4" + "name": "8.0-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "8.0-el8", "annotations": { - "description": "Provides a MongoDB 2.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/2.6/README.md.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB 2.6", + "description": "Provides a MySQL 8.0 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL 8.0 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "hidden,database,mongodb", - "version": "2.6" + "tags": "mysql", + "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mongodb-26-centos7:latest" + "name": "docker.io/centos/mysql-80-centos8:latest" }, - "name": "2.6", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "8.0-el7", "annotations": { - "description": "Provides a MongoDB 3.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB 3.2", + "description": "Provides a MySQL 8.0 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL 8.0 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "database,mongodb", - "version": "3.2" + "tags": "mysql", + "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mongodb-32-centos7:latest" + "name": "quay.io/centos7/mysql-80-centos7:latest" }, - "name": "3.2", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "8.0", "annotations": { - "description": "Provides a MongoDB 3.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.4/README.md.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB 3.4", + "description": "Provides a MySQL 8.0 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL 8.0", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "database,mongodb", - "version": "3.4" + "tags": "mysql,hidden", + "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mongodb-34-centos7:latest" + "name": "quay.io/centos7/mysql-80-centos7:latest" }, - "name": "3.4", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "nginx", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": "MySQL" - }, - "name": "mysql" + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a MySQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major versions updates.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL (Latest)", + "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major version updates.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "mysql" + "sampleRepo": "https://github.com/sclorg/nginx-ex.git", + "supports": "nginx", + "tags": "builder,nginx" }, "from": { "kind": "ImageStreamTag", - "name": "5.7" + "name": "1.18-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.18-ubi8", "annotations": { - "description": "Provides a MySQL 5.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL 5.6", + "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.18 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "hidden,mysql", - "version": "5.6" + "sampleRepo": "https://github.com/sclorg/nginx-ex.git", + "supports": "nginx", + "tags": "builder,nginx", + "version": "1.18" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mysql-56-centos7:latest" + "name": "registry.access.redhat.com/ubi8/nginx-118:latest" }, - "name": "5.6", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.18-ubi7", "annotations": { - "description": "Provides a MySQL 5.7 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL 5.7", + "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.18 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "mysql", - "version": "5.7" + "sampleRepo": "https://github.com/sclorg/nginx-ex.git", + "supports": "nginx", + "tags": "builder,nginx", + "version": "1.18" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mysql-57-centos7:latest" + "name": "registry.access.redhat.com/ubi7/nginx-118:latest" }, - "name": "5.7", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)" - }, - "name": "nginx" - }, - "spec": { - "tags": [ + }, { + "name": "1.16-el8", "annotations": { - "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.14/README.md.", + "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.16/README.md.", "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.14", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", - "version": "1.14" + "version": "1.16" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nginx-114-centos7:latest" + "name": "docker.io/centos/nginx-116-centos8:latest" }, - "name": "1.14", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.16-el7", "annotations": { "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.16/README.md.", "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", @@ -437,49 +713,61 @@ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nginx-116-centos7:latest" + "name": "quay.io/centos7/nginx-116-centos7:latest" }, - "name": "1.16", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.16", "annotations": { - "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major versions updates.", + "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.16/README.md.", "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", - "tags": "builder,nginx" + "tags": "builder,nginx,hidden", + "version": "1.16" }, "from": { - "kind": "ImageStreamTag", - "name": "1.16" + "kind": "DockerImage", + "name": "quay.io/centos7/nginx-116-centos7:latest" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "nodejs", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Node.js" - }, - "name": "nodejs" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run Node.js applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major versions updates.", + "description": "Build and run Node.js applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major version updates.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -489,37 +777,83 @@ }, "from": { "kind": "ImageStreamTag", - "name": "12" + "name": "14-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "14-ubi8", "annotations": { - "description": "Build and run Node.js 10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/10/README.md.", + "description": "Build and run Node.js 14 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.", "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js 10", + "openshift.io/display-name": "Node.js 14 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", - "version": "10" + "version": "14" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nodejs-10-centos7:latest" + "name": "registry.access.redhat.com/ubi8/nodejs-14:latest" }, - "name": "10", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "14-ubi7", "annotations": { - "description": "Build and run Node.js 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "description": "Build and run Node.js 14 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.", "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js 12", + "openshift.io/display-name": "Node.js 14 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", + "tags": "builder,nodejs", + "version": "14" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/nodejs-14:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "12-ubi8", + "annotations": { + "description": "Build and run Node.js 12 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js 12 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", + "tags": "builder,nodejs", + "version": "12" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/nodejs-12:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "12-ubi7", + "annotations": { + "description": "Build and run Node.js 12 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js 12 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", @@ -527,28 +861,58 @@ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nodejs-12-centos7:latest" + "name": "registry.access.redhat.com/ubi7/nodejs-12:latest" }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { "name": "12", + "annotations": { + "description": "Build and run Node.js 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js 12", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", + "tags": "builder,nodejs,hidden", + "version": "12" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/nodejs-12-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "perl", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Perl" - }, - "name": "perl" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { "description": "Build and run Perl applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30-mod_fcgid/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Perl available on OpenShift, including major version updates.", "iconClass": "icon-perl", @@ -562,7 +926,8 @@ "kind": "ImageStreamTag", "name": "5.30-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } @@ -610,24 +975,54 @@ "referencePolicy": { "type": "Local" } + }, + { + "name": "5.30", + "annotations": { + "description": "Build and run Perl 5.30 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30/README.md.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Perl 5.30", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/dancer-ex.git", + "supports": "perl:5.30,perl", + "tags": "builder,perl,hidden", + "version": "5.30" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/perl-530-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "php", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "PHP" - }, - "name": "php" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run PHP applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major versions updates.", + "description": "Build and run PHP applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major version updates.", "iconClass": "icon-php", "openshift.io/display-name": "PHP (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -637,70 +1032,127 @@ }, "from": { "kind": "ImageStreamTag", - "name": "7.1" + "name": "7.4-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "7.4-ubi8", + "annotations": { + "description": "Build and run PHP 7.4 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.4/README.md.", + "iconClass": "icon-php", + "openshift.io/display-name": "PHP 7.4 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", + "supports": "php:7.4,php", + "tags": "builder,php", + "version": "7.4" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/php-74:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "7.3-ubi8", "annotations": { - "description": "Build and run PHP 7.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.0/README.md.", + "description": "Build and run PHP 7.3 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", "iconClass": "icon-php", - "openshift.io/display-name": "PHP 7.0", + "openshift.io/display-name": "PHP 7.3 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", - "supports": "php:7.0,php", + "supports": "php:7.3,php", "tags": "builder,php", - "version": "7.0" + "version": "7.3" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/php-70-centos7:latest" + "name": "registry.access.redhat.com/ubi8/php-73:latest" }, - "name": "7.0", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "7.3-ubi7", "annotations": { - "description": "Build and run PHP 7.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.", + "description": "Build and run PHP 7.3 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", "iconClass": "icon-php", - "openshift.io/display-name": "PHP 7.1", + "openshift.io/display-name": "PHP 7.3 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", - "supports": "php:7.1,php", + "supports": "php:7.3,php", "tags": "builder,php", - "version": "7.1" + "version": "7.3" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/php-73:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "7.3", + "annotations": { + "description": "Build and run PHP 7.3 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", + "iconClass": "icon-php", + "openshift.io/display-name": "PHP 7.3", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", + "supports": "php:7.3,php", + "tags": "builder,php,hidden", + "version": "7.3" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/php-71-centos7:latest" + "name": "quay.io/centos7/php-73-centos7:latest" }, - "name": "7.1", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "postgresql", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "PostgreSQL" - }, - "name": "postgresql" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a PostgreSQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major versions updates.", + "description": "Provides a PostgreSQL database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major version updates.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -708,298 +1160,1043 @@ }, "from": { "kind": "ImageStreamTag", - "name": "9.6" + "name": "12-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "12-el8", "annotations": { - "description": "Provides a PostgreSQL 9.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "description": "Provides a PostgreSQL 12 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL 9.5", + "openshift.io/display-name": "PostgreSQL 12 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", - "version": "9.5" + "version": "12" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/postgresql-95-centos7:latest" + "name": "docker.io/centos/postgresql-12-centos8:latest" }, - "name": "9.5", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "12-el7", "annotations": { - "description": "Provides a PostgreSQL 9.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "description": "Provides a PostgreSQL 12 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL 9.6", + "openshift.io/display-name": "PostgreSQL 12 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", - "version": "9.6" + "version": "12" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/postgresql-96-centos7:latest" + "name": "quay.io/centos7/postgresql-12-centos7:latest" }, - "name": "9.6", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "openshift.io/display-name": "Python" - }, - "name": "python" - }, - "spec": { - "tags": [ + }, { + "name": "12", "annotations": { - "description": "Build and run Python applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major versions updates.", - "iconClass": "icon-python", - "openshift.io/display-name": "Python (Latest)", + "description": "Provides a PostgreSQL 12 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 12", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/sclorg/django-ex.git", - "supports": "python", - "tags": "builder,python" + "tags": "database,postgresql,hidden", + "version": "12" }, "from": { - "kind": "ImageStreamTag", - "name": "3.6" + "kind": "DockerImage", + "name": "quay.io/centos7/postgresql-12-centos7:latest" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "10-el8", "annotations": { - "description": "Build and run Python 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", - "iconClass": "icon-python", - "openshift.io/display-name": "Python 2.7", + "description": "Provides a PostgreSQL 10 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 10 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/sclorg/django-ex.git", - "supports": "python:2.7,python", - "tags": "builder,python", - "version": "2.7" + "tags": "database,postgresql", + "version": "10" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/python-27-centos7:latest" + "name": "docker.io/centos/postgresql-10-centos8:latest" }, - "name": "2.7", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "10-el7", "annotations": { - "description": "Build and run Python 3.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.", - "iconClass": "icon-python", - "openshift.io/display-name": "Python 3.6", + "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 10 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/sclorg/django-ex.git", - "supports": "python:3.6,python", - "tags": "builder,python", - "version": "3.6" + "tags": "database,postgresql", + "version": "10" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/python-36-centos7:latest" + "name": "quay.io/centos7/postgresql-10-centos7:latest" }, - "name": "3.6", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "openshift.io/display-name": "Redis" - }, - "name": "redis" - }, - "spec": { - "tags": [ + }, { + "name": "10", "annotations": { - "description": "Provides a Redis database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major versions updates.", - "iconClass": "icon-redis", - "openshift.io/display-name": "Redis (Latest)", + "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 10", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "redis" + "tags": "database,postgresql,hidden", + "version": "10" }, "from": { - "kind": "ImageStreamTag", - "name": "5" + "kind": "DockerImage", + "name": "quay.io/centos7/postgresql-10-centos7:latest" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "9.6-el8", "annotations": { - "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5/README.md.", - "iconClass": "icon-redis", - "openshift.io/display-name": "Redis 5", + "description": "Provides a PostgreSQL 9.6 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 9.6 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "redis", - "version": "5" + "tags": "database,postgresql", + "version": "9.6" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/redis-5-centos7:latest" + "name": "docker.io/centos/postgresql-96-centos8:latest" }, - "name": "5", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "python", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": "Ruby" - }, - "name": "ruby" + "openshift.io/display-name": "Python" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major versions updates.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Ruby (Latest)", + "description": "Build and run Python applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major version updates.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/sclorg/ruby-ex.git", - "supports": "ruby", - "tags": "builder,ruby" + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python", + "tags": "builder,python" }, "from": { "kind": "ImageStreamTag", - "name": "2.7" + "name": "3.8-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "3.8-ubi8", "annotations": { - "description": "Build and run Ruby 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Ruby 2.7", + "description": "Build and run Python 3.8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 3.8 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/sclorg/ruby-ex.git", - "supports": "ruby:2.7,ruby", - "tags": "builder,ruby", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:3.8,python", + "tags": "builder,python", + "version": "3.8" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/python-38:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.8-ubi7", + "annotations": { + "description": "Build and run Python 3.8 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 3.8 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:3.8,python", + "tags": "builder,python", + "version": "3.8" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/python-38:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.6-ubi8", + "annotations": { + "description": "Build and run Python 3.6 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 3.6 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:3.6,python", + "tags": "builder,python", + "version": "3.6" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/python-36:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7-ubi8", + "annotations": { + "description": "Build and run Python 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 2.7 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:2.7,python", + "tags": "builder,python", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/python-27:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7-ubi7", + "annotations": { + "description": "Build and run Python 2.7 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 2.7 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:2.7,python", + "tags": "builder,python", "version": "2.7" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi7/python-27:latest" }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { "name": "2.7", + "annotations": { + "description": "Build and run Python 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 2.7", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:2.7,python", + "tags": "builder,python,hidden", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/python-27-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "redis", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": "WildFly" - }, - "name": "wildfly" + "openshift.io/display-name": "Redis" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.", - "iconClass": "icon-wildfly", - "openshift.io/display-name": "WildFly (Latest)", + "description": "Provides a Redis database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major version updates.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", - "supports": "jee,java", - "tags": "builder,wildfly,java" + "tags": "redis" }, "from": { "kind": "ImageStreamTag", - "name": "21.0" + "name": "5-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "5-el8", "annotations": { - "description": "Build and run WildFly 20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", - "iconClass": "icon-wildfly", - "openshift.io/display-name": "WildFly 20", + "description": "Provides a Redis 5 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis 5 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", - "supports": "wildfly:20,jee,java", - "tags": "builder,wildfly,java", - "version": "20.0" + "tags": "redis", + "version": "5" }, "from": { "kind": "DockerImage", - "name": "quay.io/wildfly/wildfly-centos7:20.0" + "name": "docker.io/centos/redis-5-centos8:latest" }, - "name": "20.0", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "5-el7", "annotations": { - "description": "Build and run WildFly 21 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", - "iconClass": "icon-wildfly", - "openshift.io/display-name": "WildFly 21", + "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis 5 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", - "supports": "wildfly:21,jee,java", - "tags": "builder,wildfly,java", - "version": "21.0" + "tags": "redis", + "version": "5" }, "from": { "kind": "DockerImage", - "name": "quay.io/wildfly/wildfly-centos7:21.0.0" + "name": "quay.io/centos7/redis-5-centos7:latest" }, - "name": "21.0", + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "5", + "annotations": { + "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis 5", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "redis,hidden", + "version": "5" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/redis-5-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "ruby", + "creationTimestamp": null, + "annotations": { + "openshift.io/display-name": "Ruby" + } + }, + "spec": { + "lookupPolicy": { + "local": false + }, + "tags": [ + { + "name": "latest", + "annotations": { + "description": "Build and run Ruby applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major version updates.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby (Latest)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby", + "tags": "builder,ruby" + }, + "from": { + "kind": "ImageStreamTag", + "name": "2.7-ubi8" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7-ubi8", + "annotations": { + "description": "Build and run Ruby 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.7 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.7,ruby", + "tags": "builder,ruby", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7-ubi7", + "annotations": { + "description": "Build and run Ruby 2.7 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.7 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.7,ruby", + "tags": "builder,ruby", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/ruby-27:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7", + "annotations": { + "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.7/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major version updates.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.7", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby", + "tags": "builder,ruby,hidden" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/ruby-27-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.6-ubi8", + "annotations": { + "description": "Build and run Ruby 2.6 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.6 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.6,ruby", + "tags": "builder,ruby", + "version": "2.6" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/ruby-26:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.6-ubi7", + "annotations": { + "description": "Build and run Ruby 2.6 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.6 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.6,ruby", + "tags": "builder,ruby", + "version": "2.6" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/ruby-26:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.6", + "annotations": { + "description": "Build and run Ruby 2.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.6", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.6,ruby", + "tags": "builder,ruby,hidden", + "version": "2.6" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/ruby-26-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.5-ubi8", + "annotations": { + "description": "Build and run Ruby 2.5 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.5/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.5 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.5,ruby", + "tags": "builder,ruby", + "version": "2.5" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/ruby-25:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "wildfly", + "creationTimestamp": null, + "annotations": { + "openshift.io/display-name": "WildFly" + } + }, + "spec": { + "lookupPolicy": { + "local": false + }, + "tags": [ + { + "name": "latest", + "annotations": { + "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly (Latest)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "jee,java", + "tags": "builder,wildfly,java" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "8.1", + "annotations": { + "description": "Build and run WildFly 8.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 8.1", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:8.1,jee,java", + "tags": "builder,wildfly,java", + "version": "8.1" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-81-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "9.0", + "annotations": { + "description": "Build and run WildFly 9.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 9.0", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:9.0,jee,java", + "tags": "builder,wildfly,java", + "version": "9.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-90-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10.0", + "annotations": { + "description": "Build and run WildFly 10.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 10.0", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:10.0,jee,java", + "tags": "builder,wildfly,java", + "version": "10.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-100-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10.1", + "annotations": { + "description": "Build and run WildFly 10.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 10.1", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:10.1,jee,java", + "tags": "builder,wildfly,java", + "version": "10.1" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-101-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "11.0", + "annotations": { + "description": "Build and run WildFly 11 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 11", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:11,jee,java", + "tags": "builder,wildfly,java", + "version": "11.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-110-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "12.0", + "annotations": { + "description": "Build and run WildFly 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 12", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:12,jee,java", + "tags": "builder,wildfly,java", + "version": "12.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-120-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "13.0", + "annotations": { + "description": "Build and run WildFly 13 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 13", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:13,jee,java", + "tags": "builder,wildfly,java", + "version": "13.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-130-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "14.0", + "annotations": { + "description": "Build and run WildFly 14 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 14", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:14,jee,java", + "tags": "builder,wildfly,java", + "version": "14.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-140-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "15.0", + "annotations": { + "description": "Build and run WildFly 15 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 15", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:15,jee,java", + "tags": "builder,wildfly,java", + "version": "15.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-150-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "16.0", + "annotations": { + "description": "Build and run WildFly 16 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 16", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:16,jee,java", + "tags": "builder,wildfly,java", + "version": "16.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-160-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "17.0", + "annotations": { + "description": "Build and run WildFly 17 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 17", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:17,jee,java", + "tags": "builder,wildfly,java", + "version": "17.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:17.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "18.0", + "annotations": { + "description": "Build and run WildFly 18 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 18", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:18,jee,java", + "tags": "builder,wildfly,java", + "version": "18.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:18.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "19.0", + "annotations": { + "description": "Build and run WildFly 19 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 19", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:19,jee,java", + "tags": "builder,wildfly,java", + "version": "19.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:19.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "20.0", + "annotations": { + "description": "Build and run WildFly 20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 20", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:20,jee,java", + "tags": "builder,wildfly,java", + "version": "20.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:20.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "21.0", + "annotations": { + "description": "Build and run WildFly 21 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 21", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:21,jee,java", + "tags": "builder,wildfly,java", + "version": "21.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:21.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "22.0", + "annotations": { + "description": "Build and run WildFly 22 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 22", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:22,jee,java", + "tags": "builder,wildfly,java", + "version": "22.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:22.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "23.0", + "annotations": { + "description": "Build and run WildFly 23 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 23", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:23,jee,java", + "tags": "builder,wildfly,java", + "version": "23.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:23.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + } + ] + }, + "status": { + "dockerImageRepository": "" } } ] diff --git a/examples/jenkins/jenkins-ephemeral-template.json b/examples/jenkins/jenkins-ephemeral-template.json index 8348c8754254..7ed8adf1b43a 100644 --- a/examples/jenkins/jenkins-ephemeral-template.json +++ b/examples/jenkins/jenkins-ephemeral-template.json @@ -1,296 +1,333 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "jenkins-ephemeral", - "template": "jenkins-ephemeral-template" - }, - "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", - "metadata": { - "annotations": { - "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-jenkins", - "openshift.io/display-name": "Jenkins (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", - "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login. The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "instant-app,jenkins" - }, - "name": "jenkins-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "annotations": { - "haproxy.router.openshift.io/timeout": "4m", - "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "tls": { - "insecureEdgeTerminationPolicy": "Redirect", - "termination": "edge" - }, - "to": { - "kind": "Service", - "name": "${JENKINS_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${JENKINS_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "OPENSHIFT_ENABLE_OAUTH", - "value": "${ENABLE_OAUTH}" - }, - { - "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", - "value": "true" - }, - { - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" - }, - { - "name": "KUBERNETES_MASTER", - "value": "https://kubernetes.default:443" - }, - { - "name": "KUBERNETES_TRUST_CERTIFICATES", - "value": "true" - }, - { - "name": "JENKINS_SERVICE_NAME", - "value": "${JENKINS_SERVICE_NAME}" - }, - { - "name": "JNLP_SERVICE_NAME", - "value": "${JNLP_SERVICE_NAME}" - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "failureThreshold": 2, - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 420, - "periodSeconds": 360, - "timeoutSeconds": 240 - }, - "name": "jenkins", - "readinessProbe": { - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 240 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/jenkins", - "name": "${JENKINS_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "serviceAccountName": "${JENKINS_SERVICE_NAME}", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${JENKINS_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "jenkins" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${JENKINS_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "annotations": { - "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" - }, - "name": "${JENKINS_SERVICE_NAME}" - } - }, - { - "apiVersion": "v1", - "groupNames": null, - "kind": "RoleBinding", - "metadata": { - "name": "${JENKINS_SERVICE_NAME}_edit" - }, - "roleRef": { - "name": "edit" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "${JENKINS_SERVICE_NAME}" - } - ] - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "${JNLP_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "agent", - "nodePort": 0, - "port": 50000, - "protocol": "TCP", - "targetPort": 50000 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", - "service.openshift.io/infrastructure": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "nodePort": 0, - "port": 80, - "protocol": "TCP", - "targetPort": 8080 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - } - ], - "parameters": [ - { - "description": "The name of the OpenShift Service exposed for the Jenkins container.", - "displayName": "Jenkins Service Name", - "name": "JENKINS_SERVICE_NAME", - "value": "jenkins" - }, - { - "description": "The name of the service used for master/slave communication.", - "displayName": "Jenkins JNLP Service Name", - "name": "JNLP_SERVICE_NAME", - "value": "jenkins-jnlp" - }, - { - "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", - "displayName": "Enable OAuth in Jenkins", - "name": "ENABLE_OAUTH", - "value": "true" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", - "displayName": "Jenkins ImageStream Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", - "displayName": "Disable memory intensive administrative monitors", - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "false" - }, - { - "description": "Name of the ImageStreamTag to be used for the Jenkins image.", - "displayName": "Jenkins ImageStreamTag", - "name": "JENKINS_IMAGE_STREAM_TAG", - "value": "jenkins:2" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "jenkins-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-jenkins", + "openshift.io/display-name": "Jenkins (Ephemeral)", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", + "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login. The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "instant-app,jenkins" + } + }, + "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "annotations": { + "haproxy.router.openshift.io/timeout": "4m", + "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "tls": { + "insecureEdgeTerminationPolicy": "Redirect", + "termination": "edge" + }, + "to": { + "kind": "Service", + "name": "${JENKINS_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ConfigMap", + "metadata": { + "labels": { + "config.openshift.io/inject-trusted-cabundle": "true" + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${JENKINS_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "OPENSHIFT_ENABLE_OAUTH", + "value": "${ENABLE_OAUTH}" + }, + { + "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", + "value": "true" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" + }, + { + "name": "KUBERNETES_MASTER", + "value": "https://kubernetes.default:443" + }, + { + "name": "KUBERNETES_TRUST_CERTIFICATES", + "value": "true" + }, + { + "name": "JENKINS_SERVICE_NAME", + "value": "${JENKINS_SERVICE_NAME}" + }, + { + "name": "JNLP_SERVICE_NAME", + "value": "${JNLP_SERVICE_NAME}" + }, + { + "name": "JENKINS_UC_INSECURE", + "value": "${JENKINS_UC_INSECURE}" + }, + { + "name": "CASC_JENKINS_CONFIG", + "value": "/var/lib/jenkins/proxy.yaml" + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 420, + "periodSeconds": 360, + "timeoutSeconds": 240 + }, + "name": "jenkins", + "readinessProbe": { + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 240 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/jenkins", + "name": "${JENKINS_SERVICE_NAME}-data" + }, + { + "mountPath": "/etc/pki/ca-trust/source/anchors", + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "serviceAccountName": "${JENKINS_SERVICE_NAME}", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${JENKINS_SERVICE_NAME}-data" + }, + { + "configMap": { + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", + "optional": true + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "jenkins" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${JENKINS_IMAGE_STREAM_TAG}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "annotations": { + "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" + }, + "name": "${JENKINS_SERVICE_NAME}" + } + }, + { + "apiVersion": "v1", + "groupNames": null, + "kind": "RoleBinding", + "metadata": { + "name": "${JENKINS_SERVICE_NAME}_edit" + }, + "roleRef": { + "name": "edit" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "${JENKINS_SERVICE_NAME}" + } + ] + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "${JNLP_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "agent", + "nodePort": 0, + "port": 50000, + "protocol": "TCP", + "targetPort": 50000 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", + "service.openshift.io/infrastructure": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "nodePort": 0, + "port": 80, + "protocol": "TCP", + "targetPort": 8080 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + } + ], + "parameters": [ + { + "name": "JENKINS_SERVICE_NAME", + "displayName": "Jenkins Service Name", + "description": "The name of the OpenShift Service exposed for the Jenkins container.", + "value": "jenkins" + }, + { + "name": "JNLP_SERVICE_NAME", + "displayName": "Jenkins JNLP Service Name", + "description": "The name of the service used for master/slave communication.", + "value": "jenkins-jnlp" + }, + { + "name": "ENABLE_OAUTH", + "displayName": "Enable OAuth in Jenkins", + "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", + "value": "true" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "1Gi" + }, + { + "name": "NAMESPACE", + "displayName": "Jenkins ImageStream Namespace", + "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", + "value": "openshift" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "displayName": "Disable memory intensive administrative monitors", + "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", + "value": "false" + }, + { + "name": "JENKINS_IMAGE_STREAM_TAG", + "displayName": "Jenkins ImageStreamTag", + "description": "Name of the ImageStreamTag to be used for the Jenkins image.", + "value": "jenkins:2" + }, + { + "name": "JENKINS_UC_INSECURE", + "displayName": "Allows use of Jenkins Update Center repository with invalid SSL certificate", + "description": "Whether to allow use of a Jenkins Update Center that uses invalid certificate (self-signed, unknown CA). If any value other than 'false', certificate check is bypassed. By default, certificate check is enforced.", + "value": "false" + } + ], + "labels": { + "app": "jenkins-ephemeral", + "template": "jenkins-ephemeral-template" + } +} \ No newline at end of file diff --git a/examples/jenkins/jenkins-persistent-template.json b/examples/jenkins/jenkins-persistent-template.json index 4f92a51f8d4f..ab747d40a279 100644 --- a/examples/jenkins/jenkins-persistent-template.json +++ b/examples/jenkins/jenkins-persistent-template.json @@ -1,331 +1,367 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "jenkins-persistent", - "template": "jenkins-persistent-template" - }, - "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", - "metadata": { - "annotations": { - "description": "Jenkins service, with persistent storage.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-jenkins", - "openshift.io/display-name": "Jenkins", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", - "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "instant-app,jenkins" - }, - "name": "jenkins-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "annotations": { - "haproxy.router.openshift.io/timeout": "4m", - "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "tls": { - "insecureEdgeTerminationPolicy": "Redirect", - "termination": "edge" - }, - "to": { - "kind": "Service", - "name": "${JENKINS_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${JENKINS_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "OPENSHIFT_ENABLE_OAUTH", - "value": "${ENABLE_OAUTH}" - }, - { - "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", - "value": "true" - }, - { - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" - }, - { - "name": "KUBERNETES_MASTER", - "value": "https://kubernetes.default:443" - }, - { - "name": "KUBERNETES_TRUST_CERTIFICATES", - "value": "true" - }, - { - "name": "JENKINS_SERVICE_NAME", - "value": "${JENKINS_SERVICE_NAME}" - }, - { - "name": "JNLP_SERVICE_NAME", - "value": "${JNLP_SERVICE_NAME}" - }, - { - "name": "ENABLE_FATAL_ERROR_LOG_FILE", - "value": "${ENABLE_FATAL_ERROR_LOG_FILE}" - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "failureThreshold": 2, - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 420, - "periodSeconds": 360, - "timeoutSeconds": 240 - }, - "name": "jenkins", - "readinessProbe": { - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 240 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/jenkins", - "name": "${JENKINS_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "serviceAccountName": "${JENKINS_SERVICE_NAME}", - "volumes": [ - { - "name": "${JENKINS_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${JENKINS_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "jenkins" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${JENKINS_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "annotations": { - "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" - }, - "name": "${JENKINS_SERVICE_NAME}" - } - }, - { - "apiVersion": "v1", - "groupNames": null, - "kind": "RoleBinding", - "metadata": { - "name": "${JENKINS_SERVICE_NAME}_edit" - }, - "roleRef": { - "name": "edit" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "${JENKINS_SERVICE_NAME}" - } - ] - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "${JNLP_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "agent", - "nodePort": 0, - "port": 50000, - "protocol": "TCP", - "targetPort": 50000 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", - "service.openshift.io/infrastructure": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "nodePort": 0, - "port": 80, - "protocol": "TCP", - "targetPort": 8080 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - } - ], - "parameters": [ - { - "description": "The name of the OpenShift Service exposed for the Jenkins container.", - "displayName": "Jenkins Service Name", - "name": "JENKINS_SERVICE_NAME", - "value": "jenkins" - }, - { - "description": "The name of the service used for master/slave communication.", - "displayName": "Jenkins JNLP Service Name", - "name": "JNLP_SERVICE_NAME", - "value": "jenkins-jnlp" - }, - { - "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", - "displayName": "Enable OAuth in Jenkins", - "name": "ENABLE_OAUTH", - "value": "true" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", - "displayName": "Jenkins ImageStream Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", - "displayName": "Disable memory intensive administrative monitors", - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "false" - }, - { - "description": "Name of the ImageStreamTag to be used for the Jenkins image.", - "displayName": "Jenkins ImageStreamTag", - "name": "JENKINS_IMAGE_STREAM_TAG", - "value": "jenkins:2" - }, - { - "description": "When a fatal error occurs, an error log is created with information and the state obtained at the time of the fatal error.", - "displayName": "Fatal Error Log File", - "name": "ENABLE_FATAL_ERROR_LOG_FILE", - "value": "false" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "jenkins-persistent", + "creationTimestamp": null, + "annotations": { + "description": "Jenkins service, with persistent storage.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-jenkins", + "openshift.io/display-name": "Jenkins", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", + "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "instant-app,jenkins" + } + }, + "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "annotations": { + "haproxy.router.openshift.io/timeout": "4m", + "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "tls": { + "insecureEdgeTerminationPolicy": "Redirect", + "termination": "edge" + }, + "to": { + "kind": "Service", + "name": "${JENKINS_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ConfigMap", + "metadata": { + "labels": { + "config.openshift.io/inject-trusted-cabundle": "true" + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${JENKINS_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "OPENSHIFT_ENABLE_OAUTH", + "value": "${ENABLE_OAUTH}" + }, + { + "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", + "value": "true" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" + }, + { + "name": "KUBERNETES_MASTER", + "value": "https://kubernetes.default:443" + }, + { + "name": "KUBERNETES_TRUST_CERTIFICATES", + "value": "true" + }, + { + "name": "JENKINS_SERVICE_NAME", + "value": "${JENKINS_SERVICE_NAME}" + }, + { + "name": "JNLP_SERVICE_NAME", + "value": "${JNLP_SERVICE_NAME}" + }, + { + "name": "ENABLE_FATAL_ERROR_LOG_FILE", + "value": "${ENABLE_FATAL_ERROR_LOG_FILE}" + }, + { + "name": "JENKINS_UC_INSECURE", + "value": "${JENKINS_UC_INSECURE}" + }, + { + "name": "CASC_JENKINS_CONFIG", + "value": "/var/lib/jenkins/proxy.yaml" + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 420, + "periodSeconds": 360, + "timeoutSeconds": 240 + }, + "name": "jenkins", + "readinessProbe": { + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 240 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/jenkins", + "name": "${JENKINS_SERVICE_NAME}-data" + }, + { + "mountPath": "/etc/pki/ca-trust/source/anchors", + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "serviceAccountName": "${JENKINS_SERVICE_NAME}", + "volumes": [ + { + "name": "${JENKINS_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${JENKINS_SERVICE_NAME}" + } + }, + { + "configMap": { + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", + "optional": true + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "jenkins" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${JENKINS_IMAGE_STREAM_TAG}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "annotations": { + "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" + }, + "name": "${JENKINS_SERVICE_NAME}" + } + }, + { + "apiVersion": "v1", + "groupNames": null, + "kind": "RoleBinding", + "metadata": { + "name": "${JENKINS_SERVICE_NAME}_edit" + }, + "roleRef": { + "name": "edit" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "${JENKINS_SERVICE_NAME}" + } + ] + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "${JNLP_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "agent", + "nodePort": 0, + "port": 50000, + "protocol": "TCP", + "targetPort": 50000 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", + "service.openshift.io/infrastructure": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "nodePort": 0, + "port": 80, + "protocol": "TCP", + "targetPort": 8080 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + } + ], + "parameters": [ + { + "name": "JENKINS_SERVICE_NAME", + "displayName": "Jenkins Service Name", + "description": "The name of the OpenShift Service exposed for the Jenkins container.", + "value": "jenkins" + }, + { + "name": "JNLP_SERVICE_NAME", + "displayName": "Jenkins JNLP Service Name", + "description": "The name of the service used for master/slave communication.", + "value": "jenkins-jnlp" + }, + { + "name": "ENABLE_OAUTH", + "displayName": "Enable OAuth in Jenkins", + "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", + "value": "true" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "1Gi" + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Jenkins ImageStream Namespace", + "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", + "value": "openshift" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "displayName": "Disable memory intensive administrative monitors", + "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", + "value": "false" + }, + { + "name": "JENKINS_IMAGE_STREAM_TAG", + "displayName": "Jenkins ImageStreamTag", + "description": "Name of the ImageStreamTag to be used for the Jenkins image.", + "value": "jenkins:2" + }, + { + "name": "ENABLE_FATAL_ERROR_LOG_FILE", + "displayName": "Fatal Error Log File", + "description": "When a fatal error occurs, an error log is created with information and the state obtained at the time of the fatal error.", + "value": "false" + }, + { + "name": "JENKINS_UC_INSECURE", + "displayName": "Allows use of Jenkins Update Center repository with invalid SSL certificate", + "description": "Whether to allow use of a Jenkins Update Center that uses invalid certificate (self-signed, unknown CA). If any value other than 'false', certificate check is bypassed. By default, certificate check is enforced.", + "value": "false" + } + ], + "labels": { + "app": "jenkins-persistent", + "template": "jenkins-persistent-template" + } } \ No newline at end of file diff --git a/examples/jenkins/pipeline/bluegreen-pipeline.yaml b/examples/jenkins/pipeline/bluegreen-pipeline.yaml index df94683f5565..89b1da514002 100644 --- a/examples/jenkins/pipeline/bluegreen-pipeline.yaml +++ b/examples/jenkins/pipeline/bluegreen-pipeline.yaml @@ -195,14 +195,14 @@ objects: - env: - name: DATABASE_SERVICE_NAME value: ${DATABASE_SERVICE_NAME} - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: httpGet: @@ -210,7 +210,7 @@ objects: port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 - name: nodejs-mongodb-example + name: nodejs-mariadb-example ports: - containerPort: 8080 readinessProbe: @@ -226,7 +226,7 @@ objects: - imageChangeParams: automatic: true containerNames: - - nodejs-mongodb-example + - nodejs-mariadb-example from: kind: ImageStreamTag name: ${NAME}:blue @@ -267,14 +267,14 @@ objects: - env: - name: DATABASE_SERVICE_NAME value: ${DATABASE_SERVICE_NAME} - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: httpGet: @@ -282,7 +282,7 @@ objects: port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 - name: nodejs-mongodb-example + name: nodejs-mariadb-example ports: - containerPort: 8080 readinessProbe: @@ -298,7 +298,7 @@ objects: - imageChangeParams: automatic: true containerNames: - - nodejs-mongodb-example + - nodejs-mariadb-example from: kind: ImageStreamTag name: ${NAME}:green @@ -312,9 +312,9 @@ objects: name: ${DATABASE_SERVICE_NAME} spec: ports: - - name: mongodb - port: 27017 - targetPort: 27017 + - name: mariadb + port: 3306 + targetPort: 3306 selector: name: ${DATABASE_SERVICE_NAME} - apiVersion: v1 @@ -337,21 +337,21 @@ objects: spec: containers: - env: - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: initialDelaySeconds: 30 tcpSocket: port: 27017 timeoutSeconds: 1 - name: mongodb + name: mariadb ports: - containerPort: 27017 readinessProbe: @@ -360,15 +360,14 @@ objects: - /bin/sh - -i - -c - - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD - --eval="quit()" + - MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping initialDelaySeconds: 3 timeoutSeconds: 1 resources: limits: - memory: ${MEMORY_MONGODB_LIMIT} + memory: ${MEMORY_MYSQL_LIMIT} volumeMounts: - - mountPath: /var/lib/mongodb/data + - mountPath: /var/lib/mysql/data name: ${DATABASE_SERVICE_NAME}-data volumes: - emptyDir: @@ -378,10 +377,10 @@ objects: - imageChangeParams: automatic: true containerNames: - - mongodb + - mariadb from: kind: ImageStreamTag - name: mongodb:3.2 + name: mariadb:10.3-el8 namespace: ${NAMESPACE} type: ImageChange - type: ConfigChange @@ -390,7 +389,7 @@ parameters: displayName: Name name: NAME required: true - value: nodejs-mongodb-example + value: nodejs-mariadb-example - description: The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted. displayName: Application Hostname @@ -409,13 +408,13 @@ parameters: name: DATABASE_NAME required: true value: sampledb -- description: Username for MongoDB user that will be used for accessing the database. - displayName: MongoDB Username +- description: Username for MariaDB user that will be used for accessing the database. + displayName: MariaDB Username from: user[A-Z0-9]{3} generate: expression name: DATABASE_USER -- description: Password for the MongoDB user. - displayName: MongoDB Password +- description: Password for the MariaDB user. + displayName: MariaDB Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_PASSWORD @@ -424,20 +423,20 @@ parameters: name: MEMORY_LIMIT required: true value: 512Mi -- description: Maximum amount of memory the MongoDB container can use. - displayName: Memory Limit (MongoDB) - name: MEMORY_MONGODB_LIMIT +- description: Maximum amount of memory the MariaDB container can use. + displayName: Memory Limit (MariaDB) + name: MEMORY_MYSQL_LIMIT required: true value: 512Mi - displayName: Database Service Name name: DATABASE_SERVICE_NAME required: true - value: mongodb + value: mariadb - description: Password for the database admin user. displayName: Database Administrator Password from: '[a-zA-Z0-9]{16}' generate: expression - name: DATABASE_ADMIN_PASSWORD + name: DATABASE_ROOT_PASSWORD - description: Set this to the relative path to your project if it is not in the root of your repository. displayName: Context Directory @@ -455,7 +454,7 @@ parameters: - description: The custom NPM mirror URL displayName: Custom NPM Mirror URL name: NPM_MIRROR -- description: The OpenShift Namespace where the NodeJS and MongoDB ImageStreams reside. +- description: The OpenShift Namespace where the NodeJS and MariaDB ImageStreams reside. displayName: Namespace name: NAMESPACE required: true diff --git a/examples/jenkins/pipeline/nodejs-sample-pipeline.yaml b/examples/jenkins/pipeline/nodejs-sample-pipeline.yaml index 93f3b6259099..45956f741209 100644 --- a/examples/jenkins/pipeline/nodejs-sample-pipeline.yaml +++ b/examples/jenkins/pipeline/nodejs-sample-pipeline.yaml @@ -7,9 +7,9 @@ spec: jenkinsPipelineStrategy: jenkinsfile: |- // path of the template to use - def templatePath = 'nodejs-mongodb-example' + def templatePath = 'nodejs-postgresql-example' // name of the template that will be created - def templateName = 'nodejs-mongodb-example' + def templateName = 'nodejs-postgresql-example' // NOTE, the "pipeline" directive/closure from the declarative pipeline syntax needs to include, or be nested outside, // and "openshift" directive/closure from the OpenShift Client Plugin for Jenkins. Otherwise, the declarative pipeline engine // will not be fully engaged. diff --git a/examples/jenkins/pipeline/samplepipeline.yaml b/examples/jenkins/pipeline/samplepipeline.yaml index fe519f445056..2f1568ccc7f9 100644 --- a/examples/jenkins/pipeline/samplepipeline.yaml +++ b/examples/jenkins/pipeline/samplepipeline.yaml @@ -24,7 +24,7 @@ parameters: displayName: Name name: NAME required: true - value: nodejs-mongodb-example + value: nodejs-mariadb-example - description: The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted. displayName: Application Hostname @@ -38,13 +38,13 @@ parameters: name: DATABASE_NAME required: true value: sampledb -- description: Username for MongoDB user that will be used for accessing the database. - displayName: MongoDB Username +- description: Username for MariaDB user that will be used for accessing the database. + displayName: MariaDB Username from: user[A-Z0-9]{3} generate: expression name: DATABASE_USER -- description: Password for the MongoDB user. - displayName: MongoDB Password +- description: Password for the MariaDB user. + displayName: MariaDB Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_PASSWORD @@ -53,20 +53,20 @@ parameters: name: MEMORY_LIMIT required: true value: 512Mi -- description: Maximum amount of memory the MongoDB container can use. - displayName: Memory Limit (MongoDB) - name: MEMORY_MONGODB_LIMIT +- description: Maximum amount of memory the MariaDB container can use. + displayName: Memory Limit (MariaDB) + name: MEMORY_MARIADB_LIMIT required: true value: 512Mi - displayName: Database Service Name name: DATABASE_SERVICE_NAME required: true - value: mongodb + value: mariadb - description: Password for the database admin user. displayName: Database Administrator Password from: '[a-zA-Z0-9]{16}' generate: expression - name: DATABASE_ADMIN_PASSWORD + name: DATABASE_ROOT_PASSWORD - description: Set this to a branch name, tag or other ref of your repository if you are not using the default branch. displayName: Git Reference @@ -88,7 +88,7 @@ parameters: - description: The custom NPM mirror URL displayName: Custom NPM Mirror URL name: NPM_MIRROR -- description: The OpenShift Namespace where the NodeJS and MongoDB ImageStreams reside. +- description: The OpenShift Namespace where the NodeJS and MariaDB ImageStreams reside. displayName: Namespace name: NAMESPACE required: true @@ -198,7 +198,7 @@ objects: value: ${NPM_MIRROR} from: kind: ImageStreamTag - name: nodejs:12 + name: nodejs:12-ubi8 namespace: ${NAMESPACE} type: Source triggers: @@ -230,14 +230,14 @@ objects: - env: - name: DATABASE_SERVICE_NAME value: ${DATABASE_SERVICE_NAME} - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: httpGet: @@ -245,7 +245,7 @@ objects: port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 - name: nodejs-mongodb-example + name: nodejs-mariadb-example ports: - containerPort: 8080 readinessProbe: @@ -261,7 +261,7 @@ objects: - imageChangeParams: automatic: false containerNames: - - nodejs-mongodb-example + - nodejs-mariadb-example from: kind: ImageStreamTag name: ${NAME}:latest @@ -275,9 +275,9 @@ objects: name: ${DATABASE_SERVICE_NAME} spec: ports: - - name: mongodb - port: 27017 - targetPort: 27017 + - name: mariadb + port: 3306 + targetPort: 3306 selector: name: ${DATABASE_SERVICE_NAME} - apiVersion: v1 @@ -300,21 +300,21 @@ objects: spec: containers: - env: - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQLB_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: initialDelaySeconds: 30 tcpSocket: port: 27017 timeoutSeconds: 1 - name: mongodb + name: mariadb ports: - containerPort: 27017 readinessProbe: @@ -323,15 +323,14 @@ objects: - /bin/sh - -i - -c - - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD - --eval="quit()" + - MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping initialDelaySeconds: 3 timeoutSeconds: 1 resources: limits: - memory: ${MEMORY_MONGODB_LIMIT} + memory: ${MEMORY_MARIADB_LIMIT} volumeMounts: - - mountPath: /var/lib/mongodb/data + - mountPath: /var/lib/mysql/data name: ${DATABASE_SERVICE_NAME}-data volumes: - emptyDir: @@ -341,10 +340,10 @@ objects: - imageChangeParams: automatic: true containerNames: - - mongodb + - mariadb from: kind: ImageStreamTag - name: mongodb:3.2 + name: mariadb:10.3-el8 namespace: ${NAMESPACE} type: ImageChange - type: ConfigChange diff --git a/examples/quickstarts/README.md b/examples/quickstarts/README.md index 6f063b5c9644..7e5d1a32a57b 100644 --- a/examples/quickstarts/README.md +++ b/examples/quickstarts/README.md @@ -27,8 +27,8 @@ instantiating them. * [Nginx](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nginx/templates/nginx-example.json) - Provides a basic Nginx static content application. For more information see the [source repository](https://github.com/sclorg/nginx-ex). -* [NodeJS](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nodejs/templates/nodejs-mongodb-example.json) - Provides a basic NodeJS application with a MongoDB database. For more information see the [source repository](https://github.com/sclorg/nodejs-ex). -* [NodeJS persistent](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nodejs/templates/nodejs-mongo-persistent.json) - Provides a basic NodeJS application with a persistent MongoDB database. Note: requires available persistent volumes. For more information see the [source repository](https://github.com/sclorg/nodejs-ex). +* [NodeJS](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nodejs/templates/nodejs-postgresql-example.json) - Provides a basic NodeJS application with a PostgreSQL database. For more information see the [source repository](https://github.com/nodeshift-starters/nodejs-rest-http-crud). +* [NodeJS persistent](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/nodejs/templates/nodejs-postgresql-persistent.json) - Provides a basic NodeJS application with a persistent PostgreSQL database. Note: requires available persistent volumes. For more information see the [source repository](https://github.com/nodeshift-starters/nodejs-rest-http-crud). * [Rails](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/rails/templates/rails-postgresql-example.json) - Provides a basic Rails (Ruby) application with a PostgreSQL database. For more information see the [source repository](https://github.com/sclorg/rails-ex). * [Rails persistent](https://raw.githubusercontent.com/openshift/library/master/arch/x86_64/official/rails/templates/rails-pgsql-persistent.json) - Provides a basic Rails (Ruby) application with a persistent PostgreSQL database. Note: requires available persistent volumes. For more information see the [source repository](https://github.com/sclorg/rails-ex). diff --git a/examples/quickstarts/cakephp-mysql-persistent.json b/examples/quickstarts/cakephp-mysql-persistent.json index 61dac609931c..7a0398aea90e 100644 --- a/examples/quickstarts/cakephp-mysql-persistent.json +++ b/examples/quickstarts/cakephp-mysql-persistent.json @@ -1,584 +1,600 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "cakephp-mysql-persistent", - "template": "cakephp-mysql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "iconClass": "icon-php", - "openshift.io/display-name": "CakePHP + MySQL", - "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", - "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,php,cakephp", - "template.openshift.io/bindable": "false" - }, - "name": "cakephp-mysql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", - "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./vendor/bin/phpunit" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "COMPOSER_MIRROR", - "value": "${COMPOSER_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "php:${PHP_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-persistent" - }, - "failurePolicy": "Retry" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-secret-token", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-security-salt", - "name": "${NAME}" - } - } - }, - { - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "${OPCACHE_REVALIDATE_FREQ}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 30, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "name": "cakephp-mysql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 3, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "cakephp-mysql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of PHP image to be used (7.1 or latest).", - "displayName": "PHP Version", - "name": "PHP_VERSION", - "required": true, - "value": "7.1" - }, - { - "description": "Maximum amount of memory the CakePHP container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/cakephp-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "mysql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database User", - "name": "DATABASE_USER", - "required": true, - "value": "cakephp" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Set this to a long random string.", - "displayName": "CakePHP secret token", - "from": "[\\w]{50}", - "generate": "expression", - "name": "CAKEPHP_SECRET_TOKEN" - }, - { - "description": "Security salt for session hash.", - "displayName": "CakePHP Security Salt", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "CAKEPHP_SECURITY_SALT" - }, - { - "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", - "displayName": "OPcache Revalidation Frequency", - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "2" - }, - { - "description": "The custom Composer mirror URL", - "displayName": "Custom Composer Mirror URL", - "name": "COMPOSER_MIRROR", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "cakephp-mysql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "iconClass": "icon-php", + "openshift.io/display-name": "CakePHP + MySQL", + "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", + "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,php,cakephp", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", + "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./vendor/bin/phpunit" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "COMPOSER_MIRROR", + "value": "${COMPOSER_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "php:${PHP_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "cakephp-mysql-persistent" + }, + "failurePolicy": "Retry" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-secret-token", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-security-salt", + "name": "${NAME}" + } + } + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "value": "${OPCACHE_REVALIDATE_FREQ}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 30, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "name": "cakephp-mysql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 3, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cakephp-mysql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "cakephp-mysql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PHP_VERSION", + "displayName": "PHP Version", + "description": "Version of PHP image to be used (7.3-ubi7, 7.3-ubi8, or latest).", + "value": "7.3-ubi8", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "MySQL Version", + "description": "Version of MySQL image to be used (8.0-el8 or latest).", + "value": "8.0-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/cakephp-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database User", + "value": "cakephp", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "value": "2" + }, + { + "name": "COMPOSER_MIRROR", + "displayName": "Custom Composer Mirror URL", + "description": "The custom Composer mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "cakephp-mysql-persistent", + "template": "cakephp-mysql-persistent" + } } \ No newline at end of file diff --git a/examples/quickstarts/cakephp-mysql.json b/examples/quickstarts/cakephp-mysql.json index 6bd867a6148f..e8fdf317e7f2 100644 --- a/examples/quickstarts/cakephp-mysql.json +++ b/examples/quickstarts/cakephp-mysql.json @@ -1,558 +1,574 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "cakephp-mysql-example", - "template": "cakephp-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-php", - "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", - "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,php,cakephp", - "template.openshift.io/bindable": "false" - }, - "name": "cakephp-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", - "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./vendor/bin/phpunit" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "COMPOSER_MIRROR", - "value": "${COMPOSER_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "php:${PHP_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-example" - }, - "failurePolicy": "Retry" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-secret-token", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-security-salt", - "name": "${NAME}" - } - } - }, - { - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "${OPCACHE_REVALIDATE_FREQ}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 30, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "name": "cakephp-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 3, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "cakephp-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of PHP image to be used (7.1 or latest).", - "displayName": "PHP Version", - "name": "PHP_VERSION", - "required": true, - "value": "7.1" - }, - { - "description": "Maximum amount of memory the CakePHP container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/cakephp-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "mysql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database User", - "name": "DATABASE_USER", - "required": true, - "value": "cakephp" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Set this to a long random string.", - "displayName": "CakePHP secret token", - "from": "[\\w]{50}", - "generate": "expression", - "name": "CAKEPHP_SECRET_TOKEN" - }, - { - "description": "Security salt for session hash.", - "displayName": "CakePHP Security Salt", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "CAKEPHP_SECURITY_SALT" - }, - { - "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", - "displayName": "OPcache Revalidation Frequency", - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "2" - }, - { - "description": "The custom Composer mirror URL", - "displayName": "Custom Composer Mirror URL", - "name": "COMPOSER_MIRROR", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "cakephp-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-php", + "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", + "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,php,cakephp", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", + "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./vendor/bin/phpunit" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "COMPOSER_MIRROR", + "value": "${COMPOSER_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "php:${PHP_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "cakephp-mysql-example" + }, + "failurePolicy": "Retry" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-secret-token", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-security-salt", + "name": "${NAME}" + } + } + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "value": "${OPCACHE_REVALIDATE_FREQ}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 30, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "name": "cakephp-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 3, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cakephp-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "cakephp-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PHP_VERSION", + "displayName": "PHP Version", + "description": "Version of PHP image to be used (7.3-ubi7, 7.3-ubi8, or latest).", + "value": "7.3-ubi8", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "MySQL Version", + "description": "Version of MySQL image to be used (8.0-el8 or latest).", + "value": "8.0-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/cakephp-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database User", + "value": "cakephp", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "value": "2" + }, + { + "name": "COMPOSER_MIRROR", + "displayName": "Custom Composer Mirror URL", + "description": "The custom Composer mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "cakephp-mysql-example", + "template": "cakephp-mysql-example" + } } \ No newline at end of file diff --git a/examples/quickstarts/dancer-mysql-persistent.json b/examples/quickstarts/dancer-mysql-persistent.json index b1cd178c2ce1..2b0cad268e0d 100644 --- a/examples/quickstarts/dancer-mysql-persistent.json +++ b/examples/quickstarts/dancer-mysql-persistent.json @@ -1,536 +1,551 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "dancer-mysql-persistent", - "template": "dancer-mysql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "iconClass": "icon-perl", - "openshift.io/display-name": "Dancer + MySQL", - "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,perl,dancer", - "template.openshift.io/bindable": "false" - }, - "name": "dancer-mysql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "perl -I extlib/lib/perl5 -I lib t/*" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "CPAN_MIRROR", - "value": "${CPAN_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "perl:5.30-ubi8", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "PERL_APACHE2_RELOAD", - "value": "${PERL_APACHE2_RELOAD}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "dancer-mysql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-mysql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dancer-mysql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Perl Dancer container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/dancer-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "database" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", - "displayName": "Perl Module Reload", - "name": "PERL_APACHE2_RELOAD", - "value": "" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The custom CPAN mirror URL", - "displayName": "Custom CPAN Mirror URL", - "name": "CPAN_MIRROR", - "value": "" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "dancer-mysql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Dancer + MySQL", + "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,perl,dancer", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "perl -I extlib/lib/perl5 -I lib t/*" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "CPAN_MIRROR", + "value": "${CPAN_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "perl:${PERL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "PERL_APACHE2_RELOAD", + "value": "${PERL_APACHE2_RELOAD}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "dancer-mysql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "dancer-mysql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:8.0-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "dancer-mysql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PERL_VERSION", + "displayName": "Version of Perl Image", + "description": "Version of Perl image to be used (5.26-el7, 5.26-ubi8, or latest).", + "value": "5.26-ubi8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Perl Dancer container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/dancer-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "database", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "sampledb", + "required": true + }, + { + "name": "PERL_APACHE2_RELOAD", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "CPAN_MIRROR", + "displayName": "Custom CPAN Mirror URL", + "description": "The custom CPAN mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "dancer-mysql-persistent", + "template": "dancer-mysql-persistent" + } +} \ No newline at end of file diff --git a/examples/quickstarts/dancer-mysql.json b/examples/quickstarts/dancer-mysql.json index ff9db5658ee5..b5244e9a4eaf 100644 --- a/examples/quickstarts/dancer-mysql.json +++ b/examples/quickstarts/dancer-mysql.json @@ -1,510 +1,525 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "dancer-mysql-example", - "template": "dancer-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-perl", - "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,perl,dancer", - "template.openshift.io/bindable": "false" - }, - "name": "dancer-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "perl -I extlib/lib/perl5 -I lib t/*" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "CPAN_MIRROR", - "value": "${CPAN_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "perl:5.30-ubi8", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "PERL_APACHE2_RELOAD", - "value": "${PERL_APACHE2_RELOAD}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "dancer-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dancer-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Perl Dancer container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/dancer-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "database" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", - "displayName": "Perl Module Reload", - "name": "PERL_APACHE2_RELOAD", - "value": "" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The custom CPAN mirror URL", - "displayName": "Custom CPAN Mirror URL", - "name": "CPAN_MIRROR", - "value": "" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "dancer-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,perl,dancer", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "perl -I extlib/lib/perl5 -I lib t/*" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "CPAN_MIRROR", + "value": "${CPAN_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "perl:${PERL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "PERL_APACHE2_RELOAD", + "value": "${PERL_APACHE2_RELOAD}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "dancer-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "dancer-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:8.0-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "dancer-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PERL_VERSION", + "displayName": "Version of Perl Image", + "description": "Version of Perl image to be used (5.26-el7, 5.26-ubi8, or latest).", + "value": "5.26-ubi8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Perl Dancer container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/dancer-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "database", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "sampledb", + "required": true + }, + { + "name": "PERL_APACHE2_RELOAD", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "CPAN_MIRROR", + "displayName": "Custom CPAN Mirror URL", + "description": "The custom CPAN mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "dancer-mysql-example", + "template": "dancer-mysql-example" + } +} \ No newline at end of file diff --git a/examples/quickstarts/django-postgresql-persistent.json b/examples/quickstarts/django-postgresql-persistent.json index 677631ecf7f1..9fb7eae2aab0 100644 --- a/examples/quickstarts/django-postgresql-persistent.json +++ b/examples/quickstarts/django-postgresql-persistent.json @@ -1,560 +1,559 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "django-psql-persistent", - "template": "django-psql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "iconClass": "icon-python", - "openshift.io/display-name": "Django + PostgreSQL", - "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,python,django", - "template.openshift.io/bindable": "false" - }, - "name": "django-psql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "django-secret-key": "${DJANGO_SECRET_KEY}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./manage.py test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "PIP_INDEX_URL", - "value": "${PIP_INDEX_URL}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "python:${PYTHON_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "valueFrom": { - "secretKeyRef": { - "key": "django-secret-key", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "django-psql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-psql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "django-psql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of Python image to be used (3.6 or latest).", - "displayName": "Version of Python Image", - "name": "PYTHON_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - }, - { - "description": "Maximum amount of memory the Django container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/django-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database Username", - "name": "DATABASE_USER", - "required": true, - "value": "django" - }, - { - "displayName": "Database User Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Relative path to Gunicorn configuration file (optional).", - "displayName": "Application Configuration File Path", - "name": "APP_CONFIG" - }, - { - "description": "Set this to a long random string.", - "displayName": "Django Secret Key", - "from": "[\\w]{50}", - "generate": "expression", - "name": "DJANGO_SECRET_KEY" - }, - { - "description": "The custom PyPi index URL", - "displayName": "Custom PyPi Index URL", - "name": "PIP_INDEX_URL", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "django-psql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Django + PostgreSQL", + "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,python,django", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "django-secret-key": "${DJANGO_SECRET_KEY}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./manage.py test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "PIP_INDEX_URL", + "value": "${PIP_INDEX_URL}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "python:${PYTHON_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "APP_CONFIG", + "value": "${APP_CONFIG}" + }, + { + "name": "DJANGO_SECRET_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "django-secret-key", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "django-psql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "django-psql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "django-psql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi7, 3.8-ubi8, or latest).", + "value": "3.8-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Django container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/django-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "value": "django", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database User Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "APP_CONFIG", + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." + }, + { + "name": "DJANGO_SECRET_KEY", + "displayName": "Django Secret Key", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "PIP_INDEX_URL", + "displayName": "Custom PyPi Index URL", + "description": "The custom PyPi index URL" + } + ], + "labels": { + "app": "django-psql-persistent", + "template": "django-psql-persistent" + } } \ No newline at end of file diff --git a/examples/quickstarts/django-postgresql.json b/examples/quickstarts/django-postgresql.json index 71e922787c41..51a708aa05da 100644 --- a/examples/quickstarts/django-postgresql.json +++ b/examples/quickstarts/django-postgresql.json @@ -1,534 +1,533 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "django-psql-example", - "template": "django-psql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-python", - "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,python,django", - "template.openshift.io/bindable": "false" - }, - "name": "django-psql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "django-secret-key": "${DJANGO_SECRET_KEY}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./manage.py test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "PIP_INDEX_URL", - "value": "${PIP_INDEX_URL}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "python:${PYTHON_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "valueFrom": { - "secretKeyRef": { - "key": "django-secret-key", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "django-psql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-psql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "django-psql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of Python image to be used (3.6 or latest).", - "displayName": "Version of Python Image", - "name": "PYTHON_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - }, - { - "description": "Maximum amount of memory the Django container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/django-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database Username", - "name": "DATABASE_USER", - "required": true, - "value": "django" - }, - { - "displayName": "Database User Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Relative path to Gunicorn configuration file (optional).", - "displayName": "Application Configuration File Path", - "name": "APP_CONFIG" - }, - { - "description": "Set this to a long random string.", - "displayName": "Django Secret Key", - "from": "[\\w]{50}", - "generate": "expression", - "name": "DJANGO_SECRET_KEY" - }, - { - "description": "The custom PyPi index URL", - "displayName": "Custom PyPi Index URL", - "name": "PIP_INDEX_URL", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "django-psql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-python", + "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,python,django", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "django-secret-key": "${DJANGO_SECRET_KEY}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./manage.py test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "PIP_INDEX_URL", + "value": "${PIP_INDEX_URL}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "python:${PYTHON_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "APP_CONFIG", + "value": "${APP_CONFIG}" + }, + { + "name": "DJANGO_SECRET_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "django-secret-key", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "django-psql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "django-psql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "django-psql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi7, 3.8-ubi8, or latest).", + "value": "3.8-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Django container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/django-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "value": "django", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database User Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "APP_CONFIG", + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." + }, + { + "name": "DJANGO_SECRET_KEY", + "displayName": "Django Secret Key", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "PIP_INDEX_URL", + "displayName": "Custom PyPi Index URL", + "description": "The custom PyPi index URL" + } + ], + "labels": { + "app": "django-psql-example", + "template": "django-psql-example" + } } \ No newline at end of file diff --git a/examples/quickstarts/dotnet-pgsql-persistent.json b/examples/quickstarts/dotnet-pgsql-persistent.json index 2a3ede9251dd..1becba2bb0a8 100644 --- a/examples/quickstarts/dotnet-pgsql-persistent.json +++ b/examples/quickstarts/dotnet-pgsql-persistent.json @@ -1,568 +1 @@ -{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "dotnet-pgsql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore.", - "metadata": { - "annotations": { - "description": "An example .NET Core application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore.", - "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core + PostgreSQL (Persistent)", - "tags": "quickstart,dotnet", - "template.openshift.io/documentation-url": "https://github.com/redhat-developer/s2i-dotnetcore", - "template.openshift.io/provider-display-name": "Red Hat, Inc.", - "template.openshift.io/support-url": "https://access.redhat.com" - }, - "name": "dotnet-pgsql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "connect-string": "Host=${DATABASE_SERVICE_NAME};Database=${DATABASE_NAME};Username=${DATABASE_USER};Password=${DATABASE_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": {}, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "DOTNET_STARTUP_PROJECT", - "value": "${DOTNET_STARTUP_PROJECT}" - }, - { - "name": "DOTNET_SDK_VERSION", - "value": "${DOTNET_SDK_VERSION}" - }, - { - "name": "DOTNET_ASSEMBLY_NAME", - "value": "${DOTNET_ASSEMBLY_NAME}" - }, - { - "name": "DOTNET_NPM_TOOLS", - "value": "${DOTNET_NPM_TOOLS}" - }, - { - "name": "DOTNET_TEST_PROJECTS", - "value": "${DOTNET_TEST_PROJECTS}" - }, - { - "name": "DOTNET_CONFIGURATION", - "value": "${DOTNET_CONFIGURATION}" - }, - { - "name": "DOTNET_RESTORE_SOURCES", - "value": "${DOTNET_RESTORE_SOURCES}" - }, - { - "name": "DOTNET_TOOLS", - "value": "${DOTNET_TOOLS}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "${DOTNET_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "resources": {}, - "rollingParams": { - "intervalSeconds": 1, - "maxSurge": "25%", - "maxUnavailable": "25%", - "timeoutSeconds": 600, - "updatePeriodSeconds": 1 - }, - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "ConnectionString", - "valueFrom": { - "secretKeyRef": { - "key": "connect-string", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 40, - "timeoutSeconds": 10 - }, - "name": "dotnet-pgsql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 30 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dotnet-pgsql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 5432 - }, - "timeoutSeconds": 1 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:9.5", - "namespace": "openshift" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "musicstore" - }, - { - "description": "Maximum amount of memory the .NET Core container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "128Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "128Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "256Mi" - }, - { - "description": "The image stream tag which is used to build the code.", - "displayName": ".NET builder", - "name": "DOTNET_IMAGE_STREAM_TAG", - "required": true, - "value": "dotnet:2.1" - }, - { - "description": "The OpenShift Namespace where the .NET builder ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/redhat-developer/s2i-aspnet-musicstore-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF", - "value": "rel/2.1-example" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "Set this to a project file (e.g. csproj) or a folder containing a single project file.", - "displayName": "Startup Project", - "name": "DOTNET_STARTUP_PROJECT", - "value": "samples/MusicStore" - }, - { - "description": "Set this to configure the default SDK version. This can be set to a specific version, '' (lowest version) or 'latest' (highest version).", - "displayName": "SDK Version", - "name": "DOTNET_SDK_VERSION", - "value": "" - }, - { - "description": "Set this when the assembly name is overridden in the project file.", - "displayName": "Startup Assembly", - "name": "DOTNET_ASSEMBLY_NAME" - }, - { - "description": "Set this to a space separated list of .NET tools needed to publish.", - "displayName": ".NET Tools", - "name": "DOTNET_TOOLS" - }, - { - "description": "Set this to a space separated list of npm tools needed to publish.", - "displayName": "Npm Tools", - "name": "DOTNET_NPM_TOOLS" - }, - { - "description": "Set this to a space separated list of test projects to run before publishing.", - "displayName": "Test projects", - "name": "DOTNET_TEST_PROJECTS" - }, - { - "description": "Set this to configuration (Release/Debug).", - "displayName": "Configuration", - "name": "DOTNET_CONFIGURATION", - "value": "Release" - }, - { - "description": "Set this to override the NuGet.config sources.", - "displayName": "NuGet package sources", - "name": "DOTNET_RESTORE_SOURCES" - }, - { - "description": "The exposed hostname that will route to the .NET Core service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "A secret string used to configure the GitHub webhook.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "musicstore" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - } - ] -} \ No newline at end of file +404: Not Found \ No newline at end of file diff --git a/examples/quickstarts/dotnet.json b/examples/quickstarts/dotnet.json index 9d94687634e9..1becba2bb0a8 100644 --- a/examples/quickstarts/dotnet.json +++ b/examples/quickstarts/dotnet.json @@ -1,347 +1 @@ -{ - "apiVersion": "v1", - "kind": "Template", - "metadata": { - "annotations": { - "description": "An example .NET Core application.", - "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core Example", - "tags": "quickstart,dotnet,.net", - "template.openshift.io/documentation-url": "https://github.com/redhat-developer/s2i-dotnetcore", - "template.openshift.io/provider-display-name": "Red Hat, Inc.", - "template.openshift.io/support-url": "https://access.redhat.com" - }, - "name": "dotnet-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "DOTNET_STARTUP_PROJECT", - "value": "${DOTNET_STARTUP_PROJECT}" - }, - { - "name": "DOTNET_SDK_VERSION", - "value": "${DOTNET_SDK_VERSION}" - }, - { - "name": "DOTNET_ASSEMBLY_NAME", - "value": "${DOTNET_ASSEMBLY_NAME}" - }, - { - "name": "DOTNET_NPM_TOOLS", - "value": "${DOTNET_NPM_TOOLS}" - }, - { - "name": "DOTNET_TEST_PROJECTS", - "value": "${DOTNET_TEST_PROJECTS}" - }, - { - "name": "DOTNET_CONFIGURATION", - "value": "${DOTNET_CONFIGURATION}" - }, - { - "name": "DOTNET_RESTORE_SOURCES", - "value": "${DOTNET_RESTORE_SOURCES}" - }, - { - "name": "DOTNET_TOOLS", - "value": "${DOTNET_TOOLS}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "${DOTNET_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 40, - "timeoutSeconds": 15 - }, - "name": "dotnet-app", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 30 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dotnet-app" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dotnet-example" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "128Mi" - }, - { - "description": "The image stream tag which is used to build the code.", - "displayName": ".NET builder", - "name": "DOTNET_IMAGE_STREAM_TAG", - "required": true, - "value": "dotnet:2.2" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF", - "value": "dotnetcore-2.2" - }, - { - "description": "Set this to use a subdirectory of the source code repository", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the .NET Core service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "A secret string used to configure the GitHub webhook.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "description": "Set this to configure the default SDK version. This can be set to a specific version, '' (lowest version) or 'latest' (highest version).", - "displayName": "SDK Version", - "name": "DOTNET_SDK_VERSION", - "value": "" - }, - { - "description": "Set this to a project file (e.g. csproj) or a folder containing a single project file.", - "displayName": "Startup Project", - "name": "DOTNET_STARTUP_PROJECT", - "value": "app" - }, - { - "description": "Set this when the assembly name is overridden in the project file.", - "displayName": "Startup Assembly", - "name": "DOTNET_ASSEMBLY_NAME" - }, - { - "description": "Set this to a space separated list of .NET tools needed to publish.", - "displayName": ".NET Tools", - "name": "DOTNET_TOOLS" - }, - { - "description": "Set this to a space separated list of npm tools needed to publish.", - "displayName": "Npm Tools", - "name": "DOTNET_NPM_TOOLS" - }, - { - "description": "Set this to a space separated list of test projects to run before publishing.", - "displayName": "Test projects", - "name": "DOTNET_TEST_PROJECTS" - }, - { - "description": "Set this to configuration (Release/Debug).", - "displayName": "Configuration", - "name": "DOTNET_CONFIGURATION", - "value": "Release" - }, - { - "description": "Set this to override the NuGet.config sources.", - "displayName": "NuGet package sources", - "name": "DOTNET_RESTORE_SOURCES" - } - ] -} \ No newline at end of file +404: Not Found \ No newline at end of file diff --git a/examples/quickstarts/httpd.json b/examples/quickstarts/httpd.json index cc09e1344921..d9d9d2197826 100644 --- a/examples/quickstarts/httpd.json +++ b/examples/quickstarts/httpd.json @@ -1,269 +1,269 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "httpd-example", - "template": "httpd-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Apache HTTP Server (httpd) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", - "iconClass": "icon-apache", - "openshift.io/display-name": "Apache HTTP Server", - "openshift.io/documentation-url": "https://github.com/sclorg/httpd-ex", - "openshift.io/long-description": "This template defines resources needed to develop a static application served by Apache HTTP Server (httpd), including a build configuration and application deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,httpd", - "template.openshift.io/bindable": "false" - }, - "name": "httpd-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "name": "httpd:2.4", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "httpd-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "httpd-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "httpd-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/httpd-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "httpd-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Apache HTTP Server (httpd) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", + "iconClass": "icon-apache", + "openshift.io/display-name": "Apache HTTP Server", + "openshift.io/documentation-url": "https://github.com/sclorg/httpd-ex", + "openshift.io/long-description": "This template defines resources needed to develop a static application served by Apache HTTP Server (httpd), including a build configuration and application deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,httpd", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "name": "httpd:2.4-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Rolling" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "httpd-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "httpd-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "httpd-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/httpd-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + } + ], + "labels": { + "app": "httpd-example", + "template": "httpd-example" + } } \ No newline at end of file diff --git a/examples/quickstarts/nginx.json b/examples/quickstarts/nginx.json index f06d6a6c9795..9586e7adf96d 100644 --- a/examples/quickstarts/nginx.json +++ b/examples/quickstarts/nginx.json @@ -1,277 +1,277 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "nginx-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Nginx HTTP server and a reverse proxy (nginx) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", - "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy", - "openshift.io/documentation-url": "https://github.com/sclorg/nginx-ex", - "openshift.io/long-description": "This template defines resources needed to develop a static application served by Nginx HTTP server and a reverse proxy (nginx), including a build configuration and application deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nginx" - }, - "name": "nginx-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" - }, - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "name": "nginx:${NGINX_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nginx-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nginx-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nginx-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NGINX image to be used (1.12 by default).", - "displayName": "NGINX Version", - "name": "NGINX_VERSION", - "required": true, - "value": "1.12" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nginx-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the nginx service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "nginx-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Nginx HTTP server and a reverse proxy (nginx) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy", + "openshift.io/documentation-url": "https://github.com/sclorg/nginx-ex", + "openshift.io/long-description": "This template defines resources needed to develop a static application served by Nginx HTTP server and a reverse proxy (nginx), including a build configuration and application deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nginx" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" + }, + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "name": "nginx:${NGINX_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Rolling" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nginx-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nginx-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nginx-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NGINX_VERSION", + "displayName": "NGINX Version", + "description": "Version of NGINX image to be used (1.16-el8 by default).", + "value": "1.16-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/nginx-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the nginx service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + } + ], + "labels": { + "template": "nginx-example" + } } \ No newline at end of file diff --git a/examples/quickstarts/nodejs-mongodb-persistent.json b/examples/quickstarts/nodejs-mongodb-persistent.json deleted file mode 100644 index a444827c6791..000000000000 --- a/examples/quickstarts/nodejs-mongodb-persistent.json +++ /dev/null @@ -1,563 +0,0 @@ -{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "nodejs-mongo-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js + MongoDB", - "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex", - "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nodejs", - "template.openshift.io/bindable": "false" - }, - "name": "nodejs-mongo-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "npm test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "NPM_MIRROR", - "value": "${NPM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs:${NODEJS_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nodejs-mongo-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-mongo-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongodb", - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MONGODB_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nodejs-mongo-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NodeJS image to be used (6, 8, or latest).", - "displayName": "Version of NodeJS Image", - "name": "NODEJS_VERSION", - "required": true, - "value": "8" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Maximum amount of memory the Node.js container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MongoDB container can use.", - "displayName": "Memory Limit (MongoDB)", - "name": "MEMORY_MONGODB_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nodejs-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "description": "Password for the MongoDB user.", - "displayName": "MongoDB Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "Database Administrator Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_ADMIN_PASSWORD" - }, - { - "description": "The custom NPM mirror URL", - "displayName": "Custom NPM Mirror URL", - "name": "NPM_MIRROR", - "value": "" - } - ] -} \ No newline at end of file diff --git a/examples/quickstarts/nodejs-mongodb.json b/examples/quickstarts/nodejs-mongodb.json deleted file mode 100644 index a26905696800..000000000000 --- a/examples/quickstarts/nodejs-mongodb.json +++ /dev/null @@ -1,540 +0,0 @@ -{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "nodejs-mongodb-example", - "template": "nodejs-mongodb-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js + MongoDB (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex", - "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nodejs", - "template.openshift.io/bindable": "false" - }, - "name": "nodejs-mongodb-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "npm test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "NPM_MIRROR", - "value": "${NPM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs:${NODEJS_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nodejs-mongodb-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-mongodb-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongodb", - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MONGODB_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nodejs-mongodb-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NodeJS image to be used (6, 8, or latest).", - "displayName": "Version of NodeJS Image", - "name": "NODEJS_VERSION", - "required": true, - "value": "8" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Maximum amount of memory the Node.js container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MongoDB container can use.", - "displayName": "Memory Limit (MongoDB)", - "name": "MEMORY_MONGODB_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nodejs-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "description": "Password for the MongoDB user.", - "displayName": "MongoDB Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "Database Administrator Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_ADMIN_PASSWORD" - }, - { - "description": "The custom NPM mirror URL", - "displayName": "Custom NPM Mirror URL", - "name": "NPM_MIRROR", - "value": "" - } - ] -} \ No newline at end of file diff --git a/examples/quickstarts/nodejs-postgresql-persistent.json b/examples/quickstarts/nodejs-postgresql-persistent.json new file mode 100644 index 000000000000..5f79cc84f3cb --- /dev/null +++ b/examples/quickstarts/nodejs-postgresql-persistent.json @@ -0,0 +1,553 @@ +{ + "kind": "Template", + "apiVersion": "template.openshift.io/v1", + "metadata": { + "name": "nodejs-postgresql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js + PostgreSQL", + "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", + "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nodejs", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": {}, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "NPM_MIRROR", + "value": "${NPM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "nodejs:${NODEJS_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "labels": { + "app.openshift.io/runtime": "nodejs" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "app.openshift.io/runtime": "nodejs", + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nodejs-postgresql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nodejs-postgresql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + }, + "timeoutSeconds": 1 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/postgresql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nodejs-postgresql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NODEJS_VERSION", + "displayName": "Version of NodeJS Image", + "description": "Version of NodeJS image to be used (10-ubi8, 12-ubi8, or latest).", + "value": "12-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Node.js container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "PostgreSQL Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "PostgreSQL Password", + "description": "Password for the PostgreSQL user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "my_data", + "required": true + }, + { + "name": "DATABASE_ADMIN_PASSWORD", + "displayName": "Database Administrator Password", + "description": "Password for the database admin user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "NPM_MIRROR", + "displayName": "Custom NPM Mirror URL", + "description": "The custom NPM mirror URL" + } + ], + "labels": { + "app": "nodejs-postgresql-persistent", + "template": "nodejs-postgresql-persistent" + } +} \ No newline at end of file diff --git a/examples/quickstarts/nodejs-postgresql.json b/examples/quickstarts/nodejs-postgresql.json new file mode 100644 index 000000000000..b63716aac0d2 --- /dev/null +++ b/examples/quickstarts/nodejs-postgresql.json @@ -0,0 +1,529 @@ +{ + "kind": "Template", + "apiVersion": "template.openshift.io/v1", + "metadata": { + "name": "nodejs-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", + "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nodejs", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": {}, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "NPM_MIRROR", + "value": "${NPM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "nodejs:${NODEJS_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "labels": { + "app.openshift.io/runtime": "nodejs" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "app.openshift.io/runtime": "nodejs", + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nodejs-postgresql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nodejs-postgresql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + }, + "timeoutSeconds": 1 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/postgresql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nodejs-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NODEJS_VERSION", + "displayName": "Version of NodeJS Image", + "description": "Version of NodeJS image to be used (10-ubi8, 12-ubi8, or latest).", + "value": "12-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Node.js container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "PostgreSQL Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "PostgreSQL Password", + "description": "Password for the PostgreSQL user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "my_data", + "required": true + }, + { + "name": "DATABASE_ADMIN_PASSWORD", + "displayName": "Database Administrator Password", + "description": "Password for the database admin user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "NPM_MIRROR", + "displayName": "Custom NPM Mirror URL", + "description": "The custom NPM mirror URL" + } + ], + "labels": { + "app": "nodejs-postgresql-example", + "template": "nodejs-postgresql-example" + } +} \ No newline at end of file diff --git a/examples/quickstarts/rails-postgresql-persistent.json b/examples/quickstarts/rails-postgresql-persistent.json index 3b8bc9d451bb..e03d3a6c17ce 100644 --- a/examples/quickstarts/rails-postgresql-persistent.json +++ b/examples/quickstarts/rails-postgresql-persistent.json @@ -1,612 +1,611 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "rails-pgsql-persistent", - "template": "rails-pgsql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Rails + PostgreSQL", - "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,ruby,rails", - "template.openshift.io/bindable": "false" - }, - "name": "rails-pgsql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "application-password": "${APPLICATION_PASSWORD}", - "application-user": "${APPLICATION_USER}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "bundle exec rake test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "RUBYGEM_MIRROR", - "value": "${RUBYGEM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "ruby:2.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "${NAME}" - }, - "failurePolicy": "Abort" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - }, - { - "name": "APPLICATION_DOMAIN", - "value": "${APPLICATION_DOMAIN}" - }, - { - "name": "APPLICATION_USER", - "valueFrom": { - "secretKeyRef": { - "key": "application-user", - "name": "${NAME}" - } - } - }, - { - "name": "APPLICATION_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "application-password", - "name": "${NAME}" - } - } - }, - { - "name": "RAILS_ENV", - "value": "${RAILS_ENV}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 3 - }, - "name": "${NAME}", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${NAME}" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:12", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "rails-pgsql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Rails container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/rails-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The application user that is used within the sample application to authorize access on pages.", - "displayName": "Application Username", - "name": "APPLICATION_USER", - "required": true, - "value": "openshift" - }, - { - "description": "The application password that is used within the sample application to authorize access on pages.", - "displayName": "Application Password", - "name": "APPLICATION_PASSWORD", - "required": true, - "value": "secret" - }, - { - "description": "Environment under which the sample application will run. Could be set to production, development or test.", - "displayName": "Rails Environment", - "name": "RAILS_ENV", - "required": true, - "value": "production" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "root" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - }, - { - "description": "The custom RubyGems mirror URL", - "displayName": "Custom RubyGems Mirror URL", - "name": "RUBYGEM_MIRROR", - "value": "" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "rails-pgsql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Rails + PostgreSQL", + "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,ruby,rails", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "application-password": "${APPLICATION_PASSWORD}", + "application-user": "${APPLICATION_USER}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "bundle exec rake test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "RUBYGEM_MIRROR", + "value": "${RUBYGEM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "ruby:2.6-ubi8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "${NAME}" + }, + "failurePolicy": "Abort" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + }, + { + "name": "APPLICATION_DOMAIN", + "value": "${APPLICATION_DOMAIN}" + }, + { + "name": "APPLICATION_USER", + "valueFrom": { + "secretKeyRef": { + "key": "application-user", + "name": "${NAME}" + } + } + }, + { + "name": "APPLICATION_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "application-password", + "name": "${NAME}" + } + } + }, + { + "name": "RAILS_ENV", + "value": "${RAILS_ENV}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 3 + }, + "name": "${NAME}", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "${NAME}" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:12-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "rails-pgsql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Rails container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/rails-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "APPLICATION_USER", + "displayName": "Application Username", + "description": "The application user that is used within the sample application to authorize access on pages.", + "value": "openshift", + "required": true + }, + { + "name": "APPLICATION_PASSWORD", + "displayName": "Application Password", + "description": "The application password that is used within the sample application to authorize access on pages.", + "value": "secret", + "required": true + }, + { + "name": "RAILS_ENV", + "displayName": "Rails Environment", + "description": "Environment under which the sample application will run. Could be set to production, development or test.", + "value": "production", + "required": true + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "root", + "required": true + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "displayName": "Maximum Database Connections", + "value": "100" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "displayName": "Shared Buffer Amount", + "value": "12MB" + }, + { + "name": "RUBYGEM_MIRROR", + "displayName": "Custom RubyGems Mirror URL", + "description": "The custom RubyGems mirror URL" + } + ], + "labels": { + "app": "rails-pgsql-persistent", + "template": "rails-pgsql-persistent" + } +} \ No newline at end of file diff --git a/examples/quickstarts/rails-postgresql.json b/examples/quickstarts/rails-postgresql.json index aaef36427028..9d4366f7f6be 100644 --- a/examples/quickstarts/rails-postgresql.json +++ b/examples/quickstarts/rails-postgresql.json @@ -1,586 +1,585 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "rails-postgresql-example", - "template": "rails-postgresql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,ruby,rails", - "template.openshift.io/bindable": "false" - }, - "name": "rails-postgresql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "application-password": "${APPLICATION_PASSWORD}", - "application-user": "${APPLICATION_USER}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "bundle exec rake test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "RUBYGEM_MIRROR", - "value": "${RUBYGEM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "ruby:2.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "${NAME}" - }, - "failurePolicy": "Abort" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - }, - { - "name": "APPLICATION_DOMAIN", - "value": "${APPLICATION_DOMAIN}" - }, - { - "name": "APPLICATION_USER", - "valueFrom": { - "secretKeyRef": { - "key": "application-user", - "name": "${NAME}" - } - } - }, - { - "name": "APPLICATION_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "application-password", - "name": "${NAME}" - } - } - }, - { - "name": "RAILS_ENV", - "value": "${RAILS_ENV}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 3 - }, - "name": "${NAME}", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${NAME}" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:12", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "rails-postgresql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Rails container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/rails-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The application user that is used within the sample application to authorize access on pages.", - "displayName": "Application Username", - "name": "APPLICATION_USER", - "required": true, - "value": "openshift" - }, - { - "description": "The application password that is used within the sample application to authorize access on pages.", - "displayName": "Application Password", - "name": "APPLICATION_PASSWORD", - "required": true, - "value": "secret" - }, - { - "description": "Environment under which the sample application will run. Could be set to production, development or test.", - "displayName": "Rails Environment", - "name": "RAILS_ENV", - "required": true, - "value": "production" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "root" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - }, - { - "description": "The custom RubyGems mirror URL", - "displayName": "Custom RubyGems Mirror URL", - "name": "RUBYGEM_MIRROR", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "rails-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,ruby,rails", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "application-password": "${APPLICATION_PASSWORD}", + "application-user": "${APPLICATION_USER}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "bundle exec rake test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "RUBYGEM_MIRROR", + "value": "${RUBYGEM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "ruby:2.6-ubi8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "${NAME}" + }, + "failurePolicy": "Abort" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + }, + { + "name": "APPLICATION_DOMAIN", + "value": "${APPLICATION_DOMAIN}" + }, + { + "name": "APPLICATION_USER", + "valueFrom": { + "secretKeyRef": { + "key": "application-user", + "name": "${NAME}" + } + } + }, + { + "name": "APPLICATION_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "application-password", + "name": "${NAME}" + } + } + }, + { + "name": "RAILS_ENV", + "value": "${RAILS_ENV}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 3 + }, + "name": "${NAME}", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "${NAME}" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:12-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "rails-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Rails container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/rails-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "APPLICATION_USER", + "displayName": "Application Username", + "description": "The application user that is used within the sample application to authorize access on pages.", + "value": "openshift", + "required": true + }, + { + "name": "APPLICATION_PASSWORD", + "displayName": "Application Password", + "description": "The application password that is used within the sample application to authorize access on pages.", + "value": "secret", + "required": true + }, + { + "name": "RAILS_ENV", + "displayName": "Rails Environment", + "description": "Environment under which the sample application will run. Could be set to production, development or test.", + "value": "production", + "required": true + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "root", + "required": true + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "displayName": "Maximum Database Connections", + "value": "100" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "displayName": "Shared Buffer Amount", + "value": "12MB" + }, + { + "name": "RUBYGEM_MIRROR", + "displayName": "Custom RubyGems Mirror URL", + "description": "The custom RubyGems mirror URL" + } + ], + "labels": { + "app": "rails-postgresql-example", + "template": "rails-postgresql-example" + } } \ No newline at end of file diff --git a/examples/sample-app/application-template-dockerbuild.json b/examples/sample-app/application-template-dockerbuild.json index f2067d262bae..94a57487fcd3 100644 --- a/examples/sample-app/application-template-dockerbuild.json +++ b/examples/sample-app/application-template-dockerbuild.json @@ -83,14 +83,14 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7" + "name": "ruby-27" }, "spec": { "tags": [ { "from": { "kind": "DockerImage", - "name": "docker.io/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" }, "name": "latest" } @@ -143,7 +143,7 @@ "dockerStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -354,7 +354,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "centos/mysql-57-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, diff --git a/examples/sample-app/application-template-pullspecbuild.json b/examples/sample-app/application-template-pullspecbuild.json index 964263682be5..c89a48587439 100644 --- a/examples/sample-app/application-template-pullspecbuild.json +++ b/examples/sample-app/application-template-pullspecbuild.json @@ -83,10 +83,10 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7" + "name": "ruby-27" }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -134,7 +134,7 @@ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } } }, @@ -389,7 +389,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "centos/mysql-57-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, diff --git a/examples/sample-app/application-template-stibuild.json b/examples/sample-app/application-template-stibuild.json index e7c8b220eb6f..8ec884a781ee 100644 --- a/examples/sample-app/application-template-stibuild.json +++ b/examples/sample-app/application-template-stibuild.json @@ -83,10 +83,10 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7" + "name": "ruby-27" }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -138,7 +138,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -399,7 +399,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "centos/mysql-57-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, diff --git a/hack/update-external-examples.sh b/hack/update-external-examples.sh index bfec45df9675..bca6dd011e52 100755 --- a/hack/update-external-examples.sh +++ b/hack/update-external-examples.sh @@ -16,16 +16,16 @@ IMAGESTREAMS_DIR="${OS_ROOT}/examples/image-streams" # Specifically look for a line containing https://raw.githubusercontent.com, then # look for the first content in ()s on that line, which will be the actual url of the file, # then use curl to pull that file down. - curl -# $(grep -E '\(https://raw.githubusercontent.com.*centos7.*\)' README.md | sed -E 's/.*\((.*)\)/\1 -O/') + curl -# $(grep -E '\(https://raw.githubusercontent.com.*centos.*\)' README.md | sed -E 's/.*\((.*)\)/\1 -O/') jq . -s *.json | jq '. | {"kind": "ImageStreamList","apiVersion": "v1", "items": .}' > images-centos.tmp rm -vf *.{json,yaml,yml} - curl -# $(grep -E '\(https://raw.githubusercontent.com.*rhel7.*\)' README.md | sed -E 's/.*\((.*)\)/\1 -O/') - jq . -s *.json | jq '. | {"kind": "ImageStreamList","apiVersion": "v1", "items": .}' > images-rhel.tmp - rm -vf *.{json,yaml,yml} +# curl -# $(grep -E '\(https://raw.githubusercontent.com.*rhel.*\)' README.md | sed -E 's/.*\((.*)\)/\1 -O/') +# jq . -s *.json | jq '. | {"kind": "ImageStreamList","apiVersion": "v1", "items": .}' > images-rhel.tmp +# rm -vf *.{json,yaml,yml} mv images-centos.tmp image-streams-centos7.json - mv images-rhel.tmp image-streams-rhel7.json +# mv images-rhel.tmp image-streams-rhel7.json ) @@ -48,7 +48,6 @@ QUICKSTARTS_DIR="${OS_ROOT}/examples/quickstarts" mv django-psql-persistent.json django-postgresql-persistent.json mv django-psql.json django-postgresql.json mv rails-pgsql-persistent.json rails-postgresql-persistent.json - mv nodejs-mongo-persistent.json nodejs-mongodb-persistent.json ) diff --git a/test/extended/builds/dockerfile.go b/test/extended/builds/dockerfile.go index 4b653bdd6c83..e2b30bb7947b 100644 --- a/test/extended/builds/dockerfile.go +++ b/test/extended/builds/dockerfile.go @@ -26,7 +26,7 @@ FROM %s USER 1001 `, image.ShellImage()) testDockerfile2 = ` -FROM image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 +FROM image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 USER 1001 ` testDockerfile3 = ` @@ -110,7 +110,7 @@ USER 1001 o.Expect(image.Image.DockerImageMetadata.Object.(*docker10.DockerImage).Config.User).To(o.Equal("1001")) g.By("checking for the imported tag") - _, err = oc.ImageClient().ImageV1().ImageStreamTags(oc.Namespace()).Get(context.Background(), "ruby:2.7", metav1.GetOptions{}) + _, err = oc.ImageClient().ImageV1().ImageStreamTags(oc.Namespace()).Get(context.Background(), "ruby:2.7-ubi8", metav1.GetOptions{}) o.Expect(err).NotTo(o.HaveOccurred()) }) diff --git a/test/extended/builds/pipeline_jenkins_e2e.go b/test/extended/builds/pipeline_jenkins_e2e.go index e5c35db62c16..feec71378275 100644 --- a/test/extended/builds/pipeline_jenkins_e2e.go +++ b/test/extended/builds/pipeline_jenkins_e2e.go @@ -380,26 +380,26 @@ var _ = g.Describe("[sig-devex][Feature:Jenkins][Slow] Jenkins repos e2e openshi if err != nil || !br.BuildSuccess { exutil.DumpBuilds(oc) exutil.DumpPodLogsStartingWith("nodejs", oc) - exutil.DumpBuildLogs("nodejs-mongodb-example", oc) - exutil.DumpDeploymentLogs("mongodb", 1, oc) - exutil.DumpDeploymentLogs("nodejs-mongodb-example", 1, oc) + exutil.DumpBuildLogs("nodejs-postgresql-example", oc) + exutil.DumpDeploymentLogs("postgresql", 1, oc) + exutil.DumpDeploymentLogs("nodejs-postgresql-example", 1, oc) } debugAnyJenkinsFailure(br, oc.Namespace()+"-nodejs-sample-pipeline", oc, true) br.AssertSuccess() // wait for the service to be running - g.By("expecting the nodejs-mongodb-example service to be deployed and running") - _, err = exutil.GetEndpointAddress(oc, "nodejs-mongodb-example") + g.By("expecting the nodejs-postgresql-example service to be deployed and running") + _, err = exutil.GetEndpointAddress(oc, "nodejs-postgresql-example") o.Expect(err).NotTo(o.HaveOccurred()) g.By("clean up openshift resources for next potential run") - err = oc.Run("delete").Args("all", "-l", "app=nodejs-mongodb-example").Execute() + err = oc.Run("delete").Args("all", "-l", "app=nodejs-postgresql-example").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = oc.Run("delete").Args("secret", "nodejs-mongodb-example").Execute() + err = oc.Run("delete").Args("secret", "nodejs-postgresql-example").Execute() o.Expect(err).NotTo(o.HaveOccurred()) err = oc.Run("delete").Args("bc", "nodejs-sample-pipeline").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = oc.Run("delete").Args("is", "nodejs-mongodb-example-staging").Execute() + err = oc.Run("delete").Args("is", "nodejs-postgresql-example-staging").Execute() o.Expect(err).NotTo(o.HaveOccurred()) }) @@ -556,11 +556,11 @@ var _ = g.Describe("[sig-devex][Feature:Jenkins][Slow] Jenkins repos e2e openshi o.Expect(err).NotTo(o.HaveOccurred()) g.By(fmt.Sprintf("verifying that the main route has been switched to %s", newColour)) - value, err := oc.Run("get").Args("route", "nodejs-mongodb-example", "-o", "jsonpath={ .spec.to.name }").Output() + value, err := oc.Run("get").Args("route", "nodejs-postgresql-example", "-o", "jsonpath={ .spec.to.name }").Output() o.Expect(err).NotTo(o.HaveOccurred()) activeRoute := strings.TrimSpace(value) - g.By(fmt.Sprintf("verifying that the active route is 'nodejs-mongodb-example-%s'", newColour)) - o.Expect(activeRoute).To(o.Equal(fmt.Sprintf("nodejs-mongodb-example-%s", newColour))) + g.By(fmt.Sprintf("verifying that the active route is 'nodejs-postgresql-example-%s'", newColour)) + o.Expect(activeRoute).To(o.Equal(fmt.Sprintf("nodejs-postgresql-example-%s", newColour))) } buildAndSwitch("green") diff --git a/test/extended/builds/pipeline_origin_bld.go b/test/extended/builds/pipeline_origin_bld.go index 0b0a01079847..3c08a5bd00db 100644 --- a/test/extended/builds/pipeline_origin_bld.go +++ b/test/extended/builds/pipeline_origin_bld.go @@ -42,26 +42,26 @@ var _ = g.Describe("[sig-builds][Feature:Builds][sig-devex][Feature:Jenkins][Slo defer g.GinkgoRecover() var ( - jenkinsEphemeralTemplatePath = exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json") - jenkinsPersistentTemplatePath = exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-persistent-template.json") - envVarsPipelinePath = exutil.FixturePath("testdata", "samplepipeline-withenvs.yaml") - origPipelinePath = exutil.FixturePath("..", "..", "examples", "jenkins", "pipeline", "samplepipeline.yaml") - configMapPodTemplatePath = exutil.FixturePath("testdata", "config-map-jenkins-slave-pods.yaml") - imagestreamPodTemplatePath = exutil.FixturePath("testdata", "imagestream-jenkins-slave-pods.yaml") - imagestreamtagPodTemplatePath = exutil.FixturePath("testdata", "imagestreamtag-jenkins-slave-pods.yaml") - podTemplateSlavePipelinePath = exutil.FixturePath("testdata", "jenkins-slave-template.yaml") - secretPath = exutil.FixturePath("testdata", "openshift-secret-to-jenkins-credential.yaml") - successfulPipeline = exutil.FixturePath("testdata", "builds", "build-pruning", "successful-pipeline.yaml") - failedPipeline = exutil.FixturePath("testdata", "builds", "build-pruning", "failed-pipeline.yaml") - multiNamespaceClientPluginPipelinePath = exutil.FixturePath("testdata", "multi-namespace-pipeline.yaml") - verifyServiceClientPluginPipelinePath = exutil.FixturePath("testdata", "verifyservice-pipeline-template.yaml") - pollingInterval = time.Second - timeout = time.Minute - oc = exutil.NewCLI("jenkins-pipeline") - ticker *time.Ticker - j *jenkins.JenkinsRef - pvs = []*corev1.PersistentVolume{} - nfspod = &corev1.Pod{} + //multiNamespaceClientPluginPipelinePath = exutil.FixturePath("testdata", "multi-namespace-pipeline.yaml") + jenkinsEphemeralTemplatePath = exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json") + jenkinsPersistentTemplatePath = exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-persistent-template.json") + envVarsPipelinePath = exutil.FixturePath("testdata", "samplepipeline-withenvs.yaml") + origPipelinePath = exutil.FixturePath("..", "..", "examples", "jenkins", "pipeline", "samplepipeline.yaml") + configMapPodTemplatePath = exutil.FixturePath("testdata", "config-map-jenkins-slave-pods.yaml") + imagestreamPodTemplatePath = exutil.FixturePath("testdata", "imagestream-jenkins-slave-pods.yaml") + imagestreamtagPodTemplatePath = exutil.FixturePath("testdata", "imagestreamtag-jenkins-slave-pods.yaml") + podTemplateSlavePipelinePath = exutil.FixturePath("testdata", "jenkins-slave-template.yaml") + secretPath = exutil.FixturePath("testdata", "openshift-secret-to-jenkins-credential.yaml") + successfulPipeline = exutil.FixturePath("testdata", "builds", "build-pruning", "successful-pipeline.yaml") + failedPipeline = exutil.FixturePath("testdata", "builds", "build-pruning", "failed-pipeline.yaml") + verifyServiceClientPluginPipelinePath = exutil.FixturePath("testdata", "verifyservice-pipeline-template.yaml") + pollingInterval = time.Second + timeout = time.Minute + oc = exutil.NewCLI("jenkins-pipeline") + ticker *time.Ticker + j *jenkins.JenkinsRef + pvs = []*corev1.PersistentVolume{} + nfspod = &corev1.Pod{} cleanup = func(jenkinsTemplatePath string) { if g.CurrentGinkgoTestDescription().Failed { @@ -265,6 +265,7 @@ var _ = g.Describe("[sig-builds][Feature:Builds][sig-devex][Feature:Jenkins][Slo }) + /* to be moved to jenkins client plugin e2e g.By("should handle multi-namespace templates", func() { g.By("create additional projects") namespace := oc.Namespace() @@ -308,21 +309,22 @@ var _ = g.Describe("[sig-builds][Feature:Builds][sig-devex][Feature:Jenkins][Slo oc.SetNamespace(namespace2) output, err := oc.AsAdmin().Run("get").Args("all").Output() o.Expect(err).NotTo(o.HaveOccurred()) - o.Expect(output).To(o.ContainSubstring("deploymentconfig.apps.openshift.io/mongodb")) + o.Expect(output).To(o.ContainSubstring("deploymentconfig.apps.openshift.io/mariadb")) oc.SetNamespace(namespace3) output, err = oc.AsAdmin().Run("get").Args("all").Output() o.Expect(err).NotTo(o.HaveOccurred()) - o.Expect(output).To(o.ContainSubstring("service/mongodb")) + o.Expect(output).To(o.ContainSubstring("service/mariadb")) g.By("clean up openshift resources for next potential run") oc.SetNamespace(namespace) err = oc.Run("delete").Args("bc", "multi-namespace-pipeline").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = oc.AsAdmin().Run("delete").Args("all", "-l", "template=mongodb-ephemeral-template").Execute() + err = oc.AsAdmin().Run("delete").Args("all", "-l", "template=mariadb-ephemeral-template").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = oc.Run("delete").Args("template", "mongodb-ephemeral").Execute() + err = oc.Run("delete").Args("template", "mariadb-ephemeral").Execute() o.Expect(err).NotTo(o.HaveOccurred()) }) + */ }) }) @@ -364,9 +366,9 @@ var _ = g.Describe("[sig-builds][Feature:Builds][sig-devex][Feature:Jenkins][Slo g.By("clean up openshift resources for next potential run") // doing this as admin to avoid errors like this: - // Dec 14 13:13:02.275: INFO: Error running &{/usr/bin/oc [oc delete --config=/tmp/configfile590595709 --namespace=e2e-test-jenkins-pipeline-2z82q all -l template=mongodb-ephemeral-template] [] replicationcontroller "mongodb-1" deleted - // service "mongodb" deleted - // deploymentconfig.apps.openshift.io "mongodb" deleted + // Dec 14 13:13:02.275: INFO: Error running &{/usr/bin/oc [oc delete --config=/tmp/configfile590595709 --namespace=e2e-test-jenkins-pipeline-2z82q all -l template=mariadb-ephemeral-template] [] replicationcontroller "mariadb-1" deleted + // service "mariadb" deleted + // deploymentconfig.apps.openshift.io "mariadb" deleted // Error from server (Forbidden): clusterserviceversions.operators.coreos.com is forbidden: User "e2e-test-jenkins-pipeline-2z82q-user" cannot list clusterserviceversions.operators.coreos.com in the namespace "e2e-test-jenkins-pipeline-2z82q": no RBAC policy matched // Error from server (Forbidden): catalogsources.operators.coreos.com is forbidden: User "e2e-test-jenkins-pipeline-2z82q-user" cannot list catalogsources.operators.coreos.com in the namespace "e2e-test-jenkins-pipeline-2z82q": no RBAC policy matched // Error from server (Forbidden): installplans.operators.coreos.com is forbidden: User "e2e-test-jenkins-pipeline-2z82q-user" cannot list installplans.operators.coreos.com in the namespace "e2e-test-jenkins-pipeline-2z82q": no RBAC policy matched diff --git a/test/extended/builds/pipeline_origin_bld_rhelimagesonly.go b/test/extended/builds/pipeline_origin_bld_rhelimagesonly.go index 1687958a2cb5..65766c36472a 100644 --- a/test/extended/builds/pipeline_origin_bld_rhelimagesonly.go +++ b/test/extended/builds/pipeline_origin_bld_rhelimagesonly.go @@ -188,9 +188,9 @@ var _ = g.Describe("[sig-devex][Feature:JenkinsRHELImagesOnly][Slow] openshift p o.Expect(err).NotTo(o.HaveOccurred()) err = oc.Run("delete").Args("is", "--all").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = oc.Run("delete").Args("dc,svc", "mongodb", "--ignore-not-found").Execute() + err = oc.Run("delete").Args("dc,svc", "postgresql", "--ignore-not-found").Execute() o.Expect(err).NotTo(o.HaveOccurred()) - err = oc.Run("delete").Args("dc,svc,secret,route", "nodejs-mongodb-example", "--ignore-not-found").Execute() + err = oc.Run("delete").Args("dc,svc,secret,route", "nodejs-postgresql-example", "--ignore-not-found").Execute() o.Expect(err).NotTo(o.HaveOccurred()) }) diff --git a/test/extended/cli/admin.go b/test/extended/cli/admin.go index 751c704491fe..02097f4607db 100644 --- a/test/extended/cli/admin.go +++ b/test/extended/cli/admin.go @@ -447,9 +447,9 @@ var _ = g.Describe("[sig-cli] oc adm", func() { o.Expect(err).NotTo(o.HaveOccurred()) o.Expect(out).To(o.ContainSubstring("origin-ruby-sample:latest")) - out, err = ocns.Run("adm", "build-chain").Args("ruby-27-centos7", "-o", "dot").Output() + out, err = ocns.Run("adm", "build-chain").Args("ruby-27", "-o", "dot").Output() o.Expect(err).NotTo(o.HaveOccurred()) - o.Expect(out).To(o.ContainSubstring(`digraph "ruby-27-centos7:latest"`)) + o.Expect(out).To(o.ContainSubstring(`digraph "ruby-27:latest"`)) ocns.Run("delete").Args("all", "-l", "build=sti").Execute() }) diff --git a/test/extended/cluster/cl.go b/test/extended/cluster/cl.go index 3cddf934e520..4cbce716145d 100644 --- a/test/extended/cluster/cl.go +++ b/test/extended/cluster/cl.go @@ -44,7 +44,7 @@ var _ = g.Describe("[sig-scalability][Feature:Performance] Load cluster", func() _ = exutil.FixturePath("testdata", "cluster", "quickstarts", "cakephp-mysql.json") _ = exutil.FixturePath("testdata", "cluster", "quickstarts", "dancer-mysql.json") _ = exutil.FixturePath("testdata", "cluster", "quickstarts", "django-postgresql.json") - _ = exutil.FixturePath("testdata", "cluster", "quickstarts", "nodejs-mongodb.json") + _ = exutil.FixturePath("testdata", "cluster", "quickstarts", "nodejs-postgresql.json") _ = exutil.FixturePath("testdata", "cluster", "quickstarts", "rails-postgresql.json") ) diff --git a/test/extended/image_ecosystem/s2i_images.go b/test/extended/image_ecosystem/s2i_images.go index 0ef34bf982d2..df5dbb58b72b 100644 --- a/test/extended/image_ecosystem/s2i_images.go +++ b/test/extended/image_ecosystem/s2i_images.go @@ -31,14 +31,14 @@ var s2iImages = map[string][]tc{ Version: "27", Cmd: "ruby --version", Expected: "ruby 2.7", - Tag: "2.7", + Tag: "2.7-ubi8", NonAMD: true, }, { Version: "26", Cmd: "ruby --version", Expected: "ruby 2.6", - Tag: "2.6", + Tag: "2.6-ubi8", NonAMD: true, }, }, @@ -47,7 +47,7 @@ var s2iImages = map[string][]tc{ Version: "27", Cmd: "python --version", Expected: "Python 2.7", - Tag: "2.7", + Tag: "2.7-ubi8", NonAMD: true, }, { @@ -63,7 +63,14 @@ var s2iImages = map[string][]tc{ Version: "12", Cmd: "node --version", Expected: "v12", - Tag: "12", + Tag: "12-ubi8", + NonAMD: true, + }, + { + Version: "14", + Cmd: "node --version", + Expected: "v14", + Tag: "14-ubi8", NonAMD: true, }, }, @@ -72,7 +79,7 @@ var s2iImages = map[string][]tc{ Version: "530", Cmd: "perl --version", Expected: "v5.30", - Tag: "5.30", + Tag: "5.30-ubi8", NonAMD: true, }, }, @@ -88,7 +95,7 @@ var s2iImages = map[string][]tc{ Version: "73", Cmd: "php --version", Expected: "7.3", - Tag: "7.3", + Tag: "7.3-ubi8", NonAMD: true, }, }, diff --git a/test/extended/testdata/bindata.go b/test/extended/testdata/bindata.go index 2dfacf59b403..0d8461ca1132 100644 --- a/test/extended/testdata/bindata.go +++ b/test/extended/testdata/bindata.go @@ -2,8 +2,6 @@ // sources: // examples/db-templates/mariadb-ephemeral-template.json // examples/db-templates/mariadb-persistent-template.json -// examples/db-templates/mongodb-ephemeral-template.json -// examples/db-templates/mongodb-persistent-template.json // examples/db-templates/mysql-ephemeral-template.json // examples/db-templates/mysql-persistent-template.json // examples/db-templates/postgresql-ephemeral-template.json @@ -26,8 +24,8 @@ // examples/quickstarts/dotnet.json // examples/quickstarts/httpd.json // examples/quickstarts/nginx.json -// examples/quickstarts/nodejs-mongodb-persistent.json -// examples/quickstarts/nodejs-mongodb.json +// examples/quickstarts/nodejs-postgresql-persistent.json +// examples/quickstarts/nodejs-postgresql.json // examples/quickstarts/rails-postgresql-persistent.json // examples/quickstarts/rails-postgresql.json // examples/hello-openshift/Dockerfile @@ -167,7 +165,7 @@ // test/extended/testdata/cluster/quickstarts/cakephp-mysql.json // test/extended/testdata/cluster/quickstarts/dancer-mysql.json // test/extended/testdata/cluster/quickstarts/django-postgresql.json -// test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json +// test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json // test/extended/testdata/cluster/quickstarts/rails-postgresql.json // test/extended/testdata/cmd/hack/lib/cmd.sh // test/extended/testdata/cmd/hack/lib/compress.awk @@ -544,262 +542,268 @@ func (fi bindataFileInfo) Sys() interface{} { } var _examplesDbTemplatesMariadbEphemeralTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mariadb-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md", - "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mariadb" - }, - "name": "mariadb-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mariadb", - "port": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mariadb", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mariadb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mariadb:${MARIADB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mariadb" - }, - { - "description": "Username for MariaDB user that will be used for accessing the database.", - "displayName": "MariaDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MariaDB connection user.", - "displayName": "MariaDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MariaDB root user.", - "displayName": "MariaDB root Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MariaDB database accessed.", - "displayName": "MariaDB Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of MariaDB image to be used (10.2 or latest).", - "displayName": "Version of MariaDB Image", - "name": "MARIADB_VERSION", - "required": true, - "value": "10.2" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mariadb-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-mariadb", + "openshift.io/display-name": "MariaDB (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md", + "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mariadb" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mariadb", + "port": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mariadb", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mariadb" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mariadb:${MARIADB_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mariadb", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MariaDB Connection Username", + "description": "Username for MariaDB user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MariaDB Connection Password", + "description": "Password for the MariaDB connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MariaDB root Password", + "description": "Password for the MariaDB root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MariaDB Database Name", + "description": "Name of the MariaDB database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "MARIADB_VERSION", + "displayName": "Version of MariaDB Image", + "description": "Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest).", + "value": "10.3-el8", + "required": true + } + ], + "labels": { + "template": "mariadb-ephemeral-template" + } }`) func examplesDbTemplatesMariadbEphemeralTemplateJsonBytes() ([]byte, error) { @@ -818,1487 +822,895 @@ func examplesDbTemplatesMariadbEphemeralTemplateJson() (*asset, error) { } var _examplesDbTemplatesMariadbPersistentTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mariadb-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MariaDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB", - "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md", - "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mariadb" - }, - "name": "mariadb-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mariadb", - "port": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mariadb", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mariadb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mariadb:${MARIADB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mariadb" - }, - { - "description": "Username for MariaDB user that will be used for accessing the database.", - "displayName": "MariaDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MariaDB connection user.", - "displayName": "MariaDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MariaDB root user.", - "displayName": "MariaDB root Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MariaDB database accessed.", - "displayName": "MariaDB Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of MariaDB image to be used (10.2 or latest).", - "displayName": "Version of MariaDB Image", - "name": "MARIADB_VERSION", - "required": true, - "value": "10.2" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - } - ] -}`) - -func examplesDbTemplatesMariadbPersistentTemplateJsonBytes() ([]byte, error) { - return _examplesDbTemplatesMariadbPersistentTemplateJson, nil -} - -func examplesDbTemplatesMariadbPersistentTemplateJson() (*asset, error) { - bytes, err := examplesDbTemplatesMariadbPersistentTemplateJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/db-templates/mariadb-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesDbTemplatesMongodbEphemeralTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mongodb-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MONGODB_USER}\n Password: ${MONGODB_PASSWORD}\n Database Name: ${MONGODB_DATABASE}\n Connection URL: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}/${MONGODB_DATABASE}\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.", - "metadata": { - "annotations": { - "description": "MongoDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mongodb.html", - "openshift.io/long-description": "This template provides a standalone MongoDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mongodb" - }, - "name": "mongodb-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}", - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-admin-password": "${MONGODB_ADMIN_PASSWORD}", - "database-name": "${MONGODB_DATABASE}", - "database-password": "${MONGODB_PASSWORD}", - "database-user": "${MONGODB_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mongodb://{.spec.clusterIP}:{.spec.ports[?(.name==\"mongo\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongo", - "nodePort": 0, - "port": 27017, - "protocol": "TCP", - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MONGODB_USER", - "required": true - }, - { - "description": "Password for the MongoDB connection user.", - "displayName": "MongoDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_PASSWORD", - "required": true - }, - { - "description": "Name of the MongoDB database accessed.", - "displayName": "MongoDB Database Name", - "name": "MONGODB_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "MongoDB Admin Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_ADMIN_PASSWORD", - "required": true - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mariadb-persistent", + "creationTimestamp": null, + "annotations": { + "description": "MariaDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-mariadb", + "openshift.io/display-name": "MariaDB", + "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md", + "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mariadb" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mariadb", + "port": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mariadb", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mariadb" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mariadb:${MARIADB_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mariadb", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MariaDB Connection Username", + "description": "Username for MariaDB user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MariaDB Connection Password", + "description": "Password for the MariaDB connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MariaDB root Password", + "description": "Password for the MariaDB root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MariaDB Database Name", + "description": "Name of the MariaDB database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "MARIADB_VERSION", + "displayName": "Version of MariaDB Image", + "description": "Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest).", + "value": "10.3-el8", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + } + ], + "labels": { + "template": "mariadb-persistent-template" + } }`) -func examplesDbTemplatesMongodbEphemeralTemplateJsonBytes() ([]byte, error) { - return _examplesDbTemplatesMongodbEphemeralTemplateJson, nil +func examplesDbTemplatesMariadbPersistentTemplateJsonBytes() ([]byte, error) { + return _examplesDbTemplatesMariadbPersistentTemplateJson, nil } -func examplesDbTemplatesMongodbEphemeralTemplateJson() (*asset, error) { - bytes, err := examplesDbTemplatesMongodbEphemeralTemplateJsonBytes() +func examplesDbTemplatesMariadbPersistentTemplateJson() (*asset, error) { + bytes, err := examplesDbTemplatesMariadbPersistentTemplateJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "examples/db-templates/mongodb-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "examples/db-templates/mariadb-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _examplesDbTemplatesMongodbPersistentTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mongodb-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MONGODB_USER}\n Password: ${MONGODB_PASSWORD}\n Database Name: ${MONGODB_DATABASE}\n Connection URL: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}/${MONGODB_DATABASE}\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.", - "metadata": { - "annotations": { - "description": "MongoDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mongodb.html", - "openshift.io/long-description": "This template provides a standalone MongoDB server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mongodb" - }, - "name": "mongodb-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}", - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-admin-password": "${MONGODB_ADMIN_PASSWORD}", - "database-name": "${MONGODB_DATABASE}", - "database-password": "${MONGODB_PASSWORD}", - "database-user": "${MONGODB_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mongodb://{.spec.clusterIP}:{.spec.ports[?(.name==\"mongo\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongo", - "nodePort": 0, - "port": 27017, - "protocol": "TCP", - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MONGODB_USER", - "required": true - }, - { - "description": "Password for the MongoDB connection user.", - "displayName": "MongoDB Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_PASSWORD", - "required": true - }, - { - "description": "Name of the MongoDB database accessed.", - "displayName": "MongoDB Database Name", - "name": "MONGODB_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "MongoDB Admin Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MONGODB_ADMIN_PASSWORD", - "required": true - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - } - ] +var _examplesDbTemplatesMysqlEphemeralTemplateJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mysql-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "MySQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", + "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mysql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "nodePort": 0, + "port": 3306, + "protocol": "TCP", + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mysql", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MySQL Connection Username", + "description": "Username for MySQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MySQL Connection Password", + "description": "Password for the MySQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MySQL root user Password", + "description": "Password for the MySQL root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MySQL Database Name", + "description": "Name of the MySQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "Version of MySQL Image", + "description": "Version of MySQL image to be used (8.0-el7, 8.0-el8, or latest).", + "value": "8.0-el8", + "required": true + } + ], + "labels": { + "template": "mysql-ephemeral-template" + } }`) -func examplesDbTemplatesMongodbPersistentTemplateJsonBytes() ([]byte, error) { - return _examplesDbTemplatesMongodbPersistentTemplateJson, nil +func examplesDbTemplatesMysqlEphemeralTemplateJsonBytes() ([]byte, error) { + return _examplesDbTemplatesMysqlEphemeralTemplateJson, nil } -func examplesDbTemplatesMongodbPersistentTemplateJson() (*asset, error) { - bytes, err := examplesDbTemplatesMongodbPersistentTemplateJsonBytes() +func examplesDbTemplatesMysqlEphemeralTemplateJson() (*asset, error) { + bytes, err := examplesDbTemplatesMysqlEphemeralTemplateJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "examples/db-templates/mongodb-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesDbTemplatesMysqlEphemeralTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mysql-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MySQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", - "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mysql" - }, - "name": "mysql-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "nodePort": 0, - "port": 3306, - "protocol": "TCP", - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:${MYSQL_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Username for MySQL user that will be used for accessing the database.", - "displayName": "MySQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MySQL connection user.", - "displayName": "MySQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MySQL root user.", - "displayName": "MySQL root user Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MySQL database accessed.", - "displayName": "MySQL Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of MySQL image to be used (5.7, or latest).", - "displayName": "Version of MySQL Image", - "name": "MYSQL_VERSION", - "required": true, - "value": "5.7" - } - ] -}`) - -func examplesDbTemplatesMysqlEphemeralTemplateJsonBytes() ([]byte, error) { - return _examplesDbTemplatesMysqlEphemeralTemplateJson, nil -} - -func examplesDbTemplatesMysqlEphemeralTemplateJson() (*asset, error) { - bytes, err := examplesDbTemplatesMysqlEphemeralTemplateJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/db-templates/mysql-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "examples/db-templates/mysql-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesMysqlPersistentTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "mysql-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.", - "metadata": { - "annotations": { - "description": "MySQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", - "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,mysql" - }, - "name": "mysql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-root_password": "{.data['database-root-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${MYSQL_DATABASE}", - "database-password": "${MYSQL_PASSWORD}", - "database-root-password": "${MYSQL_ROOT_PASSWORD}", - "database-user": "${MYSQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_ROOT_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-root-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:${MYSQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Username for MySQL user that will be used for accessing the database.", - "displayName": "MySQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "MYSQL_USER", - "required": true - }, - { - "description": "Password for the MySQL connection user.", - "displayName": "MySQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_PASSWORD", - "required": true - }, - { - "description": "Password for the MySQL root user.", - "displayName": "MySQL root user Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "MYSQL_ROOT_PASSWORD", - "required": true - }, - { - "description": "Name of the MySQL database accessed.", - "displayName": "MySQL Database Name", - "name": "MYSQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of MySQL image to be used (5.7, or latest).", - "displayName": "Version of MySQL Image", - "name": "MYSQL_VERSION", - "required": true, - "value": "5.7" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "mysql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "MySQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", + "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,mysql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-root_password": "{.data['database-root-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${MYSQL_DATABASE}", + "database-password": "${MYSQL_PASSWORD}", + "database-root-password": "${MYSQL_ROOT_PASSWORD}", + "database-user": "${MYSQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-root-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "mysql", + "required": true + }, + { + "name": "MYSQL_USER", + "displayName": "MySQL Connection Username", + "description": "Username for MySQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "displayName": "MySQL Connection Password", + "description": "Password for the MySQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_ROOT_PASSWORD", + "displayName": "MySQL root user Password", + "description": "Password for the MySQL root user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "displayName": "MySQL Database Name", + "description": "Name of the MySQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "Version of MySQL Image", + "description": "Version of MySQL image to be used (8.0-el7, 8.0-el8, or latest).", + "value": "8.0-el8", + "required": true + } + ], + "labels": { + "template": "mysql-persistent-template" + } }`) func examplesDbTemplatesMysqlPersistentTemplateJsonBytes() ([]byte, error) { @@ -2317,262 +1729,263 @@ func examplesDbTemplatesMysqlPersistentTemplateJson() (*asset, error) { } var _examplesDbTemplatesPostgresqlEphemeralTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "postgresql-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", - "metadata": { - "annotations": { - "description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", - "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,postgresql" - }, - "name": "postgresql-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${POSTGRESQL_DATABASE}", - "database-password": "${POSTGRESQL_PASSWORD}", - "database-user": "${POSTGRESQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "nodePort": 0, - "port": 5432, - "protocol": "TCP", - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Username for PostgreSQL user that will be used for accessing the database.", - "displayName": "PostgreSQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "POSTGRESQL_USER", - "required": true - }, - { - "description": "Password for the PostgreSQL connection user.", - "displayName": "PostgreSQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "POSTGRESQL_PASSWORD", - "required": true - }, - { - "description": "Name of the PostgreSQL database accessed.", - "displayName": "PostgreSQL Database Name", - "name": "POSTGRESQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "postgresql-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", + "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,postgresql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${POSTGRESQL_DATABASE}", + "database-password": "${POSTGRESQL_PASSWORD}", + "database-user": "${POSTGRESQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "nodePort": 0, + "port": 5432, + "protocol": "TCP", + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "postgresql", + "required": true + }, + { + "name": "POSTGRESQL_USER", + "displayName": "PostgreSQL Connection Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "POSTGRESQL_PASSWORD", + "displayName": "PostgreSQL Connection Password", + "description": "Password for the PostgreSQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "POSTGRESQL_DATABASE", + "displayName": "PostgreSQL Database Name", + "description": "Name of the PostgreSQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).", + "value": "10-el8", + "required": true + } + ], + "labels": { + "template": "postgresql-ephemeral-template" + } }`) func examplesDbTemplatesPostgresqlEphemeralTemplateJsonBytes() ([]byte, error) { @@ -2591,286 +2004,287 @@ func examplesDbTemplatesPostgresqlEphemeralTemplateJson() (*asset, error) { } var _examplesDbTemplatesPostgresqlPersistentTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "postgresql-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", - "metadata": { - "annotations": { - "description": "PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", - "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,postgresql" - }, - "name": "postgresql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-database_name": "{.data['database-name']}", - "template.openshift.io/expose-password": "{.data['database-password']}", - "template.openshift.io/expose-username": "{.data['database-user']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-name": "${POSTGRESQL_DATABASE}", - "database-password": "${POSTGRESQL_PASSWORD}", - "database-user": "${POSTGRESQL_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "nodePort": 0, - "port": 5432, - "protocol": "TCP", - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "valueFrom": { - "secretKeyRef": { - "key": "database-name", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Username for PostgreSQL user that will be used for accessing the database.", - "displayName": "PostgreSQL Connection Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "POSTGRESQL_USER", - "required": true - }, - { - "description": "Password for the PostgreSQL connection user.", - "displayName": "PostgreSQL Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "POSTGRESQL_PASSWORD", - "required": true - }, - { - "description": "Name of the PostgreSQL database accessed.", - "displayName": "PostgreSQL Database Name", - "name": "POSTGRESQL_DATABASE", - "required": true, - "value": "sampledb" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "postgresql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", + "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,postgresql" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-database_name": "{.data['database-name']}", + "template.openshift.io/expose-password": "{.data['database-password']}", + "template.openshift.io/expose-username": "{.data['database-user']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-name": "${POSTGRESQL_DATABASE}", + "database-password": "${POSTGRESQL_PASSWORD}", + "database-user": "${POSTGRESQL_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "nodePort": 0, + "port": 5432, + "protocol": "TCP", + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "valueFrom": { + "secretKeyRef": { + "key": "database-name", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "postgresql", + "required": true + }, + { + "name": "POSTGRESQL_USER", + "displayName": "PostgreSQL Connection Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "POSTGRESQL_PASSWORD", + "displayName": "PostgreSQL Connection Password", + "description": "Password for the PostgreSQL connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "POSTGRESQL_DATABASE", + "displayName": "PostgreSQL Database Name", + "description": "Name of the PostgreSQL database accessed.", + "value": "sampledb", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).", + "value": "10-el8", + "required": true + } + ], + "labels": { + "template": "postgresql-persistent-template" + } }`) func examplesDbTemplatesPostgresqlPersistentTemplateJsonBytes() ([]byte, error) { @@ -2889,225 +2303,226 @@ func examplesDbTemplatesPostgresqlPersistentTemplateJson() (*asset, error) { } var _examplesDbTemplatesRedisEphemeralTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "redis-ephemeral-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.", - "metadata": { - "annotations": { - "description": "Redis in-memory data structure store, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", - "iconClass": "icon-redis", - "openshift.io/display-name": "Redis (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/3.2", - "openshift.io/long-description": "This template provides a standalone Redis server. The data is not stored on persistent storage, so any restart of the service will result in all data being lost.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,redis" - }, - "name": "redis-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-password": "{.data['database-password']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-password": "${REDIS_PASSWORD}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "redis", - "nodePort": 0, - "port": 6379, - "protocol": "TCP", - "targetPort": 6379 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "REDIS_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 6379 - }, - "timeoutSeconds": 1 - }, - "name": "redis", - "ports": [ - { - "containerPort": 6379, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/redis/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "redis" - ], - "from": { - "kind": "ImageStreamTag", - "name": "redis:${REDIS_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "redis" - }, - { - "description": "Password for the Redis connection user.", - "displayName": "Redis Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "REDIS_PASSWORD", - "required": true - }, - { - "description": "Version of Redis image to be used (3.2 or latest).", - "displayName": "Version of Redis Image", - "name": "REDIS_VERSION", - "required": true, - "value": "3.2" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "redis-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "Redis in-memory data structure store, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/5", + "openshift.io/long-description": "This template provides a standalone Redis server. The data is not stored on persistent storage, so any restart of the service will result in all data being lost.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,redis" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-password": "{.data['database-password']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-password": "${REDIS_PASSWORD}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "redis", + "nodePort": 0, + "port": 6379, + "protocol": "TCP", + "targetPort": 6379 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "REDIS_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 6379 + }, + "timeoutSeconds": 1 + }, + "name": "redis", + "ports": [ + { + "containerPort": 6379, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/redis/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "redis" + ], + "from": { + "kind": "ImageStreamTag", + "name": "redis:${REDIS_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "redis", + "required": true + }, + { + "name": "REDIS_PASSWORD", + "displayName": "Redis Connection Password", + "description": "Password for the Redis connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "REDIS_VERSION", + "displayName": "Version of Redis Image", + "description": "Version of Redis image to be used (5-el7, 5-el8, or latest).", + "value": "5-el8", + "required": true + } + ], + "labels": { + "template": "redis-ephemeral-template" + } }`) func examplesDbTemplatesRedisEphemeralTemplateJsonBytes() ([]byte, error) { @@ -3126,249 +2541,250 @@ func examplesDbTemplatesRedisEphemeralTemplateJson() (*asset, error) { } var _examplesDbTemplatesRedisPersistentTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "redis-persistent-template" - }, - "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.", - "metadata": { - "annotations": { - "description": "Redis in-memory data structure store, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-redis", - "openshift.io/display-name": "Redis", - "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/3.2", - "openshift.io/long-description": "This template provides a standalone Redis server. The data is stored on persistent storage.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "database,redis" - }, - "name": "redis-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "annotations": { - "template.openshift.io/expose-password": "{.data['database-password']}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "stringData": { - "database-password": "${REDIS_PASSWORD}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "redis", - "nodePort": 0, - "port": 6379, - "protocol": "TCP", - "targetPort": 6379 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - }, - "status": { - "loadBalancer": {} - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "REDIS_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${DATABASE_SERVICE_NAME}" - } - } - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 6379 - }, - "timeoutSeconds": 1 - }, - "name": "redis", - "ports": [ - { - "containerPort": 6379, - "protocol": "TCP" - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/redis/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "redis" - ], - "from": { - "kind": "ImageStreamTag", - "name": "redis:${REDIS_VERSION}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - }, - "status": {} - } - ], - "parameters": [ - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "The name of the OpenShift Service exposed for the database.", - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "redis" - }, - { - "description": "Password for the Redis connection user.", - "displayName": "Redis Connection Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "REDIS_PASSWORD", - "required": true - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "Version of Redis image to be used (3.2 or latest).", - "displayName": "Version of Redis Image", - "name": "REDIS_VERSION", - "required": true, - "value": "3.2" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "redis-persistent", + "creationTimestamp": null, + "annotations": { + "description": "Redis in-memory data structure store, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis", + "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/5", + "openshift.io/long-description": "This template provides a standalone Redis server. The data is stored on persistent storage.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "database,redis" + } + }, + "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "annotations": { + "template.openshift.io/expose-password": "{.data['database-password']}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "stringData": { + "database-password": "${REDIS_PASSWORD}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "redis", + "nodePort": 0, + "port": 6379, + "protocol": "TCP", + "targetPort": 6379 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + }, + "status": { + "loadBalancer": {} + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "REDIS_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${DATABASE_SERVICE_NAME}" + } + } + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 6379 + }, + "timeoutSeconds": 1 + }, + "name": "redis", + "ports": [ + { + "containerPort": 6379, + "protocol": "TCP" + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/redis/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "redis" + ], + "from": { + "kind": "ImageStreamTag", + "name": "redis:${REDIS_VERSION}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + }, + "status": {} + } + ], + "parameters": [ + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "description": "The name of the OpenShift Service exposed for the database.", + "value": "redis", + "required": true + }, + { + "name": "REDIS_PASSWORD", + "displayName": "Redis Connection Password", + "description": "Password for the Redis connection user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "REDIS_VERSION", + "displayName": "Version of Redis Image", + "description": "Version of Redis image to be used (5-el7, 5-el8, or latest).", + "value": "5-el8", + "required": true + } + ], + "labels": { + "template": "redis-persistent-template" + } }`) func examplesDbTemplatesRedisPersistentTemplateJsonBytes() ([]byte, error) { @@ -3391,89 +2807,251 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "apiVersion": "v1", "items": [ { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "dotnet", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": ".NET Core" - }, - "name": "dotnet" + "openshift.io/display-name": ".NET" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run .NET Core applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET Core available on OpenShift, including major versions updates.", + "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/5.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core (Latest)", + "openshift.io/display-name": ".NET (Latest)", "sampleContextDir": "app", - "sampleRef": "dotnetcore-3.1", - "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git", + "sampleRef": "dotnet-5.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet", - "tags": "builder,.net,dotnet,dotnetcore" + "tags": "builder,.net,dotnet,dotnetcore,hidden" }, "from": { "kind": "ImageStreamTag", - "name": "3.1" + "name": "5.0-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "5.0-ubi8", "annotations": { - "description": "Build and run .NET Core 2.2 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/blob/master/2.2/build/README.md.", + "description": "Build and run .NET 5 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/5.0/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core 2.2", + "openshift.io/display-name": ".NET 5 (UBI 8)", "sampleContextDir": "app", - "sampleRef": "dotnetcore-2.2", - "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git", - "supports": "dotnet:2.2,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21", - "version": "2.2" + "sampleRef": "dotnet-5.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:5.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet50", + "version": "5.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/dotnet/dotnet-22-centos7:latest" + "name": "registry.access.redhat.com/ubi8/dotnet-50:5.0" }, - "name": "2.2" + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } }, { + "name": "5.0", "annotations": { - "description": "Build and run .NET Core 3.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/blob/master/3.1/build/README.md.", + "description": "Build and run .NET 5 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/5.0/build/README.md.", "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core 3.1", + "openshift.io/display-name": ".NET 5 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-5.0", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:5.0,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet50,hidden", + "version": "5.0" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-50:5.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.1-ubi8", + "annotations": { + "description": "Build and run .NET Core 3.1 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/3.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 3.1 (UBI 8)", "sampleContextDir": "app", "sampleRef": "dotnetcore-3.1", - "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet:3.1,dotnet", - "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21", + "tags": "builder,.net,dotnet,dotnetcore,dotnet31", "version": "3.1" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/dotnet/dotnet-31-centos7:latest" + "name": "registry.access.redhat.com/ubi8/dotnet-31:3.1" }, - "name": "3.1" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.1-el7", + "annotations": { + "description": "Build and run .NET Core 3.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/3.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 3.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-3.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:3.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet31", + "version": "3.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.centos.org/dotnet/dotnet-31-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.1", + "annotations": { + "description": "Build and run .NET Core 3.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/3.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 3.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-3.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:3.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet31,hidden", + "version": "3.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.centos.org/dotnet/dotnet-31-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.1-ubi8", + "annotations": { + "description": "Build and run .NET Core 2.1 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 2.1 (UBI 8)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-2.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:2.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,dotnet21", + "version": "2.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/dotnet-21:2.1" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.1-el7", + "annotations": { + "description": "Build and run .NET Core 2.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 2.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-2.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:2.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21", + "version": "2.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.centos.org/dotnet/dotnet-21-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.1", + "annotations": { + "description": "Build and run .NET Core 2.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.", + "iconClass": "icon-dotnet", + "openshift.io/display-name": ".NET Core 2.1 (CentOS 7)", + "sampleContextDir": "app", + "sampleRef": "dotnetcore-2.1", + "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", + "supports": "dotnet:2.1,dotnet", + "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21,hidden", + "version": "2.1" + }, + "from": { + "kind": "DockerImage", + "name": "registry.centos.org/dotnet/dotnet-21-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "httpd", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Apache HTTP Server (httpd)" - }, - "name": "httpd" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major versions updates.", + "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major version updates.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -3483,18 +3061,42 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "2.4" + "name": "2.4-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.4-el8", + "annotations": { + "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", + "iconClass": "icon-apache", + "openshift.io/display-name": "Apache HTTP Server 2.4 (CentOS 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/httpd-ex.git", + "supports": "httpd", + "tags": "builder,httpd", + "version": "2.4" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/centos/httpd-24-centos8:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "2.4-el7", "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", "iconClass": "icon-apache", - "openshift.io/display-name": "Apache HTTP Server 2.4", + "openshift.io/display-name": "Apache HTTP Server 2.4 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", @@ -3503,30 +3105,61 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/httpd-24-centos7:latest" + "name": "quay.io/centos7/httpd-24-centos7:latest" }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { "name": "2.4", + "annotations": { + "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", + "iconClass": "icon-apache", + "openshift.io/display-name": "Apache HTTP Server 2.4", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/httpd-ex.git", + "supports": "httpd", + "tags": "builder,httpd,hidden", + "version": "2.4" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/httpd-24-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "jenkins", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Jenkins" - }, - "name": "jenkins" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a Jenkins server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.", + "description": "Provides a Jenkins server on CentOS. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -3536,14 +3169,16 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "kind": "ImageStreamTag", "name": "2" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "2", "annotations": { - "description": "Provides a Jenkins v2.x server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.", + "description": "Provides a Jenkins v2.x server on CentOS. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins 2.X", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -3554,28 +3189,37 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "kind": "DockerImage", "name": "quay.io/openshift/origin-jenkins:v4.0" }, - "name": "2", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "mariadb", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "MariaDB" - }, - "name": "mariadb" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a MariaDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major versions updates.", + "description": "Provides a MariaDB database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major version updates.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -3583,240 +3227,288 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "10.2" + "name": "10.3-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "10.3-el8", "annotations": { - "description": "Provides a MariaDB 10.1 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.1/README.md.", + "description": "Provides a MariaDB 10.3 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB 10.1", + "openshift.io/display-name": "MariaDB 10.3 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", - "version": "10.1" + "version": "10.3" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mariadb-101-centos7:latest" + "name": "docker.io/centos/mariadb-103-centos8:latest" }, - "name": "10.1", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "10.3-el7", "annotations": { - "description": "Provides a MariaDB 10.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/README.md.", + "description": "Provides a MariaDB 10.3 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", "iconClass": "icon-mariadb", - "openshift.io/display-name": "MariaDB 10.2", + "openshift.io/display-name": "MariaDB 10.3 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", - "version": "10.2" + "version": "10.3" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mariadb-102-centos7:latest" + "name": "quay.io/centos7/mariadb-103-centos7:latest" }, - "name": "10.2", + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10.3", + "annotations": { + "description": "Provides a MariaDB 10.3 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", + "iconClass": "icon-mariadb", + "openshift.io/display-name": "MariaDB 10.3", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "database,mariadb,hidden", + "version": "10.3" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/mariadb-103-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "mysql", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": "MongoDB" - }, - "name": "mongodb" + "openshift.io/display-name": "MySQL" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a MongoDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MongoDB available on OpenShift, including major versions updates.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB (Latest)", + "description": "Provides a MySQL database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major version updates.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "database,mongodb" + "tags": "mysql" }, "from": { "kind": "ImageStreamTag", - "name": "3.4" + "name": "8.0-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "8.0-el8", "annotations": { - "description": "Provides a MongoDB 2.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/2.6/README.md.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB 2.6", + "description": "Provides a MySQL 8.0 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL 8.0 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "hidden,database,mongodb", - "version": "2.6" + "tags": "mysql", + "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mongodb-26-centos7:latest" + "name": "docker.io/centos/mysql-80-centos8:latest" }, - "name": "2.6", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "8.0-el7", "annotations": { - "description": "Provides a MongoDB 3.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB 3.2", + "description": "Provides a MySQL 8.0 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL 8.0 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "database,mongodb", - "version": "3.2" + "tags": "mysql", + "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mongodb-32-centos7:latest" + "name": "quay.io/centos7/mysql-80-centos7:latest" }, - "name": "3.2", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "8.0", "annotations": { - "description": "Provides a MongoDB 3.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.4/README.md.", - "iconClass": "icon-mongodb", - "openshift.io/display-name": "MongoDB 3.4", + "description": "Provides a MySQL 8.0 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", + "iconClass": "icon-mysql-database", + "openshift.io/display-name": "MySQL 8.0", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "database,mongodb", - "version": "3.4" + "tags": "mysql,hidden", + "version": "8.0" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mongodb-34-centos7:latest" + "name": "quay.io/centos7/mysql-80-centos7:latest" }, - "name": "3.4", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "nginx", + "creationTimestamp": null, "annotations": { - "openshift.io/display-name": "MySQL" - }, - "name": "mysql" + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a MySQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major versions updates.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL (Latest)", + "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major version updates.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "mysql" + "sampleRepo": "https://github.com/sclorg/nginx-ex.git", + "supports": "nginx", + "tags": "builder,nginx" }, "from": { "kind": "ImageStreamTag", - "name": "5.7" + "name": "1.18-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.18-ubi8", "annotations": { - "description": "Provides a MySQL 5.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL 5.6", + "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.18 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "hidden,mysql", - "version": "5.6" + "sampleRepo": "https://github.com/sclorg/nginx-ex.git", + "supports": "nginx", + "tags": "builder,nginx", + "version": "1.18" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mysql-56-centos7:latest" + "name": "registry.access.redhat.com/ubi8/nginx-118:latest" }, - "name": "5.6", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.18-ubi7", "annotations": { - "description": "Provides a MySQL 5.7 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", - "iconClass": "icon-mysql-database", - "openshift.io/display-name": "MySQL 5.7", + "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.18 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", - "tags": "mysql", - "version": "5.7" + "sampleRepo": "https://github.com/sclorg/nginx-ex.git", + "supports": "nginx", + "tags": "builder,nginx", + "version": "1.18" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/mysql-57-centos7:latest" + "name": "registry.access.redhat.com/ubi7/nginx-118:latest" }, - "name": "5.7", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)" - }, - "name": "nginx" - }, - "spec": { - "tags": [ + }, { + "name": "1.16-el8", "annotations": { - "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.14/README.md.", + "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.16/README.md.", "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.14", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", - "version": "1.14" + "version": "1.16" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nginx-114-centos7:latest" + "name": "docker.io/centos/nginx-116-centos8:latest" }, - "name": "1.14", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.16-el7", "annotations": { "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.16/README.md.", "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", @@ -3825,49 +3517,61 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nginx-116-centos7:latest" + "name": "quay.io/centos7/nginx-116-centos7:latest" }, - "name": "1.16", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "1.16", "annotations": { - "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major versions updates.", + "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.16/README.md.", "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", - "tags": "builder,nginx" + "tags": "builder,nginx,hidden", + "version": "1.16" }, "from": { - "kind": "ImageStreamTag", - "name": "1.16" + "kind": "DockerImage", + "name": "quay.io/centos7/nginx-116-centos7:latest" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "nodejs", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Node.js" - }, - "name": "nodejs" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run Node.js applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major versions updates.", + "description": "Build and run Node.js applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major version updates.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -3877,37 +3581,62 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "12" + "name": "14-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "14-ubi8", "annotations": { - "description": "Build and run Node.js 10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/10/README.md.", + "description": "Build and run Node.js 14 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.", "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js 10", + "openshift.io/display-name": "Node.js 14 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", - "version": "10" + "version": "14" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nodejs-10-centos7:latest" + "name": "registry.access.redhat.com/ubi8/nodejs-14:latest" }, - "name": "10", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "14-ubi7", "annotations": { - "description": "Build and run Node.js 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "description": "Build and run Node.js 14 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.", "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js 12", + "openshift.io/display-name": "Node.js 14 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", + "tags": "builder,nodejs", + "version": "14" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/nodejs-14:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "12-ubi8", + "annotations": { + "description": "Build and run Node.js 12 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js 12 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", @@ -3915,28 +3644,79 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/nodejs-12-centos7:latest" + "name": "registry.access.redhat.com/ubi8/nodejs-12:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "12-ubi7", + "annotations": { + "description": "Build and run Node.js 12 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js 12 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", + "tags": "builder,nodejs", + "version": "12" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/nodejs-12:latest" }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { "name": "12", + "annotations": { + "description": "Build and run Node.js 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js 12", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", + "tags": "builder,nodejs,hidden", + "version": "12" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/nodejs-12-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "perl", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Perl" - }, - "name": "perl" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { "description": "Build and run Perl applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30-mod_fcgid/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Perl available on OpenShift, including major version updates.", "iconClass": "icon-perl", @@ -3950,7 +3730,8 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "kind": "ImageStreamTag", "name": "5.30-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } @@ -3998,24 +3779,54 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "referencePolicy": { "type": "Local" } + }, + { + "name": "5.30", + "annotations": { + "description": "Build and run Perl 5.30 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30/README.md.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Perl 5.30", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/dancer-ex.git", + "supports": "perl:5.30,perl", + "tags": "builder,perl,hidden", + "version": "5.30" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/perl-530-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "php", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "PHP" - }, - "name": "php" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run PHP applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major versions updates.", + "description": "Build and run PHP applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major version updates.", "iconClass": "icon-php", "openshift.io/display-name": "PHP (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -4025,70 +3836,127 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "7.1" + "name": "7.4-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "7.4-ubi8", "annotations": { - "description": "Build and run PHP 7.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.0/README.md.", + "description": "Build and run PHP 7.4 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.4/README.md.", "iconClass": "icon-php", - "openshift.io/display-name": "PHP 7.0", + "openshift.io/display-name": "PHP 7.4 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", - "supports": "php:7.0,php", + "supports": "php:7.4,php", "tags": "builder,php", - "version": "7.0" + "version": "7.4" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/php-70-centos7:latest" + "name": "registry.access.redhat.com/ubi8/php-74:latest" }, - "name": "7.0", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "7.3-ubi8", "annotations": { - "description": "Build and run PHP 7.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.", + "description": "Build and run PHP 7.3 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", "iconClass": "icon-php", - "openshift.io/display-name": "PHP 7.1", + "openshift.io/display-name": "PHP 7.3 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", - "supports": "php:7.1,php", + "supports": "php:7.3,php", "tags": "builder,php", - "version": "7.1" + "version": "7.3" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/php-71-centos7:latest" + "name": "registry.access.redhat.com/ubi8/php-73:latest" }, - "name": "7.1", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "openshift.io/display-name": "PostgreSQL" - }, - "name": "postgresql" + }, + { + "name": "7.3-ubi7", + "annotations": { + "description": "Build and run PHP 7.3 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", + "iconClass": "icon-php", + "openshift.io/display-name": "PHP 7.3 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", + "supports": "php:7.3,php", + "tags": "builder,php", + "version": "7.3" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/php-73:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "7.3", + "annotations": { + "description": "Build and run PHP 7.3 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", + "iconClass": "icon-php", + "openshift.io/display-name": "PHP 7.3", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", + "supports": "php:7.3,php", + "tags": "builder,php,hidden", + "version": "7.3" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/php-73-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + } + ] + }, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "postgresql", + "creationTimestamp": null, + "annotations": { + "openshift.io/display-name": "PostgreSQL" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a PostgreSQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major versions updates.", + "description": "Provides a PostgreSQL database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major version updates.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -4096,66 +3964,179 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "9.6" + "name": "12-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "12-el8", "annotations": { - "description": "Provides a PostgreSQL 9.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "description": "Provides a PostgreSQL 12 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL 9.5", + "openshift.io/display-name": "PostgreSQL 12 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", - "version": "9.5" + "version": "12" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/postgresql-95-centos7:latest" + "name": "docker.io/centos/postgresql-12-centos8:latest" }, - "name": "9.5", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "12-el7", "annotations": { - "description": "Provides a PostgreSQL 9.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "description": "Provides a PostgreSQL 12 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", - "openshift.io/display-name": "PostgreSQL 9.6", + "openshift.io/display-name": "PostgreSQL 12 (CentOS 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "database,postgresql", + "version": "12" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/postgresql-12-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "12", + "annotations": { + "description": "Provides a PostgreSQL 12 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 12", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "database,postgresql,hidden", + "version": "12" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/postgresql-12-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10-el8", + "annotations": { + "description": "Provides a PostgreSQL 10 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 10 (CentOS 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "database,postgresql", + "version": "10" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/centos/postgresql-10-centos8:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10-el7", + "annotations": { + "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 10 (CentOS 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "database,postgresql", + "version": "10" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/postgresql-10-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10", + "annotations": { + "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 10", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "database,postgresql,hidden", + "version": "10" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/postgresql-10-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "9.6-el8", + "annotations": { + "description": "Provides a PostgreSQL 9.6 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", + "iconClass": "icon-postgresql", + "openshift.io/display-name": "PostgreSQL 9.6 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", "version": "9.6" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/postgresql-96-centos7:latest" + "name": "docker.io/centos/postgresql-96-centos8:latest" }, - "name": "9.6", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "python", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Python" - }, - "name": "python" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run Python applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major versions updates.", + "description": "Build and run Python applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major version updates.", "iconClass": "icon-python", "openshift.io/display-name": "Python (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -4165,38 +4146,64 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "3.6" + "name": "3.8-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "3.8-ubi8", "annotations": { - "description": "Build and run Python 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", + "description": "Build and run Python 3.8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.", "iconClass": "icon-python", - "openshift.io/display-name": "Python 2.7", + "openshift.io/display-name": "Python 3.8 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", - "supports": "python:2.7,python", + "supports": "python:3.8,python", "tags": "builder,python", - "version": "2.7" + "version": "3.8" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/python-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/python-38:latest" }, - "name": "2.7", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "3.8-ubi7", "annotations": { - "description": "Build and run Python 3.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.", + "description": "Build and run Python 3.8 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.", "iconClass": "icon-python", - "openshift.io/display-name": "Python 3.6", + "openshift.io/display-name": "Python 3.8 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:3.8,python", + "tags": "builder,python", + "version": "3.8" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/python-38:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "3.6-ubi8", + "annotations": { + "description": "Build and run Python 3.6 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 3.6 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:3.6,python", @@ -4205,30 +4212,105 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/python-36-centos7:latest" + "name": "registry.access.redhat.com/ubi8/python-36:latest" }, - "name": "3.6", + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7-ubi8", + "annotations": { + "description": "Build and run Python 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 2.7 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:2.7,python", + "tags": "builder,python", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/python-27:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7-ubi7", + "annotations": { + "description": "Build and run Python 2.7 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 2.7 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:2.7,python", + "tags": "builder,python", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/python-27:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7", + "annotations": { + "description": "Build and run Python 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Python 2.7", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/django-ex.git", + "supports": "python:2.7,python", + "tags": "builder,python,hidden", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/python-27-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "redis", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Redis" - }, - "name": "redis" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Provides a Redis database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major versions updates.", + "description": "Provides a Redis database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major version updates.", "iconClass": "icon-redis", "openshift.io/display-name": "Redis (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -4236,48 +4318,99 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "5" + "name": "5-el8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "5-el8", "annotations": { - "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5/README.md.", + "description": "Provides a Redis 5 database on CentOS 8. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", "iconClass": "icon-redis", - "openshift.io/display-name": "Redis 5", + "openshift.io/display-name": "Redis 5 (CentOS 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "redis", "version": "5" }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/redis-5-centos7:latest" + "name": "docker.io/centos/redis-5-centos8:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "5-el7", + "annotations": { + "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis 5 (CentOS 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "redis", + "version": "5" }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/redis-5-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { "name": "5", + "annotations": { + "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", + "iconClass": "icon-redis", + "openshift.io/display-name": "Redis 5", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "tags": "redis,hidden", + "version": "5" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/redis-5-centos7:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "ruby", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Ruby" - }, - "name": "ruby" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major versions updates.", + "description": "Build and run Ruby applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major version updates.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -4287,18 +4420,42 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "ImageStreamTag", - "name": "2.7" + "name": "2.7-ubi8" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "2.7-ubi8", "annotations": { - "description": "Build and run Ruby 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", + "description": "Build and run Ruby 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", "iconClass": "icon-ruby", - "openshift.io/display-name": "Ruby 2.7", + "openshift.io/display-name": "Ruby 2.7 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.7,ruby", + "tags": "builder,ruby", + "version": "2.7" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.7-ubi7", + "annotations": { + "description": "Build and run Ruby 2.7 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.7 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:2.7,ruby", @@ -4307,30 +4464,148 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi7/ruby-27:latest" }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { "name": "2.7", + "annotations": { + "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.7/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major version updates.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.7", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby", + "tags": "builder,ruby,hidden" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/ruby-27-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.6-ubi8", + "annotations": { + "description": "Build and run Ruby 2.6 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.6 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.6,ruby", + "tags": "builder,ruby", + "version": "2.6" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/ruby-26:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.6-ubi7", + "annotations": { + "description": "Build and run Ruby 2.6 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.6 (UBI 7)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.6,ruby", + "tags": "builder,ruby", + "version": "2.6" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi7/ruby-26:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.6", + "annotations": { + "description": "Build and run Ruby 2.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.6/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.6", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.6,ruby", + "tags": "builder,ruby,hidden", + "version": "2.6" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/centos7/ruby-26-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "2.5-ubi8", + "annotations": { + "description": "Build and run Ruby 2.5 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.5/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Ruby 2.5 (UBI 8)", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/sclorg/ruby-ex.git", + "supports": "ruby:2.5,ruby", + "tags": "builder,ruby", + "version": "2.5" + }, + "from": { + "kind": "DockerImage", + "name": "registry.access.redhat.com/ubi8/ruby-25:latest" + }, + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] + }, + "status": { + "dockerImageRepository": "" } }, { - "apiVersion": "v1", "kind": "ImageStream", + "apiVersion": "v1", "metadata": { + "name": "wildfly", + "creationTimestamp": null, "annotations": { "openshift.io/display-name": "WildFly" - }, - "name": "wildfly" + } }, "spec": { + "lookupPolicy": { + "local": false + }, "tags": [ { + "name": "latest", "annotations": { - "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.", + "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", @@ -4339,101 +4614,439 @@ var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "tags": "builder,wildfly,java" }, "from": { - "kind": "ImageStreamTag", - "name": "21.0" + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:latest" }, - "name": "latest", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "8.1", "annotations": { - "description": "Build and run WildFly 20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "description": "Build and run WildFly 8.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", "iconClass": "icon-wildfly", - "openshift.io/display-name": "WildFly 20", + "openshift.io/display-name": "WildFly 8.1", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", - "supports": "wildfly:20,jee,java", + "supports": "wildfly:8.1,jee,java", "tags": "builder,wildfly,java", - "version": "20.0" + "version": "8.1" }, "from": { "kind": "DockerImage", - "name": "quay.io/wildfly/wildfly-centos7:20.0" + "name": "docker.io/openshift/wildfly-81-centos7:latest" }, - "name": "20.0", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { + "name": "9.0", "annotations": { - "description": "Build and run WildFly 21 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "description": "Build and run WildFly 9.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", "iconClass": "icon-wildfly", - "openshift.io/display-name": "WildFly 21", + "openshift.io/display-name": "WildFly 9.0", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", - "supports": "wildfly:21,jee,java", + "supports": "wildfly:9.0,jee,java", "tags": "builder,wildfly,java", - "version": "21.0" + "version": "9.0" }, "from": { "kind": "DockerImage", - "name": "quay.io/wildfly/wildfly-centos7:21.0.0" + "name": "docker.io/openshift/wildfly-90-centos7:latest" }, - "name": "21.0", + "generation": null, + "importPolicy": {}, "referencePolicy": { "type": "Local" } - } - ] - } - } - ] -} -`) - -func examplesImageStreamsImageStreamsCentos7JsonBytes() ([]byte, error) { - return _examplesImageStreamsImageStreamsCentos7Json, nil -} - -func examplesImageStreamsImageStreamsCentos7Json() (*asset, error) { - bytes, err := examplesImageStreamsImageStreamsCentos7JsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/image-streams/image-streams-centos7.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesSampleAppApplicationTemplateDockerbuildJson = []byte(`{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "ruby-helloworld-sample", - "annotations": { - "description": "This example shows how to create a simple ruby application in openshift origin v3", - "iconClass": "icon-ruby", - "tags": "instant-app,ruby,mysql" - } - }, - "objects": [ - { - "kind": "Secret", - "apiVersion": "v1", - "metadata": { - "name": "dbsecret" - }, - "stringData" : { - "mysql-user" : "${MYSQL_USER}", - "mysql-password" : "${MYSQL_PASSWORD}" - } - }, - { - "kind": "Service", + }, + { + "name": "10.0", + "annotations": { + "description": "Build and run WildFly 10.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 10.0", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:10.0,jee,java", + "tags": "builder,wildfly,java", + "version": "10.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-100-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "10.1", + "annotations": { + "description": "Build and run WildFly 10.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 10.1", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:10.1,jee,java", + "tags": "builder,wildfly,java", + "version": "10.1" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-101-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "11.0", + "annotations": { + "description": "Build and run WildFly 11 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 11", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:11,jee,java", + "tags": "builder,wildfly,java", + "version": "11.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-110-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "12.0", + "annotations": { + "description": "Build and run WildFly 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 12", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:12,jee,java", + "tags": "builder,wildfly,java", + "version": "12.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-120-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "13.0", + "annotations": { + "description": "Build and run WildFly 13 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 13", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:13,jee,java", + "tags": "builder,wildfly,java", + "version": "13.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-130-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "14.0", + "annotations": { + "description": "Build and run WildFly 14 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 14", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:14,jee,java", + "tags": "builder,wildfly,java", + "version": "14.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-140-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "15.0", + "annotations": { + "description": "Build and run WildFly 15 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 15", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:15,jee,java", + "tags": "builder,wildfly,java", + "version": "15.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-150-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "16.0", + "annotations": { + "description": "Build and run WildFly 16 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 16", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:16,jee,java", + "tags": "builder,wildfly,java", + "version": "16.0" + }, + "from": { + "kind": "DockerImage", + "name": "docker.io/openshift/wildfly-160-centos7:latest" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "17.0", + "annotations": { + "description": "Build and run WildFly 17 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 17", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:17,jee,java", + "tags": "builder,wildfly,java", + "version": "17.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:17.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "18.0", + "annotations": { + "description": "Build and run WildFly 18 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 18", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:18,jee,java", + "tags": "builder,wildfly,java", + "version": "18.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:18.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "19.0", + "annotations": { + "description": "Build and run WildFly 19 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 19", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:19,jee,java", + "tags": "builder,wildfly,java", + "version": "19.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:19.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "20.0", + "annotations": { + "description": "Build and run WildFly 20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 20", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:20,jee,java", + "tags": "builder,wildfly,java", + "version": "20.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:20.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "21.0", + "annotations": { + "description": "Build and run WildFly 21 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 21", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:21,jee,java", + "tags": "builder,wildfly,java", + "version": "21.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:21.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "22.0", + "annotations": { + "description": "Build and run WildFly 22 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 22", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:22,jee,java", + "tags": "builder,wildfly,java", + "version": "22.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:22.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + }, + { + "name": "23.0", + "annotations": { + "description": "Build and run WildFly 23 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", + "iconClass": "icon-wildfly", + "openshift.io/display-name": "WildFly 23", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", + "supports": "wildfly:23,jee,java", + "tags": "builder,wildfly,java", + "version": "23.0" + }, + "from": { + "kind": "DockerImage", + "name": "quay.io/wildfly/wildfly-centos7:23.0" + }, + "generation": null, + "importPolicy": {}, + "referencePolicy": { + "type": "Local" + } + } + ] + }, + "status": { + "dockerImageRepository": "" + } + } + ] +} +`) + +func examplesImageStreamsImageStreamsCentos7JsonBytes() ([]byte, error) { + return _examplesImageStreamsImageStreamsCentos7Json, nil +} + +func examplesImageStreamsImageStreamsCentos7Json() (*asset, error) { + bytes, err := examplesImageStreamsImageStreamsCentos7JsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "examples/image-streams/image-streams-centos7.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _examplesSampleAppApplicationTemplateDockerbuildJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "ruby-helloworld-sample", + "annotations": { + "description": "This example shows how to create a simple ruby application in openshift origin v3", + "iconClass": "icon-ruby", + "tags": "instant-app,ruby,mysql" + } + }, + "objects": [ + { + "kind": "Secret", + "apiVersion": "v1", + "metadata": { + "name": "dbsecret" + }, + "stringData" : { + "mysql-user" : "${MYSQL_USER}", + "mysql-password" : "${MYSQL_PASSWORD}" + } + }, + { + "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" @@ -4494,14 +5107,14 @@ var _examplesSampleAppApplicationTemplateDockerbuildJson = []byte(`{ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7" + "name": "ruby-27" }, "spec": { "tags": [ { "from": { "kind": "DockerImage", - "name": "docker.io/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" }, "name": "latest" } @@ -4554,7 +5167,7 @@ var _examplesSampleAppApplicationTemplateDockerbuildJson = []byte(`{ "dockerStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -4765,7 +5378,7 @@ var _examplesSampleAppApplicationTemplateDockerbuildJson = []byte(`{ "containers": [ { "name": "ruby-helloworld-database", - "image": "centos/mysql-57-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, @@ -4954,10 +5567,10 @@ var _examplesSampleAppApplicationTemplatePullspecbuildJson = []byte(`{ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7" + "name": "ruby-27" }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -5005,7 +5618,7 @@ var _examplesSampleAppApplicationTemplatePullspecbuildJson = []byte(`{ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } } }, @@ -5260,7 +5873,7 @@ var _examplesSampleAppApplicationTemplatePullspecbuildJson = []byte(`{ "containers": [ { "name": "ruby-helloworld-database", - "image": "centos/mysql-57-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, @@ -5449,10 +6062,10 @@ var _examplesSampleAppApplicationTemplateStibuildJson = []byte(`{ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7" + "name": "ruby-27" }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -5504,7 +6117,7 @@ var _examplesSampleAppApplicationTemplateStibuildJson = []byte(`{ "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -5765,7 +6378,7 @@ var _examplesSampleAppApplicationTemplateStibuildJson = []byte(`{ "containers": [ { "name": "ruby-helloworld-database", - "image": "centos/mysql-57-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, @@ -6047,1718 +6660,1764 @@ func examplesSampleAppGithubWebhookExampleJson() (*asset, error) { } var _examplesQuickstartsCakephpMysqlPersistentJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "cakephp-mysql-persistent", - "template": "cakephp-mysql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "iconClass": "icon-php", - "openshift.io/display-name": "CakePHP + MySQL", - "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", - "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,php,cakephp", - "template.openshift.io/bindable": "false" - }, - "name": "cakephp-mysql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", - "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./vendor/bin/phpunit" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "COMPOSER_MIRROR", - "value": "${COMPOSER_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "php:${PHP_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-persistent" - }, - "failurePolicy": "Retry" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-secret-token", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-security-salt", - "name": "${NAME}" - } - } - }, - { - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "${OPCACHE_REVALIDATE_FREQ}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 30, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "name": "cakephp-mysql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 3, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "cakephp-mysql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of PHP image to be used (7.1 or latest).", - "displayName": "PHP Version", - "name": "PHP_VERSION", - "required": true, - "value": "7.1" - }, - { - "description": "Maximum amount of memory the CakePHP container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/cakephp-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "mysql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database User", - "name": "DATABASE_USER", - "required": true, - "value": "cakephp" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Set this to a long random string.", - "displayName": "CakePHP secret token", - "from": "[\\w]{50}", - "generate": "expression", - "name": "CAKEPHP_SECRET_TOKEN" - }, - { - "description": "Security salt for session hash.", - "displayName": "CakePHP Security Salt", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "CAKEPHP_SECURITY_SALT" - }, - { - "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", - "displayName": "OPcache Revalidation Frequency", - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "2" - }, - { - "description": "The custom Composer mirror URL", - "displayName": "Custom Composer Mirror URL", - "name": "COMPOSER_MIRROR", - "value": "" - } - ] -}`) - -func examplesQuickstartsCakephpMysqlPersistentJsonBytes() ([]byte, error) { - return _examplesQuickstartsCakephpMysqlPersistentJson, nil -} - -func examplesQuickstartsCakephpMysqlPersistentJson() (*asset, error) { - bytes, err := examplesQuickstartsCakephpMysqlPersistentJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesQuickstartsCakephpMysqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "cakephp-mysql-example", - "template": "cakephp-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-php", - "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", - "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,php,cakephp", - "template.openshift.io/bindable": "false" - }, - "name": "cakephp-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", - "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./vendor/bin/phpunit" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "COMPOSER_MIRROR", - "value": "${COMPOSER_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "php:${PHP_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-example" - }, - "failurePolicy": "Retry" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-secret-token", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-security-salt", - "name": "${NAME}" - } - } - }, - { - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "${OPCACHE_REVALIDATE_FREQ}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 30, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "name": "cakephp-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 3, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "cakephp-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of PHP image to be used (7.1 or latest).", - "displayName": "PHP Version", - "name": "PHP_VERSION", - "required": true, - "value": "7.1" - }, - { - "description": "Maximum amount of memory the CakePHP container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/cakephp-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "mysql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database User", - "name": "DATABASE_USER", - "required": true, - "value": "cakephp" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Set this to a long random string.", - "displayName": "CakePHP secret token", - "from": "[\\w]{50}", - "generate": "expression", - "name": "CAKEPHP_SECRET_TOKEN" - }, - { - "description": "Security salt for session hash.", - "displayName": "CakePHP Security Salt", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "CAKEPHP_SECURITY_SALT" - }, - { - "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", - "displayName": "OPcache Revalidation Frequency", - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "2" - }, - { - "description": "The custom Composer mirror URL", - "displayName": "Custom Composer Mirror URL", - "name": "COMPOSER_MIRROR", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "cakephp-mysql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "iconClass": "icon-php", + "openshift.io/display-name": "CakePHP + MySQL", + "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", + "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,php,cakephp", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", + "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./vendor/bin/phpunit" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "COMPOSER_MIRROR", + "value": "${COMPOSER_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "php:${PHP_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "cakephp-mysql-persistent" + }, + "failurePolicy": "Retry" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-secret-token", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-security-salt", + "name": "${NAME}" + } + } + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "value": "${OPCACHE_REVALIDATE_FREQ}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 30, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "name": "cakephp-mysql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 3, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cakephp-mysql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "cakephp-mysql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PHP_VERSION", + "displayName": "PHP Version", + "description": "Version of PHP image to be used (7.3-ubi7, 7.3-ubi8, or latest).", + "value": "7.3-ubi8", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "MySQL Version", + "description": "Version of MySQL image to be used (8.0-el8 or latest).", + "value": "8.0-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/cakephp-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database User", + "value": "cakephp", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "value": "2" + }, + { + "name": "COMPOSER_MIRROR", + "displayName": "Custom Composer Mirror URL", + "description": "The custom Composer mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "cakephp-mysql-persistent", + "template": "cakephp-mysql-persistent" + } }`) -func examplesQuickstartsCakephpMysqlJsonBytes() ([]byte, error) { - return _examplesQuickstartsCakephpMysqlJson, nil +func examplesQuickstartsCakephpMysqlPersistentJsonBytes() ([]byte, error) { + return _examplesQuickstartsCakephpMysqlPersistentJson, nil } -func examplesQuickstartsCakephpMysqlJson() (*asset, error) { - bytes, err := examplesQuickstartsCakephpMysqlJsonBytes() +func examplesQuickstartsCakephpMysqlPersistentJson() (*asset, error) { + bytes, err := examplesQuickstartsCakephpMysqlPersistentJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _examplesQuickstartsDancerMysqlPersistentJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "dancer-mysql-persistent", - "template": "dancer-mysql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "iconClass": "icon-perl", - "openshift.io/display-name": "Dancer + MySQL", - "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,perl,dancer", - "template.openshift.io/bindable": "false" - }, - "name": "dancer-mysql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "perl -I extlib/lib/perl5 -I lib t/*" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "CPAN_MIRROR", - "value": "${CPAN_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "perl:5.30-ubi8", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "PERL_APACHE2_RELOAD", - "value": "${PERL_APACHE2_RELOAD}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "dancer-mysql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-mysql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dancer-mysql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Perl Dancer container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/dancer-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "database" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", - "displayName": "Perl Module Reload", - "name": "PERL_APACHE2_RELOAD", - "value": "" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The custom CPAN mirror URL", - "displayName": "Custom CPAN Mirror URL", - "name": "CPAN_MIRROR", - "value": "" - } - ] +var _examplesQuickstartsCakephpMysqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "cakephp-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-php", + "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", + "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,php,cakephp", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", + "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./vendor/bin/phpunit" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "COMPOSER_MIRROR", + "value": "${COMPOSER_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "php:${PHP_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "cakephp-mysql-example" + }, + "failurePolicy": "Retry" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-secret-token", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-security-salt", + "name": "${NAME}" + } + } + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "value": "${OPCACHE_REVALIDATE_FREQ}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 30, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "name": "cakephp-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 3, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cakephp-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "cakephp-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PHP_VERSION", + "displayName": "PHP Version", + "description": "Version of PHP image to be used (7.3-ubi7, 7.3-ubi8, or latest).", + "value": "7.3-ubi8", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "MySQL Version", + "description": "Version of MySQL image to be used (8.0-el8 or latest).", + "value": "8.0-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/cakephp-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database User", + "value": "cakephp", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "value": "2" + }, + { + "name": "COMPOSER_MIRROR", + "displayName": "Custom Composer Mirror URL", + "description": "The custom Composer mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "cakephp-mysql-example", + "template": "cakephp-mysql-example" + } +}`) + +func examplesQuickstartsCakephpMysqlJsonBytes() ([]byte, error) { + return _examplesQuickstartsCakephpMysqlJson, nil } -`) -func examplesQuickstartsDancerMysqlPersistentJsonBytes() ([]byte, error) { +func examplesQuickstartsCakephpMysqlJson() (*asset, error) { + bytes, err := examplesQuickstartsCakephpMysqlJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _examplesQuickstartsDancerMysqlPersistentJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "dancer-mysql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Dancer + MySQL", + "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,perl,dancer", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "perl -I extlib/lib/perl5 -I lib t/*" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "CPAN_MIRROR", + "value": "${CPAN_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "perl:${PERL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "PERL_APACHE2_RELOAD", + "value": "${PERL_APACHE2_RELOAD}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "dancer-mysql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "dancer-mysql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:8.0-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "dancer-mysql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PERL_VERSION", + "displayName": "Version of Perl Image", + "description": "Version of Perl image to be used (5.26-el7, 5.26-ubi8, or latest).", + "value": "5.26-ubi8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Perl Dancer container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/dancer-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "database", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "sampledb", + "required": true + }, + { + "name": "PERL_APACHE2_RELOAD", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "CPAN_MIRROR", + "displayName": "Custom CPAN Mirror URL", + "description": "The custom CPAN mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "dancer-mysql-persistent", + "template": "dancer-mysql-persistent" + } +}`) + +func examplesQuickstartsDancerMysqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsDancerMysqlPersistentJson, nil } @@ -7774,516 +8433,530 @@ func examplesQuickstartsDancerMysqlPersistentJson() (*asset, error) { } var _examplesQuickstartsDancerMysqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "dancer-mysql-example", - "template": "dancer-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-perl", - "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,perl,dancer", - "template.openshift.io/bindable": "false" - }, - "name": "dancer-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "perl -I extlib/lib/perl5 -I lib t/*" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "CPAN_MIRROR", - "value": "${CPAN_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "perl:5.30-ubi8", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "PERL_APACHE2_RELOAD", - "value": "${PERL_APACHE2_RELOAD}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "dancer-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dancer-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Perl Dancer container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/dancer-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "database" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", - "displayName": "Perl Module Reload", - "name": "PERL_APACHE2_RELOAD", - "value": "" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The custom CPAN mirror URL", - "displayName": "Custom CPAN Mirror URL", - "name": "CPAN_MIRROR", - "value": "" - } - ] -} -`) + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "dancer-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,perl,dancer", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "perl -I extlib/lib/perl5 -I lib t/*" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "CPAN_MIRROR", + "value": "${CPAN_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "perl:${PERL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "PERL_APACHE2_RELOAD", + "value": "${PERL_APACHE2_RELOAD}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "dancer-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "dancer-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:8.0-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "dancer-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PERL_VERSION", + "displayName": "Version of Perl Image", + "description": "Version of Perl image to be used (5.26-el7, 5.26-ubi8, or latest).", + "value": "5.26-ubi8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Perl Dancer container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/dancer-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "database", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "sampledb", + "required": true + }, + { + "name": "PERL_APACHE2_RELOAD", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "CPAN_MIRROR", + "displayName": "Custom CPAN Mirror URL", + "description": "The custom CPAN mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "dancer-mysql-example", + "template": "dancer-mysql-example" + } +}`) func examplesQuickstartsDancerMysqlJsonBytes() ([]byte, error) { return _examplesQuickstartsDancerMysqlJson, nil @@ -8301,564 +8974,563 @@ func examplesQuickstartsDancerMysqlJson() (*asset, error) { } var _examplesQuickstartsDjangoPostgresqlPersistentJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "django-psql-persistent", - "template": "django-psql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "iconClass": "icon-python", - "openshift.io/display-name": "Django + PostgreSQL", - "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,python,django", - "template.openshift.io/bindable": "false" - }, - "name": "django-psql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "django-secret-key": "${DJANGO_SECRET_KEY}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./manage.py test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "PIP_INDEX_URL", - "value": "${PIP_INDEX_URL}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "python:${PYTHON_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "valueFrom": { - "secretKeyRef": { - "key": "django-secret-key", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "django-psql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-psql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "django-psql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of Python image to be used (3.6 or latest).", - "displayName": "Version of Python Image", - "name": "PYTHON_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - }, - { - "description": "Maximum amount of memory the Django container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/django-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database Username", - "name": "DATABASE_USER", - "required": true, - "value": "django" - }, - { - "displayName": "Database User Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Relative path to Gunicorn configuration file (optional).", - "displayName": "Application Configuration File Path", - "name": "APP_CONFIG" - }, - { - "description": "Set this to a long random string.", - "displayName": "Django Secret Key", - "from": "[\\w]{50}", - "generate": "expression", - "name": "DJANGO_SECRET_KEY" - }, - { - "description": "The custom PyPi index URL", - "displayName": "Custom PyPi Index URL", - "name": "PIP_INDEX_URL", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "django-psql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "iconClass": "icon-python", + "openshift.io/display-name": "Django + PostgreSQL", + "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,python,django", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "django-secret-key": "${DJANGO_SECRET_KEY}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./manage.py test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "PIP_INDEX_URL", + "value": "${PIP_INDEX_URL}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "python:${PYTHON_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "APP_CONFIG", + "value": "${APP_CONFIG}" + }, + { + "name": "DJANGO_SECRET_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "django-secret-key", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "django-psql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "django-psql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "django-psql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi7, 3.8-ubi8, or latest).", + "value": "3.8-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Django container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/django-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "value": "django", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database User Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "APP_CONFIG", + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." + }, + { + "name": "DJANGO_SECRET_KEY", + "displayName": "Django Secret Key", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "PIP_INDEX_URL", + "displayName": "Custom PyPi Index URL", + "description": "The custom PyPi index URL" + } + ], + "labels": { + "app": "django-psql-persistent", + "template": "django-psql-persistent" + } }`) func examplesQuickstartsDjangoPostgresqlPersistentJsonBytes() ([]byte, error) { @@ -8877,538 +9549,537 @@ func examplesQuickstartsDjangoPostgresqlPersistentJson() (*asset, error) { } var _examplesQuickstartsDjangoPostgresqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "django-psql-example", - "template": "django-psql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-python", - "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,python,django", - "template.openshift.io/bindable": "false" - }, - "name": "django-psql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "django-secret-key": "${DJANGO_SECRET_KEY}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./manage.py test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "PIP_INDEX_URL", - "value": "${PIP_INDEX_URL}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "python:${PYTHON_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "valueFrom": { - "secretKeyRef": { - "key": "django-secret-key", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "django-psql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-psql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "django-psql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of Python image to be used (3.6 or latest).", - "displayName": "Version of Python Image", - "name": "PYTHON_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - }, - { - "description": "Maximum amount of memory the Django container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/django-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database Username", - "name": "DATABASE_USER", - "required": true, - "value": "django" - }, - { - "displayName": "Database User Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Relative path to Gunicorn configuration file (optional).", - "displayName": "Application Configuration File Path", - "name": "APP_CONFIG" - }, - { - "description": "Set this to a long random string.", - "displayName": "Django Secret Key", - "from": "[\\w]{50}", - "generate": "expression", - "name": "DJANGO_SECRET_KEY" - }, - { - "description": "The custom PyPi index URL", - "displayName": "Custom PyPi Index URL", - "name": "PIP_INDEX_URL", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "django-psql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-python", + "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,python,django", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "django-secret-key": "${DJANGO_SECRET_KEY}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./manage.py test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "PIP_INDEX_URL", + "value": "${PIP_INDEX_URL}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "python:${PYTHON_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "APP_CONFIG", + "value": "${APP_CONFIG}" + }, + { + "name": "DJANGO_SECRET_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "django-secret-key", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "django-psql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "django-psql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "django-psql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi7, 3.8-ubi8, or latest).", + "value": "3.8-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Django container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/django-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "value": "django", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database User Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "APP_CONFIG", + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." + }, + { + "name": "DJANGO_SECRET_KEY", + "displayName": "Django Secret Key", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "PIP_INDEX_URL", + "displayName": "Custom PyPi Index URL", + "description": "The custom PyPi index URL" + } + ], + "labels": { + "app": "django-psql-example", + "template": "django-psql-example" + } }`) func examplesQuickstartsDjangoPostgresqlJsonBytes() ([]byte, error) { @@ -9426,574 +10097,7 @@ func examplesQuickstartsDjangoPostgresqlJson() (*asset, error) { return a, nil } -var _examplesQuickstartsDotnetPgsqlPersistentJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "dotnet-pgsql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore.", - "metadata": { - "annotations": { - "description": "An example .NET Core application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore.", - "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core + PostgreSQL (Persistent)", - "tags": "quickstart,dotnet", - "template.openshift.io/documentation-url": "https://github.com/redhat-developer/s2i-dotnetcore", - "template.openshift.io/provider-display-name": "Red Hat, Inc.", - "template.openshift.io/support-url": "https://access.redhat.com" - }, - "name": "dotnet-pgsql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "connect-string": "Host=${DATABASE_SERVICE_NAME};Database=${DATABASE_NAME};Username=${DATABASE_USER};Password=${DATABASE_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": {}, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "DOTNET_STARTUP_PROJECT", - "value": "${DOTNET_STARTUP_PROJECT}" - }, - { - "name": "DOTNET_SDK_VERSION", - "value": "${DOTNET_SDK_VERSION}" - }, - { - "name": "DOTNET_ASSEMBLY_NAME", - "value": "${DOTNET_ASSEMBLY_NAME}" - }, - { - "name": "DOTNET_NPM_TOOLS", - "value": "${DOTNET_NPM_TOOLS}" - }, - { - "name": "DOTNET_TEST_PROJECTS", - "value": "${DOTNET_TEST_PROJECTS}" - }, - { - "name": "DOTNET_CONFIGURATION", - "value": "${DOTNET_CONFIGURATION}" - }, - { - "name": "DOTNET_RESTORE_SOURCES", - "value": "${DOTNET_RESTORE_SOURCES}" - }, - { - "name": "DOTNET_TOOLS", - "value": "${DOTNET_TOOLS}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "${DOTNET_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "resources": {}, - "rollingParams": { - "intervalSeconds": 1, - "maxSurge": "25%", - "maxUnavailable": "25%", - "timeoutSeconds": 600, - "updatePeriodSeconds": 1 - }, - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "ConnectionString", - "valueFrom": { - "secretKeyRef": { - "key": "connect-string", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 40, - "timeoutSeconds": 10 - }, - "name": "dotnet-pgsql-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 30 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dotnet-pgsql-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "value": "${DATABASE_USER}" - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 5432 - }, - "timeoutSeconds": 1 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:9.5", - "namespace": "openshift" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "musicstore" - }, - { - "description": "Maximum amount of memory the .NET Core container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "128Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "128Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "256Mi" - }, - { - "description": "The image stream tag which is used to build the code.", - "displayName": ".NET builder", - "name": "DOTNET_IMAGE_STREAM_TAG", - "required": true, - "value": "dotnet:2.1" - }, - { - "description": "The OpenShift Namespace where the .NET builder ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/redhat-developer/s2i-aspnet-musicstore-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF", - "value": "rel/2.1-example" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "Set this to a project file (e.g. csproj) or a folder containing a single project file.", - "displayName": "Startup Project", - "name": "DOTNET_STARTUP_PROJECT", - "value": "samples/MusicStore" - }, - { - "description": "Set this to configure the default SDK version. This can be set to a specific version, '' (lowest version) or 'latest' (highest version).", - "displayName": "SDK Version", - "name": "DOTNET_SDK_VERSION", - "value": "" - }, - { - "description": "Set this when the assembly name is overridden in the project file.", - "displayName": "Startup Assembly", - "name": "DOTNET_ASSEMBLY_NAME" - }, - { - "description": "Set this to a space separated list of .NET tools needed to publish.", - "displayName": ".NET Tools", - "name": "DOTNET_TOOLS" - }, - { - "description": "Set this to a space separated list of npm tools needed to publish.", - "displayName": "Npm Tools", - "name": "DOTNET_NPM_TOOLS" - }, - { - "description": "Set this to a space separated list of test projects to run before publishing.", - "displayName": "Test projects", - "name": "DOTNET_TEST_PROJECTS" - }, - { - "description": "Set this to configuration (Release/Debug).", - "displayName": "Configuration", - "name": "DOTNET_CONFIGURATION", - "value": "Release" - }, - { - "description": "Set this to override the NuGet.config sources.", - "displayName": "NuGet package sources", - "name": "DOTNET_RESTORE_SOURCES" - }, - { - "description": "The exposed hostname that will route to the .NET Core service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "A secret string used to configure the GitHub webhook.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "musicstore" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - } - ] -}`) +var _examplesQuickstartsDotnetPgsqlPersistentJson = []byte(`404: Not Found`) func examplesQuickstartsDotnetPgsqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsDotnetPgsqlPersistentJson, nil @@ -10010,353 +10114,7 @@ func examplesQuickstartsDotnetPgsqlPersistentJson() (*asset, error) { return a, nil } -var _examplesQuickstartsDotnetJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "metadata": { - "annotations": { - "description": "An example .NET Core application.", - "iconClass": "icon-dotnet", - "openshift.io/display-name": ".NET Core Example", - "tags": "quickstart,dotnet,.net", - "template.openshift.io/documentation-url": "https://github.com/redhat-developer/s2i-dotnetcore", - "template.openshift.io/provider-display-name": "Red Hat, Inc.", - "template.openshift.io/support-url": "https://access.redhat.com" - }, - "name": "dotnet-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "DOTNET_STARTUP_PROJECT", - "value": "${DOTNET_STARTUP_PROJECT}" - }, - { - "name": "DOTNET_SDK_VERSION", - "value": "${DOTNET_SDK_VERSION}" - }, - { - "name": "DOTNET_ASSEMBLY_NAME", - "value": "${DOTNET_ASSEMBLY_NAME}" - }, - { - "name": "DOTNET_NPM_TOOLS", - "value": "${DOTNET_NPM_TOOLS}" - }, - { - "name": "DOTNET_TEST_PROJECTS", - "value": "${DOTNET_TEST_PROJECTS}" - }, - { - "name": "DOTNET_CONFIGURATION", - "value": "${DOTNET_CONFIGURATION}" - }, - { - "name": "DOTNET_RESTORE_SOURCES", - "value": "${DOTNET_RESTORE_SOURCES}" - }, - { - "name": "DOTNET_TOOLS", - "value": "${DOTNET_TOOLS}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "${DOTNET_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 40, - "timeoutSeconds": 15 - }, - "name": "dotnet-app", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 30 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dotnet-app" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dotnet-example" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "128Mi" - }, - { - "description": "The image stream tag which is used to build the code.", - "displayName": ".NET builder", - "name": "DOTNET_IMAGE_STREAM_TAG", - "required": true, - "value": "dotnet:2.2" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF", - "value": "dotnetcore-2.2" - }, - { - "description": "Set this to use a subdirectory of the source code repository", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the .NET Core service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "A secret string used to configure the GitHub webhook.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "description": "Set this to configure the default SDK version. This can be set to a specific version, '' (lowest version) or 'latest' (highest version).", - "displayName": "SDK Version", - "name": "DOTNET_SDK_VERSION", - "value": "" - }, - { - "description": "Set this to a project file (e.g. csproj) or a folder containing a single project file.", - "displayName": "Startup Project", - "name": "DOTNET_STARTUP_PROJECT", - "value": "app" - }, - { - "description": "Set this when the assembly name is overridden in the project file.", - "displayName": "Startup Assembly", - "name": "DOTNET_ASSEMBLY_NAME" - }, - { - "description": "Set this to a space separated list of .NET tools needed to publish.", - "displayName": ".NET Tools", - "name": "DOTNET_TOOLS" - }, - { - "description": "Set this to a space separated list of npm tools needed to publish.", - "displayName": "Npm Tools", - "name": "DOTNET_NPM_TOOLS" - }, - { - "description": "Set this to a space separated list of test projects to run before publishing.", - "displayName": "Test projects", - "name": "DOTNET_TEST_PROJECTS" - }, - { - "description": "Set this to configuration (Release/Debug).", - "displayName": "Configuration", - "name": "DOTNET_CONFIGURATION", - "value": "Release" - }, - { - "description": "Set this to override the NuGet.config sources.", - "displayName": "NuGet package sources", - "name": "DOTNET_RESTORE_SOURCES" - } - ] -}`) +var _examplesQuickstartsDotnetJson = []byte(`404: Not Found`) func examplesQuickstartsDotnetJsonBytes() ([]byte, error) { return _examplesQuickstartsDotnetJson, nil @@ -10374,273 +10132,273 @@ func examplesQuickstartsDotnetJson() (*asset, error) { } var _examplesQuickstartsHttpdJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "httpd-example", - "template": "httpd-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Apache HTTP Server (httpd) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", - "iconClass": "icon-apache", - "openshift.io/display-name": "Apache HTTP Server", - "openshift.io/documentation-url": "https://github.com/sclorg/httpd-ex", - "openshift.io/long-description": "This template defines resources needed to develop a static application served by Apache HTTP Server (httpd), including a build configuration and application deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,httpd", - "template.openshift.io/bindable": "false" - }, - "name": "httpd-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "name": "httpd:2.4", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "httpd-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "httpd-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "httpd-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/httpd-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "httpd-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Apache HTTP Server (httpd) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", + "iconClass": "icon-apache", + "openshift.io/display-name": "Apache HTTP Server", + "openshift.io/documentation-url": "https://github.com/sclorg/httpd-ex", + "openshift.io/long-description": "This template defines resources needed to develop a static application served by Apache HTTP Server (httpd), including a build configuration and application deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,httpd", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "name": "httpd:2.4-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Rolling" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "httpd-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "httpd-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "httpd-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/httpd-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + } + ], + "labels": { + "app": "httpd-example", + "template": "httpd-example" + } }`) func examplesQuickstartsHttpdJsonBytes() ([]byte, error) { @@ -10659,281 +10417,281 @@ func examplesQuickstartsHttpdJson() (*asset, error) { } var _examplesQuickstartsNginxJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "nginx-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Nginx HTTP server and a reverse proxy (nginx) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", - "iconClass": "icon-nginx", - "openshift.io/display-name": "Nginx HTTP server and a reverse proxy", - "openshift.io/documentation-url": "https://github.com/sclorg/nginx-ex", - "openshift.io/long-description": "This template defines resources needed to develop a static application served by Nginx HTTP server and a reverse proxy (nginx), including a build configuration and application deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nginx" - }, - "name": "nginx-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "annotations": { - "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" - }, - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "from": { - "kind": "ImageStreamTag", - "name": "nginx:${NGINX_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Rolling" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nginx-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nginx-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nginx-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NGINX image to be used (1.12 by default).", - "displayName": "NGINX Version", - "name": "NGINX_VERSION", - "required": true, - "value": "1.12" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nginx-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the nginx service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "nginx-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Nginx HTTP server and a reverse proxy (nginx) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", + "iconClass": "icon-nginx", + "openshift.io/display-name": "Nginx HTTP server and a reverse proxy", + "openshift.io/documentation-url": "https://github.com/sclorg/nginx-ex", + "openshift.io/long-description": "This template defines resources needed to develop a static application served by Nginx HTTP server and a reverse proxy (nginx), including a build configuration and application deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nginx" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "annotations": { + "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" + }, + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "from": { + "kind": "ImageStreamTag", + "name": "nginx:${NGINX_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Rolling" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nginx-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nginx-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nginx-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NGINX_VERSION", + "displayName": "NGINX Version", + "description": "Version of NGINX image to be used (1.16-el8 by default).", + "value": "1.16-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/nginx-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the nginx service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + } + ], + "labels": { + "template": "nginx-example" + } }`) func examplesQuickstartsNginxJsonBytes() ([]byte, error) { @@ -10951,1754 +10709,1731 @@ func examplesQuickstartsNginxJson() (*asset, error) { return a, nil } -var _examplesQuickstartsNodejsMongodbPersistentJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "template": "nodejs-mongo-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js + MongoDB", - "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex", - "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nodejs", - "template.openshift.io/bindable": "false" - }, - "name": "nodejs-mongo-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "npm test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "NPM_MIRROR", - "value": "${NPM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs:${NODEJS_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nodejs-mongo-persistent", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-mongo-persistent" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongodb", - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MONGODB_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nodejs-mongo-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NodeJS image to be used (6, 8, or latest).", - "displayName": "Version of NodeJS Image", - "name": "NODEJS_VERSION", - "required": true, - "value": "8" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Maximum amount of memory the Node.js container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MongoDB container can use.", - "displayName": "Memory Limit (MongoDB)", - "name": "MEMORY_MONGODB_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nodejs-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "description": "Password for the MongoDB user.", - "displayName": "MongoDB Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "Database Administrator Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_ADMIN_PASSWORD" - }, - { - "description": "The custom NPM mirror URL", - "displayName": "Custom NPM Mirror URL", - "name": "NPM_MIRROR", - "value": "" - } - ] -}`) - -func examplesQuickstartsNodejsMongodbPersistentJsonBytes() ([]byte, error) { - return _examplesQuickstartsNodejsMongodbPersistentJson, nil -} - -func examplesQuickstartsNodejsMongodbPersistentJson() (*asset, error) { - bytes, err := examplesQuickstartsNodejsMongodbPersistentJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/quickstarts/nodejs-mongodb-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesQuickstartsNodejsMongodbJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "nodejs-mongodb-example", - "template": "nodejs-mongodb-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js + MongoDB (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex", - "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nodejs", - "template.openshift.io/bindable": "false" - }, - "name": "nodejs-mongodb-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "npm test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "NPM_MIRROR", - "value": "${NPM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs:${NODEJS_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nodejs-mongodb-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-mongodb-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongodb", - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MONGODB_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nodejs-mongodb-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NodeJS image to be used (6, 8, or latest).", - "displayName": "Version of NodeJS Image", - "name": "NODEJS_VERSION", - "required": true, - "value": "8" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Maximum amount of memory the Node.js container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MongoDB container can use.", - "displayName": "Memory Limit (MongoDB)", - "name": "MEMORY_MONGODB_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nodejs-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "description": "Password for the MongoDB user.", - "displayName": "MongoDB Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "Database Administrator Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_ADMIN_PASSWORD" - }, - { - "description": "The custom NPM mirror URL", - "displayName": "Custom NPM Mirror URL", - "name": "NPM_MIRROR", - "value": "" - } - ] +var _examplesQuickstartsNodejsPostgresqlPersistentJson = []byte(`{ + "kind": "Template", + "apiVersion": "template.openshift.io/v1", + "metadata": { + "name": "nodejs-postgresql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js + PostgreSQL", + "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", + "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nodejs", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": {}, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "NPM_MIRROR", + "value": "${NPM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "nodejs:${NODEJS_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "labels": { + "app.openshift.io/runtime": "nodejs" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "app.openshift.io/runtime": "nodejs", + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nodejs-postgresql-persistent", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nodejs-postgresql-persistent" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + }, + "timeoutSeconds": 1 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/postgresql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nodejs-postgresql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NODEJS_VERSION", + "displayName": "Version of NodeJS Image", + "description": "Version of NodeJS image to be used (10-ubi8, 12-ubi8, or latest).", + "value": "12-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Node.js container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "PostgreSQL Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "PostgreSQL Password", + "description": "Password for the PostgreSQL user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "my_data", + "required": true + }, + { + "name": "DATABASE_ADMIN_PASSWORD", + "displayName": "Database Administrator Password", + "description": "Password for the database admin user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "NPM_MIRROR", + "displayName": "Custom NPM Mirror URL", + "description": "The custom NPM mirror URL" + } + ], + "labels": { + "app": "nodejs-postgresql-persistent", + "template": "nodejs-postgresql-persistent" + } +}`) + +func examplesQuickstartsNodejsPostgresqlPersistentJsonBytes() ([]byte, error) { + return _examplesQuickstartsNodejsPostgresqlPersistentJson, nil +} + +func examplesQuickstartsNodejsPostgresqlPersistentJson() (*asset, error) { + bytes, err := examplesQuickstartsNodejsPostgresqlPersistentJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "examples/quickstarts/nodejs-postgresql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _examplesQuickstartsNodejsPostgresqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "template.openshift.io/v1", + "metadata": { + "name": "nodejs-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", + "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nodejs", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": {}, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "NPM_MIRROR", + "value": "${NPM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "nodejs:${NODEJS_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "labels": { + "app.openshift.io/runtime": "nodejs" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "app.openshift.io/runtime": "nodejs", + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nodejs-postgresql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nodejs-postgresql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + }, + "timeoutSeconds": 1 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/postgresql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nodejs-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NODEJS_VERSION", + "displayName": "Version of NodeJS Image", + "description": "Version of NodeJS image to be used (10-ubi8, 12-ubi8, or latest).", + "value": "12-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Node.js container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "PostgreSQL Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "PostgreSQL Password", + "description": "Password for the PostgreSQL user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "my_data", + "required": true + }, + { + "name": "DATABASE_ADMIN_PASSWORD", + "displayName": "Database Administrator Password", + "description": "Password for the database admin user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "NPM_MIRROR", + "displayName": "Custom NPM Mirror URL", + "description": "The custom NPM mirror URL" + } + ], + "labels": { + "app": "nodejs-postgresql-example", + "template": "nodejs-postgresql-example" + } }`) -func examplesQuickstartsNodejsMongodbJsonBytes() ([]byte, error) { - return _examplesQuickstartsNodejsMongodbJson, nil +func examplesQuickstartsNodejsPostgresqlJsonBytes() ([]byte, error) { + return _examplesQuickstartsNodejsPostgresqlJson, nil } -func examplesQuickstartsNodejsMongodbJson() (*asset, error) { - bytes, err := examplesQuickstartsNodejsMongodbJsonBytes() +func examplesQuickstartsNodejsPostgresqlJson() (*asset, error) { + bytes, err := examplesQuickstartsNodejsPostgresqlJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "examples/quickstarts/nodejs-mongodb.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "examples/quickstarts/nodejs-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsRailsPostgresqlPersistentJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "rails-pgsql-persistent", - "template": "rails-pgsql-persistent" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Rails + PostgreSQL", - "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,ruby,rails", - "template.openshift.io/bindable": "false" - }, - "name": "rails-pgsql-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "application-password": "${APPLICATION_PASSWORD}", - "application-user": "${APPLICATION_USER}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "bundle exec rake test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "RUBYGEM_MIRROR", - "value": "${RUBYGEM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "ruby:2.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "${NAME}" - }, - "failurePolicy": "Abort" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - }, - { - "name": "APPLICATION_DOMAIN", - "value": "${APPLICATION_DOMAIN}" - }, - { - "name": "APPLICATION_USER", - "valueFrom": { - "secretKeyRef": { - "key": "application-user", - "name": "${NAME}" - } - } - }, - { - "name": "APPLICATION_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "application-password", - "name": "${NAME}" - } - } - }, - { - "name": "RAILS_ENV", - "value": "${RAILS_ENV}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 3 - }, - "name": "${NAME}", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${NAME}" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "name": "${DATABASE_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${DATABASE_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:12", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "rails-pgsql-persistent" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Rails container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/rails-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The application user that is used within the sample application to authorize access on pages.", - "displayName": "Application Username", - "name": "APPLICATION_USER", - "required": true, - "value": "openshift" - }, - { - "description": "The application password that is used within the sample application to authorize access on pages.", - "displayName": "Application Password", - "name": "APPLICATION_PASSWORD", - "required": true, - "value": "secret" - }, - { - "description": "Environment under which the sample application will run. Could be set to production, development or test.", - "displayName": "Rails Environment", - "name": "RAILS_ENV", - "required": true, - "value": "production" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "root" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - }, - { - "description": "The custom RubyGems mirror URL", - "displayName": "Custom RubyGems Mirror URL", - "name": "RUBYGEM_MIRROR", - "value": "" - } - ] -} -`) + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "rails-pgsql-persistent", + "creationTimestamp": null, + "annotations": { + "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Rails + PostgreSQL", + "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,ruby,rails", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "application-password": "${APPLICATION_PASSWORD}", + "application-user": "${APPLICATION_USER}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "bundle exec rake test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "RUBYGEM_MIRROR", + "value": "${RUBYGEM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "ruby:2.6-ubi8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "${NAME}" + }, + "failurePolicy": "Abort" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + }, + { + "name": "APPLICATION_DOMAIN", + "value": "${APPLICATION_DOMAIN}" + }, + { + "name": "APPLICATION_USER", + "valueFrom": { + "secretKeyRef": { + "key": "application-user", + "name": "${NAME}" + } + } + }, + { + "name": "APPLICATION_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "application-password", + "name": "${NAME}" + } + } + }, + { + "name": "RAILS_ENV", + "value": "${RAILS_ENV}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 3 + }, + "name": "${NAME}", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "${NAME}" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "name": "${DATABASE_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${DATABASE_SERVICE_NAME}" + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:12-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "rails-pgsql-persistent", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Rails container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi", + "value": "1Gi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/rails-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "APPLICATION_USER", + "displayName": "Application Username", + "description": "The application user that is used within the sample application to authorize access on pages.", + "value": "openshift", + "required": true + }, + { + "name": "APPLICATION_PASSWORD", + "displayName": "Application Password", + "description": "The application password that is used within the sample application to authorize access on pages.", + "value": "secret", + "required": true + }, + { + "name": "RAILS_ENV", + "displayName": "Rails Environment", + "description": "Environment under which the sample application will run. Could be set to production, development or test.", + "value": "production", + "required": true + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "root", + "required": true + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "displayName": "Maximum Database Connections", + "value": "100" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "displayName": "Shared Buffer Amount", + "value": "12MB" + }, + { + "name": "RUBYGEM_MIRROR", + "displayName": "Custom RubyGems Mirror URL", + "description": "The custom RubyGems mirror URL" + } + ], + "labels": { + "app": "rails-pgsql-persistent", + "template": "rails-pgsql-persistent" + } +}`) func examplesQuickstartsRailsPostgresqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsRailsPostgresqlPersistentJson, nil @@ -12716,590 +12451,589 @@ func examplesQuickstartsRailsPostgresqlPersistentJson() (*asset, error) { } var _examplesQuickstartsRailsPostgresqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "rails-postgresql-example", - "template": "rails-postgresql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,ruby,rails", - "template.openshift.io/bindable": "false" - }, - "name": "rails-postgresql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "application-password": "${APPLICATION_PASSWORD}", - "application-user": "${APPLICATION_USER}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "bundle exec rake test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "RUBYGEM_MIRROR", - "value": "${RUBYGEM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "ruby:2.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "${NAME}" - }, - "failurePolicy": "Abort" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - }, - { - "name": "APPLICATION_DOMAIN", - "value": "${APPLICATION_DOMAIN}" - }, - { - "name": "APPLICATION_USER", - "valueFrom": { - "secretKeyRef": { - "key": "application-user", - "name": "${NAME}" - } - } - }, - { - "name": "APPLICATION_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "application-password", - "name": "${NAME}" - } - } - }, - { - "name": "RAILS_ENV", - "value": "${RAILS_ENV}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 3 - }, - "name": "${NAME}", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${NAME}" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:12", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "rails-postgresql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Rails container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/rails-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The application user that is used within the sample application to authorize access on pages.", - "displayName": "Application Username", - "name": "APPLICATION_USER", - "required": true, - "value": "openshift" - }, - { - "description": "The application password that is used within the sample application to authorize access on pages.", - "displayName": "Application Password", - "name": "APPLICATION_PASSWORD", - "required": true, - "value": "secret" - }, - { - "description": "Environment under which the sample application will run. Could be set to production, development or test.", - "displayName": "Rails Environment", - "name": "RAILS_ENV", - "required": true, - "value": "production" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "root" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - }, - { - "description": "The custom RubyGems mirror URL", - "displayName": "Custom RubyGems Mirror URL", - "name": "RUBYGEM_MIRROR", - "value": "" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "rails-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,ruby,rails", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "application-password": "${APPLICATION_PASSWORD}", + "application-user": "${APPLICATION_USER}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "bundle exec rake test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "RUBYGEM_MIRROR", + "value": "${RUBYGEM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "ruby:2.6-ubi8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "${NAME}" + }, + "failurePolicy": "Abort" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + }, + { + "name": "APPLICATION_DOMAIN", + "value": "${APPLICATION_DOMAIN}" + }, + { + "name": "APPLICATION_USER", + "valueFrom": { + "secretKeyRef": { + "key": "application-user", + "name": "${NAME}" + } + } + }, + { + "name": "APPLICATION_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "application-password", + "name": "${NAME}" + } + } + }, + { + "name": "RAILS_ENV", + "value": "${RAILS_ENV}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 3 + }, + "name": "${NAME}", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "${NAME}" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:12-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "rails-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Rails container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/rails-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "APPLICATION_USER", + "displayName": "Application Username", + "description": "The application user that is used within the sample application to authorize access on pages.", + "value": "openshift", + "required": true + }, + { + "name": "APPLICATION_PASSWORD", + "displayName": "Application Password", + "description": "The application password that is used within the sample application to authorize access on pages.", + "value": "secret", + "required": true + }, + { + "name": "RAILS_ENV", + "displayName": "Rails Environment", + "description": "Environment under which the sample application will run. Could be set to production, development or test.", + "value": "production", + "required": true + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "root", + "required": true + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "displayName": "Maximum Database Connections", + "value": "100" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "displayName": "Shared Buffer Amount", + "value": "12MB" + }, + { + "name": "RUBYGEM_MIRROR", + "displayName": "Custom RubyGems Mirror URL", + "description": "The custom RubyGems mirror URL" + } + ], + "labels": { + "app": "rails-postgresql-example", + "template": "rails-postgresql-example" + } }`) func examplesQuickstartsRailsPostgresqlJsonBytes() ([]byte, error) { @@ -13792,302 +13526,338 @@ func examplesJenkinsApplicationTemplateJson() (*asset, error) { } var _examplesJenkinsJenkinsEphemeralTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "jenkins-ephemeral", - "template": "jenkins-ephemeral-template" - }, - "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", - "metadata": { - "annotations": { - "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-jenkins", - "openshift.io/display-name": "Jenkins (Ephemeral)", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", - "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login. The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "instant-app,jenkins" - }, - "name": "jenkins-ephemeral" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "annotations": { - "haproxy.router.openshift.io/timeout": "4m", - "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "tls": { - "insecureEdgeTerminationPolicy": "Redirect", - "termination": "edge" - }, - "to": { - "kind": "Service", - "name": "${JENKINS_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${JENKINS_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "OPENSHIFT_ENABLE_OAUTH", - "value": "${ENABLE_OAUTH}" - }, - { - "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", - "value": "true" - }, - { - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" - }, - { - "name": "KUBERNETES_MASTER", - "value": "https://kubernetes.default:443" - }, - { - "name": "KUBERNETES_TRUST_CERTIFICATES", - "value": "true" - }, - { - "name": "JENKINS_SERVICE_NAME", - "value": "${JENKINS_SERVICE_NAME}" - }, - { - "name": "JNLP_SERVICE_NAME", - "value": "${JNLP_SERVICE_NAME}" - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "failureThreshold": 2, - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 420, - "periodSeconds": 360, - "timeoutSeconds": 240 - }, - "name": "jenkins", - "readinessProbe": { - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 240 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/jenkins", - "name": "${JENKINS_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "serviceAccountName": "${JENKINS_SERVICE_NAME}", - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${JENKINS_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "jenkins" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${JENKINS_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "annotations": { - "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" - }, - "name": "${JENKINS_SERVICE_NAME}" - } - }, - { - "apiVersion": "v1", - "groupNames": null, - "kind": "RoleBinding", - "metadata": { - "name": "${JENKINS_SERVICE_NAME}_edit" - }, - "roleRef": { - "name": "edit" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "${JENKINS_SERVICE_NAME}" - } - ] - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "${JNLP_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "agent", - "nodePort": 0, - "port": 50000, - "protocol": "TCP", - "targetPort": 50000 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", - "service.openshift.io/infrastructure": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "nodePort": 0, - "port": 80, - "protocol": "TCP", - "targetPort": 8080 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - } - ], - "parameters": [ - { - "description": "The name of the OpenShift Service exposed for the Jenkins container.", - "displayName": "Jenkins Service Name", - "name": "JENKINS_SERVICE_NAME", - "value": "jenkins" - }, - { - "description": "The name of the service used for master/slave communication.", - "displayName": "Jenkins JNLP Service Name", - "name": "JNLP_SERVICE_NAME", - "value": "jenkins-jnlp" - }, - { - "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", - "displayName": "Enable OAuth in Jenkins", - "name": "ENABLE_OAUTH", - "value": "true" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "value": "512Mi" - }, - { - "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", - "displayName": "Jenkins ImageStream Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", - "displayName": "Disable memory intensive administrative monitors", - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "false" - }, - { - "description": "Name of the ImageStreamTag to be used for the Jenkins image.", - "displayName": "Jenkins ImageStreamTag", - "name": "JENKINS_IMAGE_STREAM_TAG", - "value": "jenkins:2" - } - ] -} -`) + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "jenkins-ephemeral", + "creationTimestamp": null, + "annotations": { + "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-jenkins", + "openshift.io/display-name": "Jenkins (Ephemeral)", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", + "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login. The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "instant-app,jenkins" + } + }, + "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "annotations": { + "haproxy.router.openshift.io/timeout": "4m", + "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "tls": { + "insecureEdgeTerminationPolicy": "Redirect", + "termination": "edge" + }, + "to": { + "kind": "Service", + "name": "${JENKINS_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ConfigMap", + "metadata": { + "labels": { + "config.openshift.io/inject-trusted-cabundle": "true" + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${JENKINS_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "OPENSHIFT_ENABLE_OAUTH", + "value": "${ENABLE_OAUTH}" + }, + { + "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", + "value": "true" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" + }, + { + "name": "KUBERNETES_MASTER", + "value": "https://kubernetes.default:443" + }, + { + "name": "KUBERNETES_TRUST_CERTIFICATES", + "value": "true" + }, + { + "name": "JENKINS_SERVICE_NAME", + "value": "${JENKINS_SERVICE_NAME}" + }, + { + "name": "JNLP_SERVICE_NAME", + "value": "${JNLP_SERVICE_NAME}" + }, + { + "name": "JENKINS_UC_INSECURE", + "value": "${JENKINS_UC_INSECURE}" + }, + { + "name": "CASC_JENKINS_CONFIG", + "value": "/var/lib/jenkins/proxy.yaml" + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 420, + "periodSeconds": 360, + "timeoutSeconds": 240 + }, + "name": "jenkins", + "readinessProbe": { + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 240 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/jenkins", + "name": "${JENKINS_SERVICE_NAME}-data" + }, + { + "mountPath": "/etc/pki/ca-trust/source/anchors", + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "serviceAccountName": "${JENKINS_SERVICE_NAME}", + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${JENKINS_SERVICE_NAME}-data" + }, + { + "configMap": { + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", + "optional": true + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "jenkins" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${JENKINS_IMAGE_STREAM_TAG}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "annotations": { + "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" + }, + "name": "${JENKINS_SERVICE_NAME}" + } + }, + { + "apiVersion": "v1", + "groupNames": null, + "kind": "RoleBinding", + "metadata": { + "name": "${JENKINS_SERVICE_NAME}_edit" + }, + "roleRef": { + "name": "edit" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "${JENKINS_SERVICE_NAME}" + } + ] + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "${JNLP_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "agent", + "nodePort": 0, + "port": 50000, + "protocol": "TCP", + "targetPort": 50000 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", + "service.openshift.io/infrastructure": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "nodePort": 0, + "port": 80, + "protocol": "TCP", + "targetPort": 8080 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + } + ], + "parameters": [ + { + "name": "JENKINS_SERVICE_NAME", + "displayName": "Jenkins Service Name", + "description": "The name of the OpenShift Service exposed for the Jenkins container.", + "value": "jenkins" + }, + { + "name": "JNLP_SERVICE_NAME", + "displayName": "Jenkins JNLP Service Name", + "description": "The name of the service used for master/slave communication.", + "value": "jenkins-jnlp" + }, + { + "name": "ENABLE_OAUTH", + "displayName": "Enable OAuth in Jenkins", + "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", + "value": "true" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "1Gi" + }, + { + "name": "NAMESPACE", + "displayName": "Jenkins ImageStream Namespace", + "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", + "value": "openshift" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "displayName": "Disable memory intensive administrative monitors", + "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", + "value": "false" + }, + { + "name": "JENKINS_IMAGE_STREAM_TAG", + "displayName": "Jenkins ImageStreamTag", + "description": "Name of the ImageStreamTag to be used for the Jenkins image.", + "value": "jenkins:2" + }, + { + "name": "JENKINS_UC_INSECURE", + "displayName": "Allows use of Jenkins Update Center repository with invalid SSL certificate", + "description": "Whether to allow use of a Jenkins Update Center that uses invalid certificate (self-signed, unknown CA). If any value other than 'false', certificate check is bypassed. By default, certificate check is enforced.", + "value": "false" + } + ], + "labels": { + "app": "jenkins-ephemeral", + "template": "jenkins-ephemeral-template" + } +}`) func examplesJenkinsJenkinsEphemeralTemplateJsonBytes() ([]byte, error) { return _examplesJenkinsJenkinsEphemeralTemplateJson, nil @@ -14105,335 +13875,371 @@ func examplesJenkinsJenkinsEphemeralTemplateJson() (*asset, error) { } var _examplesJenkinsJenkinsPersistentTemplateJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "jenkins-persistent", - "template": "jenkins-persistent-template" - }, - "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", - "metadata": { - "annotations": { - "description": "Jenkins service, with persistent storage.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", - "iconClass": "icon-jenkins", - "openshift.io/display-name": "Jenkins", - "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", - "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "instant-app,jenkins" - }, - "name": "jenkins-persistent" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "annotations": { - "haproxy.router.openshift.io/timeout": "4m", - "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "tls": { - "insecureEdgeTerminationPolicy": "Redirect", - "termination": "edge" - }, - "to": { - "kind": "Service", - "name": "${JENKINS_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "PersistentVolumeClaim", - "metadata": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "accessModes": [ - "ReadWriteOnce" - ], - "resources": { - "requests": { - "storage": "${VOLUME_CAPACITY}" - } - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${JENKINS_SERVICE_NAME}" - } - }, - "spec": { - "containers": [ - { - "capabilities": {}, - "env": [ - { - "name": "OPENSHIFT_ENABLE_OAUTH", - "value": "${ENABLE_OAUTH}" - }, - { - "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", - "value": "true" - }, - { - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" - }, - { - "name": "KUBERNETES_MASTER", - "value": "https://kubernetes.default:443" - }, - { - "name": "KUBERNETES_TRUST_CERTIFICATES", - "value": "true" - }, - { - "name": "JENKINS_SERVICE_NAME", - "value": "${JENKINS_SERVICE_NAME}" - }, - { - "name": "JNLP_SERVICE_NAME", - "value": "${JNLP_SERVICE_NAME}" - }, - { - "name": "ENABLE_FATAL_ERROR_LOG_FILE", - "value": "${ENABLE_FATAL_ERROR_LOG_FILE}" - } - ], - "image": " ", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "failureThreshold": 2, - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 420, - "periodSeconds": 360, - "timeoutSeconds": 240 - }, - "name": "jenkins", - "readinessProbe": { - "httpGet": { - "path": "/login", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 240 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - }, - "securityContext": { - "capabilities": {}, - "privileged": false - }, - "terminationMessagePath": "/dev/termination-log", - "volumeMounts": [ - { - "mountPath": "/var/lib/jenkins", - "name": "${JENKINS_SERVICE_NAME}-data" - } - ] - } - ], - "dnsPolicy": "ClusterFirst", - "restartPolicy": "Always", - "serviceAccountName": "${JENKINS_SERVICE_NAME}", - "volumes": [ - { - "name": "${JENKINS_SERVICE_NAME}-data", - "persistentVolumeClaim": { - "claimName": "${JENKINS_SERVICE_NAME}" - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "jenkins" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${JENKINS_IMAGE_STREAM_TAG}", - "namespace": "${NAMESPACE}" - }, - "lastTriggeredImage": "" - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "ServiceAccount", - "metadata": { - "annotations": { - "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" - }, - "name": "${JENKINS_SERVICE_NAME}" - } - }, - { - "apiVersion": "v1", - "groupNames": null, - "kind": "RoleBinding", - "metadata": { - "name": "${JENKINS_SERVICE_NAME}_edit" - }, - "roleRef": { - "name": "edit" - }, - "subjects": [ - { - "kind": "ServiceAccount", - "name": "${JENKINS_SERVICE_NAME}" - } - ] - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "name": "${JNLP_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "agent", - "nodePort": 0, - "port": 50000, - "protocol": "TCP", - "targetPort": 50000 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", - "service.openshift.io/infrastructure": "true" - }, - "name": "${JENKINS_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "nodePort": 0, - "port": 80, - "protocol": "TCP", - "targetPort": 8080 - } - ], - "selector": { - "name": "${JENKINS_SERVICE_NAME}" - }, - "sessionAffinity": "None", - "type": "ClusterIP" - } - } - ], - "parameters": [ - { - "description": "The name of the OpenShift Service exposed for the Jenkins container.", - "displayName": "Jenkins Service Name", - "name": "JENKINS_SERVICE_NAME", - "value": "jenkins" - }, - { - "description": "The name of the service used for master/slave communication.", - "displayName": "Jenkins JNLP Service Name", - "name": "JNLP_SERVICE_NAME", - "value": "jenkins-jnlp" - }, - { - "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", - "displayName": "Enable OAuth in Jenkins", - "name": "ENABLE_OAUTH", - "value": "true" - }, - { - "description": "Maximum amount of memory the container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "value": "512Mi" - }, - { - "description": "Volume space available for data, e.g. 512Mi, 2Gi.", - "displayName": "Volume Capacity", - "name": "VOLUME_CAPACITY", - "required": true, - "value": "1Gi" - }, - { - "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", - "displayName": "Jenkins ImageStream Namespace", - "name": "NAMESPACE", - "value": "openshift" - }, - { - "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", - "displayName": "Disable memory intensive administrative monitors", - "name": "DISABLE_ADMINISTRATIVE_MONITORS", - "value": "false" - }, - { - "description": "Name of the ImageStreamTag to be used for the Jenkins image.", - "displayName": "Jenkins ImageStreamTag", - "name": "JENKINS_IMAGE_STREAM_TAG", - "value": "jenkins:2" - }, - { - "description": "When a fatal error occurs, an error log is created with information and the state obtained at the time of the fatal error.", - "displayName": "Fatal Error Log File", - "name": "ENABLE_FATAL_ERROR_LOG_FILE", - "value": "false" - } - ] + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "jenkins-persistent", + "creationTimestamp": null, + "annotations": { + "description": "Jenkins service, with persistent storage.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", + "iconClass": "icon-jenkins", + "openshift.io/display-name": "Jenkins", + "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", + "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "instant-app,jenkins" + } + }, + "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "annotations": { + "haproxy.router.openshift.io/timeout": "4m", + "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "tls": { + "insecureEdgeTerminationPolicy": "Redirect", + "termination": "edge" + }, + "to": { + "kind": "Service", + "name": "${JENKINS_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ConfigMap", + "metadata": { + "labels": { + "config.openshift.io/inject-trusted-cabundle": "true" + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + }, + { + "apiVersion": "v1", + "kind": "PersistentVolumeClaim", + "metadata": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "accessModes": [ + "ReadWriteOnce" + ], + "resources": { + "requests": { + "storage": "${VOLUME_CAPACITY}" + } + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${JENKINS_SERVICE_NAME}" + } + }, + "spec": { + "containers": [ + { + "capabilities": {}, + "env": [ + { + "name": "OPENSHIFT_ENABLE_OAUTH", + "value": "${ENABLE_OAUTH}" + }, + { + "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", + "value": "true" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" + }, + { + "name": "KUBERNETES_MASTER", + "value": "https://kubernetes.default:443" + }, + { + "name": "KUBERNETES_TRUST_CERTIFICATES", + "value": "true" + }, + { + "name": "JENKINS_SERVICE_NAME", + "value": "${JENKINS_SERVICE_NAME}" + }, + { + "name": "JNLP_SERVICE_NAME", + "value": "${JNLP_SERVICE_NAME}" + }, + { + "name": "ENABLE_FATAL_ERROR_LOG_FILE", + "value": "${ENABLE_FATAL_ERROR_LOG_FILE}" + }, + { + "name": "JENKINS_UC_INSECURE", + "value": "${JENKINS_UC_INSECURE}" + }, + { + "name": "CASC_JENKINS_CONFIG", + "value": "/var/lib/jenkins/proxy.yaml" + } + ], + "image": " ", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 2, + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 420, + "periodSeconds": 360, + "timeoutSeconds": 240 + }, + "name": "jenkins", + "readinessProbe": { + "httpGet": { + "path": "/login", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 240 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + }, + "securityContext": { + "capabilities": {}, + "privileged": false + }, + "terminationMessagePath": "/dev/termination-log", + "volumeMounts": [ + { + "mountPath": "/var/lib/jenkins", + "name": "${JENKINS_SERVICE_NAME}-data" + }, + { + "mountPath": "/etc/pki/ca-trust/source/anchors", + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "restartPolicy": "Always", + "serviceAccountName": "${JENKINS_SERVICE_NAME}", + "volumes": [ + { + "name": "${JENKINS_SERVICE_NAME}-data", + "persistentVolumeClaim": { + "claimName": "${JENKINS_SERVICE_NAME}" + } + }, + { + "configMap": { + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", + "optional": true + }, + "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "jenkins" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${JENKINS_IMAGE_STREAM_TAG}", + "namespace": "${NAMESPACE}" + }, + "lastTriggeredImage": "" + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "annotations": { + "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" + }, + "name": "${JENKINS_SERVICE_NAME}" + } + }, + { + "apiVersion": "v1", + "groupNames": null, + "kind": "RoleBinding", + "metadata": { + "name": "${JENKINS_SERVICE_NAME}_edit" + }, + "roleRef": { + "name": "edit" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "${JENKINS_SERVICE_NAME}" + } + ] + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "name": "${JNLP_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "agent", + "nodePort": 0, + "port": 50000, + "protocol": "TCP", + "targetPort": 50000 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", + "service.openshift.io/infrastructure": "true" + }, + "name": "${JENKINS_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "nodePort": 0, + "port": 80, + "protocol": "TCP", + "targetPort": 8080 + } + ], + "selector": { + "name": "${JENKINS_SERVICE_NAME}" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + } + ], + "parameters": [ + { + "name": "JENKINS_SERVICE_NAME", + "displayName": "Jenkins Service Name", + "description": "The name of the OpenShift Service exposed for the Jenkins container.", + "value": "jenkins" + }, + { + "name": "JNLP_SERVICE_NAME", + "displayName": "Jenkins JNLP Service Name", + "description": "The name of the service used for master/slave communication.", + "value": "jenkins-jnlp" + }, + { + "name": "ENABLE_OAUTH", + "displayName": "Enable OAuth in Jenkins", + "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", + "value": "true" + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the container can use.", + "value": "1Gi" + }, + { + "name": "VOLUME_CAPACITY", + "displayName": "Volume Capacity", + "description": "Volume space available for data, e.g. 512Mi, 2Gi.", + "value": "1Gi", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Jenkins ImageStream Namespace", + "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", + "value": "openshift" + }, + { + "name": "DISABLE_ADMINISTRATIVE_MONITORS", + "displayName": "Disable memory intensive administrative monitors", + "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", + "value": "false" + }, + { + "name": "JENKINS_IMAGE_STREAM_TAG", + "displayName": "Jenkins ImageStreamTag", + "description": "Name of the ImageStreamTag to be used for the Jenkins image.", + "value": "jenkins:2" + }, + { + "name": "ENABLE_FATAL_ERROR_LOG_FILE", + "displayName": "Fatal Error Log File", + "description": "When a fatal error occurs, an error log is created with information and the state obtained at the time of the fatal error.", + "value": "false" + }, + { + "name": "JENKINS_UC_INSECURE", + "displayName": "Allows use of Jenkins Update Center repository with invalid SSL certificate", + "description": "Whether to allow use of a Jenkins Update Center that uses invalid certificate (self-signed, unknown CA). If any value other than 'false', certificate check is bypassed. By default, certificate check is enforced.", + "value": "false" + } + ], + "labels": { + "app": "jenkins-persistent", + "template": "jenkins-persistent-template" + } }`) func examplesJenkinsJenkinsPersistentTemplateJsonBytes() ([]byte, error) { @@ -14648,14 +14454,14 @@ objects: - env: - name: DATABASE_SERVICE_NAME value: ${DATABASE_SERVICE_NAME} - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: httpGet: @@ -14663,7 +14469,7 @@ objects: port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 - name: nodejs-mongodb-example + name: nodejs-mariadb-example ports: - containerPort: 8080 readinessProbe: @@ -14679,7 +14485,7 @@ objects: - imageChangeParams: automatic: true containerNames: - - nodejs-mongodb-example + - nodejs-mariadb-example from: kind: ImageStreamTag name: ${NAME}:blue @@ -14720,14 +14526,14 @@ objects: - env: - name: DATABASE_SERVICE_NAME value: ${DATABASE_SERVICE_NAME} - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: httpGet: @@ -14735,7 +14541,7 @@ objects: port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 - name: nodejs-mongodb-example + name: nodejs-mariadb-example ports: - containerPort: 8080 readinessProbe: @@ -14751,7 +14557,7 @@ objects: - imageChangeParams: automatic: true containerNames: - - nodejs-mongodb-example + - nodejs-mariadb-example from: kind: ImageStreamTag name: ${NAME}:green @@ -14765,9 +14571,9 @@ objects: name: ${DATABASE_SERVICE_NAME} spec: ports: - - name: mongodb - port: 27017 - targetPort: 27017 + - name: mariadb + port: 3306 + targetPort: 3306 selector: name: ${DATABASE_SERVICE_NAME} - apiVersion: v1 @@ -14790,21 +14596,21 @@ objects: spec: containers: - env: - - name: MONGODB_USER + - name: MYSQL_USER value: ${DATABASE_USER} - - name: MONGODB_PASSWORD + - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE + - name: MYSQL_DATABASE value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: initialDelaySeconds: 30 tcpSocket: port: 27017 timeoutSeconds: 1 - name: mongodb + name: mariadb ports: - containerPort: 27017 readinessProbe: @@ -14813,15 +14619,14 @@ objects: - /bin/sh - -i - -c - - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD - --eval="quit()" + - MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping initialDelaySeconds: 3 timeoutSeconds: 1 resources: limits: - memory: ${MEMORY_MONGODB_LIMIT} + memory: ${MEMORY_MYSQL_LIMIT} volumeMounts: - - mountPath: /var/lib/mongodb/data + - mountPath: /var/lib/mysql/data name: ${DATABASE_SERVICE_NAME}-data volumes: - emptyDir: @@ -14831,10 +14636,10 @@ objects: - imageChangeParams: automatic: true containerNames: - - mongodb + - mariadb from: kind: ImageStreamTag - name: mongodb:3.2 + name: mariadb:10.3-el8 namespace: ${NAMESPACE} type: ImageChange - type: ConfigChange @@ -14843,7 +14648,7 @@ parameters: displayName: Name name: NAME required: true - value: nodejs-mongodb-example + value: nodejs-mariadb-example - description: The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted. displayName: Application Hostname @@ -14862,13 +14667,13 @@ parameters: name: DATABASE_NAME required: true value: sampledb -- description: Username for MongoDB user that will be used for accessing the database. - displayName: MongoDB Username +- description: Username for MariaDB user that will be used for accessing the database. + displayName: MariaDB Username from: user[A-Z0-9]{3} generate: expression name: DATABASE_USER -- description: Password for the MongoDB user. - displayName: MongoDB Password +- description: Password for the MariaDB user. + displayName: MariaDB Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_PASSWORD @@ -14877,20 +14682,20 @@ parameters: name: MEMORY_LIMIT required: true value: 512Mi -- description: Maximum amount of memory the MongoDB container can use. - displayName: Memory Limit (MongoDB) - name: MEMORY_MONGODB_LIMIT +- description: Maximum amount of memory the MariaDB container can use. + displayName: Memory Limit (MariaDB) + name: MEMORY_MYSQL_LIMIT required: true value: 512Mi - displayName: Database Service Name name: DATABASE_SERVICE_NAME required: true - value: mongodb + value: mariadb - description: Password for the database admin user. displayName: Database Administrator Password from: '[a-zA-Z0-9]{16}' generate: expression - name: DATABASE_ADMIN_PASSWORD + name: DATABASE_ROOT_PASSWORD - description: Set this to the relative path to your project if it is not in the root of your repository. displayName: Context Directory @@ -14908,7 +14713,7 @@ parameters: - description: The custom NPM mirror URL displayName: Custom NPM Mirror URL name: NPM_MIRROR -- description: The OpenShift Namespace where the NodeJS and MongoDB ImageStreams reside. +- description: The OpenShift Namespace where the NodeJS and MariaDB ImageStreams reside. displayName: Namespace name: NAMESPACE required: true @@ -15238,1096 +15043,1111 @@ func examplesJenkinsPipelineMavenPipelineYaml() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "examples/jenkins/pipeline/maven-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesJenkinsPipelineNodejsSamplePipelineYaml = []byte(`kind: "BuildConfig" -apiVersion: "v1" -metadata: - name: "nodejs-sample-pipeline" -spec: - strategy: - jenkinsPipelineStrategy: - jenkinsfile: |- - // path of the template to use - def templatePath = 'nodejs-mongodb-example' - // name of the template that will be created - def templateName = 'nodejs-mongodb-example' - // NOTE, the "pipeline" directive/closure from the declarative pipeline syntax needs to include, or be nested outside, - // and "openshift" directive/closure from the OpenShift Client Plugin for Jenkins. Otherwise, the declarative pipeline engine - // will not be fully engaged. - pipeline { - agent { - node { - // spin up a node.js slave pod to run this build on - label 'nodejs' - } - } - options { - // set a timeout of 20 minutes for this pipeline - timeout(time: 20, unit: 'MINUTES') - } - - stages { - stage('preamble') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - echo "Using project: ${openshift.project()}" - } - } - } - } - } - stage('cleanup') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // delete everything with this template label - openshift.selector("all", [ template : templateName ]).delete() - // delete any secrets with this template label - if (openshift.selector("secrets", templateName).exists()) { - openshift.selector("secrets", templateName).delete() - } - } - } - } // script - } // steps - } // stage - stage('create') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // create a new application from the templatePath - openshift.newApp(templatePath) - } - } - } // script - } // steps - } // stage - stage('build') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - def builds = openshift.selector("bc", templateName).related('builds') - builds.untilEach(1) { - return (it.object().status.phase == "Complete") - } - } - } - } // script - } // steps - } // stage - stage('deploy') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - def rm = openshift.selector("dc", templateName).rollout() - openshift.selector("dc", templateName).related('pods').untilEach(1) { - return (it.object().status.phase == "Running") - } - } - } - } // script - } // steps - } // stage - stage('tag') { - steps { - script { - openshift.withCluster() { - openshift.withProject() { - // if everything else succeeded, tag the ${templateName}:latest image as ${templateName}-staging:latest - // a pipeline build config for the staging environment can watch for the ${templateName}-staging:latest - // image to change and then deploy it to the staging environment - openshift.tag("${templateName}:latest", "${templateName}-staging:latest") - } - } - } // script - } // steps - } // stage - } // stages - } // pipeline - type: JenkinsPipeline -`) - -func examplesJenkinsPipelineNodejsSamplePipelineYamlBytes() ([]byte, error) { - return _examplesJenkinsPipelineNodejsSamplePipelineYaml, nil -} - -func examplesJenkinsPipelineNodejsSamplePipelineYaml() (*asset, error) { - bytes, err := examplesJenkinsPipelineNodejsSamplePipelineYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/jenkins/pipeline/nodejs-sample-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml = []byte(`apiVersion: v1 -kind: BuildConfig -metadata: - labels: - name: sample-pipeline-openshift-client-plugin - name: sample-pipeline-openshift-client-plugin -spec: - source: - type: Git - git: - uri: https://github.com/openshift/jenkins-client-plugin.git - strategy: - type: JenkinsPipeline - jenkinsPipelineStrategy: - jenkinsfilePath: examples/jenkins-image-sample.groovy -`) - -func examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes() ([]byte, error) { - return _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml, nil -} - -func examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml() (*asset, error) { - bytes, err := examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _examplesJenkinsPipelineSamplepipelineYaml = []byte(`apiVersion: v1 -kind: Template -labels: - template: application-template-sample-pipeline -message: |- - A Jenkins server must be instantiated in this project to manage - the Pipeline BuildConfig created by this template. You will be able to log in to - it using your OpenShift user credentials. -metadata: - annotations: - openshift.io/display-name: Pipeline Build Example - description: |- - This example showcases the new Jenkins Pipeline integration in OpenShift, - which performs continuous integration and deployment right on the platform. - The template contains a Jenkinsfile - a definition of a multi-stage CI/CD process - that - leverages the underlying OpenShift platform for dynamic and scalable - builds. OpenShift integrates the status of your pipeline builds into the web - console allowing you to see your entire application lifecycle in a single view. - iconClass: icon-jenkins - tags: instant-app,jenkins - name: jenkins-pipeline-example -parameters: -- description: The name assigned to all of the frontend objects defined in this template. - displayName: Name - name: NAME - required: true - value: nodejs-mongodb-example -- description: The exposed hostname that will route to the Node.js service, if left - blank a value will be defaulted. - displayName: Application Hostname - name: APPLICATION_DOMAIN -- description: The URL of the repository with your application source code. - displayName: Git Repository URL - name: SOURCE_REPOSITORY_URL - required: true - value: https://github.com/openshift/nodejs-ex.git -- displayName: Database Name - name: DATABASE_NAME - required: true - value: sampledb -- description: Username for MongoDB user that will be used for accessing the database. - displayName: MongoDB Username - from: user[A-Z0-9]{3} - generate: expression - name: DATABASE_USER -- description: Password for the MongoDB user. - displayName: MongoDB Password - from: '[a-zA-Z0-9]{16}' - generate: expression - name: DATABASE_PASSWORD -- description: Maximum amount of memory the Node.js container can use. - displayName: Memory Limit - name: MEMORY_LIMIT - required: true - value: 512Mi -- description: Maximum amount of memory the MongoDB container can use. - displayName: Memory Limit (MongoDB) - name: MEMORY_MONGODB_LIMIT - required: true - value: 512Mi -- displayName: Database Service Name - name: DATABASE_SERVICE_NAME - required: true - value: mongodb -- description: Password for the database admin user. - displayName: Database Administrator Password - from: '[a-zA-Z0-9]{16}' - generate: expression - name: DATABASE_ADMIN_PASSWORD -- description: Set this to a branch name, tag or other ref of your repository if you - are not using the default branch. - displayName: Git Reference - name: SOURCE_REPOSITORY_REF -- description: Set this to the relative path to your project if it is not in the root - of your repository. - displayName: Context Directory - name: CONTEXT_DIR -- description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted. - displayName: GitHub Webhook Secret - from: '[a-zA-Z0-9]{40}' - generate: expression - name: GITHUB_WEBHOOK_SECRET -- description: A secret string used to configure the Generic webhook. - displayName: Generic Webhook Secret - from: '[a-zA-Z0-9]{40}' - generate: expression - name: GENERIC_WEBHOOK_SECRET -- description: The custom NPM mirror URL - displayName: Custom NPM Mirror URL - name: NPM_MIRROR -- description: The OpenShift Namespace where the NodeJS and MongoDB ImageStreams reside. - displayName: Namespace - name: NAMESPACE - required: true - value: openshift -objects: -- apiVersion: v1 - kind: BuildConfig - metadata: - annotations: - pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]' - labels: - name: sample-pipeline - name: sample-pipeline - spec: - strategy: - jenkinsPipelineStrategy: - jenkinsfile: |- - try { - timeout(time: 20, unit: 'MINUTES') { - node('nodejs') { - stage('build') { - openshift.withCluster() { - openshift.withProject() { - def bld = openshift.startBuild('${NAME}') - bld.untilEach { - return it.object().status.phase == "Running" - } - bld.logs('-f') - } - } - } - stage('deploy') { - openshift.withCluster() { - openshift.withProject() { - def dc = openshift.selector('dc', '${NAME}') - dc.rollout().latest() - } - } - } - } - } - } catch (err) { - echo "in catch block" - echo "Caught: ${err}" - currentBuild.result = 'FAILURE' - throw err - } - type: JenkinsPipeline - triggers: - - github: - secret: secret101 - type: GitHub - - generic: - secret: secret101 - type: Generic -- apiVersion: v1 - kind: Service - metadata: - annotations: - service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "namespace": "", "kind": "Service"}]' - name: ${NAME} - spec: - ports: - - name: web - port: 8080 - targetPort: 8080 - selector: - name: ${NAME} -- apiVersion: v1 - kind: Route - metadata: - name: ${NAME} - spec: - host: ${APPLICATION_DOMAIN} - to: - kind: Service - name: ${NAME} -- apiVersion: v1 - kind: ImageStream - metadata: - annotations: - description: Keeps track of changes in the application image - name: ${NAME} -- apiVersion: v1 - kind: BuildConfig - metadata: - annotations: - description: Defines how to build the application - name: ${NAME} - spec: - output: - to: - kind: ImageStreamTag - name: ${NAME}:latest - postCommit: - script: npm test - source: - contextDir: ${CONTEXT_DIR} - git: - ref: ${SOURCE_REPOSITORY_REF} - uri: ${SOURCE_REPOSITORY_URL} - type: Git - strategy: - sourceStrategy: - env: - - name: NPM_MIRROR - value: ${NPM_MIRROR} - from: - kind: ImageStreamTag - name: nodejs:12 - namespace: ${NAMESPACE} - type: Source - triggers: - - github: - secret: ${GITHUB_WEBHOOK_SECRET} - type: GitHub - - generic: - secret: ${GENERIC_WEBHOOK_SECRET} - type: Generic -- apiVersion: v1 - kind: DeploymentConfig - metadata: - annotations: - description: Defines how to deploy the application server - name: ${NAME} - spec: - replicas: 1 - selector: - name: ${NAME} - strategy: - type: Rolling - template: - metadata: - labels: - name: ${NAME} - name: ${NAME} - spec: - containers: - - env: - - name: DATABASE_SERVICE_NAME - value: ${DATABASE_SERVICE_NAME} - - name: MONGODB_USER - value: ${DATABASE_USER} - - name: MONGODB_PASSWORD - value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE - value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} - image: ' ' - livenessProbe: - httpGet: - path: /pagecount - port: 8080 - initialDelaySeconds: 30 - timeoutSeconds: 3 - name: nodejs-mongodb-example - ports: - - containerPort: 8080 - readinessProbe: - httpGet: - path: /pagecount - port: 8080 - initialDelaySeconds: 3 - timeoutSeconds: 3 - resources: - limits: - memory: ${MEMORY_LIMIT} - triggers: - - imageChangeParams: - automatic: false - containerNames: - - nodejs-mongodb-example - from: - kind: ImageStreamTag - name: ${NAME}:latest - type: ImageChange - - type: ConfigChange -- apiVersion: v1 - kind: Service - metadata: - annotations: - description: Exposes the database server - name: ${DATABASE_SERVICE_NAME} - spec: - ports: - - name: mongodb - port: 27017 - targetPort: 27017 - selector: - name: ${DATABASE_SERVICE_NAME} -- apiVersion: v1 - kind: DeploymentConfig - metadata: - annotations: - description: Defines how to deploy the database - name: ${DATABASE_SERVICE_NAME} - spec: - replicas: 1 - selector: - name: ${DATABASE_SERVICE_NAME} - strategy: - type: Recreate - template: - metadata: - labels: - name: ${DATABASE_SERVICE_NAME} - name: ${DATABASE_SERVICE_NAME} - spec: - containers: - - env: - - name: MONGODB_USER - value: ${DATABASE_USER} - - name: MONGODB_PASSWORD - value: ${DATABASE_PASSWORD} - - name: MONGODB_DATABASE - value: ${DATABASE_NAME} - - name: MONGODB_ADMIN_PASSWORD - value: ${DATABASE_ADMIN_PASSWORD} - image: ' ' - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: 27017 - timeoutSeconds: 1 - name: mongodb - ports: - - containerPort: 27017 - readinessProbe: - exec: - command: - - /bin/sh - - -i - - -c - - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD - --eval="quit()" - initialDelaySeconds: 3 - timeoutSeconds: 1 - resources: - limits: - memory: ${MEMORY_MONGODB_LIMIT} - volumeMounts: - - mountPath: /var/lib/mongodb/data - name: ${DATABASE_SERVICE_NAME}-data - volumes: - - emptyDir: - medium: "" - name: ${DATABASE_SERVICE_NAME}-data - triggers: - - imageChangeParams: - automatic: true - containerNames: - - mongodb - from: - kind: ImageStreamTag - name: mongodb:3.2 - namespace: ${NAMESPACE} - type: ImageChange - - type: ConfigChange -`) - -func examplesJenkinsPipelineSamplepipelineYamlBytes() ([]byte, error) { - return _examplesJenkinsPipelineSamplepipelineYaml, nil -} - -func examplesJenkinsPipelineSamplepipelineYaml() (*asset, error) { - bytes, err := examplesJenkinsPipelineSamplepipelineYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "examples/jenkins/pipeline/samplepipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "examples/jenkins/pipeline/maven-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "cakephp-mysql-example", - "template": "cakephp-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-php", - "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", - "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,php,cakephp", - "template.openshift.io/bindable": "false" - }, - "name": "cakephp-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", - "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } +var _examplesJenkinsPipelineNodejsSamplePipelineYaml = []byte(`kind: "BuildConfig" +apiVersion: "v1" +metadata: + name: "nodejs-sample-pipeline" +spec: + strategy: + jenkinsPipelineStrategy: + jenkinsfile: |- + // path of the template to use + def templatePath = 'nodejs-postgresql-example' + // name of the template that will be created + def templateName = 'nodejs-postgresql-example' + // NOTE, the "pipeline" directive/closure from the declarative pipeline syntax needs to include, or be nested outside, + // and "openshift" directive/closure from the OpenShift Client Plugin for Jenkins. Otherwise, the declarative pipeline engine + // will not be fully engaged. + pipeline { + agent { + node { + // spin up a node.js slave pod to run this build on + label 'nodejs' + } } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" + options { + // set a timeout of 20 minutes for this pipeline + timeout(time: 20, unit: 'MINUTES') } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./vendor/bin/phpunit" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "COMPOSER_MIRROR", - "value": "${COMPOSER_MIRROR}" + + stages { + stage('preamble') { + steps { + script { + openshift.withCluster() { + openshift.withProject() { + echo "Using project: ${openshift.project()}" + } } - ], - "from": { - "kind": "ImageStreamTag", - "name": "php:${PHP_VERSION}", - "namespace": "${NAMESPACE}" } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-example" - }, - "failurePolicy": "Retry" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-secret-token", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-security-salt", - "name": "${NAME}" - } - } - }, - { - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "${OPCACHE_REVALIDATE_FREQ}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 30, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "name": "cakephp-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 3, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" + } + stage('cleanup') { + steps { + script { + openshift.withCluster() { + openshift.withProject() { + // delete everything with this template label + openshift.selector("all", [ template : templateName ]).delete() + // delete any secrets with this template label + if (openshift.selector("secrets", templateName).exists()) { + openshift.selector("secrets", templateName).delete() } } } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" + } // script + } // steps + } // stage + stage('create') { + steps { + script { + openshift.withCluster() { + openshift.withProject() { + // create a new application from the templatePath + openshift.newApp(templatePath) + } } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" + } // script + } // steps + } // stage + stage('build') { + steps { + script { + openshift.withCluster() { + openshift.withProject() { + def builds = openshift.selector("bc", templateName).related('builds') + builds.untilEach(1) { + return (it.object().status.phase == "Complete") } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" + } + } + } // script + } // steps + } // stage + stage('deploy') { + steps { + script { + openshift.withCluster() { + openshift.withProject() { + def rm = openshift.selector("dc", templateName).rollout() + openshift.selector("dc", templateName).related('pods').untilEach(1) { + return (it.object().status.phase == "Running") } - ] + } } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" + } // script + } // steps + } // stage + stage('tag') { + steps { + script { + openshift.withCluster() { + openshift.withProject() { + // if everything else succeeded, tag the ${templateName}:latest image as ${templateName}-staging:latest + // a pipeline build config for the staging environment can watch for the ${templateName}-staging:latest + // image to change and then deploy it to the staging environment + openshift.tag("${templateName}:latest", "${templateName}-staging:latest") + } + } + } // script + } // steps + } // stage + } // stages + } // pipeline + type: JenkinsPipeline +`) + +func examplesJenkinsPipelineNodejsSamplePipelineYamlBytes() ([]byte, error) { + return _examplesJenkinsPipelineNodejsSamplePipelineYaml, nil +} + +func examplesJenkinsPipelineNodejsSamplePipelineYaml() (*asset, error) { + bytes, err := examplesJenkinsPipelineNodejsSamplePipelineYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "examples/jenkins/pipeline/nodejs-sample-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml = []byte(`apiVersion: v1 +kind: BuildConfig +metadata: + labels: + name: sample-pipeline-openshift-client-plugin + name: sample-pipeline-openshift-client-plugin +spec: + source: + type: Git + git: + uri: https://github.com/openshift/jenkins-client-plugin.git + strategy: + type: JenkinsPipeline + jenkinsPipelineStrategy: + jenkinsfilePath: examples/jenkins-image-sample.groovy +`) + +func examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes() ([]byte, error) { + return _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml, nil +} + +func examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml() (*asset, error) { + bytes, err := examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _examplesJenkinsPipelineSamplepipelineYaml = []byte(`apiVersion: v1 +kind: Template +labels: + template: application-template-sample-pipeline +message: |- + A Jenkins server must be instantiated in this project to manage + the Pipeline BuildConfig created by this template. You will be able to log in to + it using your OpenShift user credentials. +metadata: + annotations: + openshift.io/display-name: Pipeline Build Example + description: |- + This example showcases the new Jenkins Pipeline integration in OpenShift, + which performs continuous integration and deployment right on the platform. + The template contains a Jenkinsfile - a definition of a multi-stage CI/CD process - that + leverages the underlying OpenShift platform for dynamic and scalable + builds. OpenShift integrates the status of your pipeline builds into the web + console allowing you to see your entire application lifecycle in a single view. + iconClass: icon-jenkins + tags: instant-app,jenkins + name: jenkins-pipeline-example +parameters: +- description: The name assigned to all of the frontend objects defined in this template. + displayName: Name + name: NAME + required: true + value: nodejs-mariadb-example +- description: The exposed hostname that will route to the Node.js service, if left + blank a value will be defaulted. + displayName: Application Hostname + name: APPLICATION_DOMAIN +- description: The URL of the repository with your application source code. + displayName: Git Repository URL + name: SOURCE_REPOSITORY_URL + required: true + value: https://github.com/openshift/nodejs-ex.git +- displayName: Database Name + name: DATABASE_NAME + required: true + value: sampledb +- description: Username for MariaDB user that will be used for accessing the database. + displayName: MariaDB Username + from: user[A-Z0-9]{3} + generate: expression + name: DATABASE_USER +- description: Password for the MariaDB user. + displayName: MariaDB Password + from: '[a-zA-Z0-9]{16}' + generate: expression + name: DATABASE_PASSWORD +- description: Maximum amount of memory the Node.js container can use. + displayName: Memory Limit + name: MEMORY_LIMIT + required: true + value: 512Mi +- description: Maximum amount of memory the MariaDB container can use. + displayName: Memory Limit (MariaDB) + name: MEMORY_MARIADB_LIMIT + required: true + value: 512Mi +- displayName: Database Service Name + name: DATABASE_SERVICE_NAME + required: true + value: mariadb +- description: Password for the database admin user. + displayName: Database Administrator Password + from: '[a-zA-Z0-9]{16}' + generate: expression + name: DATABASE_ROOT_PASSWORD +- description: Set this to a branch name, tag or other ref of your repository if you + are not using the default branch. + displayName: Git Reference + name: SOURCE_REPOSITORY_REF +- description: Set this to the relative path to your project if it is not in the root + of your repository. + displayName: Context Directory + name: CONTEXT_DIR +- description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted. + displayName: GitHub Webhook Secret + from: '[a-zA-Z0-9]{40}' + generate: expression + name: GITHUB_WEBHOOK_SECRET +- description: A secret string used to configure the Generic webhook. + displayName: Generic Webhook Secret + from: '[a-zA-Z0-9]{40}' + generate: expression + name: GENERIC_WEBHOOK_SECRET +- description: The custom NPM mirror URL + displayName: Custom NPM Mirror URL + name: NPM_MIRROR +- description: The OpenShift Namespace where the NodeJS and MariaDB ImageStreams reside. + displayName: Namespace + name: NAMESPACE + required: true + value: openshift +objects: +- apiVersion: v1 + kind: BuildConfig + metadata: + annotations: + pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]' + labels: + name: sample-pipeline + name: sample-pipeline + spec: + strategy: + jenkinsPipelineStrategy: + jenkinsfile: |- + try { + timeout(time: 20, unit: 'MINUTES') { + node('nodejs') { + stage('build') { + openshift.withCluster() { + openshift.withProject() { + def bld = openshift.startBuild('${NAME}') + bld.untilEach { + return it.object().status.phase == "Running" } - ] + bld.logs('-f') + } + } } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" + stage('deploy') { + openshift.withCluster() { + openshift.withProject() { + def dc = openshift.selector('dc', '${NAME}') + dc.rollout().latest() + } + } } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "cakephp-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of PHP image to be used (7.1 or latest).", - "displayName": "PHP Version", - "name": "PHP_VERSION", - "required": true, - "value": "7.1" - }, - { - "description": "Maximum amount of memory the CakePHP container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/cakephp-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "mysql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database User", - "name": "DATABASE_USER", - "required": true, - "value": "cakephp" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Set this to a long random string.", - "displayName": "CakePHP secret token", - "from": "[\\w]{50}", - "generate": "expression", - "name": "CAKEPHP_SECRET_TOKEN" - }, - { - "description": "Security salt for session hash.", - "displayName": "CakePHP Security Salt", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "CAKEPHP_SECURITY_SALT" - }, - { - "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", - "displayName": "OPcache Revalidation Frequency", - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "2" - }, - { - "description": "The custom Composer mirror URL", - "displayName": "Custom Composer Mirror URL", - "name": "COMPOSER_MIRROR", - "value": "" - } - ] + } + } + } catch (err) { + echo "in catch block" + echo "Caught: ${err}" + currentBuild.result = 'FAILURE' + throw err + } + type: JenkinsPipeline + triggers: + - github: + secret: secret101 + type: GitHub + - generic: + secret: secret101 + type: Generic +- apiVersion: v1 + kind: Service + metadata: + annotations: + service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "namespace": "", "kind": "Service"}]' + name: ${NAME} + spec: + ports: + - name: web + port: 8080 + targetPort: 8080 + selector: + name: ${NAME} +- apiVersion: v1 + kind: Route + metadata: + name: ${NAME} + spec: + host: ${APPLICATION_DOMAIN} + to: + kind: Service + name: ${NAME} +- apiVersion: v1 + kind: ImageStream + metadata: + annotations: + description: Keeps track of changes in the application image + name: ${NAME} +- apiVersion: v1 + kind: BuildConfig + metadata: + annotations: + description: Defines how to build the application + name: ${NAME} + spec: + output: + to: + kind: ImageStreamTag + name: ${NAME}:latest + postCommit: + script: npm test + source: + contextDir: ${CONTEXT_DIR} + git: + ref: ${SOURCE_REPOSITORY_REF} + uri: ${SOURCE_REPOSITORY_URL} + type: Git + strategy: + sourceStrategy: + env: + - name: NPM_MIRROR + value: ${NPM_MIRROR} + from: + kind: ImageStreamTag + name: nodejs:12-ubi8 + namespace: ${NAMESPACE} + type: Source + triggers: + - github: + secret: ${GITHUB_WEBHOOK_SECRET} + type: GitHub + - generic: + secret: ${GENERIC_WEBHOOK_SECRET} + type: Generic +- apiVersion: v1 + kind: DeploymentConfig + metadata: + annotations: + description: Defines how to deploy the application server + name: ${NAME} + spec: + replicas: 1 + selector: + name: ${NAME} + strategy: + type: Rolling + template: + metadata: + labels: + name: ${NAME} + name: ${NAME} + spec: + containers: + - env: + - name: DATABASE_SERVICE_NAME + value: ${DATABASE_SERVICE_NAME} + - name: MYSQL_USER + value: ${DATABASE_USER} + - name: MYSQL_PASSWORD + value: ${DATABASE_PASSWORD} + - name: MYSQL_DATABASE + value: ${DATABASE_NAME} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} + image: ' ' + livenessProbe: + httpGet: + path: /pagecount + port: 8080 + initialDelaySeconds: 30 + timeoutSeconds: 3 + name: nodejs-mariadb-example + ports: + - containerPort: 8080 + readinessProbe: + httpGet: + path: /pagecount + port: 8080 + initialDelaySeconds: 3 + timeoutSeconds: 3 + resources: + limits: + memory: ${MEMORY_LIMIT} + triggers: + - imageChangeParams: + automatic: false + containerNames: + - nodejs-mariadb-example + from: + kind: ImageStreamTag + name: ${NAME}:latest + type: ImageChange + - type: ConfigChange +- apiVersion: v1 + kind: Service + metadata: + annotations: + description: Exposes the database server + name: ${DATABASE_SERVICE_NAME} + spec: + ports: + - name: mariadb + port: 3306 + targetPort: 3306 + selector: + name: ${DATABASE_SERVICE_NAME} +- apiVersion: v1 + kind: DeploymentConfig + metadata: + annotations: + description: Defines how to deploy the database + name: ${DATABASE_SERVICE_NAME} + spec: + replicas: 1 + selector: + name: ${DATABASE_SERVICE_NAME} + strategy: + type: Recreate + template: + metadata: + labels: + name: ${DATABASE_SERVICE_NAME} + name: ${DATABASE_SERVICE_NAME} + spec: + containers: + - env: + - name: MYSQL_USER + value: ${DATABASE_USER} + - name: MYSQLB_PASSWORD + value: ${DATABASE_PASSWORD} + - name: MYSQL_DATABASE + value: ${DATABASE_NAME} + - name: MYSQL_ROOT_PASSWORD + value: ${DATABASE_ROOT_PASSWORD} + image: ' ' + livenessProbe: + initialDelaySeconds: 30 + tcpSocket: + port: 27017 + timeoutSeconds: 1 + name: mariadb + ports: + - containerPort: 27017 + readinessProbe: + exec: + command: + - /bin/sh + - -i + - -c + - MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping + initialDelaySeconds: 3 + timeoutSeconds: 1 + resources: + limits: + memory: ${MEMORY_MARIADB_LIMIT} + volumeMounts: + - mountPath: /var/lib/mysql/data + name: ${DATABASE_SERVICE_NAME}-data + volumes: + - emptyDir: + medium: "" + name: ${DATABASE_SERVICE_NAME}-data + triggers: + - imageChangeParams: + automatic: true + containerNames: + - mariadb + from: + kind: ImageStreamTag + name: mariadb:10.3-el8 + namespace: ${NAMESPACE} + type: ImageChange + - type: ConfigChange +`) + +func examplesJenkinsPipelineSamplepipelineYamlBytes() ([]byte, error) { + return _examplesJenkinsPipelineSamplepipelineYaml, nil +} + +func examplesJenkinsPipelineSamplepipelineYaml() (*asset, error) { + bytes, err := examplesJenkinsPipelineSamplepipelineYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "examples/jenkins/pipeline/samplepipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "cakephp-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-php", + "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", + "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,php,cakephp", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", + "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./vendor/bin/phpunit" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "COMPOSER_MIRROR", + "value": "${COMPOSER_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "php:${PHP_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "cakephp-mysql-example" + }, + "failurePolicy": "Retry" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-secret-token", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-security-salt", + "name": "${NAME}" + } + } + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "value": "${OPCACHE_REVALIDATE_FREQ}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 30, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "name": "cakephp-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 3, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cakephp-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "cakephp-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PHP_VERSION", + "displayName": "PHP Version", + "description": "Version of PHP image to be used (7.3-ubi7, 7.3-ubi8, or latest).", + "value": "7.3-ubi8", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "MySQL Version", + "description": "Version of MySQL image to be used (8.0-el8 or latest).", + "value": "8.0-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/cakephp-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database User", + "value": "cakephp", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "value": "2" + }, + { + "name": "COMPOSER_MIRROR", + "displayName": "Custom Composer Mirror URL", + "description": "The custom Composer mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "cakephp-mysql-example", + "template": "cakephp-mysql-example" + } }`) func examplesQuickstartsCakephpMysqlJsonCakephpMysqlJsonBytes() ([]byte, error) { @@ -16961,7 +16781,7 @@ var _testExtendedTestdataBuildsApplicationTemplateCustombuildJson = []byte(`{ "containers": [ { "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, @@ -17997,7 +17817,7 @@ var _testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson = []byte(`{ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" }, "env": [ { @@ -18094,7 +17914,7 @@ func testExtendedTestdataBuildsBuildSecretsTestSecretJson() (*asset, error) { return a, nil } -var _testExtendedTestdataBuildsBuildTimingDockerfile = []byte(`FROM centos/ruby-27-centos7 +var _testExtendedTestdataBuildsBuildTimingDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 USER root `) @@ -18616,7 +18436,7 @@ var _testExtendedTestdataBuildsIncrementalAuthBuildJson = []byte(`{ ], "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" }, "incremental": true } @@ -18696,7 +18516,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: registry.redhat.io/rhscl/nodejs-10-rhel7:latest + name: registry.redhat.io/ubi8/nodejs-14:latest pullSecret: name: local-ps `) @@ -18806,7 +18626,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 `) func testExtendedTestdataBuildsStatusfailBadcontextdirs2iYamlBytes() ([]byte, error) { @@ -18898,15 +18718,15 @@ spec: paths: - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - - destinationDir: injected/opt/rh/rh-ruby-27/root/usr/bin - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + - destinationDir: injected/usr/bin + sourcePath: /usr/bin/ruby strategy: type: Docker dockerStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 `) func testExtendedTestdataBuildsStatusfailFetchimagecontentdockerYamlBytes() ([]byte, error) { @@ -18937,7 +18757,7 @@ spec: dockerStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 `) func testExtendedTestdataBuildsStatusfailFetchsourcedockerYamlBytes() ([]byte, error) { @@ -18968,7 +18788,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 `) func testExtendedTestdataBuildsStatusfailFetchsources2iYamlBytes() ([]byte, error) { @@ -18999,7 +18819,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 scripts: "http://example.org/scripts" env: - name: http_proxy @@ -19037,7 +18857,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 forcePull: true `) @@ -19254,14 +19074,14 @@ func testExtendedTestdataBuildsTestBcWithPrRefYaml() (*asset, error) { return a, nil } -var _testExtendedTestdataBuildsTestBuildAppDockerfile = []byte(`FROM centos/ruby-27-centos7 +var _testExtendedTestdataBuildsTestBuildAppDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 USER default EXPOSE 8080 ENV RACK_ENV production ENV RAILS_ENV production COPY . /opt/app-root/src/ -RUN scl enable rh-ruby27 "bundle install" -CMD ["scl", "enable", "rh-ruby27", "./run.sh"] +RUN bundle install +CMD ["./run.sh"] USER default `) @@ -19532,7 +19352,7 @@ items: dockerStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 env: - name: SOME_HTTP_PROXY value: https://envuser:password@proxy3.com @@ -19674,7 +19494,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -19703,7 +19523,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -19731,7 +19551,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -19760,7 +19580,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -19788,7 +19608,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} nodeSelector: nodelabelkey: nodelabelvalue @@ -19806,7 +19626,7 @@ items: source: type: Dockerfile dockerfile: |- - FROM centos/ruby-27-centos7 + FROM registry.access.redhat.com/ubi8/ruby-27 ARG foofoo RUN echo $foofoo strategy: @@ -19832,7 +19652,7 @@ items: source: type: Dockerfile dockerfile: |- - FROM centos/ruby-27-centos7 + FROM registry.access.redhat.com/ubi8/ruby-27 ARG foofoo RUN echo $foofoo strategy: @@ -20130,7 +19950,7 @@ var _testExtendedTestdataBuildsTestContextBuildJson = []byte(`{ ], "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } }, @@ -20526,7 +20346,7 @@ var _testExtendedTestdataBuildsTestEnvBuildJson = []byte(`{ "sourceStrategy":{ "from":{ "kind":"DockerImage", - "name":"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name":"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } }, @@ -20717,7 +20537,7 @@ items: name: inputimage:latest paths: - destinationDir: injected/dir - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + sourcePath: /usr/bin/ruby strategy: customStrategy: from: @@ -20764,7 +20584,7 @@ items: name: inputimage:latest paths: - destinationDir: injected/dir - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + sourcePath: /usr/bin/ruby strategy: dockerStrategy: from: @@ -20811,7 +20631,7 @@ items: name: inputimage:latest paths: - destinationDir: injected/dir - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + sourcePath: /usr/bin/ruby strategy: sourceStrategy: from: @@ -20859,7 +20679,7 @@ items: dockerStrategy: from: kind: ImageStreamTag - name: ruby:2.7 + name: ruby:2.7-ubi8 namespace: openshift - apiVersion: v1 kind: BuildConfig @@ -20883,8 +20703,8 @@ items: # Bug 1698152: ensure image source copy behavior is correct - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - - destinationDir: injected/opt/rh/rh-ruby-27/root/usr/bin - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + - destinationDir: injected/usr/bin + sourcePath: /usr/bin/ruby strategy: sourceStrategy: from: @@ -20913,8 +20733,8 @@ items: # Bug 1698152: ensure image source copy behavior is correct - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - - destinationDir: injected/opt/rh/rh-ruby-27/root/usr/bin - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + - destinationDir: injected/usr/bin + sourcePath: /usr/bin/ruby strategy: dockerStrategy: {} @@ -21560,398 +21380,108 @@ spec: value: $(SOME_OTHER_ENV) - name: ESCAPED_ENV value: $$(MY_ESCAPED_VALUE) - output: - to: - kind: ImageStreamTag - name: 'test:latest' - imageLabels: - - name: user-specified-label - value: arbitrary-value - resources: {} - postCommit: {} - nodeSelector: null -status: - lastVersion: 0 -`) - -func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes() ([]byte, error) { - return _testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml, nil -} - -func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml() (*asset, error) { - bytes, err := testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsValuefromTestConfigmapYaml = []byte(`apiVersion: v1 -kind: ConfigMap -metadata: - name: myconfigmap -data: - mykey: myvalue -`) - -func testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes() ([]byte, error) { - return _testExtendedTestdataBuildsValuefromTestConfigmapYaml, nil -} - -func testExtendedTestdataBuildsValuefromTestConfigmapYaml() (*asset, error) { - bytes, err := testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-configmap.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsValuefromTestIsJson = []byte(`{ - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "test" - } -} -`) - -func testExtendedTestdataBuildsValuefromTestIsJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsValuefromTestIsJson, nil -} - -func testExtendedTestdataBuildsValuefromTestIsJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsValuefromTestIsJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsValuefromTestSecretYaml = []byte(`apiVersion: v1 -kind: Secret -metadata: - name: mysecret -data: - password: cGFzc3dvcmQ= - username: ZGV2ZWxvcGVy -type: kubernetes.io/basic-auth -`) - -func testExtendedTestdataBuildsValuefromTestSecretYamlBytes() ([]byte, error) { - return _testExtendedTestdataBuildsValuefromTestSecretYaml, nil -} - -func testExtendedTestdataBuildsValuefromTestSecretYaml() (*asset, error) { - bytes, err := testExtendedTestdataBuildsValuefromTestSecretYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson = []byte(`{ - "actor": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "repository": { - "type": "repository", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket" - }, - "html": { - "href": "https://api.bitbucket.org/bitbucket/bitbucket" - }, - "avatar": { - "href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png" - } - }, - "uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}", - "project": { - "type": "project", - "project": "Untitled project", - "uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}", - "links": { - "html": { - "href": "https://bitbucket.org/account/user/teamawesome/projects/proj" - }, - "avatar": { - "href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32" - } - }, - "key": "proj" - }, - "full_name": "team_name/repo_name", - "name": "repo_name", - "website": "https://mywebsite.com/", - "owner": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "scm": "git", - "is_private": true - }, - "push": { - "changes": [ - { - "new": { - "type": "branch", - "name": "this-is-not-master", - "target": { - "type": "commit", - "hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d", - "author": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "message": "new commit message\n", - "date": "2015-06-09T03:34:49+00:00", - "parents": [ - { - "type": "commit", - "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/8cbbd65829c7ad834a97841e0defc965718036a0" - }, - "html": { - "href": "https://bitbucket.org/user_name/repo_name/commits/8cbbd65829c7ad834a97841e0defc965718036a0" - } - } - } - ], - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/c4b2b7914156a878aa7c9da452a09fb50c2091f2" - }, - "html": { - "href": "https://bitbucket.org/user_name/repo_name/commits/c4b2b7914156a878aa7c9da452a09fb50c2091f2" - } - } - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" - }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" - }, - "html": { - "href": "https://bitbucket.org/user_name/repo_name/branch/master" - } - } - }, - "old": { - "type": "branch", - "name": "this-is-not-master", - "target": { - "type": "commit", - "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", - "author": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "message": "old commit message\n", - "date": "2015-06-08T21:34:56+00:00", - "parents": [ - { - "type": "commit", - "hash": "e0d0c2041e09746be5ce4b55067d5a8e3098c843", - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" - }, - "html": { - "href": "https://bitbucket.org/user_name/repo_name/commits/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" - } - } - } - ], - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/b99ea6dad8f416e57c5ca78c1ccef590600d841b" - }, - "html": { - "href": "https://bitbucket.org/user_name/repo_name/commits/b99ea6dad8f416e57c5ca78c1ccef590600d841b" - } - } - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" - }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" - }, - "html": { - "href": "https://bitbucket.org/user_name/repo_name/branch/master" - } - } - }, - "links": { - "html": { - "href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" - }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b" - } - }, - "created": false, - "forced": false, - "closed": false, - "commits": [ - { - "hash": "03f4a7270240708834de475bcf21532d6134777e", - "type": "commit", - "message": "First commit", - "author": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" - }, - "html": { - "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" - } - } - }, - { - "hash": "ffffffffffffffffffffffffffffffffffffffff", - "type": "commit", - "message": "Second commit", - "author": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" - }, - "html": { - "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" - } - } - } - ], - "truncated": false - } - ] + output: + to: + kind: ImageStreamTag + name: 'test:latest' + imageLabels: + - name: user-specified-label + value: arbitrary-value + resources: {} + postCommit: {} + nodeSelector: null +status: + lastVersion: 0 +`) + +func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes() ([]byte, error) { + return _testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml, nil +} + +func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml() (*asset, error) { + bytes, err := testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes() + if err != nil { + return nil, err } + + info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil } + +var _testExtendedTestdataBuildsValuefromTestConfigmapYaml = []byte(`apiVersion: v1 +kind: ConfigMap +metadata: + name: myconfigmap +data: + mykey: myvalue `) -func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson, nil +func testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes() ([]byte, error) { + return _testExtendedTestdataBuildsValuefromTestConfigmapYaml, nil } -func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes() +func testExtendedTestdataBuildsValuefromTestConfigmapYaml() (*asset, error) { + bytes, err := testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-configmap.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson = []byte(`{ +var _testExtendedTestdataBuildsValuefromTestIsJson = []byte(`{ + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "test" + } +} +`) + +func testExtendedTestdataBuildsValuefromTestIsJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsValuefromTestIsJson, nil +} + +func testExtendedTestdataBuildsValuefromTestIsJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsValuefromTestIsJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataBuildsValuefromTestSecretYaml = []byte(`apiVersion: v1 +kind: Secret +metadata: + name: mysecret +data: + password: cGFzc3dvcmQ= + username: ZGV2ZWxvcGVy +type: kubernetes.io/basic-auth +`) + +func testExtendedTestdataBuildsValuefromTestSecretYamlBytes() ([]byte, error) { + return _testExtendedTestdataBuildsValuefromTestSecretYaml, nil +} + +func testExtendedTestdataBuildsValuefromTestSecretYaml() (*asset, error) { + bytes, err := testExtendedTestdataBuildsValuefromTestSecretYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson = []byte(`{ "actor": { "type": "user", "username": "emmap1", @@ -22025,7 +21555,7 @@ var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson = []byte(`{ { "new": { "type": "branch", - "name": "master", + "name": "this-is-not-master", "target": { "type": "commit", "hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d", @@ -22085,7 +21615,7 @@ var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson = []byte(`{ }, "old": { "type": "branch", - "name": "master", + "name": "this-is-not-master", "target": { "type": "commit", "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", @@ -22135,3891 +21665,4164 @@ var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson = []byte(`{ "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" - }, - "html": { - "href": "https://bitbucket.org/user_name/repo_name/branch/master" - } - } - }, - "links": { - "html": { - "href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" - }, - "diff": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" - }, - "commits": { - "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b" - } - }, - "created": false, - "forced": false, - "closed": false, - "commits": [ - { - "hash": "03f4a7270240708834de475bcf21532d6134777e", - "type": "commit", - "message": "First commit", - "author": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" - }, - "html": { - "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" - } - } - }, - { - "hash": "ffffffffffffffffffffffffffffffffffffffff", - "type": "commit", - "message": "Second commit", - "author": { - "type": "user", - "username": "emmap1", - "display_name": "Emma", - "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", - "links": { - "self": { - "href": "https://api.bitbucket.org/api/2.0/users/emmap1" - }, - "html": { - "href": "https://api.bitbucket.org/emmap1" - }, - "avatar": { - "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" - } - } - }, - "links": { - "self": { - "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" - }, - "html": { - "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" - } - } - } - ], - "truncated": false - } - ] - } -} -`) - -func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson, nil -} - -func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson = []byte(`{ - "eventKey":"repo:refs_changed", - "date":"2017-09-19T09:45:32+1000", - "actor":{ - "name":"admin", - "emailAddress":"admin@example.com", - "id":1, - "displayName":"Administrator", - "active":true, - "slug":"admin", - "type":"NORMAL" - }, - "repository":{ - "slug":"repository", - "id":84, - "name":"repository", - "scmId":"git", - "state":"AVAILABLE", - "statusMessage":"Available", - "forkable":true, - "project":{ - "key":"PROJ", - "id":84, - "name":"project", - "public":false, - "type":"NORMAL" - }, - "public":false - }, - "changes":[ - { - "ref":{ - "id":"refs/heads/other", - "displayId":"other", - "type":"BRANCH" - }, - "refId":"refs/heads/other", - "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932", - "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc", - "type":"UPDATE" - } - ] -}`) - -func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson, nil -} - -func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json = []byte(`{ - "eventKey":"repo:refs_changed", - "date":"2017-09-19T09:45:32+1000", - "actor":{ - "name":"admin", - "emailAddress":"admin@example.com", - "id":1, - "displayName":"Administrator", - "active":true, - "slug":"admin", - "type":"NORMAL" - }, - "repository":{ - "slug":"repository", - "id":84, - "name":"repository", - "scmId":"git", - "state":"AVAILABLE", - "statusMessage":"Available", - "forkable":true, - "project":{ - "key":"PROJ", - "id":84, - "name":"project", - "public":false, - "type":"NORMAL" - }, - "public":false - }, - "changes":[ - { - "ref":{ - "id":"refs/heads/master", - "displayId":"master", - "type":"BRANCH" - }, - "refId":"refs/heads/master", - "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932", - "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc", - "type":"UPDATE" - } - ] -}`) - -func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json, nil -} - -func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson = []byte(`{ - "type": "Git", - "git": { - "author": {}, - "committer": {}, - "refs": [ - { - "ref": "refs/heads/master", - "commit": "2602ace61490de0513dfbd7c7de949356cf9bd17", - "author": { - "name": "Joe Smith", - "email": "joe.smith@gmail.com" - }, - "committer": { - "name": "Joe Smith", - "email": "joe.smith@gmail.com" - }, - "message": "Merge pull request #31 from mnagy/prepare_for_new_mysql_image\n\nPrepare for new centos/mysql-56-centos7 image" - } - ] - } -}`) - -func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson, nil -} - -func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson = []byte(`{ - "type" : "Git", - "git" : { - "uri" : "https://mygitserver/myrepo.git", - "ref" : "refs/heads/master", - "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051", - "message" : "Random act of kindness", - "author" : { - "name" : "Jon Doe", - "email" : "jondoe@email.com" - }, - "committer" : { - "name" : "Jon Doe", - "email" : "jondoe@email.com" - } - }, - "env": [ - { - "name": "EXAMPLE", - "value": "sample-app" - } - ] -} -`) - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson, nil -} - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml = []byte(`--- - type: "Git" - git: - uri: "https://mygitserver/myrepo.git" - ref: "refs/heads/master" - commit: "9bdc3a26ff933b32f3e558636b58aea86a69f051" - message: "Random act of kindness" - author: - name: "Jon Doe" - email: "jondoe@email.com" - committer: - name: "Jon Doe" - email: "jondoe@email.com" - env: - - - name: "EXAMPLE" - value: "sample-app" -`) - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml, nil -} - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson = []byte(`{ - "type" : "Git", - "git" : { - "uri" : "https://mygitserver/myrepo.git", - "ref" : "refs/heads/master", - "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051", - "message" : "Random act of kindness", - "author" : { - "name" : "Jon Doe", - "email" : "jondoe@email.com" - }, - "committer" : { - "name" : "Jon Doe", - "email" : "jondoe@email.com" - } - } -} -`) - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson, nil -} - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson = []byte(`{ - "object_kind":"push", - "before":"cf1fa898d2a78685ccde72f14b4922b474f73cd1", - "after":"2602ace61490de0513dfbd7c7de949356cf9bd17", - "ref":"refs/heads/master", - "checkout_sha":"2602ace61490de0513dfbd7c7de949356cf9bd17", - "message":null, - "user_id":12345, - "user_name":"Jon Doe", - "user_email":"jondoe@email.com", - "project_id":12345, - "repository":{ - "name":"ruby-hello-world", - "url":"git@gitlab.com:jondoe/repo.git", - "description":"", - "homepage":"https://gitlab.com/jondoe/repo", - "git_http_url":"https://gitlab.com/jondoe/repo", - "git_ssh_url":"git@gitlab.com:jondoe/repo", - "visibility_level":20 - }, - "commits":[ - { - "id":"2602ace61490de0513dfbd7c7de949356cf9bd17", - "message":"Random act of kindness", - "timestamp":"2015-03-17T09:23:58+01:00", - "url":"https://gitlab.com/jondoe/repo/commit/2602ace61490de0513dfbd7c7de949356cf9bd17", - "author":{ - "name":"Jon Doe", - "email":"jondoe@email.com" - } - } - ], - "total_commits_count":3 -} -`) - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson, nil -} - -func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes() - if err != nil { - return nil, err + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" + }, + "html": { + "href": "https://bitbucket.org/user_name/repo_name/branch/master" + } + } + }, + "links": { + "html": { + "href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" + }, + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b" + } + }, + "created": false, + "forced": false, + "closed": false, + "commits": [ + { + "hash": "03f4a7270240708834de475bcf21532d6134777e", + "type": "commit", + "message": "First commit", + "author": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" + }, + "html": { + "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" + } + } + }, + { + "hash": "ffffffffffffffffffffffffffffffffffffffff", + "type": "commit", + "message": "Second commit", + "author": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" + }, + "html": { + "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" + } + } + } + ], + "truncated": false + } + ] } - - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson = []byte(`{ - "zen":"Encourage flow.", - "hook":{ - "url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466", - "test_url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466/test", - "id":2896466, - "name":"web", - "active":true, - "events":[ - "push" - ], - "config":{ - "secret":"", - "url":"http://example.com/gitwebhook", - "content_type":"json", - "insecure_ssl":"0" - }, - "last_response":{ - "code":null, - "status":"unused", - "message":null - }, - "updated_at":"2014-08-28T14:25:47Z", - "created_at":"2014-08-28T14:25:47Z" - }, - "hook_id":2896466 } `) -func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson, nil +func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson, nil } -func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes() +func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pingevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson = []byte(`{ - "ref":"refs/heads/my_other_branch", - "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051", - "before":"0000000000000000000000000000000000000000", - "created":true, - "deleted":false, - "forced":true, - "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93", - "commits":[ - { - "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", - "distinct":true, - "message":"Added license", - "timestamp":"2014-08-28T16:55:36+02:00", - "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", - "author":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "committer":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "added":[ - "LICENSE" - ], - "removed":[ - - ], - "modified":[ - - ] - } - ], - "head_commit":{ - "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", - "distinct":true, - "message":"Added license", - "timestamp":"2014-08-28T16:55:36+02:00", - "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", - "author":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "committer":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "added":[ - "LICENSE" - ], - "removed":[ - - ], - "modified":[ - - ] - }, - "repository":{ - "id":23354788, - "name":"anonRepo", - "full_name":"anonUser/anonRepo", - "owner":{ - "name":"anonUser", - "email":"anonUser@example.com" - }, - "private":false, - "html_url":"https://github.com/anonUser/anonRepo", - "description":"Git webhook implementation in Go.", - "fork":false, - "url":"https://github.com/anonUser/anonRepo", - "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks", - "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}", - "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}", - "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams", - "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks", - "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}", - "events_url":"https://api.github.com/repos/anonUser/anonRepo/events", - "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}", - "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}", - "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags", - "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}", - "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}", - "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}", - "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}", - "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}", - "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages", - "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers", - "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors", - "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers", - "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription", - "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}", - "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}", - "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}", - "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}", - "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}", - "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}", - "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges", - "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}", - "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads", - "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}", - "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}", - "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}", - "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}", - "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}", - "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}", - "created_at":1409063699, - "updated_at":"2014-08-26T14:34:59Z", - "pushed_at":1409238007, - "git_url":"https://github.com/anonUser/anonRepo.git", - "ssh_url":"git@github.com:anonUser/anonRepo.git", - "clone_url":"https://github.com/anonUser/anonRepo.git", - "svn_url":"https://github.com/anonUser/anonRepo", - "homepage":null, - "size":0, - "stargazers_count":0, - "watchers_count":0, - "language":null, - "has_issues":true, - "has_downloads":true, - "has_wiki":true, - "forks_count":0, - "mirror_url":null, - "open_issues_count":0, - "forks":0, - "open_issues":0, - "watchers":0, - "default_branch":"master", - "stargazers":0, - "master_branch":"master" - }, - "pusher":{ - "name":"anonUser", - "email":"anonUser@example.com" - } +var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson = []byte(`{ + "actor": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "repository": { + "type": "repository", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket" + }, + "html": { + "href": "https://api.bitbucket.org/bitbucket/bitbucket" + }, + "avatar": { + "href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png" + } + }, + "uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}", + "project": { + "type": "project", + "project": "Untitled project", + "uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}", + "links": { + "html": { + "href": "https://bitbucket.org/account/user/teamawesome/projects/proj" + }, + "avatar": { + "href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32" + } + }, + "key": "proj" + }, + "full_name": "team_name/repo_name", + "name": "repo_name", + "website": "https://mywebsite.com/", + "owner": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "scm": "git", + "is_private": true + }, + "push": { + "changes": [ + { + "new": { + "type": "branch", + "name": "master", + "target": { + "type": "commit", + "hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d", + "author": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "message": "new commit message\n", + "date": "2015-06-09T03:34:49+00:00", + "parents": [ + { + "type": "commit", + "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/8cbbd65829c7ad834a97841e0defc965718036a0" + }, + "html": { + "href": "https://bitbucket.org/user_name/repo_name/commits/8cbbd65829c7ad834a97841e0defc965718036a0" + } + } + } + ], + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/c4b2b7914156a878aa7c9da452a09fb50c2091f2" + }, + "html": { + "href": "https://bitbucket.org/user_name/repo_name/commits/c4b2b7914156a878aa7c9da452a09fb50c2091f2" + } + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" + }, + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" + }, + "html": { + "href": "https://bitbucket.org/user_name/repo_name/branch/master" + } + } + }, + "old": { + "type": "branch", + "name": "master", + "target": { + "type": "commit", + "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", + "author": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "message": "old commit message\n", + "date": "2015-06-08T21:34:56+00:00", + "parents": [ + { + "type": "commit", + "hash": "e0d0c2041e09746be5ce4b55067d5a8e3098c843", + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" + }, + "html": { + "href": "https://bitbucket.org/user_name/repo_name/commits/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" + } + } + } + ], + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/b99ea6dad8f416e57c5ca78c1ccef590600d841b" + }, + "html": { + "href": "https://bitbucket.org/user_name/repo_name/commits/b99ea6dad8f416e57c5ca78c1ccef590600d841b" + } + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" + }, + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" + }, + "html": { + "href": "https://bitbucket.org/user_name/repo_name/branch/master" + } + } + }, + "links": { + "html": { + "href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" + }, + "diff": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" + }, + "commits": { + "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b" + } + }, + "created": false, + "forced": false, + "closed": false, + "commits": [ + { + "hash": "03f4a7270240708834de475bcf21532d6134777e", + "type": "commit", + "message": "First commit", + "author": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" + }, + "html": { + "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" + } + } + }, + { + "hash": "ffffffffffffffffffffffffffffffffffffffff", + "type": "commit", + "message": "Second commit", + "author": { + "type": "user", + "username": "emmap1", + "display_name": "Emma", + "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", + "links": { + "self": { + "href": "https://api.bitbucket.org/api/2.0/users/emmap1" + }, + "html": { + "href": "https://api.bitbucket.org/emmap1" + }, + "avatar": { + "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" + } + } + }, + "links": { + "self": { + "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" + }, + "html": { + "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" + } + } + } + ], + "truncated": false + } + ] + } } `) -func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson, nil +func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson, nil } -func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes() +func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson = []byte(`{ - "ref":"refs/heads/master", - "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051", - "before":"0000000000000000000000000000000000000000", - "created":true, - "deleted":false, - "forced":true, - "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93", - "commits":[ - { - "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", - "distinct":true, - "message":"Added license", - "timestamp":"2014-08-28T16:55:36+02:00", - "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", - "author":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "committer":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "added":[ - "LICENSE" - ], - "removed":[ +var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson = []byte(`{ + "eventKey":"repo:refs_changed", + "date":"2017-09-19T09:45:32+1000", + "actor":{ + "name":"admin", + "emailAddress":"admin@example.com", + "id":1, + "displayName":"Administrator", + "active":true, + "slug":"admin", + "type":"NORMAL" + }, + "repository":{ + "slug":"repository", + "id":84, + "name":"repository", + "scmId":"git", + "state":"AVAILABLE", + "statusMessage":"Available", + "forkable":true, + "project":{ + "key":"PROJ", + "id":84, + "name":"project", + "public":false, + "type":"NORMAL" + }, + "public":false + }, + "changes":[ + { + "ref":{ + "id":"refs/heads/other", + "displayId":"other", + "type":"BRANCH" + }, + "refId":"refs/heads/other", + "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932", + "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc", + "type":"UPDATE" + } + ] +}`) - ], - "modified":[ +func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson, nil +} - ] - } - ], - "head_commit":{ - "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", - "distinct":true, - "message":"Added license", - "timestamp":"2014-08-28T16:55:36+02:00", - "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", - "author":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "committer":{ - "name":"Anonymous User", - "email":"anonUser@example.com" - }, - "added":[ - "LICENSE" - ], - "removed":[ +func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes() + if err != nil { + return nil, err + } - ], - "modified":[ + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} - ] - }, - "repository":{ - "id":23354788, - "name":"anonRepo", - "full_name":"anonUser/anonRepo", - "owner":{ - "name":"anonUser", - "email":"anonUser@example.com" +var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json = []byte(`{ + "eventKey":"repo:refs_changed", + "date":"2017-09-19T09:45:32+1000", + "actor":{ + "name":"admin", + "emailAddress":"admin@example.com", + "id":1, + "displayName":"Administrator", + "active":true, + "slug":"admin", + "type":"NORMAL" + }, + "repository":{ + "slug":"repository", + "id":84, + "name":"repository", + "scmId":"git", + "state":"AVAILABLE", + "statusMessage":"Available", + "forkable":true, + "project":{ + "key":"PROJ", + "id":84, + "name":"project", + "public":false, + "type":"NORMAL" + }, + "public":false + }, + "changes":[ + { + "ref":{ + "id":"refs/heads/master", + "displayId":"master", + "type":"BRANCH" }, - "private":false, - "html_url":"https://github.com/anonUser/anonRepo", - "description":"Git webhook implementation in Go.", - "fork":false, - "url":"https://github.com/anonUser/anonRepo", - "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks", - "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}", - "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}", - "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams", - "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks", - "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}", - "events_url":"https://api.github.com/repos/anonUser/anonRepo/events", - "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}", - "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}", - "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags", - "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}", - "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}", - "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}", - "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}", - "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}", - "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages", - "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers", - "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors", - "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers", - "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription", - "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}", - "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}", - "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}", - "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}", - "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}", - "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}", - "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges", - "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}", - "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads", - "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}", - "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}", - "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}", - "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}", - "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}", - "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}", - "created_at":1409063699, - "updated_at":"2014-08-26T14:34:59Z", - "pushed_at":1409238007, - "git_url":"https://github.com/anonUser/anonRepo.git", - "ssh_url":"git@github.com:anonUser/anonRepo.git", - "clone_url":"https://github.com/anonUser/anonRepo.git", - "svn_url":"https://github.com/anonUser/anonRepo", - "homepage":null, - "size":0, - "stargazers_count":0, - "watchers_count":0, - "language":null, - "has_issues":true, - "has_downloads":true, - "has_wiki":true, - "forks_count":0, - "mirror_url":null, - "open_issues_count":0, - "forks":0, - "open_issues":0, - "watchers":0, - "default_branch":"master", - "stargazers":0, - "master_branch":"master" - }, - "pusher":{ - "name":"anonUser", - "email":"anonUser@example.com" - } + "refId":"refs/heads/master", + "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932", + "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc", + "type":"UPDATE" + } + ] +}`) + +func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json, nil } -`) -func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson, nil +func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil } -func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes() +var _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson = []byte(`{ + "type": "Git", + "git": { + "author": {}, + "committer": {}, + "refs": [ + { + "ref": "refs/heads/master", + "commit": "2602ace61490de0513dfbd7c7de949356cf9bd17", + "author": { + "name": "Joe Smith", + "email": "joe.smith@gmail.com" + }, + "committer": { + "name": "Joe Smith", + "email": "joe.smith@gmail.com" + }, + "message": "Merge pull request #31 from mnagy/prepare_for_new_mysql_image\n\nPrepare for new centos/mysql-56-centos7 image" + } + ] + } +}`) + +func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson, nil +} + +func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson = []byte(`{ - "object_kind": "push", - "before": "95790bf891e76fee5e1747ab589903a6a1f80f22", - "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "ref": "refs/heads/my_other_branch", - "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "user_id": 4, - "user_name": "John Smith", - "user_email": "john@example.com", - "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80", - "project_id": 15, - "project":{ - "name":"Diaspora", - "description":"", - "web_url":"http://example.com/mike/diaspora", - "avatar_url":null, - "git_ssh_url":"git@example.com:mike/diaspora.git", - "git_http_url":"http://example.com/mike/diaspora.git", - "namespace":"Mike", - "visibility_level":0, - "path_with_namespace":"mike/diaspora", - "default_branch":"master", - "homepage":"http://example.com/mike/diaspora", - "url":"git@example.com:mike/diaspora.git", - "ssh_url":"git@example.com:mike/diaspora.git", - "http_url":"http://example.com/mike/diaspora.git" - }, - "repository":{ - "name": "Diaspora", - "url": "git@example.com:mike/diaspora.git", - "description": "", - "homepage": "http://example.com/mike/diaspora", - "git_http_url":"http://example.com/mike/diaspora.git", - "git_ssh_url":"git@example.com:mike/diaspora.git", - "visibility_level":0 - }, - "commits": [ - { - "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", - "message": "Update Catalan translation to e38cb41.", - "timestamp": "2011-12-12T14:27:31+02:00", - "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", - "author": { - "name": "Jordi Mallach", - "email": "jordi@softcatala.org" - }, - "added": ["CHANGELOG"], - "modified": ["app/controller/application.rb"], - "removed": [] +var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson = []byte(`{ + "type" : "Git", + "git" : { + "uri" : "https://mygitserver/myrepo.git", + "ref" : "refs/heads/master", + "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051", + "message" : "Random act of kindness", + "author" : { + "name" : "Jon Doe", + "email" : "jondoe@email.com" }, - { - "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "message": "fixed readme", - "timestamp": "2012-01-03T23:36:29+02:00", - "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "author": { - "name": "GitLab dev user", - "email": "gitlabdev@dv6700.(none)" - }, - "added": ["CHANGELOG"], - "modified": ["app/controller/application.rb"], - "removed": [] + "committer" : { + "name" : "Jon Doe", + "email" : "jondoe@email.com" } - ], - "total_commits_count": 4 + }, + "env": [ + { + "name": "EXAMPLE", + "value": "sample-app" + } + ] } `) -func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson, nil +func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson, nil } -func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes() +func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson = []byte(`{ - "object_kind": "push", - "before": "95790bf891e76fee5e1747ab589903a6a1f80f22", - "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "ref": "refs/heads/master", - "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "user_id": 4, - "user_name": "John Smith", - "user_email": "john@example.com", - "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80", - "project_id": 15, - "project":{ - "name":"Diaspora", - "description":"", - "web_url":"http://example.com/mike/diaspora", - "avatar_url":null, - "git_ssh_url":"git@example.com:mike/diaspora.git", - "git_http_url":"http://example.com/mike/diaspora.git", - "namespace":"Mike", - "visibility_level":0, - "path_with_namespace":"mike/diaspora", - "default_branch":"master", - "homepage":"http://example.com/mike/diaspora", - "url":"git@example.com:mike/diaspora.git", - "ssh_url":"git@example.com:mike/diaspora.git", - "http_url":"http://example.com/mike/diaspora.git" - }, - "repository":{ - "name": "Diaspora", - "url": "git@example.com:mike/diaspora.git", - "description": "", - "homepage": "http://example.com/mike/diaspora", - "git_http_url":"http://example.com/mike/diaspora.git", - "git_ssh_url":"git@example.com:mike/diaspora.git", - "visibility_level":0 - }, - "commits": [ - { - "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", - "message": "Update Catalan translation to e38cb41.", - "timestamp": "2011-12-12T14:27:31+02:00", - "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", - "author": { - "name": "Jordi Mallach", - "email": "jordi@softcatala.org" - }, - "added": ["CHANGELOG"], - "modified": ["app/controller/application.rb"], - "removed": [] - }, - { - "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "message": "fixed readme", - "timestamp": "2012-01-03T23:36:29+02:00", - "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", - "author": { - "name": "GitLab dev user", - "email": "gitlabdev@dv6700.(none)" - }, - "added": ["CHANGELOG"], - "modified": ["app/controller/application.rb"], - "removed": [] - } - ], - "total_commits_count": 4 -} +var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml = []byte(`--- + type: "Git" + git: + uri: "https://mygitserver/myrepo.git" + ref: "refs/heads/master" + commit: "9bdc3a26ff933b32f3e558636b58aea86a69f051" + message: "Random act of kindness" + author: + name: "Jon Doe" + email: "jondoe@email.com" + committer: + name: "Jon Doe" + email: "jondoe@email.com" + env: + - + name: "EXAMPLE" + value: "sample-app" `) -func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes() ([]byte, error) { - return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson, nil +func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml, nil } -func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson() (*asset, error) { - bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes() +func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } - -var _testExtendedTestdataCliPodWithTwoContainersYaml = []byte(`kind: Pod -apiVersion: v1 -metadata: - name: doublecontainers - labels: - name: hello-centos -spec: - containers: - - name: hello-centos - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest - command: - - /bin/sleep - - infinity - resources: - limits: - memory: 256Mi - terminationMessagePath: "/dev/termination-log" - imagePullPolicy: IfNotPresent - securityContext: {} - - name: hello-centos-2 - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest - command: - - /bin/sleep - - infinity - resources: - limits: - memory: 256Mi - terminationMessagePath: "/dev/termination-log1" - imagePullPolicy: IfNotPresent - securityContext: {} - restartPolicy: Always - dnsPolicy: ClusterFirst - serviceAccount: '' -status: {} + +var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson = []byte(`{ + "type" : "Git", + "git" : { + "uri" : "https://mygitserver/myrepo.git", + "ref" : "refs/heads/master", + "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051", + "message" : "Random act of kindness", + "author" : { + "name" : "Jon Doe", + "email" : "jondoe@email.com" + }, + "committer" : { + "name" : "Jon Doe", + "email" : "jondoe@email.com" + } + } +} `) -func testExtendedTestdataCliPodWithTwoContainersYamlBytes() ([]byte, error) { - return _testExtendedTestdataCliPodWithTwoContainersYaml, nil +func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson, nil } -func testExtendedTestdataCliPodWithTwoContainersYaml() (*asset, error) { - bytes, err := testExtendedTestdataCliPodWithTwoContainersYamlBytes() +func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/cli/pod-with-two-containers.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataClusterMasterVertYaml = []byte(`provider: local -ClusterLoader: - cleanup: true - ifexists: delete - projects: - - num: 1 - basename: clusterloader-cakephp-mysql - ifexists: delete - tuning: default - templates: - - num: 1 - file: ./quickstarts/cakephp-mysql.json - - - num: 1 - basename: clusterloader-dancer-mysql - ifexists: delete - tuning: default - templates: - - num: 1 - file: ./quickstarts/dancer-mysql.json - - - num: 1 - basename: clusterloader-django-postgresql - ifexists: delete - tuning: default - templates: - - num: 1 - file: ./quickstarts/django-postgresql.json - - - num: 1 - basename: clusterloader-nodejs-mongodb - ifexists: delete - tuning: default - templates: - - num: 1 - file: ./quickstarts/nodejs-mongodb.json - - - num: 1 - basename: clusterloader-rails-postgresql - ifexists: delete - tuning: default - templates: - - num: 1 - file: ./quickstarts/rails-postgresql.json - - tuningsets: - - name: default - pods: - stepping: - stepsize: 5 - pause: 0 min - rate_limit: - delay: 0 ms +var _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson = []byte(`{ + "object_kind":"push", + "before":"cf1fa898d2a78685ccde72f14b4922b474f73cd1", + "after":"2602ace61490de0513dfbd7c7de949356cf9bd17", + "ref":"refs/heads/master", + "checkout_sha":"2602ace61490de0513dfbd7c7de949356cf9bd17", + "message":null, + "user_id":12345, + "user_name":"Jon Doe", + "user_email":"jondoe@email.com", + "project_id":12345, + "repository":{ + "name":"ruby-hello-world", + "url":"git@gitlab.com:jondoe/repo.git", + "description":"", + "homepage":"https://gitlab.com/jondoe/repo", + "git_http_url":"https://gitlab.com/jondoe/repo", + "git_ssh_url":"git@gitlab.com:jondoe/repo", + "visibility_level":20 + }, + "commits":[ + { + "id":"2602ace61490de0513dfbd7c7de949356cf9bd17", + "message":"Random act of kindness", + "timestamp":"2015-03-17T09:23:58+01:00", + "url":"https://gitlab.com/jondoe/repo/commit/2602ace61490de0513dfbd7c7de949356cf9bd17", + "author":{ + "name":"Jon Doe", + "email":"jondoe@email.com" + } + } + ], + "total_commits_count":3 +} `) -func testExtendedTestdataClusterMasterVertYamlBytes() ([]byte, error) { - return _testExtendedTestdataClusterMasterVertYaml, nil +func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson, nil } -func testExtendedTestdataClusterMasterVertYaml() (*asset, error) { - bytes, err := testExtendedTestdataClusterMasterVertYamlBytes() +func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/cluster/master-vert.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataClusterQuickstartsCakephpMysqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "cakephp-mysql-example", - "template": "cakephp-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-php", - "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", - "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,php,cakephp", - "template.openshift.io/bindable": "false" - }, - "name": "cakephp-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", - "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./vendor/bin/phpunit" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "COMPOSER_MIRROR", - "value": "${COMPOSER_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "php:${PHP_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-example" - }, - "failurePolicy": "Retry" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-secret-token", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-security-salt", - "name": "${NAME}" - } - } - }, - { - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "${OPCACHE_REVALIDATE_FREQ}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 30, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "name": "cakephp-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 3, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "cakephp-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of PHP image to be used (7.1 or latest).", - "displayName": "PHP Version", - "name": "PHP_VERSION", - "required": true, - "value": "7.1" - }, - { - "description": "Maximum amount of memory the CakePHP container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/cakephp-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "mysql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database User", - "name": "DATABASE_USER", - "required": true, - "value": "cakephp" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Set this to a long random string.", - "displayName": "CakePHP secret token", - "from": "[\\w]{50}", - "generate": "expression", - "name": "CAKEPHP_SECRET_TOKEN" - }, - { - "description": "Security salt for session hash.", - "displayName": "CakePHP Security Salt", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "CAKEPHP_SECURITY_SALT" - }, - { - "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", - "displayName": "OPcache Revalidation Frequency", - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "2" - }, - { - "description": "The custom Composer mirror URL", - "displayName": "Custom Composer Mirror URL", - "name": "COMPOSER_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] +var _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson = []byte(`{ + "zen":"Encourage flow.", + "hook":{ + "url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466", + "test_url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466/test", + "id":2896466, + "name":"web", + "active":true, + "events":[ + "push" + ], + "config":{ + "secret":"", + "url":"http://example.com/gitwebhook", + "content_type":"json", + "insecure_ssl":"0" + }, + "last_response":{ + "code":null, + "status":"unused", + "message":null + }, + "updated_at":"2014-08-28T14:25:47Z", + "created_at":"2014-08-28T14:25:47Z" + }, + "hook_id":2896466 } `) -func testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes() ([]byte, error) { - return _testExtendedTestdataClusterQuickstartsCakephpMysqlJson, nil +func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson, nil } -func testExtendedTestdataClusterQuickstartsCakephpMysqlJson() (*asset, error) { - bytes, err := testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes() +func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pingevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataClusterQuickstartsDancerMysqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "dancer-mysql-example", - "template": "dancer-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-perl", - "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,perl,dancer", - "template.openshift.io/bindable": "false" - }, - "name": "dancer-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "perl -I extlib/lib/perl5 -I lib t/*" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "CPAN_MIRROR", - "value": "${CPAN_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "perl:5.30-ubi8", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "PERL_APACHE2_RELOAD", - "value": "${PERL_APACHE2_RELOAD}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "dancer-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dancer-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Perl Dancer container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/dancer-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "database" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", - "displayName": "Perl Module Reload", - "name": "PERL_APACHE2_RELOAD", - "value": "" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The custom CPAN mirror URL", - "displayName": "Custom CPAN Mirror URL", - "name": "CPAN_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] +var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson = []byte(`{ + "ref":"refs/heads/my_other_branch", + "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051", + "before":"0000000000000000000000000000000000000000", + "created":true, + "deleted":false, + "forced":true, + "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93", + "commits":[ + { + "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", + "distinct":true, + "message":"Added license", + "timestamp":"2014-08-28T16:55:36+02:00", + "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", + "author":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "committer":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "added":[ + "LICENSE" + ], + "removed":[ + + ], + "modified":[ + + ] + } + ], + "head_commit":{ + "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", + "distinct":true, + "message":"Added license", + "timestamp":"2014-08-28T16:55:36+02:00", + "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", + "author":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "committer":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "added":[ + "LICENSE" + ], + "removed":[ + + ], + "modified":[ + + ] + }, + "repository":{ + "id":23354788, + "name":"anonRepo", + "full_name":"anonUser/anonRepo", + "owner":{ + "name":"anonUser", + "email":"anonUser@example.com" + }, + "private":false, + "html_url":"https://github.com/anonUser/anonRepo", + "description":"Git webhook implementation in Go.", + "fork":false, + "url":"https://github.com/anonUser/anonRepo", + "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks", + "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}", + "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}", + "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams", + "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks", + "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}", + "events_url":"https://api.github.com/repos/anonUser/anonRepo/events", + "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}", + "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}", + "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags", + "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}", + "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}", + "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}", + "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}", + "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}", + "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages", + "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers", + "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors", + "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers", + "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription", + "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}", + "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}", + "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}", + "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}", + "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}", + "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}", + "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges", + "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}", + "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads", + "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}", + "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}", + "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}", + "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}", + "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}", + "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}", + "created_at":1409063699, + "updated_at":"2014-08-26T14:34:59Z", + "pushed_at":1409238007, + "git_url":"https://github.com/anonUser/anonRepo.git", + "ssh_url":"git@github.com:anonUser/anonRepo.git", + "clone_url":"https://github.com/anonUser/anonRepo.git", + "svn_url":"https://github.com/anonUser/anonRepo", + "homepage":null, + "size":0, + "stargazers_count":0, + "watchers_count":0, + "language":null, + "has_issues":true, + "has_downloads":true, + "has_wiki":true, + "forks_count":0, + "mirror_url":null, + "open_issues_count":0, + "forks":0, + "open_issues":0, + "watchers":0, + "default_branch":"master", + "stargazers":0, + "master_branch":"master" + }, + "pusher":{ + "name":"anonUser", + "email":"anonUser@example.com" + } +} +`) + +func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson, nil +} + +func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson = []byte(`{ + "ref":"refs/heads/master", + "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051", + "before":"0000000000000000000000000000000000000000", + "created":true, + "deleted":false, + "forced":true, + "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93", + "commits":[ + { + "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", + "distinct":true, + "message":"Added license", + "timestamp":"2014-08-28T16:55:36+02:00", + "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", + "author":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "committer":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "added":[ + "LICENSE" + ], + "removed":[ + + ], + "modified":[ + + ] + } + ], + "head_commit":{ + "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", + "distinct":true, + "message":"Added license", + "timestamp":"2014-08-28T16:55:36+02:00", + "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", + "author":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "committer":{ + "name":"Anonymous User", + "email":"anonUser@example.com" + }, + "added":[ + "LICENSE" + ], + "removed":[ + + ], + "modified":[ + + ] + }, + "repository":{ + "id":23354788, + "name":"anonRepo", + "full_name":"anonUser/anonRepo", + "owner":{ + "name":"anonUser", + "email":"anonUser@example.com" + }, + "private":false, + "html_url":"https://github.com/anonUser/anonRepo", + "description":"Git webhook implementation in Go.", + "fork":false, + "url":"https://github.com/anonUser/anonRepo", + "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks", + "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}", + "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}", + "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams", + "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks", + "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}", + "events_url":"https://api.github.com/repos/anonUser/anonRepo/events", + "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}", + "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}", + "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags", + "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}", + "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}", + "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}", + "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}", + "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}", + "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages", + "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers", + "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors", + "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers", + "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription", + "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}", + "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}", + "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}", + "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}", + "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}", + "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}", + "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges", + "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}", + "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads", + "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}", + "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}", + "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}", + "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}", + "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}", + "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}", + "created_at":1409063699, + "updated_at":"2014-08-26T14:34:59Z", + "pushed_at":1409238007, + "git_url":"https://github.com/anonUser/anonRepo.git", + "ssh_url":"git@github.com:anonUser/anonRepo.git", + "clone_url":"https://github.com/anonUser/anonRepo.git", + "svn_url":"https://github.com/anonUser/anonRepo", + "homepage":null, + "size":0, + "stargazers_count":0, + "watchers_count":0, + "language":null, + "has_issues":true, + "has_downloads":true, + "has_wiki":true, + "forks_count":0, + "mirror_url":null, + "open_issues_count":0, + "forks":0, + "open_issues":0, + "watchers":0, + "default_branch":"master", + "stargazers":0, + "master_branch":"master" + }, + "pusher":{ + "name":"anonUser", + "email":"anonUser@example.com" + } } `) -func testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes() ([]byte, error) { - return _testExtendedTestdataClusterQuickstartsDancerMysqlJson, nil +func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson, nil } -func testExtendedTestdataClusterQuickstartsDancerMysqlJson() (*asset, error) { - bytes, err := testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes() +func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/dancer-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "django-psql-example", - "template": "django-psql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-python", - "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,python,django", - "template.openshift.io/bindable": "false" - }, - "name": "django-psql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "django-secret-key": "${DJANGO_SECRET_KEY}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./manage.py test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "PIP_INDEX_URL", - "value": "${PIP_INDEX_URL}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "python:${PYTHON_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "valueFrom": { - "secretKeyRef": { - "key": "django-secret-key", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "django-psql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-psql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "django-psql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of Python image to be used (3.6 or latest).", - "displayName": "Version of Python Image", - "name": "PYTHON_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - }, - { - "description": "Maximum amount of memory the Django container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/django-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database Username", - "name": "DATABASE_USER", - "required": true, - "value": "django" - }, - { - "displayName": "Database User Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Relative path to Gunicorn configuration file (optional).", - "displayName": "Application Configuration File Path", - "name": "APP_CONFIG" - }, - { - "description": "Set this to a long random string.", - "displayName": "Django Secret Key", - "from": "[\\w]{50}", - "generate": "expression", - "name": "DJANGO_SECRET_KEY" - }, - { - "description": "The custom PyPi index URL", - "displayName": "Custom PyPi Index URL", - "name": "PIP_INDEX_URL", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] +var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson = []byte(`{ + "object_kind": "push", + "before": "95790bf891e76fee5e1747ab589903a6a1f80f22", + "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "ref": "refs/heads/my_other_branch", + "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "user_id": 4, + "user_name": "John Smith", + "user_email": "john@example.com", + "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80", + "project_id": 15, + "project":{ + "name":"Diaspora", + "description":"", + "web_url":"http://example.com/mike/diaspora", + "avatar_url":null, + "git_ssh_url":"git@example.com:mike/diaspora.git", + "git_http_url":"http://example.com/mike/diaspora.git", + "namespace":"Mike", + "visibility_level":0, + "path_with_namespace":"mike/diaspora", + "default_branch":"master", + "homepage":"http://example.com/mike/diaspora", + "url":"git@example.com:mike/diaspora.git", + "ssh_url":"git@example.com:mike/diaspora.git", + "http_url":"http://example.com/mike/diaspora.git" + }, + "repository":{ + "name": "Diaspora", + "url": "git@example.com:mike/diaspora.git", + "description": "", + "homepage": "http://example.com/mike/diaspora", + "git_http_url":"http://example.com/mike/diaspora.git", + "git_ssh_url":"git@example.com:mike/diaspora.git", + "visibility_level":0 + }, + "commits": [ + { + "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", + "message": "Update Catalan translation to e38cb41.", + "timestamp": "2011-12-12T14:27:31+02:00", + "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", + "author": { + "name": "Jordi Mallach", + "email": "jordi@softcatala.org" + }, + "added": ["CHANGELOG"], + "modified": ["app/controller/application.rb"], + "removed": [] + }, + { + "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "message": "fixed readme", + "timestamp": "2012-01-03T23:36:29+02:00", + "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "author": { + "name": "GitLab dev user", + "email": "gitlabdev@dv6700.(none)" + }, + "added": ["CHANGELOG"], + "modified": ["app/controller/application.rb"], + "removed": [] + } + ], + "total_commits_count": 4 } `) -func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes() ([]byte, error) { - return _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, nil +func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson, nil } -func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson() (*asset, error) { - bytes, err := testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes() +func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/django-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataClusterQuickstartsNodejsMongodbJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "nodejs-mongodb-example", - "template": "nodejs-mongodb-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js + MongoDB (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex", - "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nodejs", - "template.openshift.io/bindable": "false" - }, - "name": "nodejs-mongodb-example" +var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson = []byte(`{ + "object_kind": "push", + "before": "95790bf891e76fee5e1747ab589903a6a1f80f22", + "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "ref": "refs/heads/master", + "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "user_id": 4, + "user_name": "John Smith", + "user_email": "john@example.com", + "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80", + "project_id": 15, + "project":{ + "name":"Diaspora", + "description":"", + "web_url":"http://example.com/mike/diaspora", + "avatar_url":null, + "git_ssh_url":"git@example.com:mike/diaspora.git", + "git_http_url":"http://example.com/mike/diaspora.git", + "namespace":"Mike", + "visibility_level":0, + "path_with_namespace":"mike/diaspora", + "default_branch":"master", + "homepage":"http://example.com/mike/diaspora", + "url":"git@example.com:mike/diaspora.git", + "ssh_url":"git@example.com:mike/diaspora.git", + "http_url":"http://example.com/mike/diaspora.git" + }, + "repository":{ + "name": "Diaspora", + "url": "git@example.com:mike/diaspora.git", + "description": "", + "homepage": "http://example.com/mike/diaspora", + "git_http_url":"http://example.com/mike/diaspora.git", + "git_ssh_url":"git@example.com:mike/diaspora.git", + "visibility_level":0 + }, + "commits": [ + { + "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", + "message": "Update Catalan translation to e38cb41.", + "timestamp": "2011-12-12T14:27:31+02:00", + "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", + "author": { + "name": "Jordi Mallach", + "email": "jordi@softcatala.org" + }, + "added": ["CHANGELOG"], + "modified": ["app/controller/application.rb"], + "removed": [] }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "npm test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "NPM_MIRROR", - "value": "${NPM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs:${NODEJS_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nodejs-mongodb-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-mongodb-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongodb", - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MONGODB_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nodejs-mongodb-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NodeJS image to be used (6, 8, or latest).", - "displayName": "Version of NodeJS Image", - "name": "NODEJS_VERSION", - "required": true, - "value": "8" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Maximum amount of memory the Node.js container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MongoDB container can use.", - "displayName": "Memory Limit (MongoDB)", - "name": "MEMORY_MONGODB_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nodejs-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "description": "Password for the MongoDB user.", - "displayName": "MongoDB Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "Database Administrator Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_ADMIN_PASSWORD" - }, - { - "description": "The custom NPM mirror URL", - "displayName": "Custom NPM Mirror URL", - "name": "NPM_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] + { + "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "message": "fixed readme", + "timestamp": "2012-01-03T23:36:29+02:00", + "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", + "author": { + "name": "GitLab dev user", + "email": "gitlabdev@dv6700.(none)" + }, + "added": ["CHANGELOG"], + "modified": ["app/controller/application.rb"], + "removed": [] + } + ], + "total_commits_count": 4 +} +`) + +func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes() ([]byte, error) { + return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson, nil +} + +func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson() (*asset, error) { + bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataCliPodWithTwoContainersYaml = []byte(`kind: Pod +apiVersion: v1 +metadata: + name: doublecontainers + labels: + name: hello-centos +spec: + containers: + - name: hello-centos + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + command: + - /bin/sleep + - infinity + resources: + limits: + memory: 256Mi + terminationMessagePath: "/dev/termination-log" + imagePullPolicy: IfNotPresent + securityContext: {} + - name: hello-centos-2 + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + command: + - /bin/sleep + - infinity + resources: + limits: + memory: 256Mi + terminationMessagePath: "/dev/termination-log1" + imagePullPolicy: IfNotPresent + securityContext: {} + restartPolicy: Always + dnsPolicy: ClusterFirst + serviceAccount: '' +status: {} +`) + +func testExtendedTestdataCliPodWithTwoContainersYamlBytes() ([]byte, error) { + return _testExtendedTestdataCliPodWithTwoContainersYaml, nil +} + +func testExtendedTestdataCliPodWithTwoContainersYaml() (*asset, error) { + bytes, err := testExtendedTestdataCliPodWithTwoContainersYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/cli/pod-with-two-containers.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil } + +var _testExtendedTestdataClusterMasterVertYaml = []byte(`provider: local +ClusterLoader: + cleanup: true + ifexists: delete + projects: + - num: 1 + basename: clusterloader-cakephp-mysql + ifexists: delete + tuning: default + templates: + - num: 1 + file: ./quickstarts/cakephp-mysql.json + + - num: 1 + basename: clusterloader-dancer-mysql + ifexists: delete + tuning: default + templates: + - num: 1 + file: ./quickstarts/dancer-mysql.json + + - num: 1 + basename: clusterloader-django-postgresql + ifexists: delete + tuning: default + templates: + - num: 1 + file: ./quickstarts/django-postgresql.json + + - num: 1 + basename: clusterloader-nodejs-postgresql + ifexists: delete + tuning: default + templates: + - num: 1 + file: ./quickstarts/nodejs-postgresql.json + + - num: 1 + basename: clusterloader-rails-postgresql + ifexists: delete + tuning: default + templates: + - num: 1 + file: ./quickstarts/rails-postgresql.json + + tuningsets: + - name: default + pods: + stepping: + stepsize: 5 + pause: 0 min + rate_limit: + delay: 0 ms `) -func testExtendedTestdataClusterQuickstartsNodejsMongodbJsonBytes() ([]byte, error) { - return _testExtendedTestdataClusterQuickstartsNodejsMongodbJson, nil +func testExtendedTestdataClusterMasterVertYamlBytes() ([]byte, error) { + return _testExtendedTestdataClusterMasterVertYaml, nil +} + +func testExtendedTestdataClusterMasterVertYaml() (*asset, error) { + bytes, err := testExtendedTestdataClusterMasterVertYamlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/cluster/master-vert.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataClusterQuickstartsCakephpMysqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "cakephp-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-php", + "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", + "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,php,cakephp", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", + "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./vendor/bin/phpunit" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "COMPOSER_MIRROR", + "value": "${COMPOSER_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "php:${PHP_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "cakephp-mysql-example" + }, + "failurePolicy": "Retry" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-secret-token", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-security-salt", + "name": "${NAME}" + } + } + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "value": "${OPCACHE_REVALIDATE_FREQ}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 30, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "name": "cakephp-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 3, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cakephp-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "cakephp-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PHP_VERSION", + "displayName": "PHP Version", + "description": "Version of PHP image to be used (7.3-ubi7, 7.3-ubi8, or latest).", + "value": "7.3-ubi8", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "MySQL Version", + "description": "Version of MySQL image to be used (8.0-el8 or latest).", + "value": "8.0-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/cakephp-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database User", + "value": "cakephp", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "value": "2" + }, + { + "name": "COMPOSER_MIRROR", + "displayName": "Custom Composer Mirror URL", + "description": "The custom Composer mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "cakephp-mysql-example", + "template": "cakephp-mysql-example" + } +}`) + +func testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes() ([]byte, error) { + return _testExtendedTestdataClusterQuickstartsCakephpMysqlJson, nil +} + +func testExtendedTestdataClusterQuickstartsCakephpMysqlJson() (*asset, error) { + bytes, err := testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataClusterQuickstartsDancerMysqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "dancer-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,perl,dancer", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "perl -I extlib/lib/perl5 -I lib t/*" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "CPAN_MIRROR", + "value": "${CPAN_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "perl:${PERL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "PERL_APACHE2_RELOAD", + "value": "${PERL_APACHE2_RELOAD}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "dancer-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "dancer-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:8.0-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "dancer-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PERL_VERSION", + "displayName": "Version of Perl Image", + "description": "Version of Perl image to be used (5.26-el7, 5.26-ubi8, or latest).", + "value": "5.26-ubi8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Perl Dancer container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/dancer-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "database", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "sampledb", + "required": true + }, + { + "name": "PERL_APACHE2_RELOAD", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "CPAN_MIRROR", + "displayName": "Custom CPAN Mirror URL", + "description": "The custom CPAN mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "dancer-mysql-example", + "template": "dancer-mysql-example" + } +}`) + +func testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes() ([]byte, error) { + return _testExtendedTestdataClusterQuickstartsDancerMysqlJson, nil } -func testExtendedTestdataClusterQuickstartsNodejsMongodbJson() (*asset, error) { - bytes, err := testExtendedTestdataClusterQuickstartsNodejsMongodbJsonBytes() +func testExtendedTestdataClusterQuickstartsDancerMysqlJson() (*asset, error) { + bytes, err := testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/dancer-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } -var _testExtendedTestdataClusterQuickstartsRailsPostgresqlJson = []byte(`{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "rails-postgresql-example", - "template": "rails-postgresql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,ruby,rails", - "template.openshift.io/bindable": "false" - }, - "name": "rails-postgresql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "application-password": "${APPLICATION_PASSWORD}", - "application-user": "${APPLICATION_USER}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "bundle exec rake test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "RUBYGEM_MIRROR", - "value": "${RUBYGEM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "ruby:2.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "${NAME}" - }, - "failurePolicy": "Abort" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - }, - { - "name": "APPLICATION_DOMAIN", - "value": "${APPLICATION_DOMAIN}" - }, - { - "name": "APPLICATION_USER", - "valueFrom": { - "secretKeyRef": { - "key": "application-user", - "name": "${NAME}" - } - } - }, - { - "name": "APPLICATION_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "application-password", - "name": "${NAME}" - } - } - }, - { - "name": "RAILS_ENV", - "value": "${RAILS_ENV}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 3 - }, - "name": "${NAME}", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${NAME}" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:12", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "rails-postgresql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Rails container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/rails-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The application user that is used within the sample application to authorize access on pages.", - "displayName": "Application Username", - "name": "APPLICATION_USER", - "required": true, - "value": "openshift" - }, - { - "description": "The application password that is used within the sample application to authorize access on pages.", - "displayName": "Application Password", - "name": "APPLICATION_PASSWORD", - "required": true, - "value": "secret" - }, - { - "description": "Environment under which the sample application will run. Could be set to production, development or test.", - "displayName": "Rails Environment", - "name": "RAILS_ENV", - "required": true, - "value": "production" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "root" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - }, - { - "description": "The custom RubyGems mirror URL", - "displayName": "Custom RubyGems Mirror URL", - "name": "RUBYGEM_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] +var _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "django-psql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-python", + "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,python,django", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "django-secret-key": "${DJANGO_SECRET_KEY}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./manage.py test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "PIP_INDEX_URL", + "value": "${PIP_INDEX_URL}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "python:${PYTHON_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "APP_CONFIG", + "value": "${APP_CONFIG}" + }, + { + "name": "DJANGO_SECRET_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "django-secret-key", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "django-psql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "django-psql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "django-psql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi7, 3.8-ubi8, or latest).", + "value": "3.8-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Django container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/django-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "value": "django", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database User Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "APP_CONFIG", + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." + }, + { + "name": "DJANGO_SECRET_KEY", + "displayName": "Django Secret Key", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "PIP_INDEX_URL", + "displayName": "Custom PyPi Index URL", + "description": "The custom PyPi index URL" + } + ], + "labels": { + "app": "django-psql-example", + "template": "django-psql-example" + } +}`) + +func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes() ([]byte, error) { + return _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, nil } -`) + +func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson() (*asset, error) { + bytes, err := testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/django-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "template.openshift.io/v1", + "metadata": { + "name": "nodejs-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", + "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nodejs", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": {}, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "NPM_MIRROR", + "value": "${NPM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "nodejs:${NODEJS_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "labels": { + "app.openshift.io/runtime": "nodejs" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "app.openshift.io/runtime": "nodejs", + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nodejs-postgresql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nodejs-postgresql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + }, + "timeoutSeconds": 1 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/postgresql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nodejs-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NODEJS_VERSION", + "displayName": "Version of NodeJS Image", + "description": "Version of NodeJS image to be used (10-ubi8, 12-ubi8, or latest).", + "value": "12-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Node.js container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "PostgreSQL Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "PostgreSQL Password", + "description": "Password for the PostgreSQL user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "my_data", + "required": true + }, + { + "name": "DATABASE_ADMIN_PASSWORD", + "displayName": "Database Administrator Password", + "description": "Password for the database admin user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "NPM_MIRROR", + "displayName": "Custom NPM Mirror URL", + "description": "The custom NPM mirror URL" + } + ], + "labels": { + "app": "nodejs-postgresql-example", + "template": "nodejs-postgresql-example" + } +}`) + +func testExtendedTestdataClusterQuickstartsNodejsPostgresqlJsonBytes() ([]byte, error) { + return _testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson, nil +} + +func testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson() (*asset, error) { + bytes, err := testExtendedTestdataClusterQuickstartsNodejsPostgresqlJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataClusterQuickstartsRailsPostgresqlJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "rails-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,ruby,rails", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "application-password": "${APPLICATION_PASSWORD}", + "application-user": "${APPLICATION_USER}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "bundle exec rake test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "RUBYGEM_MIRROR", + "value": "${RUBYGEM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "ruby:2.6-ubi8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "${NAME}" + }, + "failurePolicy": "Abort" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + }, + { + "name": "APPLICATION_DOMAIN", + "value": "${APPLICATION_DOMAIN}" + }, + { + "name": "APPLICATION_USER", + "valueFrom": { + "secretKeyRef": { + "key": "application-user", + "name": "${NAME}" + } + } + }, + { + "name": "APPLICATION_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "application-password", + "name": "${NAME}" + } + } + }, + { + "name": "RAILS_ENV", + "value": "${RAILS_ENV}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 3 + }, + "name": "${NAME}", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "${NAME}" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:12-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "rails-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Rails container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/rails-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "APPLICATION_USER", + "displayName": "Application Username", + "description": "The application user that is used within the sample application to authorize access on pages.", + "value": "openshift", + "required": true + }, + { + "name": "APPLICATION_PASSWORD", + "displayName": "Application Password", + "description": "The application password that is used within the sample application to authorize access on pages.", + "value": "secret", + "required": true + }, + { + "name": "RAILS_ENV", + "displayName": "Rails Environment", + "description": "Environment under which the sample application will run. Could be set to production, development or test.", + "value": "production", + "required": true + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "root", + "required": true + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "displayName": "Maximum Database Connections", + "value": "100" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "displayName": "Shared Buffer Amount", + "value": "12MB" + }, + { + "name": "RUBYGEM_MIRROR", + "displayName": "Custom RubyGems Mirror URL", + "description": "The custom RubyGems mirror URL" + } + ], + "labels": { + "app": "rails-postgresql-example", + "template": "rails-postgresql-example" + } +}`) func testExtendedTestdataClusterQuickstartsRailsPostgresqlJsonBytes() ([]byte, error) { return _testExtendedTestdataClusterQuickstartsRailsPostgresqlJson, nil @@ -29428,7 +29231,7 @@ os::cmd::try_until_success 'oc rollout history dc/database --revision=2' # rolling back to the same revision should fail os::cmd::expect_failure 'oc rollback dc/database --to-version=2' # undo --dry-run should report the original image -os::cmd::expect_success_and_text 'oc rollout undo dc/database --dry-run' 'image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7' +os::cmd::expect_success_and_text 'oc rollout undo dc/database --dry-run' 'image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8' echo "rollback: ok" os::test::junit::declare_suite_end @@ -33268,7 +33071,7 @@ var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson = "containers": [ { "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, @@ -33461,467 +33264,467 @@ var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson = "name": "ruby-27-centos7" }, "spec": { - "tags": [ - { - "from": { - "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:latest" - }, - "name": "latest" - } - ] - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "ruby-sample-build", - "labels": { - "name": "ruby-sample-build" - }, - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - } - }, - "spec": { - "triggers": [ - { - "type": "GitHub", - "github": { - "secret": "secret101" - } - }, - { - "type": "Generic", - "generic": { - "secret": "secret101", - "allowEnv": true - } - }, - { - "type": "ImageChange", - "imageChange": {} - }, - { - "type": "ConfigChange" - } - ], - "source": { - "type": "Git", - "git": { - "uri": "https://github.com/openshift/ruby-hello-world.git" - } - }, - "strategy": { - "type": "Docker", - "dockerStrategy": { - "from": { - "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" - }, - "env": [ - { - "name": "EXAMPLE", - "value": "sample-app" - } - ] - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "origin-ruby-sample:latest" - } - }, - "postCommit": { - "script": "bundle exec rake test" - }, - "resources": {} - }, - "status": { - "lastVersion": 0 - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "frontend", - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - } - }, - "spec": { - "strategy": { - "type": "Rolling", - "rollingParams": { - "updatePeriodSeconds": 1, - "intervalSeconds": 1, - "timeoutSeconds": 120, - "pre": { - "failurePolicy": "Abort", - "execNewPod": { - "command": [ - "/bin/true" - ], - "env": [ - { - "name": "CUSTOM_VAR1", - "value": "custom_value1" - } - ], - "containerName": "ruby-helloworld" - } - }, - "post": { - "failurePolicy": "Ignore", - "execNewPod": { - "command": [ - "/bin/true" - ], - "env": [ - { - "name": "CUSTOM_VAR2", - "value": "custom_value2" - } - ], - "containerName": "ruby-helloworld" - } - } - }, - "resources": {} - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "ruby-helloworld" - ], - "from": { - "kind": "ImageStreamTag", - "name": "origin-ruby-sample:latest" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 2, - "selector": { - "name": "frontend" - }, - "template": { - "metadata": { - "labels": { - "name": "frontend" - } - }, - "spec": { - "containers": [ - { - "name": "ruby-helloworld", - "image": "origin-ruby-sample", - "ports": [ - { - "containerPort": 8080, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef" : { - "name" : "dbsecret", - "key" : "mysql-user" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef" : { - "name" : "dbsecret", - "key" : "mysql-password" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${MYSQL_DATABASE}" - } - ], - "resources": {}, - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "IfNotPresent", - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "database" - }, - "spec": { - "ports": [ - { - "name": "db", - "protocol": "TCP", - "port": 5434, - "targetPort": 3306, - "nodePort": 0 - } - ], - "selector": { - "name": "database" - }, - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "database", - "annotations": { - "template.alpha.openshift.io/wait-for-ready": "true" - } - }, - "spec": { - "strategy": { - "type": "Recreate", - "resources": {} - }, - "triggers": [ - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "selector": { - "name": "database" - }, - "template": { - "metadata": { - "labels": { - "name": "database" - } - }, - "spec": { - "containers": [ - { - "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", - "ports": [ - { - "containerPort": 3306, - "protocol": "TCP" - } - ], - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef" : { - "name" : "dbsecret", - "key" : "mysql-user" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef" : { - "name" : "dbsecret", - "key" : "mysql-password" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${MYSQL_DATABASE}" - } - ], - "resources": {}, - "volumeMounts": [ - { - "name": "ruby-helloworld-data", - "mountPath": "/var/lib/mysql/data" - } - ], - "terminationMessagePath": "/dev/termination-log", - "imagePullPolicy": "Always", - "securityContext": { - "capabilities": {}, - "privileged": false - } - } - ], - "volumes": [ - { - "name": "ruby-helloworld-data", - "emptyDir": { - "medium": "" - } - } - ], - "restartPolicy": "Always", - "dnsPolicy": "ClusterFirst" - } - } - } - } - ], - "parameters": [ - { - "name": "MYSQL_USER", - "description": "database username", - "generate": "expression", - "from": "user[A-Z0-9]{3}", - "required": true - }, - { - "name": "MYSQL_PASSWORD", - "description": "database password", - "generate": "expression", - "from": "[a-zA-Z0-9]{8}", - "required": true - }, - { - "name": "MYSQL_DATABASE", - "description": "database name", - "value": "root", - "required": true - } - ], - "labels": { - "template": "application-template-dockerbuild" - } -} -`) - -func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes() ([]byte, error) { - return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson, nil -} - -func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson() (*asset, error) { - bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes() - if err != nil { - return nil, err - } - - info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} - a := &asset{bytes: bytes, info: info} - return a, nil -} - -var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson = []byte(`{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "name": "ruby-helloworld-sample", - "annotations": { - "description": "This example shows how to create a simple ruby application in openshift origin v3", - "iconClass": "icon-ruby", - "tags": "instant-app,ruby,mysql" - } - }, - "objects": [ - { - "kind": "Secret", - "apiVersion": "v1", - "metadata": { - "name": "dbsecret" - }, - "stringData" : { - "mysql-user" : "${MYSQL_USER}", - "mysql-password" : "${MYSQL_PASSWORD}" - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "frontend" - }, - "spec": { - "ports": [ - { - "name": "web", - "protocol": "TCP", - "port": 5432, - "targetPort": 8080, - "nodePort": 0 - } - ], - "selector": { - "name": "frontend" - }, - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - }, - { - "kind": "Route", - "apiVersion": "v1", - "metadata": { - "name": "route-edge", - "annotations": { - "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" - } - }, - "spec": { - "host": "www.example.com", - "to": { - "kind": "Service", - "name": "frontend" - }, - "tls": { - "termination": "edge" - } - }, - "status": {} - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "origin-ruby-sample" - }, - "spec": {}, - "status": { - "dockerImageRepository": "" - } - }, - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "ruby-27-centos7" - }, - "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "tags": [ + { + "from": { + "kind": "DockerImage", + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:latest" + }, + "name": "latest" + } + ] + } + }, + { + "kind": "BuildConfig", + "apiVersion": "v1", + "metadata": { + "name": "ruby-sample-build", + "labels": { + "name": "ruby-sample-build" + }, + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + } + }, + "spec": { + "triggers": [ + { + "type": "GitHub", + "github": { + "secret": "secret101" + } + }, + { + "type": "Generic", + "generic": { + "secret": "secret101", + "allowEnv": true + } + }, + { + "type": "ImageChange", + "imageChange": {} + }, + { + "type": "ConfigChange" + } + ], + "source": { + "type": "Git", + "git": { + "uri": "https://github.com/openshift/ruby-hello-world.git" + } + }, + "strategy": { + "type": "Docker", + "dockerStrategy": { + "from": { + "kind": "ImageStreamTag", + "name": "ruby-27-centos7:latest" + }, + "env": [ + { + "name": "EXAMPLE", + "value": "sample-app" + } + ] + } + }, + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "origin-ruby-sample:latest" + } + }, + "postCommit": { + "script": "bundle exec rake test" + }, + "resources": {} + }, + "status": { + "lastVersion": 0 + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "frontend", + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + } + }, + "spec": { + "strategy": { + "type": "Rolling", + "rollingParams": { + "updatePeriodSeconds": 1, + "intervalSeconds": 1, + "timeoutSeconds": 120, + "pre": { + "failurePolicy": "Abort", + "execNewPod": { + "command": [ + "/bin/true" + ], + "env": [ + { + "name": "CUSTOM_VAR1", + "value": "custom_value1" + } + ], + "containerName": "ruby-helloworld" + } + }, + "post": { + "failurePolicy": "Ignore", + "execNewPod": { + "command": [ + "/bin/true" + ], + "env": [ + { + "name": "CUSTOM_VAR2", + "value": "custom_value2" + } + ], + "containerName": "ruby-helloworld" + } + } + }, + "resources": {} + }, + "triggers": [ + { + "type": "ImageChange", + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "ruby-helloworld" + ], + "from": { + "kind": "ImageStreamTag", + "name": "origin-ruby-sample:latest" + } + } + }, + { + "type": "ConfigChange" + } + ], + "replicas": 2, + "selector": { + "name": "frontend" + }, + "template": { + "metadata": { + "labels": { + "name": "frontend" + } + }, + "spec": { + "containers": [ + { + "name": "ruby-helloworld", + "image": "origin-ruby-sample", + "ports": [ + { + "containerPort": 8080, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef" : { + "name" : "dbsecret", + "key" : "mysql-user" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef" : { + "name" : "dbsecret", + "key" : "mysql-password" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${MYSQL_DATABASE}" + } + ], + "resources": {}, + "terminationMessagePath": "/dev/termination-log", + "imagePullPolicy": "IfNotPresent", + "securityContext": { + "capabilities": {}, + "privileged": false + } + } + ], + "restartPolicy": "Always", + "dnsPolicy": "ClusterFirst" + } + } + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "database" + }, + "spec": { + "ports": [ + { + "name": "db", + "protocol": "TCP", + "port": 5434, + "targetPort": 3306, + "nodePort": 0 + } + ], + "selector": { + "name": "database" + }, + "type": "ClusterIP", + "sessionAffinity": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "DeploymentConfig", + "apiVersion": "v1", + "metadata": { + "name": "database", + "annotations": { + "template.alpha.openshift.io/wait-for-ready": "true" + } + }, + "spec": { + "strategy": { + "type": "Recreate", + "resources": {} + }, + "triggers": [ + { + "type": "ConfigChange" + } + ], + "replicas": 1, + "selector": { + "name": "database" + }, + "template": { + "metadata": { + "labels": { + "name": "database" + } + }, + "spec": { + "containers": [ + { + "name": "ruby-helloworld-database", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", + "ports": [ + { + "containerPort": 3306, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef" : { + "name" : "dbsecret", + "key" : "mysql-user" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef" : { + "name" : "dbsecret", + "key" : "mysql-password" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${MYSQL_DATABASE}" + } + ], + "resources": {}, + "volumeMounts": [ + { + "name": "ruby-helloworld-data", + "mountPath": "/var/lib/mysql/data" + } + ], + "terminationMessagePath": "/dev/termination-log", + "imagePullPolicy": "Always", + "securityContext": { + "capabilities": {}, + "privileged": false + } + } + ], + "volumes": [ + { + "name": "ruby-helloworld-data", + "emptyDir": { + "medium": "" + } + } + ], + "restartPolicy": "Always", + "dnsPolicy": "ClusterFirst" + } + } + } + } + ], + "parameters": [ + { + "name": "MYSQL_USER", + "description": "database username", + "generate": "expression", + "from": "user[A-Z0-9]{3}", + "required": true + }, + { + "name": "MYSQL_PASSWORD", + "description": "database password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}", + "required": true + }, + { + "name": "MYSQL_DATABASE", + "description": "database name", + "value": "root", + "required": true + } + ], + "labels": { + "template": "application-template-dockerbuild" + } +} +`) + +func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes() ([]byte, error) { + return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson, nil +} + +func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson() (*asset, error) { + bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson = []byte(`{ + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "ruby-helloworld-sample", + "annotations": { + "description": "This example shows how to create a simple ruby application in openshift origin v3", + "iconClass": "icon-ruby", + "tags": "instant-app,ruby,mysql" + } + }, + "objects": [ + { + "kind": "Secret", + "apiVersion": "v1", + "metadata": { + "name": "dbsecret" + }, + "stringData" : { + "mysql-user" : "${MYSQL_USER}", + "mysql-password" : "${MYSQL_PASSWORD}" + } + }, + { + "kind": "Service", + "apiVersion": "v1", + "metadata": { + "name": "frontend" + }, + "spec": { + "ports": [ + { + "name": "web", + "protocol": "TCP", + "port": 5432, + "targetPort": 8080, + "nodePort": 0 + } + ], + "selector": { + "name": "frontend" + }, + "type": "ClusterIP", + "sessionAffinity": "None" + }, + "status": { + "loadBalancer": {} + } + }, + { + "kind": "Route", + "apiVersion": "v1", + "metadata": { + "name": "route-edge", + "annotations": { + "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" + } + }, + "spec": { + "host": "www.example.com", + "to": { + "kind": "Service", + "name": "frontend" + }, + "tls": { + "termination": "edge" + } + }, + "status": {} + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "origin-ruby-sample" + }, + "spec": {}, + "status": { + "dockerImageRepository": "" + } + }, + { + "kind": "ImageStream", + "apiVersion": "v1", + "metadata": { + "name": "ruby-27" + }, + "spec": { + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -33973,7 +33776,7 @@ var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson = []b "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -34235,7 +34038,7 @@ var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson = []b "containers": [ { "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, @@ -36007,7 +35810,7 @@ var _testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson = []byte( "annotations": { "openshift.io/display-name": "Ruby Patched", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Build and run Ruby 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", + "description": "Build and run Ruby 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", "iconClass": "icon-ruby", "tags": "builder,ruby", "supports": "ruby:2.7,ruby", @@ -36016,14 +35819,14 @@ var _testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson = []byte( }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } }, { "name": "newtag", "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } } ] @@ -36161,7 +35964,7 @@ func testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson() (* return a, nil } -var _testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile = []byte(`FROM centos/ruby-27-centos7 +var _testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 ARG foo RUN echo $foo `) @@ -36274,7 +36077,7 @@ spec: name: "latest" - from: kind: ImageStreamTag - name: ruby:2.7 + name: ruby:2.7-ubi8 name: "2.7" `) @@ -36540,11 +36343,11 @@ var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson = []by "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7", + "name": "ruby-27", "creationTimestamp": null }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -36594,7 +36397,7 @@ var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson = []by "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -36853,7 +36656,7 @@ var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson = []by "containers": [ { "name": "ruby-helloworld-database", - "image": "openshift/mysql-55-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, @@ -37203,11 +37006,11 @@ var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson = [ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7", + "name": "ruby-27", "creationTimestamp": null }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -37256,7 +37059,7 @@ var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson = [ "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -37516,7 +37319,7 @@ var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson = [ "containers": [ { "name": "ruby-helloworld-database", - "image": "openshift/mysql-55-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, @@ -38530,7 +38333,7 @@ spec: spec: containers: - name: testapp - image: centos/ruby-27-centos7:latest + image: registry.access.redhat.com/ubi8/ruby-27:latest command: - /bin/sleep args: @@ -39485,7 +39288,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: centos/ruby-27-centos7 + name: registry.access.redhat.com/ubi8/ruby-27 type: Source triggers: [] status: @@ -39796,7 +39599,7 @@ var _testExtendedTestdataCmdTestCmdTestdataTestImageJson = []byte(`{ "name": "test", "creationTimestamp": null }, - "dockerImageReference": "registry.redhat.io/rhscl/ruby-27-rhel7:latest", + "dockerImageReference": "registry.redhat.io/ubi8/ruby-27:latest", "dockerImageMetadata": { "kind": "DockerImage", "apiVersion": "1.0", @@ -40113,7 +39916,7 @@ project="$(oc project -q)" os::test::junit::declare_suite_start "cmd/triggers" # This test validates triggers -os::cmd::expect_success 'oc new-app centos/ruby-27-centos7~https://github.com/openshift/ruby-hello-world.git' +os::cmd::expect_success 'oc new-app registry.access.redhat.com/ubi8/ruby-27~https://github.com/openshift/ruby-hello-world.git' os::cmd::expect_success 'oc get bc/ruby-hello-world' os::cmd::expect_success "oc new-build --name=scratch --docker-image=scratch --dockerfile='FROM scratch'" @@ -40126,7 +39929,7 @@ os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --remove - os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --auto --manual' 'at most one of --auto or --manual' # print os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*true' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:latest.*true' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:latest.*true' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github' # note, oc new-app currently does not set up gitlab or bitbucket webhooks by default @@ -40143,7 +39946,7 @@ os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove-a os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook|github' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*false' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:latest.*false' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:latest.*false' # set github hook os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-github' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github' @@ -40170,18 +39973,18 @@ os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'bitbucke os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-bitbucket' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'bitbucket' # set from-image -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other' 'updated' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:other.*true' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other' 'updated' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other.*true' # manual and remove both clear build configs -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other --manual' 'updated' -os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:other.*false' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other' 'updated' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other --remove' 'updated' -os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:other' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other --manual' 'updated' +os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other.*false' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other' 'updated' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other --remove' 'updated' +os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other' # test --all -os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27-centos7:latest.*false' +os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27:latest.*false' os::cmd::expect_success_and_text 'oc set triggers bc --all --auto' 'updated' -os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27-centos7:latest.*true' +os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27:latest.*true' # set a trigger on a build that doesn't have an imagestream strategy.from-image os::cmd::expect_success_and_text 'oc set triggers bc/scratch --from-image=test:latest' 'updated' @@ -40532,7 +40335,7 @@ run Proc.new { |env| EOF cat > Dockerfile <<- EOF -FROM centos/ruby-27-centos7 +FROM registry.access.redhat.com/ubi8/ruby-27 ENV SECRET_FILE /opt/openshift/src/dockercfg COPY dockercfg ./ COPY config.ru ./ @@ -40644,7 +40447,7 @@ spec: - containerPort: 8080 protocol: TCP - imagePullPolicy: IfNotPresent - name: mongodb + name: postgresql command: - /bin/sleep - "100" @@ -40666,10 +40469,10 @@ spec: - imageChangeParams: automatic: true containerNames: - - mongodb + - postgresql from: kind: ImageStreamTag - name: mongodb:latest + name: postgresql:latest namespace: openshift type: ImageChange `) @@ -42932,7 +42735,7 @@ var _testExtendedTestdataImageTestImageJson = []byte(`{ "name": "test", "creationTimestamp": null }, - "dockerImageReference": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7", + "dockerImageReference": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8", "dockerImageMetadata": { "kind": "DockerImage", "apiVersion": "1.0", @@ -44291,7 +44094,7 @@ var _testExtendedTestdataJenkinsPluginMultitagTemplateJson = []byte(`{ "name": "orig", "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } ] @@ -44309,7 +44112,7 @@ var _testExtendedTestdataJenkinsPluginMultitagTemplateJson = []byte(`{ "name": "orig", "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } ] @@ -44327,7 +44130,7 @@ var _testExtendedTestdataJenkinsPluginMultitagTemplateJson = []byte(`{ "name": "orig", "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } ] @@ -47738,7 +47541,7 @@ func testExtendedTestdataLdapLdapserverServiceYaml() (*asset, error) { return a, nil } -var _testExtendedTestdataLong_namesDockerfile = []byte(`FROM centos/ruby-27-centos7 +var _testExtendedTestdataLong_namesDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 CMD ["/bin/sh", "-c", "echo", "hello"] `) @@ -47786,7 +47589,7 @@ var _testExtendedTestdataLong_namesFixtureJson = []byte(`{ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } } @@ -47815,7 +47618,7 @@ var _testExtendedTestdataLong_namesFixtureJson = []byte(`{ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } } @@ -48021,50 +47824,61 @@ func testExtendedTestdataMultiNamespacePipelineYaml() (*asset, error) { return a, nil } -var _testExtendedTestdataMultiNamespaceTemplateYaml = []byte(`apiVersion: v1 -items: -- apiVersion: template.openshift.io/v1 - kind: Template - labels: - template: mongodb-ephemeral-template - metadata: - name: mongodb-ephemeral - objects: +var _testExtendedTestdataMultiNamespaceTemplateYaml = []byte(`kind: Template +apiVersion: v1 +metadata: + name: mariadb-ephemeral + creationTimestamp: null + annotations: + description: |- + MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md. + + WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing + iconClass: icon-mariadb + openshift.io/display-name: MariaDB (Ephemeral) + openshift.io/documentation-url: https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md + openshift.io/long-description: This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service. + openshift.io/provider-display-name: Red Hat, Inc. + openshift.io/support-url: https://access.redhat.com + tags: database,mariadb +message: |- + The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}. + + Username: ${MYSQL_USER} + Password: ${MYSQL_PASSWORD} + Database Name: ${MYSQL_DATABASE} + Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/ + + For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md. +objects: - apiVersion: v1 kind: Secret metadata: annotations: - template.openshift.io/expose-admin_password: '{.data[''database-admin-password'']}' template.openshift.io/expose-database_name: '{.data[''database-name'']}' template.openshift.io/expose-password: '{.data[''database-password'']}' + template.openshift.io/expose-root_password: '{.data[''database-root-password'']}' template.openshift.io/expose-username: '{.data[''database-user'']}' name: ${DATABASE_SERVICE_NAME} namespace: ${NAMESPACE2} stringData: - database-admin-password: ${MONGODB_ADMIN_PASSWORD} - database-name: ${MONGODB_DATABASE} - database-password: ${MONGODB_PASSWORD} - database-user: ${MONGODB_USER} + database-name: ${MYSQL_DATABASE} + database-password: ${MYSQL_PASSWORD} + database-root-password: ${MYSQL_ROOT_PASSWORD} + database-user: ${MYSQL_USER} - apiVersion: v1 kind: Service metadata: annotations: - template.openshift.io/expose-uri: mongodb://{.spec.clusterIP}:{.spec.ports[?(.name=="mongo")].port} + template.openshift.io/expose-uri: mysql://{.spec.clusterIP}:{.spec.ports[?(.name=="mariadb")].port} name: ${DATABASE_SERVICE_NAME} namespace: ${NAMESPACE3} spec: ports: - - name: mongo - nodePort: 0 - port: 27017 - protocol: TCP - targetPort: 27017 + - name: mariadb + port: 3306 selector: name: ${DATABASE_SERVICE_NAME} - sessionAffinity: None - type: ClusterIP - status: - loadBalancer: {} - apiVersion: v1 kind: DeploymentConfig metadata: @@ -48084,133 +47898,125 @@ items: name: ${DATABASE_SERVICE_NAME} spec: containers: - - capabilities: {} - env: - - name: MONGODB_USER - valueFrom: - secretKeyRef: - key: database-user - name: ${DATABASE_SERVICE_NAME} - - name: MONGODB_PASSWORD - valueFrom: - secretKeyRef: - key: database-password - name: ${DATABASE_SERVICE_NAME} - - name: MONGODB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: database-admin-password - name: ${DATABASE_SERVICE_NAME} - - name: MONGODB_DATABASE - valueFrom: - secretKeyRef: - key: database-name - name: ${DATABASE_SERVICE_NAME} - image: ' ' - imagePullPolicy: IfNotPresent - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: 27017 - timeoutSeconds: 1 - name: mongodb - ports: - - containerPort: 27017 - protocol: TCP - readinessProbe: - exec: - command: - - /bin/sh - - -i - - -c - - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD - --eval="quit()" - initialDelaySeconds: 3 - timeoutSeconds: 1 - resources: - limits: - memory: ${MEMORY_LIMIT} - securityContext: - capabilities: {} - privileged: false - terminationMessagePath: /dev/termination-log - volumeMounts: - - mountPath: /var/lib/mongodb/data - name: ${DATABASE_SERVICE_NAME}-data - dnsPolicy: ClusterFirst - restartPolicy: Always + - env: + - name: MYSQL_USER + valueFrom: + secretKeyRef: + key: database-user + name: ${DATABASE_SERVICE_NAME} + - name: MYSQL_PASSWORD + valueFrom: + secretKeyRef: + key: database-password + name: ${DATABASE_SERVICE_NAME} + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + key: database-root-password + name: ${DATABASE_SERVICE_NAME} + - name: MYSQL_DATABASE + valueFrom: + secretKeyRef: + key: database-name + name: ${DATABASE_SERVICE_NAME} + image: ' ' + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - /bin/sh + - -i + - -c + - MYSQL_PWD="$MYSQL_PASSWORD" mysqladmin -u $MYSQL_USER ping + initialDelaySeconds: 30 + timeoutSeconds: 1 + name: mariadb + ports: + - containerPort: 3306 + readinessProbe: + exec: + command: + - /bin/sh + - -i + - -c + - MYSQL_PWD="$MYSQL_PASSWORD" mysqladmin -u $MYSQL_USER ping + initialDelaySeconds: 5 + timeoutSeconds: 1 + resources: + limits: + memory: ${MEMORY_LIMIT} + volumeMounts: + - mountPath: /var/lib/mysql/data + name: ${DATABASE_SERVICE_NAME}-data volumes: - - emptyDir: - medium: "" - name: ${DATABASE_SERVICE_NAME}-data + - emptyDir: + medium: "" + name: ${DATABASE_SERVICE_NAME}-data triggers: - - imageChangeParams: - automatic: true - containerNames: - - mongodb - from: - kind: ImageStreamTag - name: mongodb:${MONGODB_VERSION} - namespace: ${NAMESPACE} - lastTriggeredImage: "" - type: ImageChange - - type: ConfigChange - status: {} - parameters: - - description: Maximum amount of memory the container can use. + - imageChangeParams: + automatic: true + containerNames: + - mariadb + from: + kind: ImageStreamTag + name: mariadb:${MARIADB_VERSION} + namespace: ${NAMESPACE} + type: ImageChange + - type: ConfigChange +parameters: + - name: MEMORY_LIMIT displayName: Memory Limit - name: MEMORY_LIMIT - required: true + description: Maximum amount of memory the container can use. value: 512Mi - - description: The OpenShift Namespace where the ImageStream resides. + required: true + - name: NAMESPACE displayName: Namespace - name: NAMESPACE + description: The OpenShift Namespace where the ImageStream resides. value: openshift - - description: The OpenShift Namespace where the ImageStream resides. + - name: NAMESPACE2 displayName: Namespace2 - name: NAMESPACE2 + description: The OpenShift Namespace where the DeploymentConfig will reside. value: ggm-namespace - - description: The OpenShift Namespace where the ImageStream resides. + - name: NAMESPACE3 displayName: Namespace3 - name: NAMESPACE3 + description: The OpenShift Namespace where the Service will reside. value: myproject - - description: The name of the OpenShift Service exposed for the database. + - name: DATABASE_SERVICE_NAME displayName: Database Service Name - name: DATABASE_SERVICE_NAME + description: The name of the OpenShift Service exposed for the database. + value: mariadb required: true - value: mongodb - - description: Username for MongoDB user that will be used for accessing the database. - displayName: MongoDB Connection Username - from: user[A-Z0-9]{3} + - name: MYSQL_USER + displayName: MariaDB Connection Username + description: Username for MariaDB user that will be used for accessing the database. generate: expression - name: MONGODB_USER + from: user[A-Z0-9]{3} required: true - - description: Password for the MongoDB connection user. - displayName: MongoDB Connection Password - from: '[a-zA-Z0-9]{16}' + - name: MYSQL_PASSWORD + displayName: MariaDB Connection Password + description: Password for the MariaDB connection user. generate: expression - name: MONGODB_PASSWORD + from: '[a-zA-Z0-9]{16}' required: true - - description: Name of the MongoDB database accessed. - displayName: MongoDB Database Name - name: MONGODB_DATABASE + - name: MYSQL_ROOT_PASSWORD + displayName: MariaDB root Password + description: Password for the MariaDB root user. + generate: expression + from: '[a-zA-Z0-9]{16}' required: true + - name: MYSQL_DATABASE + displayName: MariaDB Database Name + description: Name of the MariaDB database accessed. value: sampledb - - description: Password for the database admin user. - displayName: MongoDB Admin Password - from: '[a-zA-Z0-9]{16}' - generate: expression - name: MONGODB_ADMIN_PASSWORD required: true - - description: Version of MongoDB image to be used (2.4, 2.6, 3.2 or latest). - displayName: Version of MongoDB Image - name: MONGODB_VERSION + - name: MARIADB_VERSION + displayName: Version of MariaDB Image + description: Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest). + value: 10.3-el8 required: true - value: "3.2" -kind: List -metadata: - resourceVersion: "" - selfLink: ""`) +labels: + template: mariadb-ephemeral-template +`) func testExtendedTestdataMultiNamespaceTemplateYamlBytes() ([]byte, error) { return _testExtendedTestdataMultiNamespaceTemplateYaml, nil @@ -50892,7 +50698,7 @@ var _testExtendedTestdataRun_policyParallelBcYaml = []byte(`--- sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" resources: {} status: lastVersion: 0 @@ -50938,7 +50744,7 @@ var _testExtendedTestdataRun_policySerialBcYaml = []byte(`--- sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" - kind: "BuildConfig" apiVersion: "v1" @@ -50959,7 +50765,7 @@ var _testExtendedTestdataRun_policySerialBcYaml = []byte(`--- sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" `) func testExtendedTestdataRun_policySerialBcYamlBytes() ([]byte, error) { @@ -51002,7 +50808,7 @@ var _testExtendedTestdataRun_policySerialLatestOnlyBcYaml = []byte(`--- sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" resources: {} status: lastVersion: 0 @@ -51076,7 +50882,7 @@ func testExtendedTestdataS2iDropcapsRootAccessBuildYaml() (*asset, error) { return a, nil } -var _testExtendedTestdataS2iDropcapsRootableRubyDockerfile = []byte(`FROM centos/ruby-27-centos7:latest +var _testExtendedTestdataS2iDropcapsRootableRubyDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27:latest USER root RUN rm -f /usr/bin/ls RUN echo "root:redhat" | chpasswd @@ -53299,8 +53105,6 @@ func AssetNames() []string { var _bindata = map[string]func() (*asset, error){ "examples/db-templates/mariadb-ephemeral-template.json": examplesDbTemplatesMariadbEphemeralTemplateJson, "examples/db-templates/mariadb-persistent-template.json": examplesDbTemplatesMariadbPersistentTemplateJson, - "examples/db-templates/mongodb-ephemeral-template.json": examplesDbTemplatesMongodbEphemeralTemplateJson, - "examples/db-templates/mongodb-persistent-template.json": examplesDbTemplatesMongodbPersistentTemplateJson, "examples/db-templates/mysql-ephemeral-template.json": examplesDbTemplatesMysqlEphemeralTemplateJson, "examples/db-templates/mysql-persistent-template.json": examplesDbTemplatesMysqlPersistentTemplateJson, "examples/db-templates/postgresql-ephemeral-template.json": examplesDbTemplatesPostgresqlEphemeralTemplateJson, @@ -53323,8 +53127,8 @@ var _bindata = map[string]func() (*asset, error){ "examples/quickstarts/dotnet.json": examplesQuickstartsDotnetJson, "examples/quickstarts/httpd.json": examplesQuickstartsHttpdJson, "examples/quickstarts/nginx.json": examplesQuickstartsNginxJson, - "examples/quickstarts/nodejs-mongodb-persistent.json": examplesQuickstartsNodejsMongodbPersistentJson, - "examples/quickstarts/nodejs-mongodb.json": examplesQuickstartsNodejsMongodbJson, + "examples/quickstarts/nodejs-postgresql-persistent.json": examplesQuickstartsNodejsPostgresqlPersistentJson, + "examples/quickstarts/nodejs-postgresql.json": examplesQuickstartsNodejsPostgresqlJson, "examples/quickstarts/rails-postgresql-persistent.json": examplesQuickstartsRailsPostgresqlPersistentJson, "examples/quickstarts/rails-postgresql.json": examplesQuickstartsRailsPostgresqlJson, "examples/hello-openshift/Dockerfile": examplesHelloOpenshiftDockerfile, @@ -53464,7 +53268,7 @@ var _bindata = map[string]func() (*asset, error){ "test/extended/testdata/cluster/quickstarts/cakephp-mysql.json": testExtendedTestdataClusterQuickstartsCakephpMysqlJson, "test/extended/testdata/cluster/quickstarts/dancer-mysql.json": testExtendedTestdataClusterQuickstartsDancerMysqlJson, "test/extended/testdata/cluster/quickstarts/django-postgresql.json": testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, - "test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json": testExtendedTestdataClusterQuickstartsNodejsMongodbJson, + "test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json": testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson, "test/extended/testdata/cluster/quickstarts/rails-postgresql.json": testExtendedTestdataClusterQuickstartsRailsPostgresqlJson, "test/extended/testdata/cmd/hack/lib/cmd.sh": testExtendedTestdataCmdHackLibCmdSh, "test/extended/testdata/cmd/hack/lib/compress.awk": testExtendedTestdataCmdHackLibCompressAwk, @@ -53837,8 +53641,6 @@ var _bintree = &bintree{nil, map[string]*bintree{ "db-templates": {nil, map[string]*bintree{ "mariadb-ephemeral-template.json": {examplesDbTemplatesMariadbEphemeralTemplateJson, map[string]*bintree{}}, "mariadb-persistent-template.json": {examplesDbTemplatesMariadbPersistentTemplateJson, map[string]*bintree{}}, - "mongodb-ephemeral-template.json": {examplesDbTemplatesMongodbEphemeralTemplateJson, map[string]*bintree{}}, - "mongodb-persistent-template.json": {examplesDbTemplatesMongodbPersistentTemplateJson, map[string]*bintree{}}, "mysql-ephemeral-template.json": {examplesDbTemplatesMysqlEphemeralTemplateJson, map[string]*bintree{}}, "mysql-persistent-template.json": {examplesDbTemplatesMysqlPersistentTemplateJson, map[string]*bintree{}}, "postgresql-ephemeral-template.json": {examplesDbTemplatesPostgresqlEphemeralTemplateJson, map[string]*bintree{}}, @@ -53879,8 +53681,8 @@ var _bintree = &bintree{nil, map[string]*bintree{ "dotnet.json": {examplesQuickstartsDotnetJson, map[string]*bintree{}}, "httpd.json": {examplesQuickstartsHttpdJson, map[string]*bintree{}}, "nginx.json": {examplesQuickstartsNginxJson, map[string]*bintree{}}, - "nodejs-mongodb-persistent.json": {examplesQuickstartsNodejsMongodbPersistentJson, map[string]*bintree{}}, - "nodejs-mongodb.json": {examplesQuickstartsNodejsMongodbJson, map[string]*bintree{}}, + "nodejs-postgresql-persistent.json": {examplesQuickstartsNodejsPostgresqlPersistentJson, map[string]*bintree{}}, + "nodejs-postgresql.json": {examplesQuickstartsNodejsPostgresqlJson, map[string]*bintree{}}, "rails-postgresql-persistent.json": {examplesQuickstartsRailsPostgresqlPersistentJson, map[string]*bintree{}}, "rails-postgresql.json": {examplesQuickstartsRailsPostgresqlJson, map[string]*bintree{}}, }}, @@ -54098,7 +53900,7 @@ var _bintree = &bintree{nil, map[string]*bintree{ "cakephp-mysql.json": {testExtendedTestdataClusterQuickstartsCakephpMysqlJson, map[string]*bintree{}}, "dancer-mysql.json": {testExtendedTestdataClusterQuickstartsDancerMysqlJson, map[string]*bintree{}}, "django-postgresql.json": {testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, map[string]*bintree{}}, - "nodejs-mongodb.json": {testExtendedTestdataClusterQuickstartsNodejsMongodbJson, map[string]*bintree{}}, + "nodejs-postgresql.json": {testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson, map[string]*bintree{}}, "rails-postgresql.json": {testExtendedTestdataClusterQuickstartsRailsPostgresqlJson, map[string]*bintree{}}, }}, }}, diff --git a/test/extended/testdata/builds/application-template-custombuild.json b/test/extended/testdata/builds/application-template-custombuild.json index 0dd74be64b1a..84d14b38bb6a 100644 --- a/test/extended/testdata/builds/application-template-custombuild.json +++ b/test/extended/testdata/builds/application-template-custombuild.json @@ -401,7 +401,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, diff --git a/test/extended/testdata/builds/build-secrets/test-s2i-build.json b/test/extended/testdata/builds/build-secrets/test-s2i-build.json index 7137b38c2848..dbdcfcf2bf45 100644 --- a/test/extended/testdata/builds/build-secrets/test-s2i-build.json +++ b/test/extended/testdata/builds/build-secrets/test-s2i-build.json @@ -45,7 +45,7 @@ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" }, "env": [ { diff --git a/test/extended/testdata/builds/build-timing/Dockerfile b/test/extended/testdata/builds/build-timing/Dockerfile index 704da5ee7b1d..d3f1234dc244 100644 --- a/test/extended/testdata/builds/build-timing/Dockerfile +++ b/test/extended/testdata/builds/build-timing/Dockerfile @@ -1,3 +1,3 @@ -FROM centos/ruby-27-centos7 +FROM registry.access.redhat.com/ubi8/ruby-27 USER root diff --git a/test/extended/testdata/builds/incremental-auth-build.json b/test/extended/testdata/builds/incremental-auth-build.json index a2fdf70cb0b2..083b2f234870 100644 --- a/test/extended/testdata/builds/incremental-auth-build.json +++ b/test/extended/testdata/builds/incremental-auth-build.json @@ -48,7 +48,7 @@ ], "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" }, "incremental": true } diff --git a/test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml b/test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml index e142cc3d7132..5ba5502c189a 100644 --- a/test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml +++ b/test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml @@ -11,6 +11,6 @@ spec: sourceStrategy: from: kind: DockerImage - name: registry.redhat.io/rhscl/nodejs-10-rhel7:latest + name: registry.redhat.io/ubi8/nodejs-14:latest pullSecret: name: local-ps diff --git a/test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml b/test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml index a27f1dbeb4ff..c1ceb9221d54 100644 --- a/test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml +++ b/test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml @@ -12,4 +12,4 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 diff --git a/test/extended/testdata/builds/statusfail-fetchimagecontentdocker.yaml b/test/extended/testdata/builds/statusfail-fetchimagecontentdocker.yaml index 4b7682983c19..781d697d8b5e 100644 --- a/test/extended/testdata/builds/statusfail-fetchimagecontentdocker.yaml +++ b/test/extended/testdata/builds/statusfail-fetchimagecontentdocker.yaml @@ -11,12 +11,12 @@ spec: paths: - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - - destinationDir: injected/opt/rh/rh-ruby-27/root/usr/bin - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + - destinationDir: injected/usr/bin + sourcePath: /usr/bin/ruby strategy: type: Docker dockerStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 diff --git a/test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml b/test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml index 983f18dedc0a..248c4386c939 100644 --- a/test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml +++ b/test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml @@ -11,4 +11,4 @@ spec: dockerStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 diff --git a/test/extended/testdata/builds/statusfail-fetchsources2i.yaml b/test/extended/testdata/builds/statusfail-fetchsources2i.yaml index f59af9349f0c..5d8e50aba71f 100644 --- a/test/extended/testdata/builds/statusfail-fetchsources2i.yaml +++ b/test/extended/testdata/builds/statusfail-fetchsources2i.yaml @@ -11,4 +11,4 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 diff --git a/test/extended/testdata/builds/statusfail-genericreason.yaml b/test/extended/testdata/builds/statusfail-genericreason.yaml index f686574241d0..0ec29a04db43 100644 --- a/test/extended/testdata/builds/statusfail-genericreason.yaml +++ b/test/extended/testdata/builds/statusfail-genericreason.yaml @@ -11,7 +11,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 scripts: "http://example.org/scripts" env: - name: http_proxy diff --git a/test/extended/testdata/builds/statusfail-oomkilled.yaml b/test/extended/testdata/builds/statusfail-oomkilled.yaml index 83588b5ebede..7ea15f3754df 100644 --- a/test/extended/testdata/builds/statusfail-oomkilled.yaml +++ b/test/extended/testdata/builds/statusfail-oomkilled.yaml @@ -14,5 +14,5 @@ spec: sourceStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 forcePull: true diff --git a/test/extended/testdata/builds/test-build-app/Dockerfile b/test/extended/testdata/builds/test-build-app/Dockerfile index 5993ae9369d9..2efdab091bc6 100644 --- a/test/extended/testdata/builds/test-build-app/Dockerfile +++ b/test/extended/testdata/builds/test-build-app/Dockerfile @@ -1,10 +1,10 @@ -FROM centos/ruby-27-centos7 +FROM registry.access.redhat.com/ubi8/ruby-27 USER default EXPOSE 8080 ENV RACK_ENV production ENV RAILS_ENV production COPY . /opt/app-root/src/ -RUN scl enable rh-ruby27 "bundle install" -CMD ["scl", "enable", "rh-ruby27", "./run.sh"] +RUN bundle install +CMD ["./run.sh"] USER default diff --git a/test/extended/testdata/builds/test-build-proxy.yaml b/test/extended/testdata/builds/test-build-proxy.yaml index 60ad41145257..55f63b6b6add 100644 --- a/test/extended/testdata/builds/test-build-proxy.yaml +++ b/test/extended/testdata/builds/test-build-proxy.yaml @@ -84,7 +84,7 @@ items: dockerStrategy: from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 env: - name: SOME_HTTP_PROXY value: https://envuser:password@proxy3.com diff --git a/test/extended/testdata/builds/test-build.yaml b/test/extended/testdata/builds/test-build.yaml index f618f1836ba3..eb8ae8c7de34 100644 --- a/test/extended/testdata/builds/test-build.yaml +++ b/test/extended/testdata/builds/test-build.yaml @@ -48,7 +48,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -77,7 +77,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -105,7 +105,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -134,7 +134,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} status: lastVersion: 0 @@ -162,7 +162,7 @@ items: value: '5' from: kind: DockerImage - name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7 + name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8 resources: {} nodeSelector: nodelabelkey: nodelabelvalue @@ -180,7 +180,7 @@ items: source: type: Dockerfile dockerfile: |- - FROM centos/ruby-27-centos7 + FROM registry.access.redhat.com/ubi8/ruby-27 ARG foofoo RUN echo $foofoo strategy: @@ -206,7 +206,7 @@ items: source: type: Dockerfile dockerfile: |- - FROM centos/ruby-27-centos7 + FROM registry.access.redhat.com/ubi8/ruby-27 ARG foofoo RUN echo $foofoo strategy: diff --git a/test/extended/testdata/builds/test-context-build.json b/test/extended/testdata/builds/test-context-build.json index 4c9714e76884..0ac5f31e7ce5 100644 --- a/test/extended/testdata/builds/test-context-build.json +++ b/test/extended/testdata/builds/test-context-build.json @@ -55,7 +55,7 @@ ], "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } }, diff --git a/test/extended/testdata/builds/test-env-build.json b/test/extended/testdata/builds/test-env-build.json index 912e26d9ea03..a79d4ace1381 100644 --- a/test/extended/testdata/builds/test-env-build.json +++ b/test/extended/testdata/builds/test-env-build.json @@ -17,7 +17,7 @@ "sourceStrategy":{ "from":{ "kind":"DockerImage", - "name":"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name":"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } }, diff --git a/test/extended/testdata/builds/test-imageresolution-custom-build.yaml b/test/extended/testdata/builds/test-imageresolution-custom-build.yaml index fe29b52f5f7b..4873c66fbfe9 100644 --- a/test/extended/testdata/builds/test-imageresolution-custom-build.yaml +++ b/test/extended/testdata/builds/test-imageresolution-custom-build.yaml @@ -22,7 +22,7 @@ items: name: inputimage:latest paths: - destinationDir: injected/dir - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + sourcePath: /usr/bin/ruby strategy: customStrategy: from: diff --git a/test/extended/testdata/builds/test-imageresolution-docker-build.yaml b/test/extended/testdata/builds/test-imageresolution-docker-build.yaml index 481d97e7f4a9..1038b92a5fbc 100644 --- a/test/extended/testdata/builds/test-imageresolution-docker-build.yaml +++ b/test/extended/testdata/builds/test-imageresolution-docker-build.yaml @@ -22,7 +22,7 @@ items: name: inputimage:latest paths: - destinationDir: injected/dir - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + sourcePath: /usr/bin/ruby strategy: dockerStrategy: from: diff --git a/test/extended/testdata/builds/test-imageresolution-s2i-build.yaml b/test/extended/testdata/builds/test-imageresolution-s2i-build.yaml index 7172beb9cd0f..760e5c4559cb 100644 --- a/test/extended/testdata/builds/test-imageresolution-s2i-build.yaml +++ b/test/extended/testdata/builds/test-imageresolution-s2i-build.yaml @@ -22,7 +22,7 @@ items: name: inputimage:latest paths: - destinationDir: injected/dir - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + sourcePath: /usr/bin/ruby strategy: sourceStrategy: from: diff --git a/test/extended/testdata/builds/test-imagesource-buildconfig.yaml b/test/extended/testdata/builds/test-imagesource-buildconfig.yaml index a73d5a78e90f..bca4bf9da424 100644 --- a/test/extended/testdata/builds/test-imagesource-buildconfig.yaml +++ b/test/extended/testdata/builds/test-imagesource-buildconfig.yaml @@ -23,7 +23,7 @@ items: dockerStrategy: from: kind: ImageStreamTag - name: ruby:2.7 + name: ruby:2.7-ubi8 namespace: openshift - apiVersion: v1 kind: BuildConfig @@ -47,8 +47,8 @@ items: # Bug 1698152: ensure image source copy behavior is correct - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - - destinationDir: injected/opt/rh/rh-ruby-27/root/usr/bin - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + - destinationDir: injected/usr/bin + sourcePath: /usr/bin/ruby strategy: sourceStrategy: from: @@ -77,8 +77,8 @@ items: # Bug 1698152: ensure image source copy behavior is correct - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - - destinationDir: injected/opt/rh/rh-ruby-27/root/usr/bin - sourcePath: /opt/rh/rh-ruby27/root/usr/bin/ruby + - destinationDir: injected/usr/bin + sourcePath: /usr/bin/ruby strategy: dockerStrategy: {} diff --git a/test/extended/testdata/cluster/master-vert.yaml b/test/extended/testdata/cluster/master-vert.yaml index 5d5c40d65a22..f4a83c8ed37a 100644 --- a/test/extended/testdata/cluster/master-vert.yaml +++ b/test/extended/testdata/cluster/master-vert.yaml @@ -28,12 +28,12 @@ ClusterLoader: file: ./quickstarts/django-postgresql.json - num: 1 - basename: clusterloader-nodejs-mongodb + basename: clusterloader-nodejs-postgresql ifexists: delete tuning: default templates: - num: 1 - file: ./quickstarts/nodejs-mongodb.json + file: ./quickstarts/nodejs-postgresql.json - num: 1 basename: clusterloader-rails-postgresql diff --git a/test/extended/testdata/cluster/quickstarts/cakephp-mysql.json b/test/extended/testdata/cluster/quickstarts/cakephp-mysql.json index 0db9b5d685e1..e8fdf317e7f2 100644 --- a/test/extended/testdata/cluster/quickstarts/cakephp-mysql.json +++ b/test/extended/testdata/cluster/quickstarts/cakephp-mysql.json @@ -1,564 +1,574 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "cakephp-mysql-example", - "template": "cakephp-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-php", - "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", - "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,php,cakephp", - "template.openshift.io/bindable": "false" - }, - "name": "cakephp-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", - "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./vendor/bin/phpunit" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "COMPOSER_MIRROR", - "value": "${COMPOSER_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "php:${PHP_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "cakephp-mysql-example" - }, - "failurePolicy": "Retry" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECRET_TOKEN", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-secret-token", - "name": "${NAME}" - } - } - }, - { - "name": "CAKEPHP_SECURITY_SALT", - "valueFrom": { - "secretKeyRef": { - "key": "cakephp-security-salt", - "name": "${NAME}" - } - } - }, - { - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "${OPCACHE_REVALIDATE_FREQ}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 30, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "name": "cakephp-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health.php", - "port": 8080 - }, - "initialDelaySeconds": 3, - "periodSeconds": 60, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "cakephp-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "cakephp-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of PHP image to be used (7.1 or latest).", - "displayName": "PHP Version", - "name": "PHP_VERSION", - "required": true, - "value": "7.1" - }, - { - "description": "Maximum amount of memory the CakePHP container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/cakephp-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mysql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "mysql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database User", - "name": "DATABASE_USER", - "required": true, - "value": "cakephp" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Set this to a long random string.", - "displayName": "CakePHP secret token", - "from": "[\\w]{50}", - "generate": "expression", - "name": "CAKEPHP_SECRET_TOKEN" - }, - { - "description": "Security salt for session hash.", - "displayName": "CakePHP Security Salt", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "CAKEPHP_SECURITY_SALT" - }, - { - "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", - "displayName": "OPcache Revalidation Frequency", - "name": "OPCACHE_REVALIDATE_FREQ", - "value": "2" - }, - { - "description": "The custom Composer mirror URL", - "displayName": "Custom Composer Mirror URL", - "name": "COMPOSER_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "cakephp-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-php", + "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", + "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,php,cakephp", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", + "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./vendor/bin/phpunit" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "COMPOSER_MIRROR", + "value": "${COMPOSER_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "php:${PHP_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "cakephp-mysql-example" + }, + "failurePolicy": "Retry" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-secret-token", + "name": "${NAME}" + } + } + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "valueFrom": { + "secretKeyRef": { + "key": "cakephp-security-salt", + "name": "${NAME}" + } + } + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "value": "${OPCACHE_REVALIDATE_FREQ}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 30, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "name": "cakephp-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health.php", + "port": 8080 + }, + "initialDelaySeconds": 3, + "periodSeconds": 60, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "cakephp-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:${MYSQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "cakephp-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PHP_VERSION", + "displayName": "PHP Version", + "description": "Version of PHP image to be used (7.3-ubi7, 7.3-ubi8, or latest).", + "value": "7.3-ubi8", + "required": true + }, + { + "name": "MYSQL_VERSION", + "displayName": "MySQL Version", + "description": "Version of MySQL image to be used (8.0-el8 or latest).", + "value": "8.0-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the CakePHP container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/cakephp-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "mysql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database User", + "value": "cakephp", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "CAKEPHP_SECRET_TOKEN", + "displayName": "CakePHP secret token", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "CAKEPHP_SECURITY_SALT", + "displayName": "CakePHP Security Salt", + "description": "Security salt for session hash.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "OPCACHE_REVALIDATE_FREQ", + "displayName": "OPcache Revalidation Frequency", + "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", + "value": "2" + }, + { + "name": "COMPOSER_MIRROR", + "displayName": "Custom Composer Mirror URL", + "description": "The custom Composer mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "cakephp-mysql-example", + "template": "cakephp-mysql-example" + } +} \ No newline at end of file diff --git a/test/extended/testdata/cluster/quickstarts/dancer-mysql.json b/test/extended/testdata/cluster/quickstarts/dancer-mysql.json index bf4e7a6f0bf9..b5244e9a4eaf 100644 --- a/test/extended/testdata/cluster/quickstarts/dancer-mysql.json +++ b/test/extended/testdata/cluster/quickstarts/dancer-mysql.json @@ -1,516 +1,525 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "dancer-mysql-example", - "template": "dancer-mysql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-perl", - "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,perl,dancer", - "template.openshift.io/bindable": "false" - }, - "name": "dancer-mysql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "perl -I extlib/lib/perl5 -I lib t/*" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "CPAN_MIRROR", - "value": "${CPAN_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "perl:5.30-ubi8", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "PERL_APACHE2_RELOAD", - "value": "${PERL_APACHE2_RELOAD}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "dancer-mysql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "dancer-mysql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mysql", - "port": 3306, - "targetPort": 3306 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MYSQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MYSQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 3306 - }, - "timeoutSeconds": 1 - }, - "name": "mysql", - "ports": [ - { - "containerPort": 3306 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MYSQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mysql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mysql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mysql:5.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "dancer-mysql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Perl Dancer container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MySQL container can use.", - "displayName": "Memory Limit (MySQL)", - "name": "MEMORY_MYSQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/dancer-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "database" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.", - "displayName": "Perl Module Reload", - "name": "PERL_APACHE2_RELOAD", - "value": "" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The custom CPAN mirror URL", - "displayName": "Custom CPAN Mirror URL", - "name": "CPAN_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "dancer-mysql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-perl", + "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,perl,dancer", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "perl -I extlib/lib/perl5 -I lib t/*" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "CPAN_MIRROR", + "value": "${CPAN_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "perl:${PERL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "PERL_APACHE2_RELOAD", + "value": "${PERL_APACHE2_RELOAD}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "dancer-mysql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "dancer-mysql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "mysql", + "port": 3306, + "targetPort": 3306 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "MYSQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "MYSQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 3306 + }, + "timeoutSeconds": 1 + }, + "name": "mysql", + "ports": [ + { + "containerPort": 3306 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/bin/sh", + "-i", + "-c", + "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_MYSQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/mysql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "mysql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "mysql:8.0-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "dancer-mysql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PERL_VERSION", + "displayName": "Version of Perl Image", + "description": "Version of Perl image to be used (5.26-el7, 5.26-ubi8, or latest).", + "value": "5.26-ubi8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Perl Dancer container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_MYSQL_LIMIT", + "displayName": "Memory Limit (MySQL)", + "description": "Maximum amount of memory the MySQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/dancer-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "database", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "sampledb", + "required": true + }, + { + "name": "PERL_APACHE2_RELOAD", + "displayName": "Perl Module Reload", + "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "CPAN_MIRROR", + "displayName": "Custom CPAN Mirror URL", + "description": "The custom CPAN mirror URL" + }, + { + "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", + "displayName": "MySQL authentication plugin", + "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", + "value": "mysql_native_password" + } + ], + "labels": { + "app": "dancer-mysql-example", + "template": "dancer-mysql-example" + } +} \ No newline at end of file diff --git a/test/extended/testdata/cluster/quickstarts/django-postgresql.json b/test/extended/testdata/cluster/quickstarts/django-postgresql.json index f278fe472984..51a708aa05da 100644 --- a/test/extended/testdata/cluster/quickstarts/django-postgresql.json +++ b/test/extended/testdata/cluster/quickstarts/django-postgresql.json @@ -1,540 +1,533 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "django-psql-example", - "template": "django-psql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-python", - "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,python,django", - "template.openshift.io/bindable": "false" - }, - "name": "django-psql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "django-secret-key": "${DJANGO_SECRET_KEY}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "./manage.py test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "PIP_INDEX_URL", - "value": "${PIP_INDEX_URL}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "python:${PYTHON_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "DATABASE_ENGINE", - "value": "${DATABASE_ENGINE}" - }, - { - "name": "DATABASE_NAME", - "value": "${DATABASE_NAME}" - }, - { - "name": "DATABASE_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "APP_CONFIG", - "value": "${APP_CONFIG}" - }, - { - "name": "DJANGO_SECRET_KEY", - "valueFrom": { - "secretKeyRef": { - "key": "django-secret-key", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "django-psql-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/health", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "django-psql-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:${POSTGRESQL_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "django-psql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of Python image to be used (3.6 or latest).", - "displayName": "Version of Python Image", - "name": "PYTHON_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Version of PostgreSQL image to be used (10 or latest).", - "displayName": "Version of PostgreSQL Image", - "name": "POSTGRESQL_VERSION", - "required": true, - "value": "10" - }, - { - "description": "Maximum amount of memory the Django container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/django-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "description": "Database engine: postgresql, mysql or sqlite (default).", - "displayName": "Database Engine", - "name": "DATABASE_ENGINE", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "default" - }, - { - "displayName": "Database Username", - "name": "DATABASE_USER", - "required": true, - "value": "django" - }, - { - "displayName": "Database User Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "description": "Relative path to Gunicorn configuration file (optional).", - "displayName": "Application Configuration File Path", - "name": "APP_CONFIG" - }, - { - "description": "Set this to a long random string.", - "displayName": "Django Secret Key", - "from": "[\\w]{50}", - "generate": "expression", - "name": "DJANGO_SECRET_KEY" - }, - { - "description": "The custom PyPi index URL", - "displayName": "Custom PyPi Index URL", - "name": "PIP_INDEX_URL", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "django-psql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-python", + "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,python,django", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "django-secret-key": "${DJANGO_SECRET_KEY}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "./manage.py test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "PIP_INDEX_URL", + "value": "${PIP_INDEX_URL}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "python:${PYTHON_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "DATABASE_ENGINE", + "value": "${DATABASE_ENGINE}" + }, + { + "name": "DATABASE_NAME", + "value": "${DATABASE_NAME}" + }, + { + "name": "DATABASE_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "DATABASE_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "APP_CONFIG", + "value": "${APP_CONFIG}" + }, + { + "name": "DJANGO_SECRET_KEY", + "valueFrom": { + "secretKeyRef": { + "key": "django-secret-key", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "django-psql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/health", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "django-psql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "django-psql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "PYTHON_VERSION", + "displayName": "Version of Python Image", + "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi7, 3.8-ubi8, or latest).", + "value": "3.8-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Django container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/django-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_ENGINE", + "displayName": "Database Engine", + "description": "Database engine: postgresql, mysql or sqlite (default).", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "default", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "value": "django", + "required": true + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database User Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "APP_CONFIG", + "displayName": "Application Configuration File Path", + "description": "Relative path to Gunicorn configuration file (optional)." + }, + { + "name": "DJANGO_SECRET_KEY", + "displayName": "Django Secret Key", + "description": "Set this to a long random string.", + "generate": "expression", + "from": "[\\w]{50}" + }, + { + "name": "PIP_INDEX_URL", + "displayName": "Custom PyPi Index URL", + "description": "The custom PyPi index URL" + } + ], + "labels": { + "app": "django-psql-example", + "template": "django-psql-example" + } +} \ No newline at end of file diff --git a/test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json b/test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json deleted file mode 100644 index 1f1a639b56a6..000000000000 --- a/test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json +++ /dev/null @@ -1,546 +0,0 @@ -{ - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "nodejs-mongodb-example", - "template": "nodejs-mongodb-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-nodejs", - "openshift.io/display-name": "Node.js + MongoDB (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex", - "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,nodejs", - "template.openshift.io/bindable": "false" - }, - "name": "nodejs-mongodb-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "npm test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "NPM_MIRROR", - "value": "${NPM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "nodejs:${NODEJS_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - }, - { - "generic": { - "secret": "${GENERIC_WEBHOOK_SECRET}" - }, - "type": "Generic" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 30, - "timeoutSeconds": 3 - }, - "name": "nodejs-mongodb-example", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/", - "port": 8080 - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "nodejs-mongodb-example" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "mongodb", - "port": 27017, - "targetPort": 27017 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "MONGODB_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "MONGODB_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "MONGODB_ADMIN_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-admin-password", - "name": "${NAME}" - } - } - } - ], - "image": " ", - "livenessProbe": { - "initialDelaySeconds": 30, - "tcpSocket": { - "port": 27017 - }, - "timeoutSeconds": 1 - }, - "name": "mongodb", - "ports": [ - { - "containerPort": 27017 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/bin/sh", - "-i", - "-c", - "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\"" - ] - }, - "initialDelaySeconds": 3, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_MONGODB_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/mongodb/data", - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": { - "medium": "" - }, - "name": "${DATABASE_SERVICE_NAME}-data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "mongodb" - ], - "from": { - "kind": "ImageStreamTag", - "name": "mongodb:${MONGODB_VERSION}", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "nodejs-mongodb-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Version of NodeJS image to be used (6, 8, or latest).", - "displayName": "Version of NodeJS Image", - "name": "NODEJS_VERSION", - "required": true, - "value": "8" - }, - { - "description": "Version of MongoDB image to be used (3.6 or latest).", - "displayName": "Version of MongoDB Image", - "name": "MONGODB_VERSION", - "required": true, - "value": "3.6" - }, - { - "description": "Maximum amount of memory the Node.js container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the MongoDB container can use.", - "displayName": "Memory Limit (MongoDB)", - "name": "MEMORY_MONGODB_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/nodejs-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "A secret string used to configure the Generic webhook.", - "displayName": "Generic Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GENERIC_WEBHOOK_SECRET" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "mongodb" - }, - { - "description": "Username for MongoDB user that will be used for accessing the database.", - "displayName": "MongoDB Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "description": "Password for the MongoDB user.", - "displayName": "MongoDB Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "sampledb" - }, - { - "description": "Password for the database admin user.", - "displayName": "Database Administrator Password", - "from": "[a-zA-Z0-9]{16}", - "generate": "expression", - "name": "DATABASE_ADMIN_PASSWORD" - }, - { - "description": "The custom NPM mirror URL", - "displayName": "Custom NPM Mirror URL", - "name": "NPM_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] -} diff --git a/test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json b/test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json new file mode 100644 index 000000000000..b63716aac0d2 --- /dev/null +++ b/test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json @@ -0,0 +1,529 @@ +{ + "kind": "Template", + "apiVersion": "template.openshift.io/v1", + "metadata": { + "name": "nodejs-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-nodejs", + "openshift.io/display-name": "Node.js + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", + "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,nodejs", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": {}, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "NPM_MIRROR", + "value": "${NPM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "nodejs:${NODEJS_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + }, + { + "generic": { + "secret": "${GENERIC_WEBHOOK_SECRET}" + }, + "type": "Generic" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "labels": { + "app.openshift.io/runtime": "nodejs" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "app.openshift.io/runtime": "nodejs", + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 30, + "timeoutSeconds": 3 + }, + "name": "nodejs-postgresql-example", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/", + "port": 8080 + }, + "initialDelaySeconds": 3, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "nodejs-postgresql-example" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_ADMIN_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-admin-password", + "name": "${NAME}" + } + } + } + ], + "image": " ", + "livenessProbe": { + "initialDelaySeconds": 30, + "tcpSocket": { + "port": 5432 + }, + "timeoutSeconds": 1 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/postgresql/data", + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": { + "medium": "" + }, + "name": "${DATABASE_SERVICE_NAME}-data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:${POSTGRESQL_VERSION}", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "nodejs-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "NODEJS_VERSION", + "displayName": "Version of NodeJS Image", + "description": "Version of NodeJS image to be used (10-ubi8, 12-ubi8, or latest).", + "value": "12-ubi8", + "required": true + }, + { + "name": "POSTGRESQL_VERSION", + "displayName": "Version of PostgreSQL Image", + "description": "Version of PostgreSQL image to be used (12-el8, or latest).", + "value": "12-el8", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Node.js container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "256Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "GENERIC_WEBHOOK_SECRET", + "displayName": "Generic Webhook Secret", + "description": "A secret string used to configure the Generic webhook.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "PostgreSQL Username", + "description": "Username for PostgreSQL user that will be used for accessing the database.", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "PostgreSQL Password", + "description": "Password for the PostgreSQL user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "my_data", + "required": true + }, + { + "name": "DATABASE_ADMIN_PASSWORD", + "displayName": "Database Administrator Password", + "description": "Password for the database admin user.", + "generate": "expression", + "from": "[a-zA-Z0-9]{16}" + }, + { + "name": "NPM_MIRROR", + "displayName": "Custom NPM Mirror URL", + "description": "The custom NPM mirror URL" + } + ], + "labels": { + "app": "nodejs-postgresql-example", + "template": "nodejs-postgresql-example" + } +} \ No newline at end of file diff --git a/test/extended/testdata/cluster/quickstarts/rails-postgresql.json b/test/extended/testdata/cluster/quickstarts/rails-postgresql.json index 472d4b43cb9e..9d4366f7f6be 100644 --- a/test/extended/testdata/cluster/quickstarts/rails-postgresql.json +++ b/test/extended/testdata/cluster/quickstarts/rails-postgresql.json @@ -1,592 +1,585 @@ { - "apiVersion": "v1", - "kind": "Template", - "labels": { - "app": "rails-postgresql-example", - "template": "rails-postgresql-example" - }, - "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", - "metadata": { - "annotations": { - "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", - "iconClass": "icon-ruby", - "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", - "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", - "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", - "openshift.io/provider-display-name": "Red Hat, Inc.", - "openshift.io/support-url": "https://access.redhat.com", - "tags": "quickstart,ruby,rails", - "template.openshift.io/bindable": "false" - }, - "name": "rails-postgresql-example" - }, - "objects": [ - { - "apiVersion": "v1", - "kind": "Secret", - "metadata": { - "name": "${NAME}" - }, - "stringData": { - "application-password": "${APPLICATION_PASSWORD}", - "application-user": "${APPLICATION_USER}", - "database-password": "${DATABASE_PASSWORD}", - "database-user": "${DATABASE_USER}", - "keybase": "${SECRET_KEY_BASE}" - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes and load balances the application pods", - "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" - }, - "name": "${NAME}" - }, - "spec": { - "ports": [ - { - "name": "web", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "Route", - "metadata": { - "name": "${NAME}" - }, - "spec": { - "host": "${APPLICATION_DOMAIN}", - "to": { - "kind": "Service", - "name": "${NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "ImageStream", - "metadata": { - "annotations": { - "description": "Keeps track of changes in the application image" - }, - "name": "${NAME}" - } - }, - { - "apiVersion": "v1", - "kind": "BuildConfig", - "metadata": { - "annotations": { - "description": "Defines how to build the application", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "postCommit": { - "script": "bundle exec rake test" - }, - "source": { - "contextDir": "${CONTEXT_DIR}", - "git": { - "ref": "${SOURCE_REPOSITORY_REF}", - "uri": "${SOURCE_REPOSITORY_URL}" - }, - "type": "Git" - }, - "strategy": { - "sourceStrategy": { - "env": [ - { - "name": "RUBYGEM_MIRROR", - "value": "${RUBYGEM_MIRROR}" - } - ], - "from": { - "kind": "ImageStreamTag", - "name": "ruby:2.7", - "namespace": "${NAMESPACE}" - } - }, - "type": "Source" - }, - "triggers": [ - { - "type": "ImageChange" - }, - { - "type": "ConfigChange" - }, - { - "github": { - "secret": "${GITHUB_WEBHOOK_SECRET}" - }, - "type": "GitHub" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the application server", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${NAME}" - }, - "strategy": { - "recreateParams": { - "pre": { - "execNewPod": { - "command": [ - "./migrate-database.sh" - ], - "containerName": "${NAME}" - }, - "failurePolicy": "Abort" - } - }, - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${NAME}" - }, - "name": "${NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "DATABASE_SERVICE_NAME", - "value": "${DATABASE_SERVICE_NAME}" - }, - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "SECRET_KEY_BASE", - "valueFrom": { - "secretKeyRef": { - "key": "keybase", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - }, - { - "name": "APPLICATION_DOMAIN", - "value": "${APPLICATION_DOMAIN}" - }, - { - "name": "APPLICATION_USER", - "valueFrom": { - "secretKeyRef": { - "key": "application-user", - "name": "${NAME}" - } - } - }, - { - "name": "APPLICATION_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "application-password", - "name": "${NAME}" - } - } - }, - { - "name": "RAILS_ENV", - "value": "${RAILS_ENV}" - } - ], - "image": " ", - "livenessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 10, - "timeoutSeconds": 3 - }, - "name": "${NAME}", - "ports": [ - { - "containerPort": 8080 - } - ], - "readinessProbe": { - "httpGet": { - "path": "/articles", - "port": 8080 - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 3 - }, - "resources": { - "limits": { - "memory": "${MEMORY_LIMIT}" - } - } - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${NAME}" - ], - "from": { - "kind": "ImageStreamTag", - "name": "${NAME}:latest" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - }, - { - "apiVersion": "v1", - "kind": "Service", - "metadata": { - "annotations": { - "description": "Exposes the database server" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "ports": [ - { - "name": "postgresql", - "port": 5432, - "targetPort": 5432 - } - ], - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - } - } - }, - { - "apiVersion": "v1", - "kind": "DeploymentConfig", - "metadata": { - "annotations": { - "description": "Defines how to deploy the database", - "template.alpha.openshift.io/wait-for-ready": "true" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "replicas": 1, - "selector": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "strategy": { - "type": "Recreate" - }, - "template": { - "metadata": { - "labels": { - "name": "${DATABASE_SERVICE_NAME}" - }, - "name": "${DATABASE_SERVICE_NAME}" - }, - "spec": { - "containers": [ - { - "env": [ - { - "name": "POSTGRESQL_USER", - "valueFrom": { - "secretKeyRef": { - "key": "database-user", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "key": "database-password", - "name": "${NAME}" - } - } - }, - { - "name": "POSTGRESQL_DATABASE", - "value": "${DATABASE_NAME}" - }, - { - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "${POSTGRESQL_MAX_CONNECTIONS}" - }, - { - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "${POSTGRESQL_SHARED_BUFFERS}" - } - ], - "image": " ", - "livenessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container", - "--live" - ] - }, - "initialDelaySeconds": 120, - "timeoutSeconds": 10 - }, - "name": "postgresql", - "ports": [ - { - "containerPort": 5432 - } - ], - "readinessProbe": { - "exec": { - "command": [ - "/usr/libexec/check-container" - ] - }, - "initialDelaySeconds": 5, - "timeoutSeconds": 1 - }, - "resources": { - "limits": { - "memory": "${MEMORY_POSTGRESQL_LIMIT}" - } - }, - "volumeMounts": [ - { - "mountPath": "/var/lib/pgsql/data", - "name": "data" - } - ] - } - ], - "volumes": [ - { - "emptyDir": {}, - "name": "data" - } - ] - } - }, - "triggers": [ - { - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "postgresql" - ], - "from": { - "kind": "ImageStreamTag", - "name": "postgresql:12", - "namespace": "${NAMESPACE}" - } - }, - "type": "ImageChange" - }, - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "description": "The name assigned to all of the frontend objects defined in this template.", - "displayName": "Name", - "name": "NAME", - "required": true, - "value": "rails-postgresql-example" - }, - { - "description": "The OpenShift Namespace where the ImageStream resides.", - "displayName": "Namespace", - "name": "NAMESPACE", - "required": true, - "value": "openshift" - }, - { - "description": "Maximum amount of memory the Rails container can use.", - "displayName": "Memory Limit", - "name": "MEMORY_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "Maximum amount of memory the PostgreSQL container can use.", - "displayName": "Memory Limit (PostgreSQL)", - "name": "MEMORY_POSTGRESQL_LIMIT", - "required": true, - "value": "512Mi" - }, - { - "description": "The URL of the repository with your application source code.", - "displayName": "Git Repository URL", - "name": "SOURCE_REPOSITORY_URL", - "required": true, - "value": "https://github.com/sclorg/rails-ex.git" - }, - { - "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", - "displayName": "Git Reference", - "name": "SOURCE_REPOSITORY_REF" - }, - { - "description": "Set this to the relative path to your project if it is not in the root of your repository.", - "displayName": "Context Directory", - "name": "CONTEXT_DIR" - }, - { - "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.", - "displayName": "Application Hostname", - "name": "APPLICATION_DOMAIN", - "value": "" - }, - { - "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", - "displayName": "GitHub Webhook Secret", - "from": "[a-zA-Z0-9]{40}", - "generate": "expression", - "name": "GITHUB_WEBHOOK_SECRET" - }, - { - "description": "Your secret key for verifying the integrity of signed cookies.", - "displayName": "Secret Key", - "from": "[a-z0-9]{127}", - "generate": "expression", - "name": "SECRET_KEY_BASE" - }, - { - "description": "The application user that is used within the sample application to authorize access on pages.", - "displayName": "Application Username", - "name": "APPLICATION_USER", - "required": true, - "value": "openshift" - }, - { - "description": "The application password that is used within the sample application to authorize access on pages.", - "displayName": "Application Password", - "name": "APPLICATION_PASSWORD", - "required": true, - "value": "secret" - }, - { - "description": "Environment under which the sample application will run. Could be set to production, development or test.", - "displayName": "Rails Environment", - "name": "RAILS_ENV", - "required": true, - "value": "production" - }, - { - "displayName": "Database Service Name", - "name": "DATABASE_SERVICE_NAME", - "required": true, - "value": "postgresql" - }, - { - "displayName": "Database Username", - "from": "user[A-Z0-9]{3}", - "generate": "expression", - "name": "DATABASE_USER" - }, - { - "displayName": "Database Password", - "from": "[a-zA-Z0-9]{8}", - "generate": "expression", - "name": "DATABASE_PASSWORD" - }, - { - "displayName": "Database Name", - "name": "DATABASE_NAME", - "required": true, - "value": "root" - }, - { - "displayName": "Maximum Database Connections", - "name": "POSTGRESQL_MAX_CONNECTIONS", - "value": "100" - }, - { - "displayName": "Shared Buffer Amount", - "name": "POSTGRESQL_SHARED_BUFFERS", - "value": "12MB" - }, - { - "description": "The custom RubyGems mirror URL", - "displayName": "Custom RubyGems Mirror URL", - "name": "RUBYGEM_MIRROR", - "value": "" - }, - { - "description": "Unique template ID to prevent name conflict", - "displayName": "CL generation ID", - "name": "IDENTIFIER", - "value": "0" - } - ] -} + "kind": "Template", + "apiVersion": "v1", + "metadata": { + "name": "rails-postgresql-example", + "creationTimestamp": null, + "annotations": { + "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", + "iconClass": "icon-ruby", + "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", + "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", + "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", + "openshift.io/provider-display-name": "Red Hat, Inc.", + "openshift.io/support-url": "https://access.redhat.com", + "tags": "quickstart,ruby,rails", + "template.openshift.io/bindable": "false" + } + }, + "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", + "objects": [ + { + "apiVersion": "v1", + "kind": "Secret", + "metadata": { + "name": "${NAME}" + }, + "stringData": { + "application-password": "${APPLICATION_PASSWORD}", + "application-user": "${APPLICATION_USER}", + "database-password": "${DATABASE_PASSWORD}", + "database-user": "${DATABASE_USER}", + "keybase": "${SECRET_KEY_BASE}" + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes and load balances the application pods", + "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" + }, + "name": "${NAME}" + }, + "spec": { + "ports": [ + { + "name": "web", + "port": 8080, + "targetPort": 8080 + } + ], + "selector": { + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "Route", + "metadata": { + "name": "${NAME}" + }, + "spec": { + "host": "${APPLICATION_DOMAIN}", + "to": { + "kind": "Service", + "name": "${NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "ImageStream", + "metadata": { + "annotations": { + "description": "Keeps track of changes in the application image" + }, + "name": "${NAME}" + } + }, + { + "apiVersion": "v1", + "kind": "BuildConfig", + "metadata": { + "annotations": { + "description": "Defines how to build the application", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "output": { + "to": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "postCommit": { + "script": "bundle exec rake test" + }, + "source": { + "contextDir": "${CONTEXT_DIR}", + "git": { + "ref": "${SOURCE_REPOSITORY_REF}", + "uri": "${SOURCE_REPOSITORY_URL}" + }, + "type": "Git" + }, + "strategy": { + "sourceStrategy": { + "env": [ + { + "name": "RUBYGEM_MIRROR", + "value": "${RUBYGEM_MIRROR}" + } + ], + "from": { + "kind": "ImageStreamTag", + "name": "ruby:2.6-ubi8", + "namespace": "${NAMESPACE}" + } + }, + "type": "Source" + }, + "triggers": [ + { + "type": "ImageChange" + }, + { + "type": "ConfigChange" + }, + { + "github": { + "secret": "${GITHUB_WEBHOOK_SECRET}" + }, + "type": "GitHub" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the application server", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${NAME}" + }, + "strategy": { + "recreateParams": { + "pre": { + "execNewPod": { + "command": [ + "./migrate-database.sh" + ], + "containerName": "${NAME}" + }, + "failurePolicy": "Abort" + } + }, + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${NAME}" + }, + "name": "${NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "DATABASE_SERVICE_NAME", + "value": "${DATABASE_SERVICE_NAME}" + }, + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "SECRET_KEY_BASE", + "valueFrom": { + "secretKeyRef": { + "key": "keybase", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + }, + { + "name": "APPLICATION_DOMAIN", + "value": "${APPLICATION_DOMAIN}" + }, + { + "name": "APPLICATION_USER", + "valueFrom": { + "secretKeyRef": { + "key": "application-user", + "name": "${NAME}" + } + } + }, + { + "name": "APPLICATION_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "application-password", + "name": "${NAME}" + } + } + }, + { + "name": "RAILS_ENV", + "value": "${RAILS_ENV}" + } + ], + "image": " ", + "livenessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 3 + }, + "name": "${NAME}", + "ports": [ + { + "containerPort": 8080 + } + ], + "readinessProbe": { + "httpGet": { + "path": "/articles", + "port": 8080 + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 3 + }, + "resources": { + "limits": { + "memory": "${MEMORY_LIMIT}" + } + } + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "${NAME}" + ], + "from": { + "kind": "ImageStreamTag", + "name": "${NAME}:latest" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "description": "Exposes the database server" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "ports": [ + { + "name": "postgresql", + "port": 5432, + "targetPort": 5432 + } + ], + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + } + } + }, + { + "apiVersion": "v1", + "kind": "DeploymentConfig", + "metadata": { + "annotations": { + "description": "Defines how to deploy the database", + "template.alpha.openshift.io/wait-for-ready": "true" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "replicas": 1, + "selector": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "strategy": { + "type": "Recreate" + }, + "template": { + "metadata": { + "labels": { + "name": "${DATABASE_SERVICE_NAME}" + }, + "name": "${DATABASE_SERVICE_NAME}" + }, + "spec": { + "containers": [ + { + "env": [ + { + "name": "POSTGRESQL_USER", + "valueFrom": { + "secretKeyRef": { + "key": "database-user", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_PASSWORD", + "valueFrom": { + "secretKeyRef": { + "key": "database-password", + "name": "${NAME}" + } + } + }, + { + "name": "POSTGRESQL_DATABASE", + "value": "${DATABASE_NAME}" + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "value": "${POSTGRESQL_MAX_CONNECTIONS}" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "value": "${POSTGRESQL_SHARED_BUFFERS}" + } + ], + "image": " ", + "livenessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container", + "--live" + ] + }, + "initialDelaySeconds": 120, + "timeoutSeconds": 10 + }, + "name": "postgresql", + "ports": [ + { + "containerPort": 5432 + } + ], + "readinessProbe": { + "exec": { + "command": [ + "/usr/libexec/check-container" + ] + }, + "initialDelaySeconds": 5, + "timeoutSeconds": 1 + }, + "resources": { + "limits": { + "memory": "${MEMORY_POSTGRESQL_LIMIT}" + } + }, + "volumeMounts": [ + { + "mountPath": "/var/lib/pgsql/data", + "name": "data" + } + ] + } + ], + "volumes": [ + { + "emptyDir": {}, + "name": "data" + } + ] + } + }, + "triggers": [ + { + "imageChangeParams": { + "automatic": true, + "containerNames": [ + "postgresql" + ], + "from": { + "kind": "ImageStreamTag", + "name": "postgresql:12-el8", + "namespace": "${NAMESPACE}" + } + }, + "type": "ImageChange" + }, + { + "type": "ConfigChange" + } + ] + } + } + ], + "parameters": [ + { + "name": "NAME", + "displayName": "Name", + "description": "The name assigned to all of the frontend objects defined in this template.", + "value": "rails-postgresql-example", + "required": true + }, + { + "name": "NAMESPACE", + "displayName": "Namespace", + "description": "The OpenShift Namespace where the ImageStream resides.", + "value": "openshift", + "required": true + }, + { + "name": "MEMORY_LIMIT", + "displayName": "Memory Limit", + "description": "Maximum amount of memory the Rails container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "MEMORY_POSTGRESQL_LIMIT", + "displayName": "Memory Limit (PostgreSQL)", + "description": "Maximum amount of memory the PostgreSQL container can use.", + "value": "512Mi", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_URL", + "displayName": "Git Repository URL", + "description": "The URL of the repository with your application source code.", + "value": "https://github.com/sclorg/rails-ex.git", + "required": true + }, + { + "name": "SOURCE_REPOSITORY_REF", + "displayName": "Git Reference", + "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." + }, + { + "name": "CONTEXT_DIR", + "displayName": "Context Directory", + "description": "Set this to the relative path to your project if it is not in the root of your repository." + }, + { + "name": "APPLICATION_DOMAIN", + "displayName": "Application Hostname", + "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." + }, + { + "name": "GITHUB_WEBHOOK_SECRET", + "displayName": "GitHub Webhook Secret", + "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", + "generate": "expression", + "from": "[a-zA-Z0-9]{40}" + }, + { + "name": "SECRET_KEY_BASE", + "displayName": "Secret Key", + "description": "Your secret key for verifying the integrity of signed cookies.", + "generate": "expression", + "from": "[a-z0-9]{127}" + }, + { + "name": "APPLICATION_USER", + "displayName": "Application Username", + "description": "The application user that is used within the sample application to authorize access on pages.", + "value": "openshift", + "required": true + }, + { + "name": "APPLICATION_PASSWORD", + "displayName": "Application Password", + "description": "The application password that is used within the sample application to authorize access on pages.", + "value": "secret", + "required": true + }, + { + "name": "RAILS_ENV", + "displayName": "Rails Environment", + "description": "Environment under which the sample application will run. Could be set to production, development or test.", + "value": "production", + "required": true + }, + { + "name": "DATABASE_SERVICE_NAME", + "displayName": "Database Service Name", + "value": "postgresql", + "required": true + }, + { + "name": "DATABASE_USER", + "displayName": "Database Username", + "generate": "expression", + "from": "user[A-Z0-9]{3}" + }, + { + "name": "DATABASE_PASSWORD", + "displayName": "Database Password", + "generate": "expression", + "from": "[a-zA-Z0-9]{8}" + }, + { + "name": "DATABASE_NAME", + "displayName": "Database Name", + "value": "root", + "required": true + }, + { + "name": "POSTGRESQL_MAX_CONNECTIONS", + "displayName": "Maximum Database Connections", + "value": "100" + }, + { + "name": "POSTGRESQL_SHARED_BUFFERS", + "displayName": "Shared Buffer Amount", + "value": "12MB" + }, + { + "name": "RUBYGEM_MIRROR", + "displayName": "Custom RubyGems Mirror URL", + "description": "The custom RubyGems mirror URL" + } + ], + "labels": { + "app": "rails-postgresql-example", + "template": "rails-postgresql-example" + } +} \ No newline at end of file diff --git a/test/extended/testdata/cmd/test/cmd/deployments.sh b/test/extended/testdata/cmd/test/cmd/deployments.sh index c1f77be513eb..83f1b721600c 100755 --- a/test/extended/testdata/cmd/test/cmd/deployments.sh +++ b/test/extended/testdata/cmd/test/cmd/deployments.sh @@ -122,7 +122,7 @@ os::cmd::try_until_success 'oc rollout history dc/database --revision=2' # rolling back to the same revision should fail os::cmd::expect_failure 'oc rollback dc/database --to-version=2' # undo --dry-run should report the original image -os::cmd::expect_success_and_text 'oc rollout undo dc/database --dry-run' 'image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7' +os::cmd::expect_success_and_text 'oc rollout undo dc/database --dry-run' 'image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8' echo "rollback: ok" os::test::junit::declare_suite_end diff --git a/test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json b/test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json index 0dd74be64b1a..84d14b38bb6a 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json @@ -401,7 +401,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, diff --git a/test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json b/test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json index 9f2f68ead139..14c9b02ecd3a 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json @@ -354,7 +354,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, diff --git a/test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json b/test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json index f4c1fec78e9e..c6254b7978cc 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json @@ -83,10 +83,10 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7" + "name": "ruby-27" }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -138,7 +138,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -400,7 +400,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:5.7", + "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, diff --git a/test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json b/test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json index 8ac147bbb116..71f2bbe1b3d1 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json @@ -14,7 +14,7 @@ "annotations": { "openshift.io/display-name": "Ruby Patched", "openshift.io/provider-display-name": "Red Hat, Inc.", - "description": "Build and run Ruby 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", + "description": "Build and run Ruby 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", "iconClass": "icon-ruby", "tags": "builder,ruby", "supports": "ruby:2.7,ruby", @@ -23,14 +23,14 @@ }, "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } }, { "name": "newtag", "from": { "kind": "DockerImage", - "name": "registry.centos.org/centos/ruby-27-centos7:latest" + "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } } ] diff --git a/test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile b/test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile index 01c1d3a4a754..41674d8b8538 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile +++ b/test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile @@ -1,3 +1,3 @@ -FROM centos/ruby-27-centos7 +FROM registry.access.redhat.com/ubi8/ruby-27 ARG foo RUN echo $foo diff --git a/test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml b/test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml index 6cbbf867758a..42509dbe973a 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml +++ b/test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml @@ -10,5 +10,5 @@ spec: name: "latest" - from: kind: ImageStreamTag - name: ruby:2.7 + name: ruby:2.7-ubi8 name: "2.7" diff --git a/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json b/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json index 5f0fc3853ccb..d809b53a9005 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json @@ -73,11 +73,11 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7", + "name": "ruby-27", "creationTimestamp": null }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -127,7 +127,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -386,7 +386,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "openshift/mysql-55-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, diff --git a/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json b/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json index 191413dfa51e..a89e1fd3433a 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json @@ -77,11 +77,11 @@ "kind": "ImageStream", "apiVersion": "v1", "metadata": { - "name": "ruby-27-centos7", + "name": "ruby-27", "creationTimestamp": null }, "spec": { - "dockerImageRepository": "centos/ruby-27-centos7" + "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" @@ -130,7 +130,7 @@ "sourceStrategy": { "from": { "kind": "ImageStreamTag", - "name": "ruby-27-centos7:latest" + "name": "ruby-27:latest" }, "env": [ { @@ -390,7 +390,7 @@ "containers": [ { "name": "ruby-helloworld-database", - "image": "openshift/mysql-55-centos7:latest", + "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, diff --git a/test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml b/test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml index 3af081ad2fb4..fee4c1cb84be 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml +++ b/test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml @@ -15,7 +15,7 @@ spec: spec: containers: - name: testapp - image: centos/ruby-27-centos7:latest + image: registry.access.redhat.com/ubi8/ruby-27:latest command: - /bin/sleep args: diff --git a/test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml b/test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml index a4f15768bcf7..706e111fded4 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml +++ b/test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml @@ -14,7 +14,7 @@ spec: sourceStrategy: from: kind: DockerImage - name: centos/ruby-27-centos7 + name: registry.access.redhat.com/ubi8/ruby-27 type: Source triggers: [] status: diff --git a/test/extended/testdata/cmd/test/cmd/testdata/test-image.json b/test/extended/testdata/cmd/test/cmd/testdata/test-image.json index 8824089c062f..9d74c1f9ce94 100644 --- a/test/extended/testdata/cmd/test/cmd/testdata/test-image.json +++ b/test/extended/testdata/cmd/test/cmd/testdata/test-image.json @@ -5,7 +5,7 @@ "name": "test", "creationTimestamp": null }, - "dockerImageReference": "registry.redhat.io/rhscl/ruby-27-rhel7:latest", + "dockerImageReference": "registry.redhat.io/ubi8/ruby-27:latest", "dockerImageMetadata": { "kind": "DockerImage", "apiVersion": "1.0", diff --git a/test/extended/testdata/cmd/test/cmd/triggers.sh b/test/extended/testdata/cmd/test/cmd/triggers.sh index 83ff880499cc..026650633944 100755 --- a/test/extended/testdata/cmd/test/cmd/triggers.sh +++ b/test/extended/testdata/cmd/test/cmd/triggers.sh @@ -16,7 +16,7 @@ project="$(oc project -q)" os::test::junit::declare_suite_start "cmd/triggers" # This test validates triggers -os::cmd::expect_success 'oc new-app centos/ruby-27-centos7~https://github.com/openshift/ruby-hello-world.git' +os::cmd::expect_success 'oc new-app registry.access.redhat.com/ubi8/ruby-27~https://github.com/openshift/ruby-hello-world.git' os::cmd::expect_success 'oc get bc/ruby-hello-world' os::cmd::expect_success "oc new-build --name=scratch --docker-image=scratch --dockerfile='FROM scratch'" @@ -29,7 +29,7 @@ os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --remove - os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --auto --manual' 'at most one of --auto or --manual' # print os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*true' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:latest.*true' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:latest.*true' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github' # note, oc new-app currently does not set up gitlab or bitbucket webhooks by default @@ -46,7 +46,7 @@ os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove-a os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook|github' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*false' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:latest.*false' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:latest.*false' # set github hook os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-github' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github' @@ -73,18 +73,18 @@ os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'bitbucke os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-bitbucket' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'bitbucket' # set from-image -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other' 'updated' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:other.*true' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other' 'updated' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other.*true' # manual and remove both clear build configs -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other --manual' 'updated' -os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:other.*false' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other' 'updated' -os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27-centos7:other --remove' 'updated' -os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27-centos7:other' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other --manual' 'updated' +os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other.*false' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other' 'updated' +os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other --remove' 'updated' +os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other' # test --all -os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27-centos7:latest.*false' +os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27:latest.*false' os::cmd::expect_success_and_text 'oc set triggers bc --all --auto' 'updated' -os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27-centos7:latest.*true' +os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27:latest.*true' # set a trigger on a build that doesn't have an imagestream strategy.from-image os::cmd::expect_success_and_text 'oc set triggers bc/scratch --from-image=test:latest' 'updated' diff --git a/test/extended/testdata/custom-secret-builder/build.sh b/test/extended/testdata/custom-secret-builder/build.sh index 36551115f53f..ccdefb99385a 100755 --- a/test/extended/testdata/custom-secret-builder/build.sh +++ b/test/extended/testdata/custom-secret-builder/build.sh @@ -35,7 +35,7 @@ run Proc.new { |env| EOF cat > Dockerfile <<- EOF -FROM centos/ruby-27-centos7 +FROM registry.access.redhat.com/ubi8/ruby-27 ENV SECRET_FILE /opt/openshift/src/dockercfg COPY dockercfg ./ COPY config.ru ./ diff --git a/test/extended/testdata/deployments/deployment-example.yaml b/test/extended/testdata/deployments/deployment-example.yaml index 998d63502c5a..11685d33889d 100644 --- a/test/extended/testdata/deployments/deployment-example.yaml +++ b/test/extended/testdata/deployments/deployment-example.yaml @@ -21,7 +21,7 @@ spec: - containerPort: 8080 protocol: TCP - imagePullPolicy: IfNotPresent - name: mongodb + name: postgresql command: - /bin/sleep - "100" @@ -43,9 +43,9 @@ spec: - imageChangeParams: automatic: true containerNames: - - mongodb + - postgresql from: kind: ImageStreamTag - name: mongodb:latest + name: postgresql:latest namespace: openshift type: ImageChange diff --git a/test/extended/testdata/image/test-image.json b/test/extended/testdata/image/test-image.json index 4966c068a305..be8712381a12 100644 --- a/test/extended/testdata/image/test-image.json +++ b/test/extended/testdata/image/test-image.json @@ -5,7 +5,7 @@ "name": "test", "creationTimestamp": null }, - "dockerImageReference": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7", + "dockerImageReference": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8", "dockerImageMetadata": { "kind": "DockerImage", "apiVersion": "1.0", diff --git a/test/extended/testdata/jenkins-plugin/multitag-template.json b/test/extended/testdata/jenkins-plugin/multitag-template.json index 2b18552cf92a..3e3d4957239d 100644 --- a/test/extended/testdata/jenkins-plugin/multitag-template.json +++ b/test/extended/testdata/jenkins-plugin/multitag-template.json @@ -18,7 +18,7 @@ "name": "orig", "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } ] @@ -36,7 +36,7 @@ "name": "orig", "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } ] @@ -54,7 +54,7 @@ "name": "orig", "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } ] diff --git a/test/extended/testdata/long_names/Dockerfile b/test/extended/testdata/long_names/Dockerfile index 993eee5ca53c..90cae3ca2e64 100644 --- a/test/extended/testdata/long_names/Dockerfile +++ b/test/extended/testdata/long_names/Dockerfile @@ -1,3 +1,3 @@ -FROM centos/ruby-27-centos7 +FROM registry.access.redhat.com/ubi8/ruby-27 CMD ["/bin/sh", "-c", "echo", "hello"] diff --git a/test/extended/testdata/long_names/fixture.json b/test/extended/testdata/long_names/fixture.json index efd3d23b10e9..0d36dbf2ab07 100644 --- a/test/extended/testdata/long_names/fixture.json +++ b/test/extended/testdata/long_names/fixture.json @@ -26,7 +26,7 @@ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } } @@ -55,7 +55,7 @@ "sourceStrategy": { "from": { "kind": "DockerImage", - "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" } } } diff --git a/test/extended/testdata/multi-namespace-template.yaml b/test/extended/testdata/multi-namespace-template.yaml index 425001759765..eef185193228 100644 --- a/test/extended/testdata/multi-namespace-template.yaml +++ b/test/extended/testdata/multi-namespace-template.yaml @@ -1,47 +1,58 @@ +kind: Template apiVersion: v1 -items: -- apiVersion: template.openshift.io/v1 - kind: Template - labels: - template: mongodb-ephemeral-template - metadata: - name: mongodb-ephemeral - objects: +metadata: + name: mariadb-ephemeral + creationTimestamp: null + annotations: + description: |- + MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md. + + WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing + iconClass: icon-mariadb + openshift.io/display-name: MariaDB (Ephemeral) + openshift.io/documentation-url: https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md + openshift.io/long-description: This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service. + openshift.io/provider-display-name: Red Hat, Inc. + openshift.io/support-url: https://access.redhat.com + tags: database,mariadb +message: |- + The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}. + + Username: ${MYSQL_USER} + Password: ${MYSQL_PASSWORD} + Database Name: ${MYSQL_DATABASE} + Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/ + + For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md. +objects: - apiVersion: v1 kind: Secret metadata: annotations: - template.openshift.io/expose-admin_password: '{.data[''database-admin-password'']}' template.openshift.io/expose-database_name: '{.data[''database-name'']}' template.openshift.io/expose-password: '{.data[''database-password'']}' + template.openshift.io/expose-root_password: '{.data[''database-root-password'']}' template.openshift.io/expose-username: '{.data[''database-user'']}' name: ${DATABASE_SERVICE_NAME} namespace: ${NAMESPACE2} stringData: - database-admin-password: ${MONGODB_ADMIN_PASSWORD} - database-name: ${MONGODB_DATABASE} - database-password: ${MONGODB_PASSWORD} - database-user: ${MONGODB_USER} + database-name: ${MYSQL_DATABASE} + database-password: ${MYSQL_PASSWORD} + database-root-password: ${MYSQL_ROOT_PASSWORD} + database-user: ${MYSQL_USER} - apiVersion: v1 kind: Service metadata: annotations: - template.openshift.io/expose-uri: mongodb://{.spec.clusterIP}:{.spec.ports[?(.name=="mongo")].port} + template.openshift.io/expose-uri: mysql://{.spec.clusterIP}:{.spec.ports[?(.name=="mariadb")].port} name: ${DATABASE_SERVICE_NAME} namespace: ${NAMESPACE3} spec: ports: - - name: mongo - nodePort: 0 - port: 27017 - protocol: TCP - targetPort: 27017 + - name: mariadb + port: 3306 selector: name: ${DATABASE_SERVICE_NAME} - sessionAffinity: None - type: ClusterIP - status: - loadBalancer: {} - apiVersion: v1 kind: DeploymentConfig metadata: @@ -61,130 +72,121 @@ items: name: ${DATABASE_SERVICE_NAME} spec: containers: - - capabilities: {} - env: - - name: MONGODB_USER - valueFrom: - secretKeyRef: - key: database-user - name: ${DATABASE_SERVICE_NAME} - - name: MONGODB_PASSWORD - valueFrom: - secretKeyRef: - key: database-password - name: ${DATABASE_SERVICE_NAME} - - name: MONGODB_ADMIN_PASSWORD - valueFrom: - secretKeyRef: - key: database-admin-password - name: ${DATABASE_SERVICE_NAME} - - name: MONGODB_DATABASE - valueFrom: - secretKeyRef: - key: database-name - name: ${DATABASE_SERVICE_NAME} - image: ' ' - imagePullPolicy: IfNotPresent - livenessProbe: - initialDelaySeconds: 30 - tcpSocket: - port: 27017 - timeoutSeconds: 1 - name: mongodb - ports: - - containerPort: 27017 - protocol: TCP - readinessProbe: - exec: - command: - - /bin/sh - - -i - - -c - - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD - --eval="quit()" - initialDelaySeconds: 3 - timeoutSeconds: 1 - resources: - limits: - memory: ${MEMORY_LIMIT} - securityContext: - capabilities: {} - privileged: false - terminationMessagePath: /dev/termination-log - volumeMounts: - - mountPath: /var/lib/mongodb/data - name: ${DATABASE_SERVICE_NAME}-data - dnsPolicy: ClusterFirst - restartPolicy: Always + - env: + - name: MYSQL_USER + valueFrom: + secretKeyRef: + key: database-user + name: ${DATABASE_SERVICE_NAME} + - name: MYSQL_PASSWORD + valueFrom: + secretKeyRef: + key: database-password + name: ${DATABASE_SERVICE_NAME} + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + key: database-root-password + name: ${DATABASE_SERVICE_NAME} + - name: MYSQL_DATABASE + valueFrom: + secretKeyRef: + key: database-name + name: ${DATABASE_SERVICE_NAME} + image: ' ' + imagePullPolicy: IfNotPresent + livenessProbe: + exec: + command: + - /bin/sh + - -i + - -c + - MYSQL_PWD="$MYSQL_PASSWORD" mysqladmin -u $MYSQL_USER ping + initialDelaySeconds: 30 + timeoutSeconds: 1 + name: mariadb + ports: + - containerPort: 3306 + readinessProbe: + exec: + command: + - /bin/sh + - -i + - -c + - MYSQL_PWD="$MYSQL_PASSWORD" mysqladmin -u $MYSQL_USER ping + initialDelaySeconds: 5 + timeoutSeconds: 1 + resources: + limits: + memory: ${MEMORY_LIMIT} + volumeMounts: + - mountPath: /var/lib/mysql/data + name: ${DATABASE_SERVICE_NAME}-data volumes: - - emptyDir: - medium: "" - name: ${DATABASE_SERVICE_NAME}-data + - emptyDir: + medium: "" + name: ${DATABASE_SERVICE_NAME}-data triggers: - - imageChangeParams: - automatic: true - containerNames: - - mongodb - from: - kind: ImageStreamTag - name: mongodb:${MONGODB_VERSION} - namespace: ${NAMESPACE} - lastTriggeredImage: "" - type: ImageChange - - type: ConfigChange - status: {} - parameters: - - description: Maximum amount of memory the container can use. + - imageChangeParams: + automatic: true + containerNames: + - mariadb + from: + kind: ImageStreamTag + name: mariadb:${MARIADB_VERSION} + namespace: ${NAMESPACE} + type: ImageChange + - type: ConfigChange +parameters: + - name: MEMORY_LIMIT displayName: Memory Limit - name: MEMORY_LIMIT - required: true + description: Maximum amount of memory the container can use. value: 512Mi - - description: The OpenShift Namespace where the ImageStream resides. + required: true + - name: NAMESPACE displayName: Namespace - name: NAMESPACE + description: The OpenShift Namespace where the ImageStream resides. value: openshift - - description: The OpenShift Namespace where the ImageStream resides. + - name: NAMESPACE2 displayName: Namespace2 - name: NAMESPACE2 + description: The OpenShift Namespace where the DeploymentConfig will reside. value: ggm-namespace - - description: The OpenShift Namespace where the ImageStream resides. + - name: NAMESPACE3 displayName: Namespace3 - name: NAMESPACE3 + description: The OpenShift Namespace where the Service will reside. value: myproject - - description: The name of the OpenShift Service exposed for the database. + - name: DATABASE_SERVICE_NAME displayName: Database Service Name - name: DATABASE_SERVICE_NAME + description: The name of the OpenShift Service exposed for the database. + value: mariadb required: true - value: mongodb - - description: Username for MongoDB user that will be used for accessing the database. - displayName: MongoDB Connection Username - from: user[A-Z0-9]{3} + - name: MYSQL_USER + displayName: MariaDB Connection Username + description: Username for MariaDB user that will be used for accessing the database. generate: expression - name: MONGODB_USER + from: user[A-Z0-9]{3} required: true - - description: Password for the MongoDB connection user. - displayName: MongoDB Connection Password - from: '[a-zA-Z0-9]{16}' + - name: MYSQL_PASSWORD + displayName: MariaDB Connection Password + description: Password for the MariaDB connection user. generate: expression - name: MONGODB_PASSWORD + from: '[a-zA-Z0-9]{16}' required: true - - description: Name of the MongoDB database accessed. - displayName: MongoDB Database Name - name: MONGODB_DATABASE + - name: MYSQL_ROOT_PASSWORD + displayName: MariaDB root Password + description: Password for the MariaDB root user. + generate: expression + from: '[a-zA-Z0-9]{16}' required: true + - name: MYSQL_DATABASE + displayName: MariaDB Database Name + description: Name of the MariaDB database accessed. value: sampledb - - description: Password for the database admin user. - displayName: MongoDB Admin Password - from: '[a-zA-Z0-9]{16}' - generate: expression - name: MONGODB_ADMIN_PASSWORD required: true - - description: Version of MongoDB image to be used (2.4, 2.6, 3.2 or latest). - displayName: Version of MongoDB Image - name: MONGODB_VERSION + - name: MARIADB_VERSION + displayName: Version of MariaDB Image + description: Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest). + value: 10.3-el8 required: true - value: "3.2" -kind: List -metadata: - resourceVersion: "" - selfLink: "" \ No newline at end of file +labels: + template: mariadb-ephemeral-template diff --git a/test/extended/testdata/run_policy/parallel-bc.yaml b/test/extended/testdata/run_policy/parallel-bc.yaml index 3621046490cd..d9c5aa10db0a 100644 --- a/test/extended/testdata/run_policy/parallel-bc.yaml +++ b/test/extended/testdata/run_policy/parallel-bc.yaml @@ -32,7 +32,7 @@ sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" resources: {} status: lastVersion: 0 diff --git a/test/extended/testdata/run_policy/serial-bc.yaml b/test/extended/testdata/run_policy/serial-bc.yaml index c4299aecf6ab..2384211b80ad 100644 --- a/test/extended/testdata/run_policy/serial-bc.yaml +++ b/test/extended/testdata/run_policy/serial-bc.yaml @@ -23,7 +23,7 @@ sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" - kind: "BuildConfig" apiVersion: "v1" @@ -44,4 +44,4 @@ sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" diff --git a/test/extended/testdata/run_policy/serial-latest-only-bc.yaml b/test/extended/testdata/run_policy/serial-latest-only-bc.yaml index d196fedcb68f..459e6f9fe616 100644 --- a/test/extended/testdata/run_policy/serial-latest-only-bc.yaml +++ b/test/extended/testdata/run_policy/serial-latest-only-bc.yaml @@ -23,7 +23,7 @@ sourceStrategy: from: kind: "DockerImage" - name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7" + name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8" resources: {} status: lastVersion: 0 diff --git a/test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile b/test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile index 5fea6587be6a..d8b73788c404 100644 --- a/test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile +++ b/test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile @@ -1,4 +1,4 @@ -FROM centos/ruby-27-centos7:latest +FROM registry.access.redhat.com/ubi8/ruby-27:latest USER root RUN rm -f /usr/bin/ls RUN echo "root:redhat" | chpasswd diff --git a/test/extended/util/annotate/generated/zz_generated.annotations.go b/test/extended/util/annotate/generated/zz_generated.annotations.go index bc302e968899..bb67d74c3f1c 100644 --- a/test/extended/util/annotate/generated/zz_generated.annotations.go +++ b/test/extended/util/annotate/generated/zz_generated.annotations.go @@ -1417,37 +1417,41 @@ var annotations = map[string]string{ "[Top Level] [sig-devex] check registry.redhat.io is available and samples operator can import sample imagestreams run sample related validations": "run sample related validations [Suite:openshift/conformance/parallel]", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12\" should print the usage", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12-ubi8\" should print the usage", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30\" should print the usage", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:14-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:14-ubi8\" should print the usage", + + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30-ubi8\" should print the usage", "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/php:7.2-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/php:7.2-ubi8\" should print the usage", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3\" should print the usage", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3-ubi8\" should print the usage", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7\" should print the usage", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7-ubi8\" should print the usage", "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/python:3.6-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/python:3.6-ubi8\" should print the usage", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6\" should print the usage", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6-ubi8\" should print the usage", + + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8\" should print the usage", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled returning s2i usage when running the image \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7\" should print the usage": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7\" should print the usage", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12-ubi8\" should be SCL enabled", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:12\" should be SCL enabled", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:14-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/nodejs:14-ubi8\" should be SCL enabled", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30\" should be SCL enabled", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/perl:5.30-ubi8\" should be SCL enabled", "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/php:7.2-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/php:7.2-ubi8\" should be SCL enabled", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3\" should be SCL enabled", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/php:7.3-ubi8\" should be SCL enabled", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7\" should be SCL enabled", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/python:2.7-ubi8\" should be SCL enabled", "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/python:3.6-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/python:3.6-ubi8\" should be SCL enabled", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6\" should be SCL enabled", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.6-ubi8\" should be SCL enabled", - "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7\" should be SCL enabled", + "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift images should be SCL enabled using the SCL in s2i images \"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8\" should be SCL enabled": "\"image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.7-ubi8\" should be SCL enabled", "[Top Level] [sig-devex][Feature:ImageEcosystem][Slow] openshift sample application repositories [sig-devex][Feature:ImageEcosystem][nodejs] test nodejs images with nodejs-rest-http-crud db repo Building nodejs-postgresql app from new-app should build a nodejs-postgresql image and run it in a pod": "should build a nodejs-postgresql image and run it in a pod", diff --git a/test/extended/util/framework.go b/test/extended/util/framework.go index f0292f808561..d7b33e2e7243 100644 --- a/test/extended/util/framework.go +++ b/test/extended/util/framework.go @@ -239,7 +239,7 @@ func WaitForOpenShiftNamespaceImageStreams(oc *CLI) error { if err != nil { return err } - langs := []string{"ruby", "nodejs", "perl", "php", "python", "mysql", "postgresql", "mongodb", "jenkins"} + langs := []string{"ruby", "nodejs", "perl", "php", "python", "mysql", "postgresql", "jenkins"} scan := func() error { // check the samples operator to see about imagestream import status samplesOperatorConfig, err := oc.AdminConfigClient().ConfigV1().ClusterOperators().Get(ctx, "openshift-samples", metav1.GetOptions{})