Skip to content

Commit

Permalink
#SDSV-24 Update codefresh deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmartin committed Mar 13, 2024
1 parent 2e97524 commit c1ee10d
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 8 deletions.
12 changes: 4 additions & 8 deletions deploy/k8s/codefresh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,12 @@ steps:
deploy:
stage: "deploy"
title: "Deploying SDS Viewer"
image: codefresh/kubectl
image: codefresh/cf-deploy-kubernetes
tag: latest
working_directory: ./sds-viewer/deploy/k8s
commands:
- export CLUSTER_NAME="${{CLUSTER_NAME}}"
- export NAMESPACE="${{NAMESPACE}}"
- export CF_BUILD_ID="${{CF_BUILD_ID}}"
- export REGISTRY="${{REGISTRY}}/"
- export DOMAIN="${{DOMAIN}}"
- chmod +x ./deploy.sh
- ./deploy.sh
- /cf-deploy-kubernetes cde-mapper.yaml
- /cf-deploy-kubernetes ingress.yaml
environment:
- KUBECONTEXT=${{CLUSTER_NAME}}
- KUBERNETES_NAMESPACE=${{NAMESPACE}}
40 changes: 40 additions & 0 deletions deploy/k8s/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: 'letsencrypt-sds-viewer'
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: [email protected]
privateKeySecretRef:
name: letsencrypt-sds-viewer
solvers:
- http01:
ingress:
class: nginx
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
cert-manager.io/issuer: letsencrypt-sds-viewer
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: 'true'
nginx.ingress.kubernetes.io/proxy-body-size: 512m
name: sds-viewer-nginx-ingress
spec:
rules:
- host: "{{DOMAIN}}"
http:
paths:
- backend:
service:
name: sds-viewer
port:
number: 80
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- "{{DOMAIN}}"
secretName: sds-viewer-tls
39 changes: 39 additions & 0 deletions deploy/k8s/sds_viewer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sds-viewer
spec:
selector:
matchLabels:
app: sds-viewer
replicas: 1
template:
metadata:
labels:
app: sds-viewer
spec:
containers:
- name: sds-viewer
image: "{{REGISTRY}}sds-viewer:{{CF_BUILD_ID}}"
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 80
resources:
limits:
cpu: 1500m
memory: 768Mi
requests:
cpu: 500m
memory: 768Mi
---
apiVersion: v1
kind: Service
metadata:
name: sds-viewer
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 80
selector:
app: sds-viewer

0 comments on commit c1ee10d

Please sign in to comment.