Skip to content
Snippets Groups Projects

Add k8s configurations for staging and production

Merged Martin Lowe requested to merge malowe/main/k8s-init into main
2 files
+ 182
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 91
0
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
Loading