diff --git a/scripts/helmcharts/init.sh b/scripts/helmcharts/init.sh index c284fab92..2529254b0 100644 --- a/scripts/helmcharts/init.sh +++ b/scripts/helmcharts/init.sh @@ -70,16 +70,6 @@ randomPass() { ## Prepping the infra -## Don't override existing variables file. -[[ -f vars.yaml ]] && { - warn "Existing Variables file. Not downloading." -}|| { - -info " Downloading vars file" -curl -L -O vars.yaml https://raw.githubusercontent.com/rjshrjndrn/openreplay/${version="v1.4.0" - -} - [[ -z $DOMAIN_NAME ]] && { fatal 'DOMAIN_NAME variable is empty. Rerun the script `DOMAIN_NAME=openreplay.mycomp.org bash init.sh `' } diff --git a/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml index 3639ae413..21b7c9167 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/templates/deployment.yaml @@ -38,12 +38,52 @@ spec: {{- end }} imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: POSTGRES_STRING - value: 'postgres://{{ .Values.global.postgresql.postgresqlUser }}:{{ .Values.global.postgresql.postgresqlPassword }}@{{ .Values.global.postgresql.postgresqlHost }}:{{ .Values.global.postgresql.postgresqlPort }}/{{ .Values.global.postgresql.postgresqlDatabase }}' + - name: version_number + value: '{{ .Chart.AppVersion }}' + - name: pg_host + value: '{{ .Values.global.postgresql.postgresqlHost }}' + - name: pg_port + value: "5432" + - name: pg_dbname + value: "{{ .Values.global.postgresql.postgresqlDatabase }}" + - name: pg_user + value: '{{ .Values.global.postgresql.postgresqlUser }}' + - name: pg_password + value: '{{ .Values.global.postgresql.postgresqlPassword }}' + - name: S3_HOST + {{- if eq .Values.global.s3.endpoint "http://minio.db.svc.cluster.local:9000" }} + value: 'https://{{ .Values.global.domainName }}' + {{- else }} + value: '{{ .Values.global.s3.endpoint }}' + {{- end }} + - name: S3_KEY + value: '{{ .Values.global.s3.accessKey }}' + - name: S3_SECRET + value: '{{ .Values.global.s3.secretKey }}' + - name: AWS_DEFAULT_REGION + value: '{{ .Values.global.s3.region }}' + - name: EMAIL_HOST + value: '{{ .Values.global.email.emailHost }}' + - name: EMAIL_PORT + value: '{{ .Values.global.email.emailPort }}' + - name: EMAIL_USER + value: '{{ .Values.global.email.emailUser }}' + - name: EMAIL_PASSWORD + value: '{{ .Values.global.email.emailPassword }}' + - name: EMAIL_USE_TLS + value: '{{ .Values.global.email.emailUseTls }}' + - name: EMAIL_USE_SSL + value: '{{ .Values.global.email.emailUseSsl }}' + - name: EMAIL_SSL_KEY + value: '{{ .Values.global.email.emailSslKey }}' + - name: EMAIL_SSL_CERT + value: '{{ .Values.global.email.emailSslCert }}' + - name: EMAIL_FROM + value: '{{ .Values.global.email.emailFrom }}' {{- range $key, $val := .Values.env }} - name: {{ $key }} value: '{{ $val }}' - {{- end}} + {{- end }} ports: - name: http containerPort: {{ .Values.service.port }} diff --git a/scripts/helmcharts/openreplay/charts/alerts/values.yaml b/scripts/helmcharts/openreplay/charts/alerts/values.yaml index 9a353b057..590303a91 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/values.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/values.yaml @@ -76,8 +76,9 @@ autoscaling: # targetMemoryUtilizationPercentage: 80 env: - ALERT_NOTIFICATION_STRING: http://chalice-openreplay.app.svc.cluster.local:8000/alerts/notifications - CLICKHOUSE_STRING: 'tcp://clickhouse.db.svc.cluster.local:9000/default' + SITE_URL: '' + PYTHONUNBUFFERED: '0' + nodeSelector: {} diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml index 805873de7..dd67fa1c5 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/deployment.yaml @@ -70,6 +70,24 @@ spec: value: '{{ .Values.global.s3.sourcemaps_bucket }}' - name: js_cache_bucket value: '{{ .Values.global.s3.assetsBucket }}' + - name: EMAIL_HOST + value: '{{ .Values.global.email.emailHost }}' + - name: EMAIL_PORT + value: '{{ .Values.global.email.emailPort }}' + - name: EMAIL_USER + value: '{{ .Values.global.email.emailUser }}' + - name: EMAIL_PASSWORD + value: '{{ .Values.global.email.emailPassword }}' + - name: EMAIL_USE_TLS + value: '{{ .Values.global.email.emailUseTls }}' + - name: EMAIL_USE_SSL + value: '{{ .Values.global.email.emailUseSsl }}' + - name: EMAIL_SSL_KEY + value: '{{ .Values.global.email.emailSslKey }}' + - name: EMAIL_SSL_CERT + value: '{{ .Values.global.email.emailSslCert }}' + - name: EMAIL_FROM + value: '{{ .Values.global.email.emailFrom }}' {{- range $key, $val := .Values.env }} - name: {{ $key }} value: '{{ $val }}' diff --git a/scripts/helmcharts/openreplay/charts/chalice/values.yaml b/scripts/helmcharts/openreplay/charts/chalice/values.yaml index 509516136..4418bd704 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/values.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/values.yaml @@ -81,15 +81,6 @@ env: captcha_server: '' captcha_key: '' async_Token: '' - EMAIL_HOST: '' - EMAIL_PORT: '587' - EMAIL_USER: '' - EMAIL_PASSWORD: '' - EMAIL_USE_TLS: 'true' - EMAIL_USE_SSL: 'false' - EMAIL_SSL_KEY: '' - EMAIL_SSL_CERT: '' - EMAIL_FROM: OpenReplay SITE_URL: '' announcement_url: '' jwt_secret: "SetARandomStringHere" diff --git a/scripts/helmcharts/vars.yaml b/scripts/helmcharts/vars.yaml index ebf9888cb..ac093d6bf 100644 --- a/scripts/helmcharts/vars.yaml +++ b/scripts/helmcharts/vars.yaml @@ -1,7 +1,7 @@ fromVersion: "v1.4.0" # Databases specific variables postgresql: &postgres - # For genrating psswords + # For generating passwords # `openssl rand -hex 20` postgresqlPassword: "changeMePassword" postgresqlHost: "postgresql.db.svc.cluster.local" @@ -21,6 +21,8 @@ kafka: &kafka kafkaUseSsl: "false" redis: &redis + # For enterpriseEdition + # enabled: false redisHost: "redis-master.db.svc.cluster.local" redisPort: "6379" @@ -48,6 +50,16 @@ global: # are same as minio.global.minio.accesskey and secretKey accessKey: "changeMeMinioAccessKey" secretKey: "changeMeMinioPassword" + email: + emailHost: '' + emailPort: '587' + emailUser: '' + emailPassword: '' + emailUseTls: 'true' + emailUseSsl: 'false' + emailSslKey: '' + emailSslCert: '' + emailFrom: OpenReplay enterpriseEditionLicense: "" domainName: "" @@ -55,15 +67,6 @@ global: chalice: env: jwt_secret: "SetARandomStringHere" - # EMAIL_HOST: '' - # EMAIL_PORT: '587' - # EMAIL_USER: '' - # EMAIL_PASSWORD: '' - # EMAIL_USE_TLS: 'true' - # EMAIL_USE_SSL: 'false' - # EMAIL_SSL_KEY: '' - # EMAIL_SSL_CERT: '' - # EMAIL_FROM: OpenReplay # SAML2_MD_URL: '' # idp_entityId: '' # idp_sso_url: ''