Skip to content

Commit

Permalink
feat: add manifests for services
Browse files Browse the repository at this point in the history
  • Loading branch information
Apoorva64 committed Oct 13, 2024
1 parent cc48169 commit a8ef89b
Show file tree
Hide file tree
Showing 16 changed files with 175 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Create Kind cluster
```bash
kind create cluster --config kind-config.yaml
kind create cluster --config kind-cluster.yaml
```

### Install Manifests
Expand All @@ -14,5 +14,5 @@ NB: The command will fail on the first run because the crds are not yet created.

### Add the following entries to /etc/hosts
```bash
127.0.0.1 keycloak.al.apoorva64.com prometheus.al.apoorva64.com grafana.al.apoorva64.com
127.0.0.1 keycloak.al.apoorva64.com prometheus.al.apoorva64.com grafana.al.apoorva64.com patient-management.al.apoorva64.com alert-management.al.apoorva64.com
```
30 changes: 30 additions & 0 deletions cloud/backend/alert-management/manifests/base/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: alert-management
name: alert-management
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: alert-management
template:
metadata:
labels:
io.kompose.service: alert-management
spec:
containers:
- image: ghcr.io/startupnationlabs/poulet/alert-management:e3911b5eaa38b49c29022ad6c7e83d45884a7f32
name: alert-management
ports:
- containerPort: 8080
protocol: TCP
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
restartPolicy: Always
24 changes: 24 additions & 0 deletions cloud/backend/alert-management/manifests/base/ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-alert-management
annotations:
kubernetes.io/ingress.class: traefik
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd
spec:
rules:
- host: alert-management.al.polytech.apoorva64.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: alert-management
port:
number: 8080
tls:
- hosts:
- alert-management.al.polytech.apoorva64.com
secretName: alert-management.al.polytech.apoorva64-tls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1

kind: Kustomization
resources:
- deployment.yml
- ingress.yml
- service.yml
13 changes: 13 additions & 0 deletions cloud/backend/alert-management/manifests/base/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: alert-management
name: alert-management
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: alert-management
30 changes: 30 additions & 0 deletions cloud/backend/patient-management/manifests/base/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.kompose.service: patient-management
name: patient-management
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: patient-management
template:
metadata:
labels:
io.kompose.service: patient-management
spec:
containers:
- image: ghcr.io/startupnationlabs/poulet/patient-management:e3911b5eaa38b49c29022ad6c7e83d45884a7f32
name: patient-management
ports:
- containerPort: 8080
protocol: TCP
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
restartPolicy: Always
24 changes: 24 additions & 0 deletions cloud/backend/patient-management/manifests/base/ingress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-patient-management
annotations:
kubernetes.io/ingress.class: traefik
cert-manager.io/cluster-issuer: letsencrypt-prod
traefik.ingress.kubernetes.io/router.middlewares: default-redirect-https@kubernetescrd
spec:
rules:
- host: patient-management.al.polytech.apoorva64.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: patient-management
port:
number: 8080
tls:
- hosts:
- patient-management.al.polytech.apoorva64.com
secretName: patient-management.al.polytech.apoorva64-tls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1

kind: Kustomization
resources:
- deployment.yml
- ingress.yml
- service.yml
13 changes: 13 additions & 0 deletions cloud/backend/patient-management/manifests/base/service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
io.kompose.service: patient-management
name: patient-management
spec:
ports:
- name: "8080"
port: 8080
targetPort: 8080
selector:
io.kompose.service: patient-management
2 changes: 2 additions & 0 deletions kind/apps/al/kustomization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- ../../../manifests/base
2 changes: 1 addition & 1 deletion kind/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ kind: Kustomization
resources:
- infrastructure/flux-cd
- infrastructure/traefik
- ../manifests/base
- apps/al
File renamed without changes.
1 change: 0 additions & 1 deletion manifests/base/keycloak/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helm-repository.yaml
- helm-release.yaml
- ingress.yaml
6 changes: 5 additions & 1 deletion manifests/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
resources:
- bitnami-helm-repository.yaml
- mongodb
- prometheus
- grafana
- keycloak
- keycloak
- ../../cloud/backend/alert-management/manifests/base
- ../../cloud/backend/patient-management/manifests/base
15 changes: 15 additions & 0 deletions manifests/base/mongodb/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: mongodb
spec:
interval: 60m
chart:
spec:
chart: mongodb
version: "16.0.3"
sourceRef:
kind: HelmRepository
name: bitnami
interval: 12h
values: {}
2 changes: 2 additions & 0 deletions manifests/base/mongodb/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- helm-release.yaml

0 comments on commit a8ef89b

Please sign in to comment.