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

update service name #14

Merged
merged 1 commit into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ jobs:

- name: Create Kubernetes secret
run: |
kubectl create secret generic secret-group-18-fastfood-backend \
kubectl create secret generic secret-customer-service \
--from-literal=POSTGRES_USER=${{ secrets.POSTGRES_USER }} \
--from-literal=POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} \
--from-literal=JWT_SECRET=${{ secrets.JWT_SECRET }} \
Expand All @@ -144,7 +144,7 @@ jobs:

- name: Create Kubernetes configmap
run: |
kubectl create configmap configmap-group-18-fastfood-backend \
kubectl create configmap configmap-customer-service \
--from-literal=POSTGRES_DB=${{ secrets.POSTGRES_DB }} \
--from-literal=POSTGRES_HOST=${{ secrets.POSTGRES_HOST_CUSTOMER }} \
--dry-run=client -o yaml | kubectl apply -f -
Expand Down
25 changes: 13 additions & 12 deletions infra/golang-app-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: group-18-fastfood-backend
name: customer-service
labels:
app: group-18-fastfood-backend
app: customer-service
spec:
selector:
matchLabels:
app: group-18-fastfood-backend
app: customer-service
replicas: 3
namespace: default
strategy:
type: RollingUpdate
template:
metadata:
name: group-18-fastfood-backend
name: customer-service
labels:
app: group-18-fastfood-backend
app: customer-service
spec:
containers:
- name: group-18-fastfood-backend
- name: customer-service
image: placeholder_repository_name
imagePullPolicy: IfNotPresent
ports:
Expand Down Expand Up @@ -46,30 +47,30 @@ spec:
- name: POSTGRES_DB
valueFrom:
configMapKeyRef:
name: configmap-group-18-fastfood-backend
name: configmap-customer-service
key: POSTGRES_DB
- name: POSTGRES_HOST
valueFrom:
configMapKeyRef:
name: configmap-group-18-fastfood-backend
name: configmap-customer-service
key: POSTGRES_HOST
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: secret-group-18-fastfood-backend
name: secret-customer-service
key: POSTGRES_USER
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: secret-group-18-fastfood-backend
name: secret-customer-service
key: POSTGRES_PASSWORD
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: secret-group-18-fastfood-backend
name: secret-customer-service
key: JWT_SECRET
- name: JWT_ISSUER
valueFrom:
secretKeyRef:
name: secret-group-18-fastfood-backend
name: secret-customer-service
key: JWT_ISSUER
18 changes: 9 additions & 9 deletions infra/hpa.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: group-18-fastfood-backend-hpa
name: customer-service-hpa
labels:
app: group-18-fastfood-backend-hpa
app: customer-service-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: group-18-fastfood-backend
name: customer-service
minReplicas: 3
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 60
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 60
187 changes: 0 additions & 187 deletions infra/metrics.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions infra/services.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: svc-group-18-fastfood-backend
name: svc-customer-service
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
app: group-18-fastfood-backend
app: customer-service
2 changes: 1 addition & 1 deletion infra/configmap.yaml → infra/template-dev/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: configmap-group-18-fastfood-backend
name: configmap-customer-service
data:
POSTGRES_DB: "postgres"
POSTGRES_HOST: "postgres.caz5uypaugvp.us-east-1.rds.amazonaws.com"
2 changes: 1 addition & 1 deletion infra/secrets.yaml → infra/template-dev/secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: secret-group-18-fastfood-backend
name: secret-customer-service
type: Opaque
stringData:
POSTGRES_USER: "postgres"
Expand Down
Loading