-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yingtingxu
committed
Jun 20, 2024
1 parent
845a1b8
commit 66f7aac
Showing
6 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
mall-deployment/kubernetes/application/catalog-service/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Output the Kustomize result | ||
|
||
```bash | ||
cd ./staging | ||
``` | ||
|
||
```bash | ||
kubectl kustomize -o result.yml | ||
``` |
5 changes: 5 additions & 0 deletions
5
mall-deployment/kubernetes/application/catalog-service/production/application-prod.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mall: | ||
greeting: Welcome to the cloud native mall from a production Kubernetes environment! | ||
spring: | ||
config: | ||
import: configtree:/workspace/secrets/*/ |
25 changes: 25 additions & 0 deletions
25
mall-deployment/kubernetes/application/catalog-service/production/kustomization.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
resources: | ||
- github.com/arch/cloud-native-mall/mall-catalog/k8s?ref=main | ||
|
||
patches: | ||
- path: patch-env.yml | ||
- path: patch-volumes.yml | ||
- path: patch-resources.yml | ||
|
||
configMapGenerator: | ||
- name: catalog-config | ||
behavior: merge | ||
files: | ||
- application-prod.yml | ||
|
||
images: | ||
- name: mall-catalog | ||
newName: ghcr.io/arch/mall-catalog | ||
newTag: latest | ||
|
||
replicas: | ||
- name: catalog-service | ||
count: 2 |
14 changes: 14 additions & 0 deletions
14
mall-deployment/kubernetes/application/catalog-service/production/patch-env.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: catalog-service | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: catalog-service | ||
env: | ||
- name: SPRING_PROFILES_ACTIVE | ||
value: prod | ||
- name: BPL_JVM_THREAD_COUNT | ||
value: "100" |
16 changes: 16 additions & 0 deletions
16
mall-deployment/kubernetes/application/catalog-service/production/patch-resources.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: catalog-service | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: catalog-service | ||
resources: | ||
requests: | ||
memory: 756Mi | ||
cpu: "0.1" | ||
limits: | ||
memory: 756Mi | ||
cpu: "2" |
21 changes: 21 additions & 0 deletions
21
mall-deployment/kubernetes/application/catalog-service/production/patch-volumes.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: catalog-service | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: catalog-service | ||
volumeMounts: | ||
- mountPath: /workspace/secrets/postgres | ||
name: postgres-credentials-volume | ||
- mountPath: /workspace/secrets/keycloak | ||
name: keycloak-credentials-volume | ||
volumes: | ||
- name: postgres-credentials-volume | ||
secret: | ||
secretName: mall-postgres-catalog-credentials | ||
- name: keycloak-credentials-volume | ||
secret: | ||
secretName: mall-keycloak-issuer-resourceserver-secret |