Skip to content
Snippets Groups Projects
Commit 31803e1a authored by cyril.cros's avatar cyril.cros
Browse files

Basic Nginx with working CI/CD

parent db1db9a2
No related branches found
No related tags found
No related merge requests found
Pipeline #58225 passed
tmp/*
\ No newline at end of file
---
stages:
- deploy_to_cluster
- clean_up_on_failure
cluster_access_test:
image: dtzar/helm-kubectl:3.8.2
stage: deploy_to_cluster
script:
- cd deployment
- echo $KUBECONFIG | base64 -d > /tmp/kubeconf
- export KUBECONFIG=/tmp/kubeconf
- kubectl config current-context
kustomize_build_apply:
image: dtzar/helm-kubectl:3.8.2
stage: deploy_to_cluster
script:
- echo $KUBECONFIG | base64 -d > /tmp/kubeconf
- export KUBECONFIG=/tmp/kubeconf
- kubectl apply -k deployment
- kubectl -n $NS wait --for=condition=available --timeout=60s deploy/jbrowse2
dependencies:
- cluster_access_test
clean_up_k8s_deployment:
image: dtzar/helm-kubectl:3.8.2
stage: clean_up_on_failure
when: on_failure
script:
- echo 'Failed job, deleting resources'
- echo $KUBECONFIG | base64 -d > /tmp/kubeconf
- export KUBECONFIG=/tmp/kubeconf
- kubectl delete -k deployment
\ No newline at end of file
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jbrowse2
namespace: jbrowse2-platy
labels:
name: jbrowse2
spec:
replicas: 1
selector:
matchLabels:
app: jbrowse2
template:
metadata:
labels:
app: jbrowse2
spec:
containers:
- name: jbrowse2
image: nginx:alpine
imagePullPolicy: Always
resources:
requests:
memory: 1024Mi
cpu: 1024m
limits:
memory: 2048Mi
cpu: 2048m
ports:
- name: http
containerPort: 80
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: jbrowse2
namespace: jbrowse2-platy
spec:
selector:
app: jbrowse2
ports:
- name: http
protocol: TCP
port: 80
targetPort: http
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: jbrowse2
namespace: jbrowse2-platy
annotations:
traefik.ingress.kubernetes.io/router.tls.certresolver: sectigo
spec:
ingressClassName: external-users
rules:
- host: genomes.arendt.embl.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: jbrowse2
port:
name: http
tls:
- hosts:
- genomes.arendt.embl.de
\ No newline at end of file
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- jbrowse2-dep.yaml
labels:
- includeSelectors: true
pairs:
app: jbrowse2
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