Skip to content
Snippets Groups Projects

Update k8s conf bindings for routing + production binding

Merged Martin Lowe requested to merge malowe/eclipsefdn-cve-api:malowe/main/k8s-conf-update into main
2 files
+ 114
1
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 91
0
apiVersion: apps/v1
kind: Deployment
metadata:
name: eclipsefdn-cve-api
namespace: foundation-internal-webdev-apps
labels:
app: eclipsefdn-cve-api
environment: production
spec:
selector:
matchLabels:
app: eclipsefdn-cve-api
environment: production
replicas: 1
template:
metadata:
labels:
app: eclipsefdn-cve-api
environment: production
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: speed
operator: NotIn
values:
- fast
weight: 1
containers:
- name: app
image: eclipsefdn/eclipsefdn-cve-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/eclipsefdn-cve-api/secret.properties"
volumeMounts:
- name: secret-properties
mountPath: "/run/secrets/eclipsefdn-cve-api"
readOnly: true
volumes:
- name: secret-properties
secret:
secretName: eclipsefdn-cve-api
---
apiVersion: "v1"
kind: "Service"
metadata:
name: eclipsefdn-cve-api
namespace: foundation-internal-webdev-apps
spec:
ports:
- name: "http"
port: 80
protocol: "TCP"
targetPort: 8090
selector:
app: eclipsefdn-cve-api
environment: production
---
apiVersion: "route.openshift.io/v1"
kind: "Route"
metadata:
name: eclipsefdn-cve-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: "/cve"
port:
targetPort: "http"
tls:
insecureEdgeTerminationPolicy: "Redirect"
termination: "edge"
to:
kind: "Service"
name: eclipsefdn-cve-api
weight: 100
\ No newline at end of file
Loading