-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding templates for the JDK21 image
Signed-off-by: Sokratis Zappis <szappis@redhat.com>
- Loading branch information
Showing
3 changed files
with
787 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,297 @@ | ||
{ | ||
"kind": "Template", | ||
"apiVersion": "template.openshift.io/v1", | ||
"metadata": { | ||
"annotations": { | ||
"iconClass": "icon-rh-tomcat", | ||
"openshift.io/provider-display-name": "Red Hat, Inc.", | ||
"tags": "tomcat,tomcat10,java,jboss", | ||
"version": "6.0", | ||
"openshift.io/display-name": "JBoss Web Server 6.0 Apache Tomcat 10 OpenJDK21 on UBI8 (no https)", | ||
"description": "An example JBoss Web Server application. For more information about using this template, see https://github.com/jboss-openshift/application-templates.", | ||
"template.openshift.io/long-description": "This template defines resources needed to develop Red Hat JBoss Web Server 6.0 Apache Tomcat 10 based application, including a build configuration, and an application deployment configuration.", | ||
"template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-jboss-web-server/", | ||
"template.openshift.io/support-url": "https://access.redhat.com" | ||
}, | ||
"name": "jws60-openjdk21-tomcat10-ubi8-basic-s2i" | ||
}, | ||
"labels": { | ||
"template": "jws60-openjdk21-tomcat10-ubi8-basic-s2i", | ||
"jws60jdk21ubi8": "6.0.3" | ||
}, | ||
"message": "A new JWS application for Apache Tomcat 10 has been created in your project.", | ||
"parameters": [ | ||
{ | ||
"displayName": "Application Name", | ||
"description": "The name for the application.", | ||
"name": "APPLICATION_NAME", | ||
"value": "jws-app", | ||
"required": true | ||
}, | ||
{ | ||
"displayName": "Custom http Route Hostname", | ||
"description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>", | ||
"name": "HOSTNAME_HTTP", | ||
"value": "", | ||
"required": false | ||
}, | ||
{ | ||
"displayName": "Git Repository URL", | ||
"description": "Git source URI for application", | ||
"name": "SOURCE_REPOSITORY_URL", | ||
"value": "https://github.com/web-servers/tomcat-websocket-chat-quickstart.git", | ||
"required": true | ||
}, | ||
{ | ||
"displayName": "Git Reference", | ||
"description": "Git branch/tag reference", | ||
"name": "SOURCE_REPOSITORY_REF", | ||
"value": "main", | ||
"required": false | ||
}, | ||
{ | ||
"displayName": "Context Directory", | ||
"description": "Path within Git project to build; empty for root project directory.", | ||
"name": "CONTEXT_DIR", | ||
"value": "tomcat-websocket-chat", | ||
"required": false | ||
}, | ||
{ | ||
"displayName": "Github Webhook Secret", | ||
"description": "GitHub trigger secret", | ||
"name": "GITHUB_WEBHOOK_SECRET", | ||
"from": "[a-zA-Z0-9]{8}", | ||
"generate": "expression", | ||
"required": true | ||
}, | ||
{ | ||
"displayName": "Generic Webhook Secret", | ||
"description": "Generic build trigger secret", | ||
"name": "GENERIC_WEBHOOK_SECRET", | ||
"from": "[a-zA-Z0-9]{8}", | ||
"generate": "expression", | ||
"required": true | ||
}, | ||
{ | ||
"displayName": "ImageStream Namespace", | ||
"description": "Namespace in which the ImageStreams for Red Hat Middleware images 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": "IMAGE_STREAM_NAMESPACE", | ||
"value": "openshift", | ||
"required": true | ||
}, | ||
{ | ||
"displayName": "Maven mirror URL", | ||
"description": "Maven mirror to use for S2I builds", | ||
"name": "MAVEN_MIRROR_URL", | ||
"value": "", | ||
"required": false | ||
}, | ||
{ | ||
"description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.", | ||
"name": "ARTIFACT_DIR", | ||
"value": "", | ||
"required": false | ||
} | ||
], | ||
"objects": [ | ||
{ | ||
"kind": "Service", | ||
"apiVersion": "v1", | ||
"spec": { | ||
"ports": [ | ||
{ | ||
"port": 8080, | ||
"targetPort": 8080 | ||
} | ||
], | ||
"selector": { | ||
"deploymentConfig": "${APPLICATION_NAME}" | ||
} | ||
}, | ||
"metadata": { | ||
"name": "${APPLICATION_NAME}", | ||
"labels": { | ||
"application": "${APPLICATION_NAME}" | ||
}, | ||
"annotations": { | ||
"description": "The web server's http port." | ||
} | ||
} | ||
}, | ||
{ | ||
"kind": "Route", | ||
"apiVersion": "route.openshift.io/v1", | ||
"id": "${APPLICATION_NAME}-http", | ||
"metadata": { | ||
"name": "${APPLICATION_NAME}", | ||
"labels": { | ||
"application": "${APPLICATION_NAME}" | ||
}, | ||
"annotations": { | ||
"description": "Route for application's http service." | ||
} | ||
}, | ||
"spec": { | ||
"host": "${HOSTNAME_HTTP}", | ||
"to": { | ||
"name": "${APPLICATION_NAME}" | ||
} | ||
} | ||
}, | ||
{ | ||
"kind": "ImageStream", | ||
"apiVersion": "image.openshift.io/v1", | ||
"metadata": { | ||
"name": "${APPLICATION_NAME}", | ||
"labels": { | ||
"application": "${APPLICATION_NAME}" | ||
} | ||
} | ||
}, | ||
{ | ||
"kind": "BuildConfig", | ||
"apiVersion": "build.openshift.io/v1", | ||
"metadata": { | ||
"name": "${APPLICATION_NAME}", | ||
"labels": { | ||
"application": "${APPLICATION_NAME}" | ||
} | ||
}, | ||
"spec": { | ||
"source": { | ||
"type": "Git", | ||
"git": { | ||
"uri": "${SOURCE_REPOSITORY_URL}", | ||
"ref": "${SOURCE_REPOSITORY_REF}" | ||
}, | ||
"contextDir": "${CONTEXT_DIR}" | ||
}, | ||
"strategy": { | ||
"type": "Source", | ||
"sourceStrategy": { | ||
"env": [ | ||
{ | ||
"name": "MAVEN_MIRROR_URL", | ||
"value": "${MAVEN_MIRROR_URL}" | ||
}, | ||
{ | ||
"name": "ARTIFACT_DIR", | ||
"value": "${ARTIFACT_DIR}" | ||
} | ||
], | ||
"forcePull": true, | ||
"from": { | ||
"kind": "ImageStreamTag", | ||
"namespace": "${IMAGE_STREAM_NAMESPACE}", | ||
"name": "jboss-webserver60-openjdk21-tomcat10-openshift-ubi8:6.0.3" | ||
} | ||
} | ||
}, | ||
"output": { | ||
"to": { | ||
"kind": "ImageStreamTag", | ||
"name": "${APPLICATION_NAME}:latest" | ||
} | ||
}, | ||
"triggers": [ | ||
{ | ||
"type": "GitHub", | ||
"github": { | ||
"secret": "${GITHUB_WEBHOOK_SECRET}" | ||
} | ||
}, | ||
{ | ||
"type": "Generic", | ||
"generic": { | ||
"secret": "${GENERIC_WEBHOOK_SECRET}" | ||
} | ||
}, | ||
{ | ||
"type": "ImageChange", | ||
"imageChange": {} | ||
}, | ||
{ | ||
"type": "ConfigChange" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"kind": "DeploymentConfig", | ||
"apiVersion": "apps.openshift.io/v1", | ||
"metadata": { | ||
"name": "${APPLICATION_NAME}", | ||
"labels": { | ||
"application": "${APPLICATION_NAME}" | ||
} | ||
}, | ||
"spec": { | ||
"strategy": { | ||
"type": "Recreate" | ||
}, | ||
"triggers": [ | ||
{ | ||
"type": "ImageChange", | ||
"imageChangeParams": { | ||
"automatic": true, | ||
"containerNames": [ | ||
"${APPLICATION_NAME}" | ||
], | ||
"from": { | ||
"kind": "ImageStreamTag", | ||
"name": "${APPLICATION_NAME}:latest" | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "ConfigChange" | ||
} | ||
], | ||
"replicas": 1, | ||
"selector": { | ||
"deploymentConfig": "${APPLICATION_NAME}" | ||
}, | ||
"template": { | ||
"metadata": { | ||
"name": "${APPLICATION_NAME}", | ||
"labels": { | ||
"deploymentConfig": "${APPLICATION_NAME}", | ||
"application": "${APPLICATION_NAME}" | ||
} | ||
}, | ||
"spec": { | ||
"terminationGracePeriodSeconds": 60, | ||
"containers": [ | ||
{ | ||
"name": "${APPLICATION_NAME}", | ||
"image": "${APPLICATION_NAME}", | ||
"imagePullPolicy": "Always", | ||
"readinessProbe": { | ||
"exec": { | ||
"command": [ | ||
"/bin/bash", | ||
"-c", | ||
"curl --noproxy '*' -is 'http://localhost:8080/health' | grep -iq '\"status\": \"UP\"'" | ||
] | ||
} | ||
}, | ||
"ports": [ | ||
{ | ||
"name": "jolokia", | ||
"containerPort": 8778, | ||
"protocol": "TCP" | ||
}, | ||
{ | ||
"name": "http", | ||
"containerPort": 8080, | ||
"protocol": "TCP" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
Oops, something went wrong.