Skip to content

Commit

Permalink
Merge pull request #131 from Ensembl/deploy-newk8s
Browse files Browse the repository at this point in the history
Deploy newk8s
  • Loading branch information
bilalebi authored Aug 16, 2024
2 parents 7b3f80e + ba5ec77 commit e873023
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 22 deletions.
15 changes: 11 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ test:
# Build docker image for k8s-deploy branch
build:
extends: .build
only:
- develop
- main
rules:
- if: '$CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH == "main"'

# Template to deploy application to web's k8s cluster
.deploy-web:
Expand All @@ -80,7 +79,6 @@ build:
rules:
- if: '$CI_DEPLOY_FREEZE == null && $CI_COMMIT_BRANCH == "develop" && $CI_PROJECT_NAMESPACE== "ensembl-apps"'


# deploy to staging at WP-HH
Staging:
extends: .deploy-web
Expand Down Expand Up @@ -111,6 +109,7 @@ Live:Fallback:
environment:
name : fallback


# deploy to live at WP-HL
Live:
extends: .deploy-web
Expand All @@ -121,6 +120,14 @@ Live:
environment:
name : production

# deploy to live at WP-HL
dev:wp-hl:
extends: .deploy-web
variables:
BASE: k8s/web-prod/overlays/dev
environment:
name : development

Public:
extends: .deploy-web
variables:
Expand Down
8 changes: 4 additions & 4 deletions k8s/web-prod/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: thoas-server-deployment
name: graphql-core-deployment
spec:
replicas: 1
selector:
matchLabels:
app: thoas-server
app: graphql-core
template:
metadata:
labels:
app: thoas-server
app: graphql-core
spec:
imagePullSecrets:
- name: ensemblweb-pull-secret
containers:
- name: thoas-server
- name: graphql-core
image: DOCKER_IMAGE
ports:
- containerPort: 8000
Expand Down
4 changes: 2 additions & 2 deletions k8s/web-prod/base/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: thoas-server-ingress
name: graphql-core-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
Expand All @@ -12,7 +12,7 @@ spec:
paths:
- backend:
service:
name: thoas-server-svc
name: graphql-core-svc
port:
number: 8000
path: path
Expand Down
6 changes: 3 additions & 3 deletions k8s/web-prod/base/service.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: thoas-server-svc
name: graphql-core-svc
labels:
app: thoas-server-svc
app: graphql-core-svc
spec:
selector:
app: thoas-server
app: graphql-core
type: ClusterIP
ports:
- port: 8000
Expand Down
6 changes: 3 additions & 3 deletions k8s/web-prod/overlays/apps/apps-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
apiVersion: v1
kind: Service
metadata:
name: thoas-server-svc
name: graphql-core-svc
namespace: ensembl-apps
labels:
app: thoas-server-svc
app: graphql-core-svc
spec:
selector:
app: thoas-server
app: graphql-core
type: NodePort
ports:
- port: 8000
Expand Down
2 changes: 1 addition & 1 deletion k8s/web-prod/overlays/apps/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ patches:
group: apps
version: v1
kind: Deployment
name: thoas-server-deployment
name: graphql-core-deployment
path: patch.yaml
2 changes: 1 addition & 1 deletion k8s/web-prod/overlays/dev/patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: thoas-server-deployment
name: graphql-core-deployment
spec:
template:
spec:
Expand Down
2 changes: 1 addition & 1 deletion k8s/web-prod/overlays/internal/patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: thoas-server-deployment
name: graphql-core-deployment
spec:
template:
spec:
Expand Down
2 changes: 1 addition & 1 deletion k8s/web-prod/overlays/prod/patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: thoas-server-deployment
name: graphql-core-deployment
spec:
template:
spec:
Expand Down
2 changes: 1 addition & 1 deletion k8s/web-prod/overlays/public-graphql/patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: thoas-server-deployment
name: graphql-core-deployment
spec:
template:
spec:
Expand Down
2 changes: 1 addition & 1 deletion k8s/web-prod/overlays/staging/patch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: thoas-server-deployment
name: graphql-core-deployment
spec:
template:
spec:
Expand Down

0 comments on commit e873023

Please sign in to comment.