Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy newk8s #131

Merged
merged 10 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading