generator-codedesignplus 0.4.0 → 0.6.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/generators/microservice/core/appsettings.mjs +46 -21
  2. package/generators/microservice/core/grpc.mjs +0 -2
  3. package/generators/microservice/core/utils.mjs +2 -0
  4. package/generators/microservice/templates/microservice/.github/workflows/ca.yaml +51 -0
  5. package/generators/microservice/templates/microservice/.github/workflows/ci.yaml +33 -0
  6. package/generators/microservice/templates/microservice/CodeDesignPlus.Net.Microservice.sln +0 -10
  7. package/generators/microservice/templates/microservice/charts/ms-archetype-grpc/Chart.yaml +1 -1
  8. package/generators/microservice/templates/microservice/charts/ms-archetype-grpc/Production.yaml +103 -0
  9. package/generators/microservice/templates/microservice/charts/ms-archetype-grpc/{values.yaml → Staging.yaml} +10 -1
  10. package/generators/microservice/templates/microservice/charts/ms-archetype-rest/Chart.yaml +1 -1
  11. package/generators/microservice/templates/microservice/charts/ms-archetype-rest/Production.yaml +115 -0
  12. package/generators/microservice/templates/microservice/charts/ms-archetype-rest/{values.yaml → Staging.yaml} +8 -3
  13. package/generators/microservice/templates/microservice/charts/ms-archetype-worker/Chart.yaml +1 -1
  14. package/generators/microservice/templates/microservice/charts/ms-archetype-worker/Production.yaml +99 -0
  15. package/generators/microservice/templates/microservice/charts/ms-archetype-worker/{values.yaml → Staging.yaml} +6 -1
  16. package/generators/microservice/templates/microservice/src/domain/CodeDesignPlus.Net.Microservice.Application/CodeDesignPlus.Net.Microservice.Application.csproj +5 -5
  17. package/generators/microservice/templates/microservice/src/domain/CodeDesignPlus.Net.Microservice.Application/Errors.cs +2 -4
  18. package/generators/microservice/templates/microservice/src/domain/CodeDesignPlus.Net.Microservice.Application/Setup/MapsterConfig.cs +0 -1
  19. package/generators/microservice/templates/microservice/src/domain/CodeDesignPlus.Net.Microservice.Domain/CodeDesignPlus.Net.Microservice.Domain.csproj +2 -2
  20. package/generators/microservice/templates/microservice/src/domain/CodeDesignPlus.Net.Microservice.Domain/ValueObjects/AddressValueObject.cs +11 -6
  21. package/generators/microservice/templates/microservice/src/domain/CodeDesignPlus.Net.Microservice.Domain/ValueObjects/ClientValueObject.cs +10 -7
  22. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.AsyncWorker/CodeDesignPlus.Net.Microservice.AsyncWorker.csproj +8 -8
  23. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.AsyncWorker/Program.cs +6 -0
  24. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.AsyncWorker/appsettings.Development.json +16 -0
  25. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.AsyncWorker/appsettings.json +3 -4
  26. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.Rest/CodeDesignPlus.Net.Microservice.Rest.csproj +9 -8
  27. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.Rest/Program.cs +11 -4
  28. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.Rest/appsettings.Development.json +19 -0
  29. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.Rest/appsettings.Docker.json +23 -21
  30. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.Rest/appsettings.json +4 -4
  31. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.gRpc/CodeDesignPlus.Net.Microservice.gRpc.csproj +10 -10
  32. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.gRpc/Program.cs +4 -0
  33. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.gRpc/appsettings.Development.json +16 -0
  34. package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.gRpc/appsettings.json +6 -3
  35. package/generators/microservice/templates/microservice/tests/integration/CodeDesignPlus.Net.Microservice.AsyncWorker.Test/CodeDesignPlus.Net.Microservice.AsyncWorker.Test.csproj +1 -1
  36. package/generators/microservice/templates/microservice/tests/integration/CodeDesignPlus.Net.Microservice.Rest.Test/CodeDesignPlus.Net.Microservice.Rest.Test.csproj +1 -1
  37. package/generators/microservice/templates/microservice/tests/integration/CodeDesignPlus.Net.Microservice.gRpc.Test/CodeDesignPlus.Net.Microservice.gRpc.Test.csproj +2 -2
  38. package/generators/microservice/templates/microservice/tests/unit/CodeDesignPlus.Net.Microservice.AsyncWorker.Test/CodeDesignPlus.Net.Microservice.AsyncWorker.Test.csproj +1 -1
  39. package/generators/microservice/templates/microservice/tests/unit/CodeDesignPlus.Net.Microservice.Default.Test/CodeDesignPlus.Net.Microservice.Default.Test.csproj +2 -2
  40. package/generators/microservice/templates/microservice/tests/unit/CodeDesignPlus.Net.Microservice.Rest.Test/CodeDesignPlus.Net.Microservice.Rest.Test.csproj +1 -1
  41. package/generators/microservice/templates/microservice/tests/unit/CodeDesignPlus.Net.Microservice.gRpc.Test/CodeDesignPlus.Net.Microservice.gRpc.Test.csproj +1 -1
  42. package/generators/microservice/templates/value-object/ItemValueObject.cs +3 -0
  43. package/package.json +1 -1
  44. package/generators/microservice/templates/microservice/charts/ms-archetype-grpc/.helmignore +0 -23
  45. package/generators/microservice/templates/microservice/charts/ms-archetype-rest/.helmignore +0 -23
  46. package/generators/microservice/templates/microservice/charts/ms-archetype-worker/.helmignore +0 -23
  47. /package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.AsyncWorker/{appsettings.qa.json → appsettings.Staging.json} +0 -0
  48. /package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.Rest/{appsettings.qa.json → appsettings.Staging.json} +0 -0
  49. /package/generators/microservice/templates/microservice/src/entrypoints/CodeDesignPlus.Net.Microservice.gRpc/{appsettings.qa.json → appsettings.Staging.json} +0 -0
@@ -1,3 +1,5 @@
1
+ import { randomUUID } from 'crypto';
2
+ import { glob } from 'glob';
1
3
  import path from 'path';
2
4
 
3
5
  export default class AppSettingsGenerator {
@@ -10,42 +12,65 @@ export default class AppSettingsGenerator {
10
12
 
11
13
  async generate(options, sources = []) {
12
14
 
13
- if(sources.length === 0) {
15
+ if (sources.length === 0) {
14
16
  sources = [
15
- options.paths.src.rest,
16
- options.paths.src.grpc,
17
- options.paths.src.asyncWorker
17
+ options.paths.src.rest
18
18
  ];
19
+
20
+ if (options.enableGrpc)
21
+ sources.push(options.paths.src.grpc);
22
+
23
+ if (options.enableAsyncWorker)
24
+ sources.push(options.paths.src.asyncWorker);
19
25
  }
20
26
 
21
27
  const destination = this._generator.destinationPath();
22
28
 
23
29
  sources.forEach(source => {
24
30
 
25
- const appSettingsFile = path.join(destination, source, 'appsettings.json');
26
-
27
- const json = this._generator.fs.readJSON(appSettingsFile, {});
28
-
29
- json.Core.AppName = options.appSettings.appName;
30
- json.Core.Description = options.appSettings.description;
31
- json.Core.Business = options.appSettings.business;
32
- json.Core.Contact.Name = options.appSettings.contact.name;
33
- json.Core.Contact.Email = options.appSettings.contact.email;
34
- json.Vault.Solution = options.appSettings.vault;
35
- json.Vault.AppName = options.appSettings.appName;
36
- json.Mongo.Database = options.appSettings.database;
37
-
38
- this._generator.fs.writeJSON(appSettingsFile, json);
31
+ const files = glob.sync('appsettings.*', { dot: true, nodir: true, cwd: path.join(destination, source) });
32
+
33
+ files.forEach(file => {
34
+
35
+ const appSettingsFile = path.join(destination, source, file);
36
+
37
+ const json = this._generator.fs.readJSON(appSettingsFile, {});
38
+
39
+ if (json.Core) {
40
+ if (json.Core.Id)
41
+ json.Core.Id = randomUUID().toString();
42
+ if (json.Core.AppName)
43
+ json.Core.AppName = options.appSettings.appName;
44
+ if (json.Core.Description)
45
+ json.Core.Description = options.appSettings.description;
46
+ if (json.Core.Business)
47
+ json.Core.Business = options.appSettings.business;
48
+ if (json.Core.Contact?.Name)
49
+ json.Core.Contact.Name = options.appSettings.contact.name;
50
+ if (json.Core.Contact?.Email)
51
+ json.Core.Contact.Email = options.appSettings.contact.email;
52
+ }
53
+ if (json.Vault) {
54
+ json.Vault.Solution = options.appSettings.vault;
55
+ json.Vault.AppName = options.appSettings.appName;
56
+ }
57
+ if (json.Mongo) {
58
+ json.Mongo.Database = options.appSettings.database;
59
+ }
60
+
61
+ this._generator.fs.writeJSON(appSettingsFile, json);
62
+
63
+ });
39
64
  });
40
65
 
41
66
  try {
42
- this._updateConfigVault(path.join('tools', 'vault','config-vault.ps1'), options);
43
- this._updateConfigVault(path.join('tools', 'vault','config-vault.sh'), options);
67
+ this._updateConfigVault(path.join('tools', 'vault', 'config-vault.ps1'), options);
68
+ this._updateConfigVault(path.join('tools', 'vault', 'config-vault.sh'), options);
44
69
  this._updateReadme(options);
45
70
  } catch (error) {
46
71
  console.log('The vault configuration could not be updated.');
47
72
  console.log(error);
48
- }
73
+ }
49
74
  }
50
75
 
51
76
  _updateConfigVault(file, options) {
@@ -59,8 +59,6 @@ export default class GrpcGenerator {
59
59
 
60
60
  const files = glob.sync('**', { dot: true, nodir: true, cwd: templateGrpcProject, ignore: ignores });
61
61
 
62
- console.log(templateGrpcProject, files);
63
-
64
62
  await this._utils.generateFiles(options, options.solution, templateGrpcProject, grpcProjectPathDestination, files);
65
63
 
66
64
  await this._appsettings.generate(options, [options.paths.src.grpc]);
@@ -164,6 +164,7 @@ export default class Utils {
164
164
  [/global using CodeDesignPlus\.Net\.Microservice\.Application\.Order\.Queries\.GetAllOrders;/g, ''],
165
165
  [/app\.MapGrpcService<OrdersService>\(\)/g, `app.MapGrpcService<${options.proto?.name}Service>()`],
166
166
  [/Order/g, options.aggregate.name],
167
+ [/ms-archetype/g, `${options.appSettings.appName}`],
167
168
  ...transformations
168
169
  ]
169
170
  }
@@ -178,6 +179,7 @@ export default class Utils {
178
179
  .replace(/CodeDesignPlus\.Net\.Microservice/g, namespace)
179
180
  .replace(/Order/g, options.microservice)
180
181
  .replace(/orders.proto/g, options.proto?.file)
182
+ .replace(/ms-archetype/g, `${options.appSettings.appName }`)
181
183
  );
182
184
 
183
185
  const content = await fs.readFile(src, { encoding: 'utf-8' });
@@ -0,0 +1,51 @@
1
+ name: Continuous DeploymentAdd commentMore actions
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ environment:
7
+ type: choice
8
+ description: Select the environment to deploy to
9
+ default: Staging
10
+ options:
11
+ - Staging
12
+ - Production
13
+
14
+ permissions:
15
+ contents: write
16
+ packages: write
17
+ repository-projects: write
18
+ id-token: write
19
+
20
+ jobs:
21
+
22
+ version:
23
+ uses: codedesignplus/workflows/.github/workflows/release.yaml@main
24
+ with:
25
+ project-name: CodeDesignPlus.Net.Microservice
26
+ microservice-name: ms-archetype
27
+ environment: ${{ github.event.inputs.environment }}
28
+ secrets: inherit
29
+
30
+ container:
31
+ needs: version
32
+ if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/dev' }}
33
+ uses: codedesignplus/workflows/.github/workflows/container-image.yaml@main
34
+ with:
35
+ project-name: CodeDesignPlus.Net.Microservice
36
+ microservice-name: ms-archetype
37
+ environment: ${{ github.event.inputs.environment }}
38
+ secrets: inherit
39
+
40
+ deploy:
41
+ needs: container
42
+ if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/dev' }}
43
+ uses: codedesignplus/workflows/.github/workflows/deploy-self-host.yaml@main
44
+ with:
45
+ project-name: CodeDesignPlus.Net.Microservice
46
+ microservice-name: ms-archetype
47
+ enable-rest: true
48
+ enable-grpc: true
49
+ enable-worker: true
50
+ environment: ${{ github.event.inputs.environment }}
51
+ secrets: inherit
@@ -0,0 +1,33 @@
1
+ name: Continuous IntegrationAdd commentMore actions
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - rc
8
+ - dev
9
+ - feature/*
10
+
11
+ permissions:
12
+ contents: write
13
+ packages: write
14
+ repository-projects: write
15
+
16
+ jobs:
17
+ build:
18
+ uses: codedesignplus/workflows/.github/workflows/build-microservice.yaml@main
19
+ with:
20
+ project-name: CodeDesignPlus.Net.Microservice
21
+ microservice-name: ms-archetype
22
+ environment: Development
23
+ secrets: inherit
24
+
25
+ sonarqube:
26
+ needs: build
27
+ if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/rc' || github.ref == 'refs/heads/dev' }}
28
+ uses: codedesignplus/workflows/.github/workflows/sonarqube.yaml@main
29
+ with:
30
+ project-name: CodeDesignPlus.Net.Microservice
31
+ microservice-name: ms-archetype
32
+ environment: Development
33
+ secrets: inherit
@@ -52,15 +52,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeDesignPlus.Net.Microser
52
52
  EndProject
53
53
  Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeDesignPlus.Net.Microservice.Rest.Test", "tests\unit\CodeDesignPlus.Net.Microservice.Rest.Test\CodeDesignPlus.Net.Microservice.Rest.Test.csproj", "{86BB4D11-6C2F-44CA-B7DF-527FDFE79959}"
54
54
  EndProject
55
- Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{9C6578E7-E4FE-79BB-1635-F363CC1E80DD}"
56
- EndProject
57
- Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{E7A3C856-6834-D657-F2F0-05592DF2DDE9}"
58
- ProjectSection(SolutionItems) = preProject
59
- .github\workflows\ci.yml = .github\workflows\ci.yml
60
- .github\workflows\chart.yaml = .github\workflows\chart.yaml
61
- .github\workflows\build.yml = .github\workflows\build.yml
62
- EndProjectSection
63
- EndProject
64
55
  Global
65
56
  GlobalSection(SolutionConfigurationPlatforms) = preSolution
66
57
  Debug|Any CPU = Debug|Any CPU
@@ -157,7 +148,6 @@ Global
157
148
  {223DF4AA-8E95-4624-B439-EA232409E903} = {5769C6DB-68E8-4A8C-B43A-243401CDB4A2}
158
149
  {B190F800-89F0-43CD-B9BD-3EDD0C2E4B37} = {5769C6DB-68E8-4A8C-B43A-243401CDB4A2}
159
150
  {86BB4D11-6C2F-44CA-B7DF-527FDFE79959} = {5769C6DB-68E8-4A8C-B43A-243401CDB4A2}
160
- {E7A3C856-6834-D657-F2F0-05592DF2DDE9} = {9C6578E7-E4FE-79BB-1635-F363CC1E80DD}
161
151
  EndGlobalSection
162
152
  GlobalSection(ExtensibilityGlobals) = postSolution
163
153
  SolutionGuid = {91BAB16E-7151-425E-919F-2725C0813642}
@@ -6,5 +6,5 @@ version: 0.0.1
6
6
  appVersion: "0.0.1"
7
7
  dependencies:
8
8
  - name: ms-base
9
- version: 0.0.1
9
+ version: 0.0.10
10
10
  repository: "https://www.codedesignplus.com/helm-charts/"
@@ -0,0 +1,103 @@
1
+ ms-base:
2
+ environment: Production
3
+ replicaCount: 1
4
+
5
+ image:
6
+ repository: codedesignplus/ms-archetype-grpc
7
+ pullPolicy: IfNotPresent
8
+ tag: "v0.1.0-alpha.100"
9
+
10
+ imagePullSecrets: []
11
+ fullnameOverride: "ms-archetype-grpc"
12
+ nameOverride: "ms-archetype-grpc"
13
+
14
+ serviceAccount:
15
+ create: true
16
+ automount: true
17
+ annotations: {}
18
+ name: ""
19
+
20
+ podAnnotations: {}
21
+ podLabels: {}
22
+ podSecurityContext: {}
23
+ # fsGroup: 2000
24
+
25
+ securityContext: {}
26
+ # capabilities:
27
+ # drop:
28
+ # - ALL
29
+ # readOnlyRootFilesystem: true
30
+ # runAsNonRoot: true
31
+ # runAsUser: 1000
32
+
33
+ service:
34
+ type: ClusterIP
35
+ ports:
36
+ - name: http
37
+ port: 5000
38
+ targetPort: http
39
+ protocol: TCP
40
+ - name: grpc
41
+ port: 5001
42
+ targetPort: grpc
43
+ protocol: TCP
44
+
45
+ ingress:
46
+ enabled: false
47
+ className: ""
48
+ annotations: {}
49
+ # kubernetes.io/ingress.class: nginx
50
+ # kubernetes.io/tls-acme: "true"
51
+ hosts:
52
+ - host: services.codedesignplus.com
53
+ paths:
54
+ - path: /
55
+ pathType: ImplementationSpecific
56
+ tls: []
57
+ # - secretName: chart-example-tls
58
+ # hosts:
59
+ # - services.codedesignplus.com
60
+
61
+ resources: {}
62
+ # limits:
63
+ # cpu: 100m
64
+ # memory: 128Mi
65
+ # requests:
66
+ # cpu: 100m
67
+ # memory: 128Mi
68
+
69
+ livenessProbe:
70
+ httpGet:
71
+ path: /health/live
72
+ port: http
73
+ readinessProbe:
74
+ httpGet:
75
+ path: /health/ready
76
+ port: http
77
+
78
+ autoscaling:
79
+ enabled: false
80
+ minReplicas: 1
81
+ maxReplicas: 100
82
+ targetCPUUtilizationPercentage: 80
83
+ # targetMemoryUtilizationPercentage: 80
84
+
85
+ volumes: []
86
+ # - name: foo
87
+ # secret:
88
+ # secretName: mysecret
89
+ # optional: false
90
+
91
+ volumeMounts: []
92
+ # - name: foo
93
+ # mountPath: "/etc/foo"
94
+ # readOnly: true
95
+
96
+ nodeSelector: {}
97
+
98
+ tolerations: []
99
+
100
+ affinity: {}
101
+
102
+ virtualService:
103
+ create: false
@@ -1,4 +1,5 @@
1
1
  ms-base:
2
+ environment: Staging
2
3
  replicaCount: 1
3
4
 
4
5
  image:
@@ -31,7 +32,15 @@ ms-base:
31
32
 
32
33
  service:
33
34
  type: ClusterIP
34
- port: 5000
35
+ ports:
36
+ - name: http
37
+ port: 5000
38
+ targetPort: http
39
+ protocol: TCP
40
+ - name: grpc
41
+ port: 5001
42
+ targetPort: grpc
43
+ protocol: TCP
35
44
 
36
45
  ingress:
37
46
  enabled: false
@@ -6,5 +6,5 @@ version: 0.0.1
6
6
  appVersion: "0.0.1"
7
7
  dependencies:
8
8
  - name: ms-base
9
- version: 0.0.1
9
+ version: 0.0.10
10
10
  repository: "https://www.codedesignplus.com/helm-charts/"
@@ -0,0 +1,115 @@
1
+ ms-base:
2
+ environment: Production
3
+ replicaCount: 1
4
+
5
+ image:
6
+ repository: codedesignplus/ms-archetype-rest
7
+ pullPolicy: IfNotPresent
8
+ tag: "v0.1.0-alpha.100"
9
+
10
+ imagePullSecrets: []
11
+ fullnameOverride: "ms-archetype-rest"
12
+ nameOverride: "ms-archetype-rest"
13
+
14
+ serviceAccount:
15
+ create: true
16
+ automount: true
17
+ annotations: {}
18
+ name: ""
19
+
20
+ podAnnotations: {}
21
+ podLabels: {}
22
+ podSecurityContext: {}
23
+ # fsGroup: 2000
24
+
25
+ securityContext: {}
26
+ # capabilities:
27
+ # drop:
28
+ # - ALL
29
+ # readOnlyRootFilesystem: true
30
+ # runAsNonRoot: true
31
+ # runAsUser: 1000
32
+
33
+ service:
34
+ type: ClusterIP
35
+ ports:
36
+ - name: http
37
+ port: 5000
38
+ targetPort: http
39
+ protocol: TCP
40
+
41
+ ingress:
42
+ enabled: false
43
+ className: ""
44
+ annotations: {}
45
+ # kubernetes.io/ingress.class: nginx
46
+ # kubernetes.io/tls-acme: "true"
47
+ hosts:
48
+ - host: services.codedesignplus.com
49
+ paths:
50
+ - path: /
51
+ pathType: ImplementationSpecific
52
+ tls: []
53
+ # - secretName: chart-example-tls
54
+ # hosts:
55
+ # - services.codedesignplus.com
56
+
57
+ resources: {}
58
+ # limits:
59
+ # cpu: 100m
60
+ # memory: 128Mi
61
+ # requests:
62
+ # cpu: 100m
63
+ # memory: 128Mi
64
+
65
+ livenessProbe:
66
+ httpGet:
67
+ path: /health/live
68
+ port: http
69
+ readinessProbe:
70
+ httpGet:
71
+ path: /health/ready
72
+ port: http
73
+
74
+ autoscaling:
75
+ enabled: false
76
+ minReplicas: 1
77
+ maxReplicas: 100
78
+ targetCPUUtilizationPercentage: 80
79
+ # targetMemoryUtilizationPercentage: 80
80
+
81
+ volumes: []
82
+ # - name: foo
83
+ # secret:
84
+ # secretName: mysecret
85
+ # optional: false
86
+
87
+ volumeMounts: []
88
+ # - name: foo
89
+ # mountPath: "/etc/foo"
90
+ # readOnly: true
91
+
92
+ nodeSelector: {}
93
+
94
+ tolerations: []
95
+
96
+ affinity: {}
97
+
98
+ virtualService:
99
+ create: true
100
+ hosts:
101
+ - services.codedesignplus.com
102
+ gateways:
103
+ - istio-ingress/istio-gateway
104
+ http:
105
+ - name: ms-archetype
106
+ match:
107
+ - uri:
108
+ prefix: /ms-archetype/
109
+ rewrite:
110
+ uri: /
111
+ route:
112
+ - destination:
113
+ host: ms-archetype-rest.urbancore.svc.cluster.local
114
+ port:
115
+ number: 5000
@@ -1,4 +1,5 @@
1
1
  ms-base:
2
+ environment: Staging
2
3
  replicaCount: 1
3
4
 
4
5
  image:
@@ -31,7 +32,11 @@ ms-base:
31
32
 
32
33
  service:
33
34
  type: ClusterIP
34
- port: 5000
35
+ ports:
36
+ - name: http
37
+ port: 5000
38
+ targetPort: http
39
+ protocol: TCP
35
40
 
36
41
  ingress:
37
42
  enabled: false
@@ -95,7 +100,7 @@ ms-base:
95
100
  hosts:
96
101
  - services.codedesignplus.com
97
102
  gateways:
98
- - services-gateway
103
+ - istio-ingress/istio-gateway
99
104
  http:
100
105
  - name: ms-archetype
101
106
  match:
@@ -105,6 +110,6 @@ ms-base:
105
110
  uri: /
106
111
  route:
107
112
  - destination:
108
- host: ms-archetype-rest.default.svc.cluster.local
113
+ host: ms-archetype-rest.urbancore.svc.cluster.local
109
114
  port:
110
115
  number: 5000
@@ -6,5 +6,5 @@ version: 0.0.1
6
6
  appVersion: "0.0.1"
7
7
  dependencies:
8
8
  - name: ms-base
9
- version: 0.0.1
9
+ version: 0.0.10
10
10
  repository: "https://www.codedesignplus.com/helm-charts/"
@@ -0,0 +1,99 @@
1
+ ms-base:
2
+ environment: Production
3
+ replicaCount: 1
4
+
5
+ image:
6
+ repository: codedesignplus/ms-archetype-worker
7
+ pullPolicy: IfNotPresent
8
+ tag: "v0.1.0-alpha.100"
9
+
10
+ imagePullSecrets: []
11
+ fullnameOverride: "ms-archetype-worker"
12
+ nameOverride: "ms-archetype-worker"
13
+
14
+ serviceAccount:
15
+ create: true
16
+ automount: true
17
+ annotations: {}
18
+ name: ""
19
+
20
+ podAnnotations: {}
21
+ podLabels: {}
22
+ podSecurityContext: {}
23
+ # fsGroup: 2000
24
+
25
+ securityContext: {}
26
+ # capabilities:
27
+ # drop:
28
+ # - ALL
29
+ # readOnlyRootFilesystem: true
30
+ # runAsNonRoot: true
31
+ # runAsUser: 1000
32
+
33
+ service:
34
+ type: ClusterIP
35
+ ports:
36
+ - name: http
37
+ port: 5000
38
+ targetPort: http
39
+ protocol: TCP
40
+
41
+ ingress:
42
+ enabled: false
43
+ className: ""
44
+ annotations: {}
45
+ # kubernetes.io/ingress.class: nginx
46
+ # kubernetes.io/tls-acme: "true"
47
+ hosts:
48
+ - host: services.codedesignplus.com
49
+ paths:
50
+ - path: /
51
+ pathType: ImplementationSpecific
52
+ tls: []
53
+ # - secretName: chart-example-tls
54
+ # hosts:
55
+ # - services.codedesignplus.com
56
+
57
+ resources: {}
58
+ # limits:
59
+ # cpu: 100m
60
+ # memory: 128Mi
61
+ # requests:
62
+ # cpu: 100m
63
+ # memory: 128Mi
64
+
65
+ livenessProbe:
66
+ httpGet:
67
+ path: /health/live
68
+ port: http
69
+ readinessProbe:
70
+ httpGet:
71
+ path: /health/ready
72
+ port: http
73
+
74
+ autoscaling:
75
+ enabled: false
76
+ minReplicas: 1
77
+ maxReplicas: 100
78
+ targetCPUUtilizationPercentage: 80
79
+ # targetMemoryUtilizationPercentage: 80
80
+
81
+ volumes: []
82
+ # - name: foo
83
+ # secret:
84
+ # secretName: mysecret
85
+ # optional: false
86
+
87
+ volumeMounts: []
88
+ # - name: foo
89
+ # mountPath: "/etc/foo"
90
+ # readOnly: true
91
+
92
+ nodeSelector: {}
93
+
94
+ tolerations: []
95
+
96
+ affinity: {}
97
+
98
+ virtualService:
99
+ create: false
@@ -1,4 +1,5 @@
1
1
  ms-base:
2
+ environment: Staging
2
3
  replicaCount: 1
3
4
 
4
5
  image:
@@ -31,7 +32,11 @@ ms-base:
31
32
 
32
33
  service:
33
34
  type: ClusterIP
34
- port: 5000
35
+ ports:
36
+ - name: http
37
+ port: 5000
38
+ targetPort: http
39
+ protocol: TCP
35
40
 
36
41
  ingress:
37
42
  enabled: false
@@ -5,13 +5,13 @@
5
5
  <Nullable>enable</Nullable>
6
6
  </PropertyGroup>
7
7
  <ItemGroup>
8
- <PackageReference Include="CodeDesignPlus.Net.Generator" Version="0.6.0-beta.28" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
9
- <PackageReference Include="CodeDesignPlus.Net.Redis.Abstractions" Version="0.6.0-beta.28" />
10
- <PackageReference Include="CodeDesignPlus.Net.PubSub.Abstractions" Version="0.6.0-beta.28" />
11
- <PackageReference Include="CodeDesignPlus.Net.Cache.Abstractions" Version="0.6.0-beta.28" />
8
+ <PackageReference Include="CodeDesignPlus.Net.Generator" Version="0.7.0-beta.33" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
9
+ <PackageReference Include="CodeDesignPlus.Net.Redis.Abstractions" Version="0.7.0-beta.33" />
10
+ <PackageReference Include="CodeDesignPlus.Net.PubSub.Abstractions" Version="0.7.0-beta.33" />
11
+ <PackageReference Include="CodeDesignPlus.Net.Cache.Abstractions" Version="0.7.0-beta.33" />
12
12
  <PackageReference Include="Mapster" Version="7.4.0" />
13
13
  <PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" />
14
- <PackageReference Include="MediatR" Version="12.4.1" />
14
+ <PackageReference Include="MediatR" Version="12.5.0" />
15
15
  <PackageReference Include="FluentValidation.AspNetCore" Version="11.3.0" />
16
16
  </ItemGroup>
17
17
  <ItemGroup>
@@ -1,10 +1,8 @@
1
- using CodeDesignPlus.Net.Core.Abstractions;
2
-
3
- namespace CodeDesignPlus.Net.Microservice.Application;
1
+ namespace CodeDesignPlus.Net.Microservice.Application;
4
2
 
5
3
  public class Errors: IErrorCodes
6
4
  {
7
5
  public const string OrderNotFound = "200 : The order does not exist.";
8
6
  public const string OrderAlreadyExists = "201 : The order already exists.";
9
- public const string ClientIsNull = "300 : The client is null.";
7
+ public const string ClientIsNull = "300 : The client is null.";
10
8
  }