apiVersion: v1 kind: Template metadata: name: nginx-template annotations: description: "run a simple nginx server" tags: "webserver,nginx" objects: - apiVersion: v1 kind: DeploymentConfig metadata: labels: app: ${NAME} name: ${NAME} spec: replicas: 1 selector: app: ${NAME} deploymentconfig: ${NAME} strategy: resources: {} rollingParams: intervalSeconds: 1 maxSurge: 25% maxUnavailable: 25% timeoutSeconds: 600 updatePeriodSeconds: 1 type: Rolling template: metadata: labels: app: ${NAME} deploymentconfig: ${NAME} spec: containers: - image: twalter/openshift-nginx:${NGINX_VERSION} imagePullPolicy: Always name: nginx ports: - containerPort: 8081 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 triggers: {} - apiVersion: v1 kind: Service metadata: labels: app: ${NAME} name: ${NAME} spec: ports: - port: 8081 protocol: TCP targetPort: 8081 name: http selector: app: ${NAME} deploymentconfig: ${NAME} - apiVersion: v1 kind: Route metadata: labels: app: ${NAME} name: ${NAME} spec: port: targetPort: 8081 to: kind: Service name: ${NAME} weight: 100 wildcardPolicy: None parameters: - name: NAME description: The name for the deployment, service and route value: nginx - name: NGINX_VERSION description: The version (tag) of the used nginx image value: latest