326 lines
15 KiB
YAML
326 lines
15 KiB
YAML
# Local Kind cluster values for Hades
|
|
# Use: helm upgrade --install hades . -f values-local.yaml -n hades --create-namespace
|
|
|
|
# Allow non-Bitnami images in MySQL subchart
|
|
global:
|
|
security:
|
|
allowInsecureImages: true
|
|
|
|
replicaCount: 1
|
|
|
|
# Common labels for testing - enables Backstage Kubernetes plugin discovery
|
|
commonLabels:
|
|
backstage.io/kubernetes-id: "hades-service"
|
|
|
|
image:
|
|
repository: localhost:5001/prj-onlinesales-prod-01/os-docker-images/onlinesales/prod/services/java/hadesv2
|
|
pullPolicy: IfNotPresent
|
|
tag: "1765174028641"
|
|
|
|
# Minimal resources for local development
|
|
resources:
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
requests:
|
|
cpu: 250m
|
|
memory: 256Mi
|
|
|
|
# Disable health probes for local development by setting them to null
|
|
# Enable them once you identify a working endpoint in your application
|
|
livenessProbe: null
|
|
readinessProbe: null
|
|
|
|
# Development environment variables
|
|
env:
|
|
#- name: JAVA_OPTS
|
|
# value: "-Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1024m"
|
|
- name: CATALINA_OPTS
|
|
value: "-Denv=test"
|
|
- name: APP_ENV
|
|
value: test
|
|
#- name: TZ
|
|
# value: "UTC"
|
|
#- name: LOG_LEVEL
|
|
# value: "DEBUG"
|
|
# Enable Tomcat HTTP request logging via system properties
|
|
#- name: TOMCAT_ACCESS_LOG_ENABLED
|
|
# value: "true"
|
|
# Log all Catalina, Host, and Context events
|
|
#- name: JAVA_TOOL_OPTIONS
|
|
# value: "-Dorg.apache.catalina.core.StandardEngine.level=ALL -Dorg.apache.catalina.core.StandardHost.level=ALL"
|
|
|
|
autoscaling:
|
|
enabled: false
|
|
|
|
ingress:
|
|
enabled: false
|
|
|
|
service:
|
|
type: ClusterIP
|
|
port: 8080
|
|
targetPort: 8080
|
|
|
|
# MySQL configuration for local development (WSO2 Helm Chart)
|
|
mysql:
|
|
enabled: true
|
|
image: "biarms/mysql"
|
|
imageTag: "5.7"
|
|
mysqlRootPassword: "local-root-pass"
|
|
mysqlDatabase: "hades_db"
|
|
mysqlUser: "hades_user"
|
|
mysqlPassword: "local-hades-pass"
|
|
fullnameOverride: "hades-mysql-db-service"
|
|
# Pod labels for MySQL pods - enables Backstage Kubernetes plugin discovery
|
|
podLabels:
|
|
backstage.io/kubernetes-id: "hades-service"
|
|
persistence:
|
|
enabled: false # Use emptyDir for local testing
|
|
resources:
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
livenessProbe:
|
|
initialDelaySeconds: 5
|
|
readinessProbe:
|
|
initialDelaySeconds: 5
|
|
configurationFiles:
|
|
mysql.cnf: |-
|
|
[mysqld]
|
|
max_connections = 200
|
|
character-set-server=latin1
|
|
collation-server=latin1_swedish_ci
|
|
default_authentication_plugin=mysql_native_password
|
|
log-bin-trust-function-creators=1
|
|
|
|
# Enable database initialization to run SQL migrations
|
|
dbInit:
|
|
enabled: true
|
|
|
|
# Configuration files for local development
|
|
config:
|
|
enabled: true
|
|
files:
|
|
hades.cfg: |
|
|
{
|
|
test: {
|
|
logConfig: "/etc/onlinesales/config/hades/log.cfg",
|
|
hades_hibernate_config_read: "/etc/onlinesales/config/hades/hibernate.cfg.xml",
|
|
hades_hibernate_config_write: "/etc/onlinesales/config/hades/hibernate.cfg.xml",
|
|
rest_accessor_config_file: "/etc/onlinesales/config/hades/restAccessor.cfg",
|
|
forgot_password_email_config_file: "/etc/onlinesales/config/hades/forgotPasswordEmailSender.cfg",
|
|
activation_email_config_file: "/etc/onlinesales/config/hades/activationEmailConfigFile.cfg",
|
|
invitation_email_config_file: "/etc/onlinesales/config/hades/invitationEmailConfigFile.cfg",
|
|
grant_revoke_config_file: "/etc/onlinesales/config/hades/grantRevoke.cfg",
|
|
stats_logging_config: "/etc/onlinesales/config/hades/statsLogging.cfg",
|
|
sms_sender_lib_config: "/etc/onlinesales/config/hades/smsSenderLib.cfg",
|
|
context_key: "/etc/onlinesales/config/hades/contextKey.cfg",
|
|
is_app_ip_enabled: "true",
|
|
firebase_admin_sdk_config: "/etc/onlinesales/config/hades/firebaseAdminConfig.cfg",
|
|
firebase_data_url: "https://os-login-656b5.firebaseio.com",
|
|
failed_events_file: "/tmp/hades_failed_events.err",
|
|
user_signup_email_config_file: "/etc/onlinesales/config/hades/userSignupEmailConfigFile.cfg"
|
|
}
|
|
}
|
|
|
|
authConfig.cfg: |
|
|
{
|
|
prod: {
|
|
hades_auth_url : "http://localhost:8080/hadesV2/authorize",
|
|
auth_enable : true
|
|
},
|
|
test: {
|
|
hades_auth_url : "http://localhost:8080/hadesV2/authorize",
|
|
auth_enable : true
|
|
}
|
|
}
|
|
|
|
statsLogging.cfg: |
|
|
{
|
|
test: {
|
|
metric_name_prefix: "",
|
|
statsd_host: "localhost",
|
|
statsd_port: "8125",
|
|
logging_enabled: "true",
|
|
},
|
|
prod: {
|
|
metric_name_prefix: "",
|
|
statsd_host: "localhost",
|
|
statsd_port: "8125",
|
|
logging_enabled: "true",
|
|
}
|
|
}
|
|
|
|
smsSenderLib.cfg: |
|
|
{
|
|
prod: {
|
|
"username": "smsUser",
|
|
"password": "xxxxxx",
|
|
"sms_client_sender" : "SOKRAT",
|
|
"validity_minutes" : "15",
|
|
"sms_template" : "Your%20login%20OTP%20is%20__OTP__%20.%20Treat%20this%20as%20confidential.%20The%20OTP%20will%20be%20valid%20for%20next%20__VALIDITY__%20minutes."
|
|
},
|
|
test: {
|
|
"username": "smsUser",
|
|
"password": "xxxxxx",
|
|
"sms_client_sender" : "SOKRAT",
|
|
"validity_minutes" : "15",
|
|
"sms_template" : "Your%20login%20OTP%20is%20__OTP__%20.%20Treat%20this%20as%20confidential.%20The%20OTP%20will%20be%20valid%20for%20next%20__VALIDITY__%20minutes."
|
|
}
|
|
}
|
|
|
|
contextKey.cfg: |
|
|
{
|
|
prod: {
|
|
serviceAuthKey: "key"
|
|
},
|
|
test: {
|
|
serviceAuthKey: "key"
|
|
}
|
|
}
|
|
|
|
grantRevoke.cfg: |
|
|
{
|
|
prod:
|
|
{
|
|
"application": "TEST_APP",
|
|
"ipAddresses": "127.0.0.1"
|
|
},
|
|
test:
|
|
{
|
|
"application": "TEST_APP",
|
|
"ipAddresses": "127.0.0.1"
|
|
}
|
|
}
|
|
|
|
firebaseAdminConfig.cfg: |
|
|
{
|
|
"type": "service_account",
|
|
"private_key_id": "abc",
|
|
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDY3E8o1NEFcjMM\nHW/5ZfFJw29/8NEqpViNjQIx95Xx5KDtJ+nWn9+OW0uqsSqKlKGhAdAo+Q6bjx2c\nuXVsXTu7XrZUY5Kltvj94DvUa1wjNXs606r/RxWTJ58bfdC+gLLxBfGnB6CwK0YQ\nxnfpjNbkUfVVzO0MQD7UP0Hl5ZcY0Puvxd/yHuONQn/rIAieTHH1pqgW+zrH/y3c\n59IGThC9PPtugI9ea8RSnVj3PWz1bX2UkCDpy9IRh9LzJLaYYX9RUd7++dULUlat\nAaXBh1U6emUDzhrIsgApjDVtimOPbmQWmX1S60mqQikRpVYZ8u+NDD+LNw+/Eovn\nxCj2Y3z1AgMBAAECggEAWDBzoqO1IvVXjBA2lqId10T6hXmN3j1ifyH+aAqK+FVl\nGjyWjDj0xWQcJ9ync7bQ6fSeTeNGzP0M6kzDU1+w6FgyZqwdmXWI2VmEizRjwk+/\n/uLQUcL7I55Dxn7KUoZs/rZPmQDxmGLoue60Gg6z3yLzVcKiDc7cnhzhdBgDc8vd\nQorNAlqGPRnm3EqKQ6VQp6fyQmCAxrr45kspRXNLddat3AMsuqImDkqGKBmF3Q1y\nxWGe81LphUiRqvqbyUlh6cdSZ8pLBpc9m0c3qWPKs9paqBIvgUPlvOZMqec6x4S6\nChbdkkTRLnbsRr0Yg/nDeEPlkhRBhasXpxpMUBgPywKBgQDs2axNkFjbU94uXvd5\nznUhDVxPFBuxyUHtsJNqW4p/ujLNimGet5E/YthCnQeC2P3Ym7c3fiz68amM6hiA\nOnW7HYPZ+jKFnefpAtjyOOs46AkftEg07T9XjwWNPt8+8l0DYawPoJgbM5iE0L2O\nx8TU1Vs4mXc+ql9F90GzI0x3VwKBgQDqZOOqWw3hTnNT07Ixqnmd3dugV9S7eW6o\nU9OoUgJB4rYTpG+yFqNqbRT8bkx37iKBMEReppqonOqGm4wtuRR6LSLlgcIU9Iwx\nyfH12UWqVmFSHsgZFqM/cK3wGev38h1WBIOx3/djKn7BdlKVh8kWyx6uC8bmV+E6\nOoK0vJD6kwKBgHAySOnROBZlqzkiKW8c+uU2VATtzJSydrWm0J4wUPJifNBa/hVW\ndcqmAzXC9xznt5AVa3wxHBOfyKaE+ig8CSsjNyNZ3vbmr0X04FoV1m91k2TeXNod\njMTobkPThaNm4eLJMN2SQJuaHGTGERWC0l3T18t+/zrDMDCPiSLX1NAvAoGBAN1T\nVLJYdjvIMxf1bm59VYcepbK7HLHFkRq6xMJMZbtG0ryraZjUzYvB4q4VjHk2UDiC\nlhx13tXWDZH7MJtABzjyg+AI7XWSEQs2cBXACos0M4Myc6lU+eL+iA+OuoUOhmrh\nqmT8YYGu76/IBWUSqWuvcpHPpwl7871i4Ga/I3qnAoGBANNkKAcMoeAbJQK7a/Rn\nwPEJB+dPgNDIaboAsh1nZhVhN5cvdvCWuEYgOGCPQLYQF0zmTLcM+sVxOYgfy8mV\nfbNgPgsP5xmu6dw2COBKdtozw0HrWSRjACd1N4yGu75+wPCcX/gQarcjRcXXZeEa\nNtBLSfcqPULqD+h7br9lEJio\n-----END PRIVATE KEY-----\n",
|
|
"client_email": "123-abc@developer.gserviceaccount.com",
|
|
"client_id": "123-abc.apps.googleusercontent.com",
|
|
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
|
"token_uri": "http://localhost:8080/token"
|
|
}
|
|
|
|
log.cfg: |
|
|
log4j.rootLogger=DEBUG, root
|
|
log4j.logger.org.hibernate=ERROR, root
|
|
|
|
log4j.logger.SOKRATI=DEBUG, root
|
|
log4j.appender.root=org.apache.log4j.ConsoleAppender
|
|
log4j.appender.root.layout=org.apache.log4j.PatternLayout
|
|
log4j.appender.root.layout.ConversionPattern=<%d> %5p [%t](%c) - %m%n
|
|
log4j.additivity.SOKRATI=false
|
|
|
|
log4j.logger.SOKRATI_METRICS=OFF, A3
|
|
log4j.appender.A3=org.apache.log4j.ConsoleAppender
|
|
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
|
|
log4j.appender.A3.layout.ConversionPattern=<%d> %5p [%t](%c) - %m%n
|
|
log4j.additivity.SOKRATI_METRICS=false
|
|
|
|
restAccessor.cfg: |
|
|
{
|
|
"post_new_notifications": {
|
|
url: 'http://localhost/notificationsService/notifications',
|
|
type: post,
|
|
response: com.sokrati.notificationsSvcObjects.PostNotificationsResponse
|
|
},
|
|
"post_events": {
|
|
"url": "http://localhost/eventManagerServiceV2/events",
|
|
"type": "post",
|
|
"response": "com.sokrati.eventManagerSvcObjectsV2.PostEventsResponse"
|
|
}
|
|
}
|
|
|
|
forgotPasswordEmailSender.cfg: |
|
|
{
|
|
test: {
|
|
onlinesales:
|
|
{
|
|
subject : "Reset your password",
|
|
sender : "",
|
|
userId : 13690,
|
|
clientId : 547,
|
|
defaultDomain : "test.onlinesales.ai",
|
|
emailMessage : "Hi __USER_NAME__,<br /><br />Please set a new password <a href='__DOMAIN_NAME__?activation_code=__ACTIVATION_CODE__&email=__USER_EMAIL__'>here</a>.<br /><br />If the above link does not work, then copy paste the following link in your browser<br />__DOMAIN_NAME__?activation_code=__ACTIVATION_CODE__&email=__USER_EMAIL__<br /><br />Cheers<br />"
|
|
}
|
|
}
|
|
}
|
|
|
|
activationEmailConfigFile.cfg: |
|
|
{
|
|
test: {
|
|
browser:
|
|
{
|
|
subject : "Sokrati Email Verification",
|
|
sender : "shops@onlinesales.ai",
|
|
userId : 13690,
|
|
clientId : 547,
|
|
defaultDomain : "test.onlinesales.ai",
|
|
redirectUrl : "https://shops.onlinesales.ai",
|
|
emailMessage : "<table width=\"100%\" cellpadding=\"10\" align=\"center\"><tbody><tr align=\"center\"><td><img style=\"width: 135px;\" src=\"http:\/\/images.sokratistatic.com\/image\/upload\/v1444994594\/shops_emailer_images_2\/Sokrati-Logo.png\" alt=\"\" \/><\/td><\/tr><tr><td style=\"color: #3e3e3e; font-family: Helvetica, Arial, sans-serif; font-size: 16px;\">Hello,<\/td><\/tr><tr><td style=\"color: #3e3e3e; font-family: Helvetica, Arial, sans-serif; font-size: 16px;\">Congratulations! With Sokrati, you'll be able to reach new customers on online ads, social media, and email. Just verify your email address by clicking on the 'Verify Account' button below and get started!<\/td><\/tr><tr><td align=\"center\" width=\"100%\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td style=\"-webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; color: #ffffff; display: block; line-height: 40px;\" align=\"center\" bgcolor=\"#F14A4E\" width=\"200\" height=\"40\"><a style=\"font-size: 14px; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-decoration: none; width: 100%; display: inline-block;\" href=\"http:\/\/__DOMAIN_NAME__\/hadesV2\/emailVerification?activationCode=__ACTIVATION_CODE__&email=__USER_EMAIL__&redirectUrl=__REDIRECT_URL__&userId=__USER_ID__\"><span style=\"color: #ffffff;\">VERIFY ACCOUNT<\/span> <\/a><\/td><\/tr><\/tbody><\/table><\/td><\/tr><tr><td style=\"color: #3e3e3e; font-family: Helvetica, Arial, sans-serif; font-size: 16px;\">Get in touch with us at <a href=\"mailto:shops@onlinesales.ai\">shops@onlinesales.ai<\/a> in case you have any questions.<\/td><\/tr><tr><td style=\"color: #3e3e3e; font-family: Helvetica, Arial, sans-serif; font-size: 16px;\">Happy Selling! <br \/>Sokrati Team<\/td><\/tr><\/tbody><\/table>"
|
|
}
|
|
}
|
|
}
|
|
|
|
invitationEmailConfigFile.cfg: |
|
|
{
|
|
test: {
|
|
"enabled": false,
|
|
"from": "noreply@local.dev",
|
|
"subject": "Invitation"
|
|
}
|
|
}
|
|
|
|
userSignupEmailConfigFile.cfg: |
|
|
{
|
|
test: {
|
|
"enabled": false,
|
|
"from": "noreply@local.dev",
|
|
"subject": "Welcome"
|
|
}
|
|
}
|
|
|
|
hibernate.cfg.xml: |
|
|
<?xml version='1.0' encoding='utf-8'?>
|
|
<!DOCTYPE hibernate-configuration PUBLIC
|
|
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
|
|
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
|
|
<hibernate-configuration>
|
|
<session-factory>
|
|
<!-- Database connection settings -->
|
|
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
|
|
<property name="connection.url">jdbc:mysql://hades-mysql-db-service:3306/hades_db?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true&characterEncoding=latin1</property>
|
|
<property name="connection.username">hades_user</property>
|
|
<property name="connection.password">local-hades-pass</property>
|
|
|
|
<!-- JDBC connection pool settings -->
|
|
<property name="connection.pool_size">10</property>
|
|
|
|
<!-- SQL dialect -->
|
|
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
|
|
<property name="current_session_context_class">thread</property>
|
|
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
|
|
|
|
<!-- Echo all executed SQL to stdout -->
|
|
<property name="show_sql">true</property>
|
|
<property name="connection.isolation">2</property>
|
|
<property name="connection.autocommit">true</property>
|
|
<property name="use_keying_service">false</property>
|
|
|
|
<property name="c3p0.acquire_increment">10</property>
|
|
<property name="c3p0.idle_test_period">60</property> <!-- seconds -->
|
|
<property name="c3p0.max_size">50</property>
|
|
<property name="c3p0.max_statements">0</property>
|
|
<property name="c3p0.min_size">10</property>
|
|
<property name="c3p0.timeout">65</property> <!-- seconds -->
|
|
<property name="hibernate.c3p0.maxConnectionAge">3600</property>
|
|
<property name="hibernate.c3p0.preferredTestQuery">select 1;</property>
|
|
</session-factory>
|
|
</hibernate-configuration>
|