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 9 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
49 changes: 24 additions & 25 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 @@ -77,53 +76,53 @@ build:
rules:
- if: '$CI_DEPLOY_FREEZE == null && $CI_COMMIT_BRANCH == "develop" && $CI_PROJECT_NAMESPACE== "ensembl-apps"'

# deploy to staging at WP-HX
staging:wp-hx:
extends: .deploy-web
variables:
BASE: k8s/web-prod/overlays/staging
environment:
name: wp-hx-staging

# deploy to staging at WP-HH
staging:wp-hh:
staging:wp-hl:
extends: .deploy-web
variables:
BASE: k8s/web-prod/overlays/staging
environment:
name: wp-hh-staging

# deploy to internal at WP-HX
internal:wp-hx:
extends: .deploy-web
variables:
BASE: k8s/web-prod/overlays/internal
environment:
name: wp-hx-internal
name: wp40-hl-staging

# deploy to internal at WP-HH
internal:wp-hh:
internal:wp-hl:
extends: .deploy-web
variables:
BASE: k8s/web-prod/overlays/internal
environment:
name: wp-hh-internal
name: wp40-hl-internal

# deploy to live at WP-HX
live:wp-hx:
extends: .deploy-web
variables:
BASE: k8s/web-prod/overlays/prod
environment:
name : wp-hx-live
name : wp41-hx-prod

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

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

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

deploy:public:
extends: .deploy-web
Expand Down
2 changes: 1 addition & 1 deletion k8s/web-prod/base/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ data:
https_proxy: <HTTP_PROXY>
kind: ConfigMap
metadata:
name: thoas-configmap
name: proxy-configmap
10 changes: 5 additions & 5 deletions k8s/web-prod/base/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
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
imagePullPolicy: Always
envFrom:
- configMapRef:
name: thoas-configmap
name: proxy-configmap
- secretRef:
name: mongo-config
command: ["uvicorn"]
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