feat: refactor assist-api chart and remove ingress routing
- Add assist-api as new chart dependency with conditional enablement - Remove Kafka environment variables from assist-api deployment - Add REDIS_CACHE_ENABLED with enterprise license conditional logic - Delete assist-api ingress.yaml for direct service routing - Remove S3 configuration from assist deployment - Add openreplay.assist_url helper for service discovery - Configure assist-api as disabled by default in values BREAKING CHANGE: assist-api no longer uses ingress routing and requires direct service access. S3 configuration removed from assist service. Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
4f02fd1e9e
commit
2c975c768e
6 changed files with 16 additions and 64 deletions
|
|
@ -37,3 +37,7 @@ dependencies:
|
|||
repository: file://charts/connector
|
||||
version: 0.1.1
|
||||
condition: connector.enabled
|
||||
- name: assist-api
|
||||
repository: file://charts/assist-api
|
||||
version: 0.1.1
|
||||
condition: assist-api.enabled
|
||||
|
|
|
|||
|
|
@ -45,10 +45,6 @@ spec:
|
|||
env:
|
||||
- name: LICENSE_KEY
|
||||
value: '{{ .Values.global.enterpriseEditionLicense }}'
|
||||
- name: KAFKA_SERVERS
|
||||
value: '{{ .Values.global.kafka.kafkaHost }}:{{ .Values.global.kafka.kafkaPort }}'
|
||||
- name: KAFKA_USE_SSL
|
||||
value: '{{ .Values.global.kafka.kafkaUseSsl }}'
|
||||
- name: ASSIST_KEY
|
||||
value: {{ .Values.global.assistKey }}
|
||||
- name: pg_password
|
||||
|
|
@ -62,6 +58,8 @@ spec:
|
|||
{{- end}}
|
||||
- name: POSTGRES_STRING
|
||||
value: 'postgres://{{ .Values.global.postgresql.postgresqlUser }}:$(pg_password)@{{ .Values.global.postgresql.postgresqlHost }}:{{ .Values.global.postgresql.postgresqlPort }}/{{ .Values.global.postgresql.postgresqlDatabase }}'
|
||||
- name: REDIS_CACHE_ENABLED
|
||||
value: {{- if .Values.global.enterpriseEditionLicense }}true{{- else }}false{{- end }}
|
||||
{{- include "openreplay.env.redis_string" .Values.global.redis | nindent 12 }}
|
||||
{{- range $key, $val := .Values.global.env }}
|
||||
- name: {{ $key }}
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $fullName := include "assist-api.fullname" . -}}
|
||||
{{- $svcPort := .Values.service.ports.http -}}
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ $fullName }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "assist-api.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$1
|
||||
nginx.ingress.kubernetes.io/upstream-hash-by: $http_x_forwarded_for
|
||||
{{- with .Values.ingress.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
ingressClassName: "{{ tpl .Values.ingress.className . }}"
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.global.domainName }}
|
||||
{{- if .Values.ingress.tls.secretName}}
|
||||
secretName: {{ .Values.ingress.tls.secretName }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- host: {{ .Values.global.domainName }}
|
||||
http:
|
||||
paths:
|
||||
- path: /api-assist/(.*)
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ $fullName }}
|
||||
port:
|
||||
number: {{ $svcPort }}
|
||||
{{- end }}
|
||||
|
|
@ -49,30 +49,6 @@ spec:
|
|||
value: {{ .Values.global.assistKey }}
|
||||
- name: AWS_DEFAULT_REGION
|
||||
value: "{{ .Values.global.s3.region }}"
|
||||
- name: S3_HOST
|
||||
{{- if contains "minio" .Values.global.s3.endpoint }}
|
||||
value: '{{ ternary "https" "http" .Values.global.ORSecureAccess}}://{{ .Values.global.domainName }}:{{ ternary .Values.global.ingress.controller.service.ports.https .Values.global.ingress.controller.service.ports.http .Values.global.ORSecureAccess }}'
|
||||
{{- else}}
|
||||
value: '{{ .Values.global.s3.endpoint }}'
|
||||
{{- end}}
|
||||
- name: S3_KEY
|
||||
{{- if .Values.global.s3.existingSecret }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.global.s3.existingSecret }}
|
||||
key: access-key
|
||||
{{- else }}
|
||||
value: {{ .Values.global.s3.accessKey }}
|
||||
{{- end }}
|
||||
- name: S3_SECRET
|
||||
{{- if .Values.global.s3.existingSecret }}
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ .Values.global.s3.existingSecret }}
|
||||
key: secret-key
|
||||
{{- else }}
|
||||
value: {{ .Values.global.s3.secretKey }}
|
||||
{{- end }}
|
||||
- name: REDIS_URL
|
||||
value: {{ .Values.global.redis.redisHost }}
|
||||
{{- range $key, $val := .Values.global.env }}
|
||||
|
|
|
|||
|
|
@ -161,3 +161,11 @@ Create the volume mount config for redis TLS certificates
|
|||
{{- printf "postgres://%s:$(pg_password)@%s:%s/%s" .Values.global.postgresql.postgresqlUser .Values.global.postgresql.postgresqlHost .Values.global.postgresql.postgresqlPort .Values.global.postgresql.postgresqlDatabase -}}
|
||||
{{- end -}}
|
||||
{{- end}}
|
||||
|
||||
{{- define "openreplay.assist_url"}}
|
||||
{{- if .Values.global.enterpriseEditionLicense }}
|
||||
assist-api-openreplay:8080
|
||||
{{- else}}
|
||||
assist-openreplay:8080
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ vault: &vault
|
|||
{{- with secret "database/creds/db-app" -}}
|
||||
POSTGRES_STRING=postgres://{{.Data.username}}:{{.Data.password}}@postgresql.db.svc.cluster.local:5432/postgres
|
||||
{{- end -}}
|
||||
assist-api:
|
||||
enabled: false
|
||||
|
||||
minio:
|
||||
# Force initialize minio, even if the instance is not provisioned by OR
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue