Skip to content

Commit

Permalink
Merge pull request #54 from dynamofl/helm-api
Browse files Browse the repository at this point in the history
Bump api version 0.1.17
  • Loading branch information
suvom-das authored Aug 2, 2024
2 parents 99ba65b + d0ad85c commit af1c496
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 33 deletions.
2 changes: 1 addition & 1 deletion charts/dynamoai-api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.16
version: 0.1.17

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
23 changes: 2 additions & 21 deletions charts/dynamoai-api/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ Common environment variables used in all Dynamo AI services, including secrets a
key: port
- name: IS_KEYCLOAK_ENABLED
value: {{ if eq .Values.api.authProvider "keycloak" }}"true"{{ else }}"false"{{ end }}
- name: DB_MIGRATION_JOB_NAME
value: "{{ include "dynamoai.fullname" . }}-{{ .Values.dbMigrationsJob.name }}"
{{- end }}
{{- define "dynamoai.apiEnv" -}}
- name: PROJECTS_BUCKET
Expand Down Expand Up @@ -311,24 +313,3 @@ Common environment variables used in all Dynamo AI services, including secrets a
value: "{{ include "dynamoai.fullname" . }}-moderation.{{ if and .Values.global.dynamoguardnamespace (ne .Values.global.dynamoguardnamespace "") }}{{ .Values.global.dynamoguardnamespace }}{{ else }}{{ .Release.Namespace }}{{ end }}.svc.cluster.local:2344"

{{- end }}

{{- define "dynamoai.init.apiEnv" -}}
{
{{- if .Values.dbMigrationsJob }}
"pgDB": {
"host": "$(PG_DB_HOST)",
"user": "$(PG_DB_USERNAME)",
"password": "$(PG_DB_PASSWORD)",
"database": "$(PG_DB_NAME)",
"port": "$(PG_DB_PORT)",
"dbMigrationJobName": "{{ .Values.dbMigrationsJob.name }}",
"namespace": "$(NAMESPACE)"
},
{{- end }}
{{- if .Values.api.keycloakEnv }}
"keycloak": {
"baseUrl": "{{- range .Values.api.keycloakEnv }}{{ if eq .name "KEYCLOAK_BASE_URL" }}{{ .value }}{{ end }}{{- end }}"
}
{{- end }}
}
{{- end }}
8 changes: 0 additions & 8 deletions charts/dynamoai-api/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,3 @@ data:
domain: "http://{{ .Values.api.ingress.host }}/api"
port: "{{ .Values.api.service.port }}"
address: "{{ include "dynamoai.fullname" . }}-{{ .Values.api.name }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.api.service.port }}"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: init-components-config
data:
INIT_COMPONENTS_CONFIG: |-
{{ include "dynamoai.init.apiEnv" . | nindent 4 }}
8 changes: 5 additions & 3 deletions charts/dynamoai-api/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ spec:
env:
{{- include "dynamoai.commonEnv" $ | nindent 12 }}
{{- include "dynamoai.dbMigrationsJobEnv" $ | nindent 12 }}
envFrom:
- configMapRef:
name: init-components-config
{{- if eq .Values.api.authProvider "keycloak" }}
{{- with .Values.api.keycloakEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
image: {{ .image.registry }}/{{ .image.repository }}:{{ .image.tag }}
imagePullPolicy: {{ .image.pullPolicy }}
{{- end }}
Expand Down

0 comments on commit af1c496

Please sign in to comment.