You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
158 lines
4.3 KiB
158 lines
4.3 KiB
apiVersion: v1
|
|
kind: Template
|
|
metadata:
|
|
name: launchpad-builder
|
|
annotations:
|
|
description: This template creates a Build Configuration using an S2I builder.
|
|
tags: instant-app
|
|
parameters:
|
|
- name: SUFFIX_NAME
|
|
description: The suffix name for the template objects
|
|
displayName: Suffix name
|
|
value: ''
|
|
- name: RELEASE_VERSION
|
|
description: The release version number of application
|
|
displayName: Release version
|
|
value: 1.0.0
|
|
- name: SOURCE_REPOSITORY_URL
|
|
description: The source URL for the application
|
|
displayName: Source URL
|
|
required: true
|
|
- name: SOURCE_REPOSITORY_REF
|
|
description: The branch name for the application
|
|
displayName: Source Branch
|
|
value: master
|
|
required: true
|
|
objects:
|
|
- apiVersion: image.openshift.io/v1
|
|
kind: ImageStream
|
|
metadata:
|
|
name: 'golang-health-check${SUFFIX_NAME}'
|
|
labels:
|
|
version: '${RELEASE_VERSION}'
|
|
app: golang-health-check
|
|
spec: {}
|
|
- apiVersion: v1
|
|
kind: BuildConfig
|
|
metadata:
|
|
name: 'golang-health-check-s2i${SUFFIX_NAME}'
|
|
labels:
|
|
app: golang-health-check
|
|
version: '${RELEASE_VERSION}'
|
|
spec:
|
|
output:
|
|
to:
|
|
kind: ImageStreamTag
|
|
name: 'golang-health-check${SUFFIX_NAME}:${RELEASE_VERSION}'
|
|
postCommit: {}
|
|
resources: {}
|
|
source:
|
|
git:
|
|
uri: '${SOURCE_REPOSITORY_URL}'
|
|
ref: '${SOURCE_REPOSITORY_REF}'
|
|
type: Git
|
|
strategy:
|
|
type: Source
|
|
sourceStrategy:
|
|
from:
|
|
kind: DockerImage
|
|
name: 'registry.fedoraproject.org/f29/golang'
|
|
incremental: true
|
|
status:
|
|
lastVersion: 0
|
|
- apiVersion: v1
|
|
kind: Service
|
|
spec:
|
|
ports:
|
|
- protocol: TCP
|
|
port: 8080
|
|
targetPort: 8080
|
|
type: ClusterIP
|
|
selector:
|
|
project: golang-health-check
|
|
provider: golang-starters
|
|
metadata:
|
|
name: 'golang-health-check${SUFFIX_NAME}'
|
|
labels:
|
|
app: golang-health-check
|
|
provider: golang-starters
|
|
expose: 'true'
|
|
project: golang-health-check
|
|
version: '${RELEASE_VERSION}'
|
|
- apiVersion: v1
|
|
kind: DeploymentConfig
|
|
metadata:
|
|
name: 'golang-health-check${SUFFIX_NAME}'
|
|
labels:
|
|
app: golang-health-check
|
|
provider: golang-starters
|
|
project: golang-health-check
|
|
version: '${RELEASE_VERSION}'
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8080
|
|
scheme: HTTP
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 8080
|
|
scheme: HTTP
|
|
failureThreshold: 2
|
|
initialDelaySeconds: 60
|
|
periodSeconds: 3
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
image: ''
|
|
name: golang-health-check
|
|
securityContext:
|
|
privileged: false
|
|
ports:
|
|
- containerPort: 8080
|
|
name: http
|
|
protocol: TCP
|
|
metadata:
|
|
labels:
|
|
app: golang-health-check
|
|
project: golang-health-check
|
|
provider: golang-starters
|
|
version: '${RELEASE_VERSION}'
|
|
replicas: 1
|
|
selector:
|
|
app: golang-health-check
|
|
project: golang-health-check
|
|
provider: golang-starters
|
|
triggers:
|
|
- type: ConfigChange
|
|
- type: ImageChange
|
|
imageChangeParams:
|
|
automatic: true
|
|
containerNames:
|
|
- golang-health-check
|
|
from:
|
|
kind: ImageStreamTag
|
|
name: 'golang-health-check${SUFFIX_NAME}:${RELEASE_VERSION}'
|
|
- apiVersion: v1
|
|
kind: Route
|
|
metadata:
|
|
labels:
|
|
app: golang-health-check
|
|
project: golang-health-check
|
|
provider: golang-starters
|
|
version: '${RELEASE_VERSION}'
|
|
name: 'golang-health-check${SUFFIX_NAME}'
|
|
spec:
|
|
port:
|
|
targetPort: 8080
|
|
to:
|
|
kind: Service
|
|
name: 'golang-health-check${SUFFIX_NAME}'
|
|
|