Skip to content

Commit be2e216

Browse files
acies312orchestr7
andauthored
helm chart optimize (#2917)
* save and cosv divide in gateway * added cosv deployment templates for helm chart * Update values.yaml * modified agent service templates * removed properties from configmaps to app native properties. * removed s3 and mysql for dev deploy * codehub logo for cosv front * set all links for cosv to gitlink * yaml files merged * deleted gateway host port * updated README * fix storage.yml * yaml files merged * fixed values.yaml * fix * fix storage dict * fixed default for proxy * add optional proxy params * fix * fix * properties moved from kube to main prop file --------- Co-authored-by: Andrey Kuleshov <andrewkuleshov7@gmail.com>
1 parent 0e19690 commit be2e216

59 files changed

Lines changed: 752 additions & 769 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
gateway.backend.url=http://backend
2+
gateway.frontend.url=http://frontend
3+
gateway.demo-cpg.url=http://demo-cpg
4+
gateway.demo.url=http://demo
5+
server.shutdown=graceful
6+
management.endpoints.web.exposure.include=*
7+
management.server.port=5301
8+
logging.level.org.springframework=DEBUG
9+
logging.level.com.saveourtool=DEBUG

api-gateway/src/main/resources/application.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ spring:
4747
- id: api_route
4848
uri: ${gateway.backend.url}
4949
predicates:
50-
- Host=**.${hosts.save}:5300
50+
- Host=**.${hosts.save}
5151
- Path=/api/**
5252
filters:
5353
# If SESSION cookie is passed to downstream, it is then removed, because downstream discards it
@@ -56,7 +56,7 @@ spring:
5656
- id: cosv_api_route
5757
uri: ${gateway.backend-cosv.url}
5858
predicates:
59-
- Host=**.${hosts.cosv}:5300
59+
- Host=**.${hosts.cosv}
6060
- Path=/api/**
6161
filters:
6262
# If SESSION cookie is passed to downstream, it is then removed, because downstream discards it
@@ -71,31 +71,31 @@ spring:
7171
- id: resource_route
7272
uri: ${gateway.frontend.url}
7373
predicates:
74-
- Host=**.${hosts.save}:5300
74+
- Host=**.${hosts.save}
7575
- Path=/*.html,/*.js*,/*.css,/img/**,/*.ico,/*.png
7676
filters:
7777
# If SESSION cookie is passed to downstream, it is then removed, because downstream discards it
7878
- RemoveRequestHeader=Cookie
7979
- id: index_route
8080
uri: ${gateway.frontend.url}/index.html
8181
predicates:
82-
- Host=**.${hosts.save}:5300
82+
- Host=**.${hosts.save}
8383
- Path=/**
8484
filters:
8585
# If SESSION cookie is passed to downstream, it is then removed, because downstream discards it
8686
- RemoveRequestHeader=Cookie
8787
- id: resource_route_cosv
8888
uri: ${gateway.frontend-cosv.url}
8989
predicates:
90-
- Host=**.${hosts.cosv}:5300
90+
- Host=**.${hosts.cosv}
9191
- Path=/*.html,/*.js*,/*.css,/img/**,/*.ico,/*.png
9292
filters:
9393
# If SESSION cookie is passed to downstream, it is then removed, because downstream discards it
9494
- RemoveRequestHeader=Cookie
9595
- id: index_route_cosv
9696
uri: ${gateway.frontend-cosv.url}/index.html
9797
predicates:
98-
- Host=**.${hosts.cosv}:5300
98+
- Host=**.${hosts.cosv}
9999
- Path=/**
100100
filters:
101101
# If SESSION cookie is passed to downstream, it is then removed, because downstream discards it
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
backend.preprocessor-url=http://preprocessor
2+
backend.orchestrator-url=http://orchestrator
3+
backend.demo-url=http://demo
4+
backend.loki.url=http://loki:3100
5+
backend.loki.labels.agent-container-name=pod
6+
backend.loki.labels.application-name=app
7+
backend.agent-settings.backend-url=http://save-backend
8+
server.shutdown=graceful
9+
management.endpoints.web.exposure.include=*
10+
management.server.port=5801
11+
spring.datasource.url=${spring.datasource.backend-url}

save-backend/src/main/resources/application.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ backend.s3-storage.prefix=cnb/files
3434
backend.s3-storage.credentials.accessKeyId=${s3-storage.credentials.accessKeyId}
3535
backend.s3-storage.credentials.secretAccessKey=${s3-storage.credentials.secretAccessKey}
3636
backend.working-dir=/home/cnb/working-dir
37+
logging.level.org.springframework=DEBUG
38+
logging.level.com.saveourtool=DEBUG

save-cloud-charts/save-cloud/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ It will also create a Service for an external MySQL database.
55
api-gateway acts as an entrypoint and svc/gateway is actually a LoadBalancer.
66

77
## Prerequisites
8-
* **save-backend** expects the following secrets to be set under the secret `db-secrets` (`kubectl create secret generic db-secrets <...>`,
9-
also see Secrets section in dev profile in [mysql-deployment.yaml](templates/mysql-deployment.yaml) as a reference):
8+
* **save-backend** expects the following secrets to be set under the secret `db-secrets` (`kubectl create secret generic db-secrets <...>`
109
* `spring.datasource.username`
1110
* `spring.datasource.password`
1211
* `spring.datasource.backend-url`
@@ -73,7 +72,3 @@ command line using `--set` flag.
7372
```bash
7473
$ helm --kube-context=minikube --namespace=save-cloud upgrade -i save-cloud save-cloud-0.1.0.tgz/<or use ulr oci://ghcr.io/saveourtool/save-cloud> --values values-minikube.yaml --values=values-images.yaml <any other value files and/or --set flags>
7574
```
76-
* Database migrations can be run by setting value `mysql.migrations.enabled` to `true` (no additional setup, migrations
77-
are executed by init container, but may be too slow with constant recreations of backend pods)
78-
or port 3306 of mysql pod can be forwarded and `liquibaseUpdate` can be executed manually. If needed, don't forget that
79-
JDBC URL for liquibase in dev profile is read from `application-dev.properties` value `dev.datasource.url`.

save-cloud-charts/save-cloud/templates/agent-backend-service.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

save-cloud-charts/save-cloud/templates/agent-demo-service.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

save-cloud-charts/save-cloud/templates/agent-namespace.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

save-cloud-charts/save-cloud/templates/agent-network-policy-demo.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

save-cloud-charts/save-cloud/templates/agent-network-policy-general.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)