che-server/deploy/openshift/templates/che-plugin-registry.yml

101 lines
2.6 KiB
YAML

#
# Copyright (c) 2012-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
---
apiVersion: v1
kind: Template
metadata:
name: che-plugin-registry-service
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
labels:
app: che-plugin-registry
name: che-plugin-registry
spec:
replicas: 1
selector:
app: che-plugin-registry
deploymentconfig: che-plugin-registry
strategy:
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
app: che-plugin-registry
deploymentconfig: che-plugin-registry
spec:
containers:
- image: ${IMAGE}:${IMAGE_TAG}
imagePullPolicy: "${PULL_POLICY}"
name: che-plugin-registry
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /v3/plugins/
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /v3/plugins/
port: 8080
initialDelaySeconds: 3
periodSeconds: 10
timeoutSeconds: 3
resources:
limits:
memory: ${MEMORY_LIMIT}
triggers:
- type: ConfigChange
- apiVersion: v1
kind: Service
metadata:
name: che-plugin-registry
spec:
ports:
- protocol: TCP
port: 80
targetPort: 8080
selector:
deploymentconfig: che-plugin-registry
- apiVersion: v1
kind: Route
metadata:
name: che-plugin-registry
spec:
to:
kind: Service
name: che-plugin-registry
parameters:
- name: IMAGE
value: eclipse/che-plugin-registry
displayName: Eclipse Che plugin registry image
description: Che plugin registry Docker image. Defaults to eclipse/che-plugin-registry
- name: IMAGE_TAG
value: latest
displayName: Eclipse Che plugin registry version
description: Eclipse Che plugin registry version which defaults to latest
- name: MEMORY_LIMIT
value: 256Mi
displayName: Memory Limit
description: Maximum amount of memory the container can use. Defaults 256Mi
- name: PULL_POLICY
value: Always
displayName: Eclipse Che plugin registry image pull policy
description: Always pull by default. Can be IfNotPresent