Skip to content
Snippets Groups Projects
Commit 638cd8db authored by villersk's avatar villersk
Browse files

Added depolyment

parent 1ef49895
No related branches found
No related tags found
No related merge requests found
Pipeline #48373 passed
stages:
- build
- deploy
variables:
KANIKO_BUILD_ARGS: "--destination $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:latest"
include:
- remote: "https://gitlab.hpc.ut.ee/templates/gitlab-actions/-/raw/main/.gitlab-ci-kaniko-build.yml"
- remote: "https://gitlab.hpc.ut.ee/templates/gitlab-actions/-/raw/main/.gitlab-ci-kubectl-deploy.yml"
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${CI_PROJECT_NAME}-pod-deployment
namespace: pheweb-gi-ut-ee
spec:
replicas: 3
selector:
matchLabels:
app: ${CI_PROJECT_NAME}-app
template:
metadata:
labels:
app: ${CI_PROJECT_NAME}-app
version: ${CI_COMMIT_SHA}
spec:
containers:
- name: my-container
image: ${CI_REGISTRY}/${CI_PROJECT_PATH}/${CI_COMMIT_BRANCH}:${CI_COMMIT_SHA}
ports:
- containerPort: 5000
imagePullPolicy: Always
volumeMounts:
- name: pheweb-nfs
mountPath: /data
volumes:
- name: pheweb-nfs
persistentVolumeClaim:
claimName: pheweb-nfs-claim
imagePullSecrets:
- name: pheweb
---
apiVersion: v1
kind: Service
metadata:
name: ${CI_PROJECT_NAME}-service
namespace: pheweb-gi-ut-ee
spec:
ports:
- port: 80
targetPort: 5000
protocol: TCP
selector:
app: ${CI_PROJECT_NAME}-app
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ${CI_PROJECT_NAME}-ingress
namespace: pheweb-gi-ut-ee
annotations:
cert-manager.io/cluster-issuer: vault-hpc-issuer
nginx.ingress.kubernetes.io/proxy-buffer-size: "512k"
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-name: "route"
spec:
rules:
- host: "pheweb.gi.ut.ee"
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ${CI_PROJECT_NAME}-service
port:
number: 80
tls:
- hosts:
- pheweb.gi.ut.ee
secretName: pheweb.gi.ut.ee
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment