Add OpenShift configuration manifests

This commit is contained in:
Miika Holmlund
2025-10-03 20:36:08 +03:00
parent cef673c78e
commit f5c8099d11
6 changed files with 108 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gradesa-dep
annotations:
alpha.image.policy.openshift.io/resolve-names: "*"
image.openshift.io/triggers: >-
[{"from":{"kind":"ImageStreamTag","name":"gradesa:staging","namespace":"ohtuprojekti-staging"},"fieldPath":"spec.template.spec.containers[?(@.name==\"gradesa\")].image","pause":"false"}]
spec:
replicas: 1
selector:
matchLabels:
app: gradesa-dep
template:
metadata:
labels:
app: gradesa-dep
spec:
containers:
- name: gradesa
image: gradesa:staging
imagePullPolicy: Always
ports:
- containerPort: 8080
envFrom:
- secretRef:
name: gradesa-secret
resources:
limits:
memory: "1024Mi"
cpu: "500m"
requests:
memory: "100Mi"
cpu: "50m"
+19
View File
@@ -0,0 +1,19 @@
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
name: gradesa
labels:
app: gradesa
spec:
lookupPolicy:
local: false
tags:
- name: staging
from:
kind: DockerImage
name: ghcr.io/ohtu-german-learning-website/ohtu-german-learning-website:latest
importPolicy:
scheduled: true
referencePolicy:
type: Local
+19
View File
@@ -0,0 +1,19 @@
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: gradesa-route
namespace: ohtuprojekti-staging
labels:
app: gradesa
type: external
spec:
host: gradesa2-ohtuprojekti-staging.ext.ocp-prod-0.k8s.it.helsinki.fi
port:
targetPort: 8080
to:
kind: Service
name: gradesa-svc
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
+12
View File
@@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: gradesa-svc
spec:
selector:
app: gradesa-dep
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: ClusterIP