Commit dba198fb authored by Martin Lowe's avatar Martin Lowe 🇨🇦
Browse files

Merge branch 'malowe/main/3' into 'main'

Add initial k8s files

See merge request !2
parents 00120240 207f1a11
apiVersion: apps/v1
kind: Deployment
metadata:
name: eclipsefdn-downloads-api
namespace: foundation-internal-webdev-apps
labels:
app: eclipsefdn-downloads-api
environment: production
spec:
selector:
matchLabels:
app: eclipsefdn-downloads-api
environment: production
replicas: 2
template:
metadata:
labels:
app: eclipsefdn-downloads-api
environment: production
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: speed
operator: NotIn
values:
- fast
weight: 1
containers:
- name: api
image: eclipsefdn/eclipsefdn-downloads-api:latest
imagePullPolicy: Always
ports:
- containerPort: 8090
resources:
limits:
cpu: '1'
memory: 256Mi
requests:
cpu: 200m
memory: 256Mi
env:
- name: CONFIG_SECRET_PATH
value: "/run/secrets/downloads-api/secret.properties"
volumeMounts:
- name: secret-properties
mountPath: "/run/secrets/downloads-api"
readOnly: true
volumes:
- name: secret-properties
secret:
secretName: downloads-api
---
apiVersion: "v1"
kind: "Service"
metadata:
name: eclipsefdn-downloads-api
namespace: foundation-internal-webdev-apps
spec:
ports:
- name: "http"
port: 80
protocol: "TCP"
targetPort: 8090
selector:
app: eclipsefdn-downloads-api
environment: production
---
apiVersion: "route.openshift.io/v1"
kind: "Route"
metadata:
name: eclipsefdn-downloads-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: "/downloads"
port:
targetPort: "http"
tls:
insecureEdgeTerminationPolicy: "Redirect"
termination: "edge"
to:
kind: "Service"
name: eclipsefdn-downloads-api
weight: 100
apiVersion: apps/v1
kind: Deployment
metadata:
name: eclipsefdn-downloads-api-staging
namespace: foundation-internal-webdev-apps
labels:
app: eclipsefdn-downloads-api
environment: staging
spec:
selector:
matchLabels:
app: eclipsefdn-downloads-api
environment: staging
replicas: 2
template:
metadata:
labels:
app: eclipsefdn-downloads-api
environment: staging
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- preference:
matchExpressions:
- key: speed
operator: NotIn
values:
- fast
weight: 1
containers:
- name: api
image: eclipsefdn/eclipsefdn-downloads-api:latest
imagePullPolicy: Always
ports:
- containerPort: 8090
resources:
limits:
cpu: '1'
memory: 256Mi
requests:
cpu: 200m
memory: 256Mi
env:
- name: CONFIG_SECRET_PATH
value: "/run/secrets/downloads-api/secret.properties"
volumeMounts:
- name: secret-properties
mountPath: "/run/secrets/downloads-api"
readOnly: true
volumes:
- name: secret-properties
secret:
secretName: downloads-api-staging
---
apiVersion: "v1"
kind: "Service"
metadata:
name: eclipsefdn-downloads-api-staging
namespace: foundation-internal-webdev-apps
spec:
ports:
- name: "http"
port: 80
protocol: "TCP"
targetPort: 8090
selector:
app: eclipsefdn-downloads-api
environment: staging
---
apiVersion: "route.openshift.io/v1"
kind: "Route"
metadata:
name: eclipsefdn-downloads-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: "/downloads"
port:
targetPort: "http"
tls:
insecureEdgeTerminationPolicy: "Redirect"
termination: "edge"
to:
kind: "Service"
name: eclipsefdn-downloads-api-staging
weight: 100
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment