Skip to content
Snippets Groups Projects
Commit 4cb8b185 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Merge branch 'malowe/main/k8s-init' into 'main'

Add k8s configurations for staging and production

See merge request !4
parents f50bf8b0 76fb5fe4
No related branches found
No related tags found
1 merge request!4Add k8s configurations for staging and production
Pipeline #15275 passed
apiVersion: apps/v1
kind: Deployment
metadata:
name: eclipse-openvsx-api
namespace: foundation-internal-webdev-apps
labels:
app: eclipse-openvsx-api
environment: production
spec:
selector:
matchLabels:
app: eclipse-openvsx-api
environment: production
replicas: 1
template:
metadata:
labels:
app: eclipse-openvsx-api
environment: production
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: speed
operator: NotIn
values:
- fast
weight: 1
containers:
- name: app
image: eclipsefdn/eclipse-openvsx-api:latest
imagePullPolicy: Always
ports:
- containerPort: 8090
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 200m
memory: 256Mi
env:
- name: CONFIG_SECRET_PATH
value: "/run/secrets/working-groups-api/secret.properties"
volumeMounts:
- name: secret-properties
mountPath: "/run/secrets/working-groups-api"
readOnly: true
volumes:
- name: secret-properties
secret:
secretName: working-groups-api
---
apiVersion: "v1"
kind: "Service"
metadata:
name: eclipse-openvsx-api
namespace: foundation-internal-webdev-apps
spec:
ports:
- name: "http"
port: 80
protocol: "TCP"
targetPort: 8090
selector:
app: eclipse-openvsx-api
environment: production
---
apiVersion: "route.openshift.io/v1"
kind: "Route"
metadata:
name: eclipse-openvsx-api
namespace: foundation-internal-webdev-apps
annotations:
haproxy.router.openshift.io/timeout: 20s
haproxy.router.openshift.io/disable_cookies: "true"
haproxy.router.openshift.io/balance: roundrobin
spec:
host: "api.eclipse.org"
path: "/openvsx"
port:
targetPort: "http"
tls:
insecureEdgeTerminationPolicy: "Redirect"
termination: "edge"
to:
kind: "Service"
name: eclipse-openvsx-api
weight: 100
\ No newline at end of file
apiVersion: apps/v1
kind: Deployment
metadata:
name: eclipse-openvsx-api-staging
namespace: foundation-internal-webdev-apps
labels:
app: eclipse-openvsx-api
environment: staging
spec:
selector:
matchLabels:
app: eclipse-openvsx-api
environment: staging
replicas: 1
template:
metadata:
labels:
app: eclipse-openvsx-api
environment: staging
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: speed
operator: NotIn
values:
- fast
weight: 1
containers:
- name: app
image: eclipsefdn/eclipse-openvsx-api:latest
imagePullPolicy: Always
ports:
- containerPort: 8090
resources:
limits:
cpu: 200m
memory: 256Mi
requests:
cpu: 200m
memory: 256Mi
env:
- name: CONFIG_SECRET_PATH
value: "/run/secrets/openvsx-api/secret.properties"
volumeMounts:
- name: secret-properties
mountPath: "/run/secrets/openvsx-api"
readOnly: true
volumes:
- name: secret-properties
secret:
secretName: openvsx-api-staging
---
apiVersion: "v1"
kind: "Service"
metadata:
name: eclipse-openvsx-api-staging
namespace: foundation-internal-webdev-apps
spec:
ports:
- name: "http"
port: 80
protocol: "TCP"
targetPort: 8090
selector:
app: eclipse-openvsx-api
environment: staging
---
apiVersion: "route.openshift.io/v1"
kind: "Route"
metadata:
name: eclipse-openvsx-api-staging
namespace: foundation-internal-webdev-apps
annotations:
haproxy.router.openshift.io/timeout: 20s
haproxy.router.openshift.io/disable_cookies: "true"
haproxy.router.openshift.io/balance: roundrobin
spec:
host: "api-staging.eclipse.org"
path: "/openvsx"
port:
targetPort: "http"
tls:
insecureEdgeTerminationPolicy: "Redirect"
termination: "edge"
to:
kind: "Service"
name: eclipse-openvsx-api-staging
weight: 100
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment