Skip to content

Commit

Permalink
Fixin catalog-api kustomize files
Browse files Browse the repository at this point in the history
  • Loading branch information
jurabek committed Dec 26, 2023
1 parent b7ab2a2 commit cb90c7e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 47 deletions.
7 changes: 4 additions & 3 deletions k8s-kustomize/services/catalog-api/base/.env.secret
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
db.username=catalog-db-user
db.password=catalog-db-password
db.name=restaurant_catalog_database
db.url=postgres://db_user:password@catalog-pgsql-database:5432/catalog_database
db.name=catalog_database
db.password=password
db.username=db-user
1 change: 0 additions & 1 deletion k8s-kustomize/services/catalog-api/base/config.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
auth.authority=http://identity-api
db.host=catalog-pgsql-database
env=Development
base.path=/catalog
67 changes: 27 additions & 40 deletions k8s-kustomize/services/catalog-api/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,27 @@ spec:
image: catalog-api # must much from ./kustomization.yaml -> images[0].name
imagePullPolicy: Always
ports:
- containerPort: 80
- containerPort: 8000
env:
- name: ORCHESTRATION_TYPE
value: k8s
- name: ASPNETCORE_ENVIRONMENT
- name: ROCKET_PORT
value: "8000"
- name: ROCKET_HOST
value: "0.0.0.0"
- name: ENV
valueFrom:
configMapKeyRef:
name: catalog-api
key: env
- name: PATH_BASE
- name: BASE_URL
valueFrom:
configMapKeyRef:
name: catalog-api
key: base.path
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: catalog-db
key: db.host
- name: DB_NAME
valueFrom:
secretKeyRef:
name: catalog-db
key: db.name
- name: DB_USER
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: catalog-db
key: db.username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: catalog-db
key: db.password
name: catalog-api
key: db.url
- name: AUTH_URL
valueFrom:
configMapKeyRef:
Expand All @@ -61,23 +48,23 @@ spec:
configMapKeyRef:
name: catalog-api
key: auth.authority
readinessProbe:
httpGet:
path: /hc
port: 80
initialDelaySeconds: 60
timeoutSeconds: 5
periodSeconds: 30
successThreshold: 1
failureThreshold: 5
livenessProbe:
httpGet:
path: /liveness
port: 80
initialDelaySeconds: 10
periodSeconds: 15
successThreshold: 1
failureThreshold: 5
# readinessProbe:
# httpGet:
# path: /health/ready
# port: 8000
# initialDelaySeconds: 10
# timeoutSeconds: 5
# periodSeconds: 30
# successThreshold: 1
# failureThreshold: 5
# livenessProbe:
# httpGet:
# path: /health/live
# port: 8000
# initialDelaySeconds: 10
# periodSeconds: 15
# successThreshold: 1
# failureThreshold: 5
resources:
requests:
memory: "64Mi"
Expand Down
2 changes: 1 addition & 1 deletion k8s-kustomize/services/catalog-api/base/menu-pgsql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ metadata:
app: catalog-pgsql-database
name: catalog-pgsql-database
spec:
type: LoadBalancer
type: ClusterIP
ports:
- port: 5432
targetPort: 5432
Expand Down
2 changes: 0 additions & 2 deletions src/backend/services/catalog-api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@ COPY --from=builder /usr/src/catalog-api/data ./data
COPY --from=builder /usr/src/catalog-api/pictures ./pictures
COPY --from=builder /usr/src/catalog-api/migrations ./migrations

EXPOSE 8080

ENTRYPOINT ["./catalog-api"]

0 comments on commit cb90c7e

Please sign in to comment.