Вы находитесь на странице: 1из 3

apiVersion: v1

kind: Template
labels:
template: headless-vnc-run
metadata:
annotations:
description: Headless VNC (only run)
iconClass: icon-beaker
tags: headless,vnc,consol
version: 1.0.3
creationTimestamp: null
name: headless-vnc-run
objects:
- apiVersion: v1
kind: Service
metadata:
annotations:
description: Headless vnc and http port
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
ports:
- name: http-port-tcp
protocol: TCP
port: 6901
targetPort: 6901
- name: vnc-port-tcp
protocol: TCP
port: 5901
targetPort: 5901
selector:
deploymentConfig: ${APPLICATION_NAME}
- apiVersion: v1
id: ${APPLICATION_NAME}-http
kind: Route
metadata:
annotations:
description: Route for vnc's http service.
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
host: ${HOSTNAME_HTTP}
to:
name: ${APPLICATION_NAME}
port:
targetPort: http-port-tcp
- apiVersion: v1
kind: ImageStream
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
application: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
replicas: 1
selector:
deploymentConfig: ${APPLICATION_NAME}
strategy:
type: Recreate
template:
metadata:
labels:
application: ${APPLICATION_NAME}
deploymentConfig: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
containers:
- name: ${APPLICATION_NAME}
image: ${IMAGE}
imagePullPolicy: Always
ports:
- containerPort: 5901
name: vnc
protocol: TCP
- containerPort: 6901
name: http
protocol: TCP
livenessProbe:
httpGet:
path: /
port: 6901
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 6901
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
triggers:
- type: ConfigChange
parameters:
- description: The name for the application.
name: APPLICATION_NAME
required: true
value: headless-vnc
- description: 'Custom hostname for http service route. Leave blank for default
hostname,
e.g.: <application-name>-<project>.<default-domain-suffix>'
name: HOSTNAME_HTTP
- description: Headless vnc image
name: IMAGE
required: true
value: consol/centos-xfce-vnc:dev

Вам также может понравиться