Skip to content

Commit

Permalink
Merge pull request #101 from RasaHQ/service_names
Browse files Browse the repository at this point in the history
make scheme configurable, include full service DNS name
  • Loading branch information
Tomasz Czekajlo authored Nov 24, 2020
2 parents c02bf9f + d3603b7 commit 115f644
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
3 changes: 2 additions & 1 deletion charts/rasa-x/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
apiVersion: v2

version: "1.7.8"
version: "1.7.9"

appVersion: "0.33.0"

name: rasa-x
Expand Down
6 changes: 3 additions & 3 deletions charts/rasa-x/templates/nginx-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ spec:
initialDelaySeconds: {{ .Values.nginx.initialProbeDelay }}
env:
- name: "RASA_X_HOST"
value: "{{ include "rasa-x.host" . }}:{{ .Values.rasax.port }}"
value: "{{ include "rasa-x.host" . }}.{{ .Release.Namespace }}.svc:{{ .Values.rasax.port }}"
- name: "RASA_PRODUCTION_HOST"
value: "{{ include "rasa-x.fullname" . }}-{{ .Values.rasa.versions.rasaProduction.serviceName }}:{{ .Values.rasa.port }}"
value: "{{ include "rasa-x.fullname" . }}-{{ .Values.rasa.versions.rasaProduction.serviceName }}.{{ .Release.Namespace }}.svc:{{ .Values.rasa.port }}"
- name: "CUSTOM_ACTION_HOST"
value: "{{ include "rasa-x.fullname" . }}-app:{{ template "rasa-x.custom-actions.port" . }}"
value: "{{ include "rasa-x.fullname" . }}-app.{{ .Release.Namespace }}.svc:{{ template "rasa-x.custom-actions.port" . }}"
volumeMounts:
{{- if .Values.nginx.extraVolumeMounts }}
{{ toYaml .Values.nginx.extraVolumeMounts | indent 8 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/rasa-x/templates/rasa-config-files-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
data:
rasa-credentials: |
rasa:
url: http://{{ include "rasa-x.host" . }}:{{ .Values.rasax.port }}/api
url: {{ .Values.rasax.scheme }}://{{ include "rasa-x.host" . }}.{{ .Release.Namespace }}.svc:{{ .Values.rasax.port }}/api
{{- with .Values.rasa.additionalChannelCredentials }}
{{ toYaml . | nindent 4 }}
{{- end }}
Expand Down Expand Up @@ -45,7 +45,7 @@ data:
{{- end }}
{{- end }}
action_endpoint:
url: "http://{{ include "rasa-x.fullname" . }}-app:{{ template "rasa-x.custom-actions.port" . }}{{ .Values.app.endpoints.actionEndpointUrl }}"
url: "{{ .Values.app.scheme }}://{{ include "rasa-x.fullname" . }}-app.{{ .Release.Namespace }}.svc:{{ template "rasa-x.custom-actions.port" . }}{{ .Values.app.endpoints.actionEndpointUrl }}"
token: ""
{{- if $.Values.redis.install }}
lock_store:
Expand All @@ -57,4 +57,4 @@ data:
{{- end }}
{{- with .Values.rasa.additionalEndpoints }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- end }}
6 changes: 3 additions & 3 deletions charts/rasa-x/templates/rasa-deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
- --no-prompt
- --production
- --config-endpoint
- "http://{{ include "rasa-x.fullname" $ }}-rasa-x:{{ default 5002 $.Values.rasax.port }}/api/config?token=$(RASA_X_TOKEN)"
- {{ $.Values.rasax.scheme }}://{{ include "rasa-x.fullname" $ }}-rasa-x.{{ $.Release.Namespace }}.svc:{{ default 5002 $.Values.rasax.port }}/api/config?token=$(RASA_X_TOKEN)
- --port
- "{{ $.Values.rasa.port }}"
- --jwt-method
Expand Down Expand Up @@ -135,9 +135,9 @@ spec:
- name: "RASA_ENVIRONMENT"
value: "{{ .rasaEnvironment }}"
- name: "RASA_MODEL_SERVER"
value: "http://{{ include "rasa-x.host" $ }}:{{ $.Values.rasax.port }}/api/projects/default/models/tags/{{ .modelTag }}"
value: {{ $.Values.rasax.scheme }}://{{ include "rasa-x.host" $ }}.{{ $.Release.Namespace }}.svc:{{ $.Values.rasax.port }}/api/projects/default/models/tags/{{ .modelTag }}
- name: "RASA_DUCKLING_HTTP_URL"
value: "http://{{ include "duckling.host" $ }}:{{ $.Values.duckling.port }}"
value: {{ $.Values.duckling.scheme }}://{{ include "duckling.host" $ }}.{{ $.Release.Namespace }}.svc:{{ $.Values.duckling.port }}
{{- include "rasa.extra.envs" $ | nindent 8 }}
volumeMounts:
# Mount the temporary directory for the Rasa global configuration
Expand Down
4 changes: 2 additions & 2 deletions charts/rasa-x/templates/rasa-x-config-files-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ data:
environments: |
rasa:
production:
url: "http://{{ include "rasa-x.fullname" . }}-{{ .Values.rasa.versions.rasaProduction.serviceName }}:{{ .Values.rasa.port }}"
url: "{{ .Values.rasa.scheme }}://{{ include "rasa-x.fullname" . }}-{{ .Values.rasa.versions.rasaProduction.serviceName }}.{{ .Release.Namespace }}.svc:{{ .Values.rasa.port }}"
token: ${RASA_TOKEN}
worker:
url: "http://{{ include "rasa-x.fullname" . }}-{{ .Values.rasa.versions.rasaWorker.serviceName }}:{{ .Values.rasa.port }}"
url: "{{ .Values.rasa.scheme }}://{{ include "rasa-x.fullname" . }}-{{ .Values.rasa.versions.rasaWorker.serviceName }}:{{ .Values.rasa.port }}"
token: ${RASA_TOKEN}
2 changes: 1 addition & 1 deletion charts/rasa-x/templates/rasa-x-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
- name: "LOCAL_MODE" # This variable doesn't do anything anymore in Rasa X 0.28 and later
value: "false"
- name: "RASA_X_HOST"
value: "http://{{ include "rasa-x.host" . }}:{{ .Values.rasax.port }}"
value: {{ .Values.rasax.scheme }}://{{ include "rasa-x.host" . }}.{{ .Release.Namespace }}.svc:{{ .Values.rasax.port }}
- name: "RASA_MODEL_DIR"
value: "/app/models"
- name: "RUN_EVENT_CONSUMER_AS_SEPARATE_SERVICE"
Expand Down
8 changes: 8 additions & 0 deletions charts/rasa-x/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ rasax:
tag: ""
# port on which Rasa X runs
port: 5002
# scheme by which Rasa X is accessible
scheme: http
# passwordSalt Rasa X uses to salt the user passwords
passwordSalt: "passwordSalt"
# token Rasa X accepts as authentication token from other Rasa services
Expand Down Expand Up @@ -114,6 +116,8 @@ rasa:
tag: ""
# port on which Rasa runs
port: 5005
# scheme by which Rasa services are accessible
scheme: http
# token Rasa accepts as authentication token from other Rasa services
token: "rasaToken"
# rabbitQueue it should use to dispatch events to Rasa X
Expand Down Expand Up @@ -370,6 +374,8 @@ app:
replicaCount: 1
# port on which the custom action server runs
port: 5055
# scheme by which custom action server is accessible
scheme: http
# resources which app is required / allowed to use
resources: {}
# Jaeger Sidecar
Expand Down Expand Up @@ -506,6 +512,8 @@ duckling:
replicaCount: 1
# port on which duckling should run
port: 8000
# scheme by which duckling is accessible
scheme: http

# tolerations can be used to control the pod to node assignment
# https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
Expand Down

0 comments on commit 115f644

Please sign in to comment.