openshift/templates/app-dc-template.yaml
kind: Template
apiVersion: template.openshift.io/v1
metadata:
name: ${CONTAINER_NAME}-template
labels:
template: ${CONTAINER_NAME}-template
objects:
- kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
metadata:
annotations:
app.openshift.io/route-disabled: 'false'
openshift.io/generated-by: OpenShiftWebConsole
name: ${CONTAINER_NAME}
namespace: ${OPENSHIFT_NAMESPACE}
labels:
app: ${CONTAINER_NAME}
app.kubernetes.io/component: ${CONTAINER_NAME}
app.kubernetes.io/instance: ${CONTAINER_NAME}
app.kubernetes.io/name: ${CONTAINER_NAME}
app.kubernetes.io/part-of: ${APPLICATION_NAME}
app.openshift.io/runtime: nodejs
app.openshift.io/runtime-namespace: ${OPENSHIFT_NAMESPACE}
spec:
strategy:
type: Rolling
rollingParams:
updatePeriodSeconds: 1
intervalSeconds: 1
timeoutSeconds: 600
maxUnavailable: 25%
maxSurge: 25%
resources: {}
activeDeadlineSeconds: 21600
triggers:
- type: ConfigChange
replicas: 1
revisionHistoryLimit: 10
test: false
selector:
app: ${CONTAINER_NAME}
deploymentconfig: ${CONTAINER_NAME}
template:
metadata:
creationTimestamp: null
labels:
app: ${CONTAINER_NAME}
deploymentconfig: ${CONTAINER_NAME}
annotations:
openshift.io/generated-by: OpenShiftWebConsole
spec:
containers:
- name: ${CONTAINER_NAME}
image: >-
${ARTIFACTORY_URL}/${IMAGE_REPOSITORY}/${CONTAINER_NAME}:latest
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 150m
memory: 250Mi
requests:
cpu: 100m
memory: 150Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
imagePullSecrets:
- name: artifactory-pull
schedulerName: default-scheduler
parameters:
- description: Container Name
displayName: Container Name
name: CONTAINER_NAME
required: true
- description: OpenShift Namespace
displayName: OpenShift Namespace
name: OPENSHIFT_NAMESPACE
required: true
- description: Application Name
displayName: Application Name
name: APPLICATION_NAME
required: true
- description: Image Repository
displayName: Image Repository
name: IMAGE_REPOSITORY
required: true
- description: Artifactory URL
displayName: Artifactory URL
name: ARTIFACTORY_URL
required: true