Skip to content

Commit

Permalink
feat: add namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
hongjs authored Feb 12, 2025
1 parent c923360 commit 5bf783c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions infra/k8s/horpakjs-depl.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
apiVersion: v1
kind: Namespace
metadata:
name: horpakjs
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: horpakjs-deployment
namespace: horpakjs
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -35,6 +41,7 @@ apiVersion: v1
kind: Service
metadata:
name: horpakjs-service
namespace: horpakjs
spec:
type: ClusterIP
selector:
Expand Down
1 change: 1 addition & 0 deletions infra/k8s/horpakjs-hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: backend-hpa
namespace: horpakjs
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
4 changes: 3 additions & 1 deletion infra/k8s/ingress-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-service
namespace: horpakjs
annotations:
kubernetes.io/ingress.class: nginx
# kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: 'true'
# nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
ingressClassName: nginx
rules:
- http:
paths:
Expand Down

0 comments on commit 5bf783c

Please sign in to comment.