Skip to content

Commit

Permalink
fx: infra manifests for frontend + proxy + backend
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanshs9 committed Nov 10, 2024
1 parent 495d9ef commit a7a2c99
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 7 deletions.
10 changes: 5 additions & 5 deletions iac/gitops/backend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: sec-backend
key: WEBPASSWORD
# - name: DB_PASSWORD
# valueFrom:
# secretKeyRef:
# name: sec-backend
# key: WEBPASSWORD
resources:
requests:
memory: "128Mi"
Expand Down
2 changes: 1 addition & 1 deletion iac/gitops/backend/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ labels:
images:
- name: grpc-backend:latest
newName: europe-north1-docker.pkg.dev/polynomial-new/services/whisper-notes-backend
newTag: latest
newTag: main-495d9ef
21 changes: 21 additions & 0 deletions iac/gitops/frontend/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
template:
spec:
containers:
- name: frontend
image: frontend:latest
ports:
- name: http
containerPort: 80
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "200m"
26 changes: 26 additions & 0 deletions iac/gitops/frontend/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- deployment.yaml
- service.yaml

namePrefix: whisper-notes-
namespace: debug # CHANGEME: default

labels:
- pairs:
app.kubernetes.io/name: whisper-notes-frontend
app.kubernetes.io/component: frontend
app.kubernetes.io/part-of: whisper-notes
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/created-by: controller-manager
includeSelectors: true
- pairs:
app.kubernetes.io/version: latest # TODO: add support of dynamic versioning in label
includeSelectors: false

images:
- name: frontend:latest
newName: europe-north1-docker.pkg.dev/polynomial-new/services/whisper-notes-frontend
newTag: main-495d9ef
9 changes: 9 additions & 0 deletions iac/gitops/frontend/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kind: Service
apiVersion: v1
metadata:
name: frontend
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
3 changes: 2 additions & 1 deletion iac/gitops/proxy/envoy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ static_resources:
max_grpc_timeout: 2s
http_filters:
- name: envoy.filters.http.router
typed_config: {}
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
clusters:
- name: notes-grpc-backend
connect_timeout: 0.5s
Expand Down

0 comments on commit a7a2c99

Please sign in to comment.