moving repository to gitea
This commit is contained in:
49
k8s/production/base/deploy.yaml
Normal file
49
k8s/production/base/deploy.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: webapp
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webapp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
containers:
|
||||
- name: webapp
|
||||
image: registry.internal.uia.no/ikt206-g-26v-devops/group30/exam:$CI_COMMIT_SHORT_SHA
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
env:
|
||||
- name: FLASK_APP
|
||||
value: app.py
|
||||
- name: ENVIRONMENT
|
||||
value: production
|
||||
- name: DATABASE_URL
|
||||
value: postgresql://postgres:postgres@db:5432/postgres
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: webapp
|
||||
labels:
|
||||
app: webapp
|
||||
spec:
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 8081
|
||||
targetPort: http
|
||||
nodePort: 30081
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: webapp
|
||||
4
k8s/production/base/kustomization.yaml
Normal file
4
k8s/production/base/kustomization.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- deploy.yaml
|
||||
7
k8s/production/kustomization.yaml
Normal file
7
k8s/production/kustomization.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: production-environment
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- base
|
||||
- ../shared
|
||||
4
k8s/production/namespace.yaml
Normal file
4
k8s/production/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: production-environment
|
||||
Reference in New Issue
Block a user