apiVersion: v1 kind: Template metadata: annotations: iconClass: icon-java name: cart objects: - apiVersion: v1 kind: ImageStream metadata: name: cart labels: application: cart spec: tags: - name: latest - apiVersion: v1 kind: BuildConfig metadata: name: cart labels: application: cart spec: output: to: kind: ImageStreamTag name: cart:latest source: git: ref: ${GIT_REF} uri: ${GIT_URI} type: Git strategy: sourceStrategy: env: - name: MAVEN_MIRROR_URL value: ${MAVEN_MIRROR_URL} from: kind: ImageStreamTag name: redhat-openjdk18-openshift:1.1 namespace: ${IMAGE_STREAM_NAMESPACE} type: Source triggers: - type: ConfigChange - apiVersion: v1 kind: DeploymentConfig metadata: name: cart labels: application: cart spec: replicas: 1 selector: deploymentconfig: cart strategy: resources: {} type: Recreate template: metadata: labels: application: cart deploymentconfig: cart name: cart spec: containers: - env: - name: CATALOG_ENDPOINT value: "http://catalog:8080" image: cart imagePullPolicy: Always livenessProbe: failureThreshold: 5 httpGet: path: /health port: 8080 scheme: HTTP initialDelaySeconds: 45 periodSeconds: 5 successThreshold: 1 timeoutSeconds: 1 name: cart ports: - containerPort: 8778 name: jolokia protocol: TCP - containerPort: 8080 name: http protocol: TCP - containerPort: 8443 name: https protocol: TCP readinessProbe: failureThreshold: 10 httpGet: path: /health port: 8080 scheme: HTTP initialDelaySeconds: 45 periodSeconds: 5 successThreshold: 1 timeoutSeconds: 1 resources: limits: memory: 1Gi cpu: 1 requests: memory: 512Mi cpu: 200m terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 75 triggers: - imageChangeParams: automatic: true containerNames: - cart from: kind: ImageStreamTag name: cart:latest type: ImageChange - type: ConfigChange - apiVersion: v1 kind: Service metadata: labels: app: cart application: cart name: cart spec: ports: - port: 8080 protocol: TCP targetPort: 8080 selector: deploymentconfig: cart - apiVersion: v1 kind: Route metadata: labels: application: cart name: cart spec: to: kind: Service name: cart weight: 100 parameters: - displayName: Application name name: APPLICATION_NAME required: true value: cart - description: Git source URI for application displayName: Git source repository name: GIT_URI required: true value: https://github.com/siamaksade/cart-service.git - description: Git branch/tag reference displayName: Git branch/tag reference name: GIT_REF value: master - description: Maven mirror url. If nexus is deployed locally, use nexus url (e.g. http://nexus.ci:8081/content/groups/public/) displayName: Maven mirror url name: MAVEN_MIRROR_URL - displayName: ImageStream Namespace description: Namespace in which the ImageStreams for Red Hat OpenJDK image is 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 required: true value: openshift