mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-21 11:19:09 +00:00
Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7fceb1ea2 | ||
|
|
5c98cc1748 | ||
|
|
5d014f4669 | ||
|
|
38fc9f521b | ||
|
|
9bacd7a0f5 | ||
|
|
c89ac40039 | ||
|
|
6d6cf590ee | ||
|
|
f063a8f30e | ||
|
|
03536a2180 | ||
|
|
0efd5cc257 | ||
|
|
9439f13b7b | ||
|
|
d936806406 | ||
|
|
9d7ccd4201 | ||
|
|
c8a4c1aae6 | ||
|
|
406db7ccff | ||
|
|
f48a35c7ce | ||
|
|
8d25df74b7 | ||
|
|
831a03402e | ||
|
|
a631338599 | ||
|
|
d943721b4a | ||
|
|
d03dd6129a | ||
|
|
96c20995a3 |
@@ -5489,6 +5489,14 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "origin",
|
||||||
|
"required": true,
|
||||||
|
"in": "header",
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
@@ -5643,6 +5651,9 @@
|
|||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"displayName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"tier": {
|
"tier": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
@@ -5663,6 +5674,7 @@
|
|||||||
"modules",
|
"modules",
|
||||||
"id",
|
"id",
|
||||||
"name",
|
"name",
|
||||||
|
"displayName",
|
||||||
"tier",
|
"tier",
|
||||||
"scheduleLimit",
|
"scheduleLimit",
|
||||||
"links",
|
"links",
|
||||||
|
|||||||
+3
-1
@@ -17,4 +17,6 @@ charts:
|
|||||||
- name: maestro.open_customer_id
|
- name: maestro.open_customer_id
|
||||||
value: f239718a-a271-4ef9-ae7e-02a2f0f3aa6e
|
value: f239718a-a271-4ef9-ae7e-02a2f0f3aa6e
|
||||||
- name: maestro.open_group_id
|
- name: maestro.open_group_id
|
||||||
value: 401573bb-334f-44b2-b30e-88d4cea31ae9
|
value: 401573bb-334f-44b2-b30e-88d4cea31ae9
|
||||||
|
- name: replicaCount
|
||||||
|
value: 2
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ spec:
|
|||||||
- key: application
|
- key: application
|
||||||
operator: In
|
operator: In
|
||||||
values:
|
values:
|
||||||
- backend
|
- general
|
||||||
|
|
||||||
tolerations:
|
tolerations:
|
||||||
- key: "kubernetes.azure.com/scalesetpriority"
|
- key: "kubernetes.azure.com/scalesetpriority"
|
||||||
operator: "Equal"
|
operator: "Equal"
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/whitelist-source-range: "69.49.241.121/32" # hostgator ip
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||||
|
nginx.ingress.kubernetes.io/server-snippet: |
|
||||||
|
underscores_in_headers on;
|
||||||
|
ignore_invalid_headers on;
|
||||||
|
|
||||||
|
generation: 1
|
||||||
|
labels:
|
||||||
|
app: maestro
|
||||||
|
name: open-data
|
||||||
|
namespace: applications
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: {{ .Values.hostname }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- backend:
|
||||||
|
service:
|
||||||
|
name: maestro
|
||||||
|
port:
|
||||||
|
number: {{ .Values.ingress.port }}
|
||||||
|
path: /open-data/sharing-ocean-data
|
||||||
|
pathType: Prefix
|
||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
# Declare variables to be passed into your templates.
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
replicaCount: 3
|
replicaCount: 3
|
||||||
hostname: maestro-temp.dadosfera.ai
|
hostname: maestro.dadosfera.ai
|
||||||
image:
|
image:
|
||||||
repository: 611330257153.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_prd
|
repository: 611330257153.dkr.ecr.us-east-1.amazonaws.com/microservices/maestro_prd
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|||||||
Generated
+5
-4
@@ -12,7 +12,7 @@
|
|||||||
"@aws-sdk/client-secrets-manager": "^3.414.0",
|
"@aws-sdk/client-secrets-manager": "^3.414.0",
|
||||||
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
||||||
"@dadosfera/protospack": "2.5.3",
|
"@dadosfera/protospack": "2.5.3",
|
||||||
"@dadosfera/protospack-v2": "3.37.0-beta.6",
|
"@dadosfera/protospack-v2": "^3.37.0-beta.10 ",
|
||||||
"@grpc/grpc-js": "^1.9.3",
|
"@grpc/grpc-js": "^1.9.3",
|
||||||
"@grpc/proto-loader": "^0.7.9",
|
"@grpc/proto-loader": "^0.7.9",
|
||||||
"@nestjs/cli": "^9.5.0",
|
"@nestjs/cli": "^9.5.0",
|
||||||
@@ -1298,9 +1298,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@dadosfera/protospack-v2": {
|
"node_modules/@dadosfera/protospack-v2": {
|
||||||
"version": "3.37.0-beta.6",
|
"version": "3.37.0-beta.10",
|
||||||
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.37.0-beta.6.tgz",
|
"resolved": "https://dadosfera-611330257153.d.codeartifact.us-east-1.amazonaws.com/npm/dadosfera-npm/@dadosfera/protospack-v2/-/protospack-v2-3.37.0-beta.10.tgz",
|
||||||
"integrity": "sha512-ITNm8i+LkmLQDk78ONXLu4W3gjkMM39UQFTBr+FKPiXDAn0iNfI3+bnrhNmDmNvTx6cxxdQcfiL1ntIxAPBgmg==",
|
"integrity": "sha512-nKSu9VpOPFSTeX0yN4aEY0HjvGxgbLPYXl217NHgLm+a/+i01USDaxjwIOqP5hhDvhnMNaiCq5awiQTYbhF/7A==",
|
||||||
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@grpc/grpc-js": "^1.9.3",
|
"@grpc/grpc-js": "^1.9.3",
|
||||||
"rxjs": "^7.5.5"
|
"rxjs": "^7.5.5"
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@
|
|||||||
"@aws-sdk/client-secrets-manager": "^3.414.0",
|
"@aws-sdk/client-secrets-manager": "^3.414.0",
|
||||||
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
"@dadosfera/dadosfera-logs": "^1.0.0-beta.4",
|
||||||
"@dadosfera/protospack": "2.5.3",
|
"@dadosfera/protospack": "2.5.3",
|
||||||
"@dadosfera/protospack-v2": "3.37.0-beta.6",
|
"@dadosfera/protospack-v2": "^3.37.0-beta.10 ",
|
||||||
"@grpc/grpc-js": "^1.9.3",
|
"@grpc/grpc-js": "^1.9.3",
|
||||||
"@grpc/proto-loader": "^0.7.9",
|
"@grpc/proto-loader": "^0.7.9",
|
||||||
"@nestjs/cli": "^9.5.0",
|
"@nestjs/cli": "^9.5.0",
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ export class AuthCustomer {
|
|||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
name: string;
|
name: string;
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
|
displayName: string;
|
||||||
|
@ApiProperty()
|
||||||
tier: string;
|
tier: string;
|
||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
scheduleLimit: string;
|
scheduleLimit: string;
|
||||||
|
|||||||
@@ -440,7 +440,7 @@ class CatalogService implements OnModuleInit {
|
|||||||
|
|
||||||
this.logger.info(`Creating table metadata for table ${body.table_metadata.table_name}`, {...body.logMetadata});
|
this.logger.info(`Creating table metadata for table ${body.table_metadata.table_name}`, {...body.logMetadata});
|
||||||
this.logger.info(`Using endpoint: ${endpoint}`, {...body.logMetadata});
|
this.logger.info(`Using endpoint: ${endpoint}`, {...body.logMetadata});
|
||||||
this.logger.debug(`Payload: ${JSON.stringify(body.table_metadata)}`, {...body.logMetadata});
|
this.logger.debug(`Payload: ${JSON.stringify(body.table_metadata)}`, {...body.logMetadata});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { data, status } = await axios.post(endpoint, {...body.table_metadata});
|
const { data, status } = await axios.post(endpoint, {...body.table_metadata});
|
||||||
@@ -454,7 +454,7 @@ class CatalogService implements OnModuleInit {
|
|||||||
this.logger.error(
|
this.logger.error(
|
||||||
`Failed to create table metadata for table ${body.table_metadata.table_name} failed with status ${
|
`Failed to create table metadata for table ${body.table_metadata.table_name} failed with status ${
|
||||||
error.response?.status
|
error.response?.status
|
||||||
} because of ${error.response?.data || error.message}`, {...body.logMetadata});
|
} because of ${JSON.stringify(error.response?.data) || error.message}`, {...body.logMetadata});
|
||||||
throw new Error(error.response?.data?.message || error.message);
|
throw new Error(error.response?.data?.message || error.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export class CustomersService implements OnModuleInit {
|
|||||||
const res = await lastValueFrom(
|
const res = await lastValueFrom(
|
||||||
this.pipelineReadService.PipelineV2GetDashboardUrl(
|
this.pipelineReadService.PipelineV2GetDashboardUrl(
|
||||||
{
|
{
|
||||||
dashboard_id: '45',
|
dashboard_id: '98',
|
||||||
exp: '15m',
|
exp: '15m',
|
||||||
metabase_customer_name: 'dadosferatech',
|
metabase_customer_name: 'dadosferatech',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import DadosferaLogger from '@dadosfera/dadosfera-logs';
|
import DadosferaLogger from '@dadosfera/dadosfera-logs';
|
||||||
import { Body, Controller, ForbiddenException, Header, HttpCode, Inject, Param, Post, Query, Req, UseFilters, UseGuards, UseInterceptors } from '@nestjs/common';
|
import { Body, Controller, ForbiddenException, Header, Headers, HttpCode, HttpException, Inject, Param, Post, Query, Req, Res, UseFilters, UseGuards, UseInterceptors } from '@nestjs/common';
|
||||||
import { ApiCreatedResponse, ApiHeaders, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
import { ApiCreatedResponse, ApiHeaders, ApiOkResponse, ApiTags } from '@nestjs/swagger';
|
||||||
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
|
import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
|
||||||
import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter';
|
import { GrpcToHttpExceptionFilter } from 'src/error/grpc-to-http-exception.filter';
|
||||||
@@ -40,17 +40,23 @@ export class OpenDataController {
|
|||||||
language: string,
|
language: string,
|
||||||
@Req()
|
@Req()
|
||||||
request: Request,
|
request: Request,
|
||||||
|
@Headers('origin')
|
||||||
|
origin: string
|
||||||
) {
|
) {
|
||||||
this.logger.info('createUser for open data');
|
this.logger.info('createUser for open data' + JSON.stringify(request.headers));
|
||||||
|
|
||||||
this.logger.info('user-agent', request.headers['user-agent']);
|
const corslist = ["https://devsbm.dadosfera.io", "https://sharingoceandata.com"];
|
||||||
|
if (!corslist.includes(origin)) {
|
||||||
|
this.logger.info('block request by cors list: '+ origin);
|
||||||
|
throw new ForbiddenException();
|
||||||
|
}
|
||||||
|
|
||||||
const OPENDATA_CUSTOMER_ID = process.env.OPEN_CUSTOMER_ID;
|
const OPENDATA_CUSTOMER_ID = process.env.OPEN_CUSTOMER_ID;
|
||||||
const OPENDATA_GROUP_ID = process.env.OPEN_GROUP_ID;
|
const OPENDATA_GROUP_ID = process.env.OPEN_GROUP_ID;
|
||||||
const roles = [process.env.OPEN_GROUP_ID];
|
const roles = [process.env.OPEN_GROUP_ID];
|
||||||
const metadata = PackTheMetadata({
|
const metadata = PackTheMetadata({
|
||||||
language: language || 'en-us'
|
language: language || 'en-us'
|
||||||
});
|
});
|
||||||
|
|
||||||
const data = {}
|
const data = {}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user