Skip to content

Commit

Permalink
fix: chart fixes (#3084)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas authored Oct 11, 2024
1 parent ded3786 commit 58d823d
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 7 deletions.
1 change: 1 addition & 0 deletions charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: |
A Helm chart for Kubernetes that deploys FTL
home: https://github.com/TBD54566975/ftl
version: 0.0.1
appVersion: 0.0.1
dependencies:
- name: postgresql
version: 15.5.29
Expand Down
2 changes: 1 addition & 1 deletion charts/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dep-update:

set-version version:
@echo "Setting version to {{version}}"
yq -i '.version="{{version}}"' Chart.yaml
yq -i '.version="{{version}}",.appVersion="{{version}}"' Chart.yaml

package:
helm lint .
Expand Down
3 changes: 2 additions & 1 deletion charts/templates/controller.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ $version := printf "v%s" .Chart.Version -}}
apiVersion: apps/v1
kind: Deployment
metadata:
Expand All @@ -22,7 +23,7 @@ spec:
serviceAccountName: {{ include "ftl.fullname" . }}-controller
containers:
- name: app
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag | default .Chart.Version }}"
image: "{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag | default $version }}"
{{- if .Values.controller.envFrom }}
envFrom:
{{- if .Values.controller.envFrom }}
Expand Down
5 changes: 3 additions & 2 deletions charts/templates/db-migration-job.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{- if .Values.dbMigration.enabled }}
{{ $version := printf "v%s" .Chart.Version -}}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "ftl.fullname" . }}-dbmig-{{ .Values.controller.image.tag | default .Chart.Version }}
name: {{ include "ftl.fullname" . }}-dbmig-{{ .Values.controller.image.tag | default $version }}
labels:
{{- include "ftl.labels" . | nindent 4 }}
spec:
Expand All @@ -18,7 +19,7 @@ spec:
restartPolicy: OnFailure
containers:
- name: dbmig
image: "{{ .Values.controller.image.repository | replace "controller" "runner" }}:{{ .Values.controller.image.tag | default .Chart.Version }}"
image: "{{ .Values.controller.image.repository | replace "controller" "runner" }}:{{ .Values.controller.image.tag | default $version }}"
env:
{{- if not .Values.postgresql.enabled }}
- name: FTL_CONTROLLER_DSN
Expand Down
4 changes: 1 addition & 3 deletions deployment/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ apply:
helm upgrade --install ftl ../charts -f values.yaml

deploy-version version: setup-cluster
# Ideally this would point to https://github.com/TBD54566975/ftl//deployment/overlays/dev/?ref={{version}} but that doesn't work due to symlinks
# For now this is using the new config with a released image
helm upgrade --install ftl ../charts -f values.yaml --set controller.image.tag={{version}} --set controller.image.repository=ftl0/ftl-controller
helm upgrade --install ftl ../charts --version={{version}} -f values-release.yaml

delete:
helm uninstall ftl
Expand Down
14 changes: 14 additions & 0 deletions deployment/values-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fullnameOverride: "ftl"
ingress:
enabled: true
annotations:
ingress.kubernetes.io/ssl-redirect: "false"
kubernetes.io/ingress.class: traefik
controller:
service:
ports:
- name: "http-8892"
port: 8892

istio:
enabled: true

0 comments on commit 58d823d

Please sign in to comment.