perl/openshift-template.yml
Jan Koscielniak c4b68b0a77 Initial commit
2017-04-20 14:17:35 +02:00

130 lines
No EOL
3 KiB
YAML

apiVersion: v1
kind: Template
metadata:
labels:
description: Perl 5 is a highly capable, feature-rich programming language with
over 29 years of development. Perl 5 runs on over 100 platforms.
tags: builder,perl,perl524
template: perl
iconClass: icon-docker
name: perl
objects:
- kind : ImageStream
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : perl-s2i-${APP_NAME}
- kind : ImageStream
apiVersion : v1
metadata :
name : ${APP_NAME}-s2i
labels :
appid : perl-s2i-${APP_NAME}
spec:
tags:
- name: latest
from:
kind: DockerImage
name: koscicz/perl
- kind : BuildConfig
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : perl-s2i-${APP_NAME}
spec :
triggers :
- type : ConfigChange
- type : ImageChange
- type : GitHub
github:
secret: secret42
source :
type : Git
git :
uri : ${SOURCE_REPOSITORY}
contextDir : ${SOURCE_REPOSITORY}
strategy :
type : Source
sourceStrategy :
from :
kind : ImageStreamTag
name : ${APP_NAME}-s2i:latest
output :
to :
kind : ImageStreamTag
name : ${APP_NAME}:latest
- apiVersion: v1
kind: DeploymentConfig
metadata:
name: ${APP_NAME}
labels :
appid : perl-s2i-${APP_NAME}
spec:
strategy:
type: Rolling
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${APP_NAME}
from:
kind: ImageStreamTag
name: ${APP_NAME}:latest
replicas: 1
selector :
deploymentconfig : ${APP_NAME}
template:
metadata :
labels :
appid: perl-s2i-${APP_NAME}
deploymentconfig : ${APP_NAME}
spec:
containers:
- env:
- name: PERL_VERSION
value: '5.24'
name : ${APP_NAME}
image : ${APP_NAME}:latest
ports:
- containerPort: 8080
- kind : Service
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : perl-s2i-${APP_NAME}
spec :
ports :
- name: 8080-tcp
protocol : TCP
port : 8080
targetPort : 8080
selector :
deploymentconfig : ${APP_NAME}
- kind : Route
apiVersion : v1
metadata :
name : ${APP_NAME}
labels :
appid : perl-s2i-${APP_NAME}
spec :
host :
to :
kind : Service
name : ${APP_NAME}
weight : 100
port :
targetPort : 8080-tcp
parameters :
- name : APP_NAME
description : Name of application
value :
required : true
- name : SOURCE_REPOSITORY
description : Git source repository
value :
required : true