Skip to content

Commit

Permalink
chore: fix deployments of plugin and devfile regs (#1015)
Browse files Browse the repository at this point in the history
* chore: fix deployments of plugin and devfile regs

Signed-off-by: Valeriy Svydenko <[email protected]>

* update template apiVersion

Signed-off-by: Valeriy Svydenko <[email protected]>

---------

Signed-off-by: Valeriy Svydenko <[email protected]>
  • Loading branch information
svor authored Oct 12, 2023
1 parent 249d766 commit df51fd6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
# SPDX-License-Identifier: EPL-2.0
#
---
apiVersion: v1
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: devspaces-devfile-registry
objects:
- apiVersion: v1
kind: DeploymentConfig
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: devspaces
Expand All @@ -22,16 +22,17 @@ objects:
spec:
replicas: 1
selector:
app: devspaces
component: devfile-registry
matchLabels:
app: devspaces
component: devfile-registry
strategy:
rollingParams:
type: RollingUpdate
rollingUpdate:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
apiVersion: v1
apiVersion: template.openshift.io/v1
kind: Template
metadata:
name: devspaces-plugin-registry
objects:
- apiVersion: v1
kind: DeploymentConfig
- apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: devspaces
Expand All @@ -23,16 +23,17 @@ objects:
spec:
replicas: 1
selector:
app: devspaces
component: plugin-registry
matchLabels:
app: devspaces
component: plugin-registry
strategy:
rollingParams:
type: RollingUpdate
rollingUpdate:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
labels:
Expand All @@ -47,24 +48,28 @@ objects:
- containerPort: 8080
livenessProbe:
httpGet:
path: /plugins/
path: /v3/plugins/
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 10
readinessProbe:
httpGet:
path: /plugins/
path: /v3/plugins/
port: 8080
initialDelaySeconds: 3
periodSeconds: 10
timeoutSeconds: 3
successThreshold: 1
failureThreshold: 10
resources:
requests:
cpu: 1m
memory: 5Mi
limits:
cpu: 100m
memory: 512Mi
limits:
cpu: 500m
memory: ${MEMORY_LIMIT}
envFrom:
- configMapRef:
Expand Down Expand Up @@ -107,9 +112,7 @@ objects:
metadata:
name: plugin-registry
data:
DS_SIDECAR_CONTAINERS_REGISTRY_URL: ${DS_SIDECAR_CONTAINERS_REGISTRY_URL}
DS_SIDECAR_CONTAINERS_REGISTRY_ORGANIZATION: ${DS_SIDECAR_CONTAINERS_REGISTRY_ORGANIZATION}
DS_SIDECAR_CONTAINERS_REGISTRY_TAG: ${DS_SIDECAR_CONTAINERS_REGISTRY_TAG}
START_OPENVSX: ${START_OPENVSX}
parameters:
- name: IMAGE
value: registry.redhat.io/devspaces/pluginregistry-rhel8
Expand All @@ -121,22 +124,14 @@ parameters:
displayName: Red Hat OpenShift Dev Spaces plugin registry version
description: Red Hat OpenShift Dev Spaces plugin registry version
- name: MEMORY_LIMIT
value: 256Mi
value: 1024Mi
displayName: Memory Limit
description: Maximum amount of memory the container can use. Defaults 256Mi
- name: PULL_POLICY
value: Always
displayName: Red Hat OpenShift Dev Spaces plugin registry image pull policy
description: Always pull by default. Can be IfNotPresent
- name: DS_SIDECAR_CONTAINERS_REGISTRY_URL
displayName: Sidecar image registry URL
description: URL of docker registry containing plugin sidecar images; used to
override sidecars in plugins
- name: DS_SIDECAR_CONTAINERS_REGISTRY_ORGANIZATION
displayName: Sidecar image registry organization
description: Organization containing plugin sidecar images; used to override base
images in plugins
- name: DS_SIDECAR_CONTAINERS_REGISTRY_TAG
displayName: Plugin sidecar images tag
description: Tag used for overridden sidecar images; used to override base images
in plugins
- name: START_OPENVSX
value: "false"
displayName: Start embedded OpenVSX registry
description: If true, an embedded OpenVSX registry will be started

0 comments on commit df51fd6

Please sign in to comment.