Add k8s deployment template readme.md for payment
This commit is contained in:
parent
3ac24a38f3
commit
5c8eb64d02
@ -1,5 +1,6 @@
|
|||||||
appEnv:
|
appEnv:
|
||||||
APP_NAME: payment
|
APP_NAME: payment
|
||||||
|
CONTAINER_APP_ROOT: /app
|
||||||
SERVICE_API_ACCESS_HOST: 0.0.0.0
|
SERVICE_API_ACCESS_HOST: 0.0.0.0
|
||||||
SERVICE_API_ACCESS_PORT: 80
|
SERVICE_API_ACCESS_PORT: 80
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
appEnv:
|
appEnv:
|
||||||
APP_NAME: payment
|
APP_NAME: payment
|
||||||
|
CONTAINER_APP_ROOT: /app
|
||||||
SERVICE_API_ACCESS_HOST: 0.0.0.0
|
SERVICE_API_ACCESS_HOST: 0.0.0.0
|
||||||
SERVICE_API_ACCESS_PORT: 80
|
SERVICE_API_ACCESS_PORT: 80
|
||||||
|
|
||||||
@ -35,5 +36,3 @@ appK8sConfig:
|
|||||||
readinessProbe:
|
readinessProbe:
|
||||||
command: to_add_healthcheck.sh
|
command: to_add_healthcheck.sh
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
sites/payment/deploy/k8s/readme.md
Normal file
10
sites/payment/deploy/k8s/readme.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
- K8s namespace should be the same as the code repository name(project name), e.g. **freeleaps-service-hub**
|
||||||
|
- For each app, the K8s pod name must be the same as appEnv.APP_NAME
|
||||||
|
- When loading deployment yaml file under k8s folder (alpha.yaml, prod.yaml):
|
||||||
|
- Replace the secret values that are in format of {SECRET_NAME}, e.g. **{STRIPE_API_KEY}**
|
||||||
|
- Secret value should be stored in {REPO_NAME}/{APP_NAME}/{ENV}/{SECRET_NAME}, e.g. **freeleaps-service-hub/payment/alpha/STRIPE_API_KEY**
|
||||||
|
- Resolve appEnv references in the yaml file, e.g. **LOG_BASE_PATH: \$CONTAINER_APP_ROOT/log/\$APP_NAME**, **\$CONTAINER_APP_ROOT** and **$APP_NAME** should be replaced by the appEnv with the same name. And we should do the same for a SECRET referrence
|
||||||
|
- NOTE: only appEnvs are allowed to have references in the yaml file
|
||||||
|
- When reference can not be resolved, terminate the CI/CD
|
||||||
|
- For each app, the related k8s resource should be named as {APP_NAME}-{RESOURCE_NAME}, e.g. **payment-deployment**, **payment-service**
|
||||||
|
- For each app's k8s pod, we should deploy the resources defined in **appK8sConfig** as long as it doesn't conflict with the resource quota.
|
||||||
Loading…
Reference in New Issue
Block a user