Projeto do Agent Contas ORACLE
This commit is contained in:
6
k8s/artefatos_k8s/oracle_config_ai
Normal file
6
k8s/artefatos_k8s/oracle_config_ai
Normal file
@@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
user=ocid1.user.oc1..aaaaaaaanzctq4cfq6u7atitnpgb46rzcnewlnbljlipihlbcdnqscy7qmkq
|
||||
fingerprint=a6:e6:82:ca:d0:8e:8a:7f:58:14:ce:89:b4:b7:55:18
|
||||
tenancy=ocid1.tenancy.oc1..aaaaaaaayzepbi32gafno3hj23o3d6tuquqetuw3yelxb5y7t2ft2wtm2i7q
|
||||
region=sa-saopaulo-1
|
||||
key_file=/etc/oci/key.pem
|
||||
6
k8s/artefatos_k8s/oracle_config_ai_fqa
Normal file
6
k8s/artefatos_k8s/oracle_config_ai_fqa
Normal file
@@ -0,0 +1,6 @@
|
||||
[DEFAULT]
|
||||
user=ocid1.user.oc1..aaaaaaaallwzvfkqb4b3ezwgjsq5w2ken3etq77wy3qvfpdqdmxs4x7oxiaa
|
||||
fingerprint=a8:dc:ea:47:c9:44:e5:28:af:3c:41:13:9d:0a:33:c3
|
||||
tenancy=ocid1.tenancy.oc1..aaaaaaaayzepbi32gafno3hj23o3d6tuquqetuw3yelxb5y7t2ft2wtm2i7q
|
||||
region=sa-saopaulo-1
|
||||
key_file=/etc/oci/key.pem
|
||||
163
k8s/deployment.yaml
Normal file
163
k8s/deployment.yaml
Normal file
@@ -0,0 +1,163 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ${APP_NAME}
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ${APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ${APP_NAME}
|
||||
spec:
|
||||
hostAliases:
|
||||
- ip: 10.153.35.23
|
||||
hostnames:
|
||||
- agt-ai-atendimento-langfuse-dev.internal.timbrasil.com.br
|
||||
- ip: ${IP_CLUSTER_AI}
|
||||
hostnames:
|
||||
- ${HOSTNAME_CLUSTER_AI}
|
||||
- ip: 10.151.3.100
|
||||
hostnames:
|
||||
- pmidfqa.internal.timbrasil.com.br
|
||||
- ip: 10.151.0.100
|
||||
hostnames:
|
||||
- pmid.internal.timbrasil.com.br
|
||||
- ip: ${IP_ADB}
|
||||
hostnames:
|
||||
- ${HOST_ADB_1}
|
||||
- ${HOST_ADB_2}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: ${APP_NAME}
|
||||
image: ${IMAGE_REPOSITORY}:${IMAGE_TAG}
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: TIM_LLM_OCI_AUTH_FILE_LOCATION
|
||||
value: "/etc/oci/config"
|
||||
- name: TIM_RAG_OCI_AUTH_FILE_LOCATION
|
||||
value: "/etc/oci/config"
|
||||
- name: GOOGLE_APPLICATION_CREDENTIALS
|
||||
value: "/etc/google/credentials.json"
|
||||
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: ${APP_NAME}-api-secrets
|
||||
- configMapRef:
|
||||
name: ${APP_NAME}-config
|
||||
- secretRef:
|
||||
name: ${APP_NAME}-api-secrets-extras
|
||||
|
||||
volumeMounts:
|
||||
- name: oci-auth-volume
|
||||
mountPath: "/etc/oci"
|
||||
readOnly: true
|
||||
- name: google-sa-volume
|
||||
mountPath: "/etc/google"
|
||||
readOnly: true
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "250m"
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "1"
|
||||
|
||||
volumes:
|
||||
- name: oci-auth-volume
|
||||
secret:
|
||||
secretName: ${APP_NAME}-oci-app-secret
|
||||
- name: google-sa-volume
|
||||
secret:
|
||||
secretName: ${APP_NAME}-google-sa-secret
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ${APP_NAME}-service
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: ${APP_NAME}
|
||||
ports:
|
||||
- name: https
|
||||
protocol: TCP
|
||||
port: 443
|
||||
targetPort: 8000
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: ${APP_NAME}-route-http
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: istio-gateway
|
||||
namespace: istio-gateway
|
||||
hostnames:
|
||||
- ${DNS}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
timeouts:
|
||||
request: 1600s
|
||||
backendRefs:
|
||||
- name: ${APP_NAME}-service
|
||||
port: 80
|
||||
---
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: ${APP_NAME}-route-https
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: istio-gateway
|
||||
namespace: istio-gateway
|
||||
hostnames:
|
||||
- ${DNS}
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
timeouts:
|
||||
request: 1600s
|
||||
backendRefs:
|
||||
- name: ${APP_NAME}-service
|
||||
port: 443
|
||||
157
k8s/deployment_prd.yaml
Normal file
157
k8s/deployment_prd.yaml
Normal file
@@ -0,0 +1,157 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ${APP_NAME}
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
spec:
|
||||
replicas: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ${APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ${APP_NAME}
|
||||
spec:
|
||||
hostAliases:
|
||||
- ip: ${IP_LANGFUSE}
|
||||
hostnames:
|
||||
- ${DNS_LANGFUSE}
|
||||
- ip: ${IP_CLUSTER_AI}
|
||||
hostnames:
|
||||
- ${HOSTNAME_CLUSTER_AI}
|
||||
- ip: 10.151.0.100
|
||||
hostnames:
|
||||
- pmid.internal.timbrasil.com.br
|
||||
- ip: ${IP_ADB}
|
||||
hostnames:
|
||||
- ${HOST_ADB_1}
|
||||
- ${HOST_ADB_2}
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
fsGroup: 1000
|
||||
containers:
|
||||
- name: ${APP_NAME}
|
||||
image: ${IMAGE_REPOSITORY}:${IMAGE_TAG}
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: GOOGLE_APPLICATION_CREDENTIALS
|
||||
value: "/etc/google/credentials.json"
|
||||
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: ${APP_NAME}-api-secrets
|
||||
- configMapRef:
|
||||
name: ${APP_NAME}-config
|
||||
- secretRef:
|
||||
name: ${APP_NAME}-api-secrets-extras
|
||||
|
||||
volumeMounts:
|
||||
- name: google-sa-volume
|
||||
mountPath: "/etc/google"
|
||||
readOnly: true
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8000
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 3
|
||||
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "250m"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
cpu: "1"
|
||||
|
||||
volumes:
|
||||
- name: google-sa-volume
|
||||
secret:
|
||||
secretName: ${APP_NAME}-google-sa-secret
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ${APP_NAME}-service
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: ${APP_NAME}
|
||||
ports:
|
||||
- name: https
|
||||
protocol: TCP
|
||||
port: 443
|
||||
targetPort: 8000
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8000
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ${APP_NAME}-ingress-https
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
annotations:
|
||||
oci-native-ingress.oraclecloud.com/healthcheck-path: "/health"
|
||||
oci-native-ingress.oraclecloud.com/healthcheck-protocol: "HTTP"
|
||||
oci-native-ingress.oraclecloud.com/healthcheck-return-code: "200"
|
||||
oci-native-ingress.oraclecloud.com/backend-tls-enabled: "false"
|
||||
spec:
|
||||
ingressClassName: default-ingress-class
|
||||
tls:
|
||||
- hosts:
|
||||
- ${DNS}
|
||||
secretName: shared-tls-secret
|
||||
rules:
|
||||
- host: ${DNS}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: ${APP_NAME}-service
|
||||
port:
|
||||
number: 443
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ${APP_NAME}-ingress-http
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
annotations:
|
||||
oci-native-ingress.oraclecloud.com/healthcheck-path: "/health"
|
||||
oci-native-ingress.oraclecloud.com/healthcheck-protocol: "HTTP"
|
||||
oci-native-ingress.oraclecloud.com/healthcheck-return-code: "200"
|
||||
spec:
|
||||
ingressClassName: default-ingress-class
|
||||
rules:
|
||||
- host: ${DNS}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: ${APP_NAME}-service
|
||||
port:
|
||||
number: 80
|
||||
4
k8s/helm_deploy.yaml
Normal file
4
k8s/helm_deploy.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v2
|
||||
name: ${APP_NAME}
|
||||
description: helm para contas
|
||||
version: ${IMAGE_TAG}
|
||||
24
k8s/secrets.yaml
Normal file
24
k8s/secrets.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ${APP_NAME}-api-secrets
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
type: Opaque
|
||||
stringData:
|
||||
TIM_BLOQUEIO_AUTH: "${TIM_BLOQUEIO_AUTH}"
|
||||
TIM_CANCELAMENTO_AUTH: "${TIM_CANCELAMENTO_AUTH}"
|
||||
TIM_COMPLETE_INVOICES_AUTH: "${TIM_COMPLETE_INVOICES_AUTH}"
|
||||
TIM_CONSULTA_AUTH: "${TIM_CONSULTA_AUTH}"
|
||||
TIM_CONTRATO_AUTH: "${TIM_CONTRATO_AUTH}"
|
||||
TIM_PROFILE_BILL_AUTH: "${TIM_PROFILE_BILL_AUTH}"
|
||||
TIM_PROFILE_FULL_AUTH: "${TIM_PROFILE_FULL_AUTH}"
|
||||
TIM_PROTOCOL_AUTH: "${TIM_PROTOCOL_AUTH}"
|
||||
TIM_SERVICE_REQUEST_STATUS_AUTH: "${TIM_SERVICE_REQUEST_STATUS_AUTH}"
|
||||
TIM_LLM_GATEWAY_LANGFUSE_SECRET_KEY: "${TIM_LLM_GATEWAY_LANGFUSE_SECRET_KEY}"
|
||||
TIM_OBSERVABILITY_ENCRYPTION_KEY: "${TIM_OBSERVABILITY_ENCRYPTION_KEY}"
|
||||
TIM_TRACKING_ACTIVITIES_AUTH: "${TIM_TRACKING_ACTIVITIES_AUTH}"
|
||||
TIM_SMS_AUTH: "${TIM_SMS_AUTH}"
|
||||
TIM_VAS_HISTORY_AUTH: "${TIM_VAS_HISTORY_AUTH}"
|
||||
TIM_VAS_HISTORY_CLIENT_ID: "${TIM_VAS_HISTORY_CLIENT_ID}"
|
||||
TIM_COMPLETE_INVOICES_AUTH: "$TIM_COMPLETE_INVOICES_AUTH"
|
||||
TIM_INVOICE_RECOVER_AUTH: "${TIM_INVOICE_RECOVER_AUTH}"
|
||||
30
k8s/secrets_prod.yaml
Normal file
30
k8s/secrets_prod.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: ${APP_NAME}-api-secrets
|
||||
namespace: ${K8S_NAMESPACE}
|
||||
type: Opaque
|
||||
stringData:
|
||||
TIM_BLOQUEIO_AUTH: "${TIM_BLOQUEIO_AUTH}"
|
||||
TIM_CANCELAMENTO_AUTH: "${TIM_CANCELAMENTO_AUTH}"
|
||||
TIM_COMPLETE_INVOICES_AUTH: "${TIM_COMPLETE_INVOICES_AUTH}"
|
||||
TIM_CONSULTA_AUTH: "${TIM_CONSULTA_AUTH}"
|
||||
TIM_CONTRATO_AUTH: "${TIM_CONTRATO_AUTH}"
|
||||
TIM_PROFILE_BILL_AUTH: "${TIM_PROFILE_BILL_AUTH}"
|
||||
TIM_PROFILE_FULL_AUTH: "${TIM_PROFILE_FULL_AUTH}"
|
||||
TIM_PROTOCOL_AUTH: "${TIM_PROTOCOL_AUTH}"
|
||||
TIM_SERVICE_REQUEST_STATUS_AUTH: "${TIM_SERVICE_REQUEST_STATUS_AUTH}"
|
||||
TIM_LLM_GATEWAY_LANGFUSE_SECRET_KEY: "${TIM_LLM_GATEWAY_LANGFUSE_SECRET_KEY}"
|
||||
TIM_LLM_GATEWAY_LANGFUSE_PUBLIC_KEY: "${TIM_LLM_GATEWAY_LANGFUSE_PUBLIC_KEY}"
|
||||
TIM_OBSERVABILITY_ENCRYPTION_KEY: "${TIM_OBSERVABILITY_ENCRYPTION_KEY}"
|
||||
TIM_TRACKING_ACTIVITIES_AUTH: "${TIM_TRACKING_ACTIVITIES_AUTH}"
|
||||
TIM_SMS_AUTH: "${TIM_SMS_AUTH}"
|
||||
SMS_BARCODE_AUTH: "${SMS_BARCODE_AUTH}"
|
||||
TIM_CUSTOMER_CONTESTATION_AUTH: "${TIM_CUSTOMER_CONTESTATION_AUTH}"
|
||||
TIM_DIVERGENCIA_AUTH: "${TIM_DIVERGENCIA_AUTH}"
|
||||
TIM_INVOICE_RECOVER_AUTH: "${TIM_INVOICE_RECOVER_AUTH}"
|
||||
TIM_RAG_DB_USER: "${TIM_RAG_DB_USER}"
|
||||
MONGODB_CONNECTION_STRING: "${MONGODB_CONNECTION_STRING}"
|
||||
PUBSUB_SEQUENCE_MONGODB_URI: "${MONGODB_CONNECTION_STRING}"
|
||||
TIM_VAS_HISTORY_AUTH: "${TIM_VAS_HISTORY_AUTH}"
|
||||
TIM_VAS_HISTORY_CLIENT_ID: "${TIM_VAS_HISTORY_CLIENT_ID}"
|
||||
Reference in New Issue
Block a user