{ "apiVersion": "v1", "kind": "Template", "metadata": { "annotations": { "openshift.io/display-name": "Red Hat Fuse 7.7 Console", "openshift.io/provider-display-name": "Red Hat, Inc.", "description": "The Red Hat Fuse Console eases the discovery and management of Fuse applications deployed on OpenShift.", "tags": "hawtio,java,fuse", "iconClass": "icon-rh-integration", "version": "1.7" }, "labels": { "template": "fuse-console" }, "name": "fuse77-console" }, "parameters": [ { "name": "APP_NAME", "displayName": "Application Name", "required": true, "value": "fuse77-console", "description": "The name assigned to the application." }, { "name": "APP_VERSION", "displayName": "Application Version", "required": true, "value": "1.7", "description": "The application version." }, { "name": "IMAGE_STREAM_NAMESPACE", "displayName": "Image Stream Namespace", "value": "openshift", "required": true, "description": "Namespace in which the Fuse ImageStreams are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project." }, { "name": "ROUTE_HOSTNAME", "description": "The externally-reachable host name that routes to the Red Hat Fuse console service" }, { "name": "OPENSHIFT_WEB_CONSOLE_URL", "description": "The externally-reachable URL that routes to the OpenShift Web console", "required": false }, { "name": "CPU_REQUEST", "displayName": "CPU request", "value": "0.2", "required": true, "description": "The amount of CPU to request." }, { "name": "MEMORY_REQUEST", "displayName": "Memory request", "value": "32Mi", "required": true, "description": "The amount of memory required for the container to run." }, { "name": "CPU_LIMIT", "displayName": "CPU limit", "value": "1.0", "required": true, "description": "The amount of CPU the container is limited to use." }, { "name": "MEMORY_LIMIT", "displayName": "Memory limit", "value": "200Mi", "required": true, "description": "The amount of memory the container is limited to use." } ], "objects": [ { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "name": "${APP_NAME}-config" }, "data": { "hawtconfig.json": "{\n \"about\": {\n \"title\": \"Red Hat Fuse Console\",\n \"productInfo\": [],\n \"additionalInfo\": \"The Red Hat Fuse Console eases the discovery and management of Fuse applications deployed on OpenShift.\",\n \"copyright\": \"\",\n \"imgSrc\": \"../online/img/Logo-RedHat-A-Reverse-RGB.png\"\n },\n \"branding\": {\n \"appName\": \"Fuse Console\",\n \"appLogoUrl\": \"../online/img/Logo-Red_Hat-Fuse-A-Reverse-RGB.png\"\n },\n \"disabledRoutes\": [\n \"/camel/source\",\n \"/diagnostics\",\n \"/jvm/discover\",\n \"/jvm/local\"\n ]\n}\n" } }, { "kind": "Route", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}-route", "labels": { "component": "${APP_NAME}", "group": "console", "app": "${APP_NAME}", "version": "${APP_VERSION}" } }, "spec": { "host": "${ROUTE_HOSTNAME}", "to": { "kind": "Service", "name": "${APP_NAME}-service" }, "tls": { "insecureEdgeTerminationPolicy": "Redirect", "termination": "reencrypt" } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}-service", "labels": { "component": "${APP_NAME}", "group": "console", "app": "${APP_NAME}", "version": "${APP_VERSION}" }, "annotations": { "service.alpha.openshift.io/serving-cert-secret-name": "${APP_NAME}-tls-serving" } }, "spec": { "ports": [ { "port": 443, "protocol": "TCP", "targetPort": "nginx" } ], "selector": { "component": "${APP_NAME}", "group": "console", "app": "${APP_NAME}" } } }, { "kind": "ServiceAccount", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}-service-account", "labels": { "component": "${APP_NAME}", "group": "console", "app": "${APP_NAME}", "version": "${APP_VERSION}" }, "annotations": { "serviceaccounts.openshift.io/oauth-redirecturi.route": "https://", "serviceaccounts.openshift.io/oauth-redirectreference.route": "{\"kind\": \"OAuthRedirectReference\", \"apiVersion\": \"v1\", \"reference\": {\"kind\": \"Route\", \"name\": \"${APP_NAME}-route\"}}" } } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}", "labels": { "component": "${APP_NAME}", "group": "console", "app": "${APP_NAME}", "version": "${APP_VERSION}" } }, "spec": { "triggers": [ { "type": "ConfigChange" }, { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "${APP_NAME}" ], "from": { "kind": "ImageStreamTag", "namespace": "${IMAGE_STREAM_NAMESPACE}", "name": "fuse7-console:${APP_VERSION}" } } } ], "replicas": 1, "selector": { "component": "${APP_NAME}", "deploymentconfig": "${APP_NAME}", "group": "console", "app": "${APP_NAME}", "version": "${APP_VERSION}" }, "template": { "metadata": { "labels": { "component": "${APP_NAME}", "deploymentconfig": "${APP_NAME}", "group": "console", "app": "${APP_NAME}", "version": "${APP_VERSION}" } }, "spec": { "containers": [ { "name": "${APP_NAME}", "image": "fuse7-console:${APP_VERSION}", "readinessProbe": { "httpGet": { "path": "/online", "port": "nginx", "scheme": "HTTPS" }, "initialDelaySeconds": 5 }, "livenessProbe": { "httpGet": { "path": "/online", "port": "nginx", "scheme": "HTTPS" }, "initialDelaySeconds": 10, "periodSeconds": 10 }, "ports": [ { "containerPort": 8443, "name": "nginx" } ], "env": [ { "name": "HAWTIO_ONLINE_MODE", "value": "namespace" }, { "name": "HAWTIO_ONLINE_GATEWAY", "value": "true" }, { "name": "HAWTIO_ONLINE_NAMESPACE", "valueFrom": { "fieldRef": { "fieldPath": "metadata.namespace" } } }, { "name": "HAWTIO_OAUTH_CLIENT_ID", "value": "${APP_NAME}-service-account" }, { "name": "OPENSHIFT_WEB_CONSOLE_URL", "value": "${OPENSHIFT_WEB_CONSOLE_URL}" }, { "name": "OPENSHIFT_CLUSTER_VERSION", "value": "4" } ], "volumeMounts": [ { "name": "${APP_NAME}-config", "mountPath": "/opt/app-root/src/online/hawtconfig.json", "subPath": "hawtconfig.json" }, { "name": "${APP_NAME}-config", "mountPath": "/opt/app-root/src/integration/hawtconfig.json", "subPath": "hawtconfig.json" }, { "mountPath": "/etc/tls/private/serving", "name": "${APP_NAME}-tls-serving" }, { "mountPath": "/etc/tls/private/proxying", "name": "${APP_NAME}-tls-proxying" } ], "resources": { "requests": { "cpu": "${CPU_REQUEST}", "memory": "${MEMORY_REQUEST}" }, "limits": { "cpu": "${CPU_LIMIT}", "memory": "${MEMORY_LIMIT}" } } } ], "volumes": [ { "name": "${APP_NAME}-config", "configMap": { "name": "${APP_NAME}-config" } }, { "name": "${APP_NAME}-tls-serving", "secret": { "secretName": "${APP_NAME}-tls-serving" } }, { "name": "${APP_NAME}-tls-proxying", "secret": { "secretName": "${APP_NAME}-tls-proxying" } } ] } } } } ] }