Skip to content

Commit

Permalink
Update charts
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Nov 25, 2024
1 parent a64f04b commit 1853a2b
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 14 deletions.
4 changes: 2 additions & 2 deletions charts/ftl/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: ftl
description: |
A Helm chart for Kubernetes that deploys FTL
home: https://github.com/TBD54566975/ftl
version: 0.398.1
appVersion: 0.398.1
version: 0.399.0
appVersion: 0.399.0
dependencies:
- name: postgresql
version: 15.5.38
Expand Down
5 changes: 5 additions & 0 deletions charts/ftl/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,9 @@ app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/name: {{ include "ftl.fullname" . }}
app.kubernetes.io/component: provisioner
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{- define "ftl-cron.selectorLabels" -}}
app.kubernetes.io/name: {{ include "ftl.fullname" . }}
app.kubernetes.io/component: cron
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
9 changes: 9 additions & 0 deletions charts/ftl/templates/cron-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.cron.serviceAccountName }}
namespace: {{ .Release.Namespace }}
{{- if .Values.cron.cronsRoleArn }}
annotations:
eks.amazonaws.com/role-arn: {{ .Values.cron.cronsRoleArn }}
{{- end }}
53 changes: 53 additions & 0 deletions charts/ftl/templates/cron.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{{ $version := printf "v%s" .Chart.Version -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ftl.fullname" . }}-cron
labels:
{{- include "ftl.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.cron.replicas }}
revisionHistoryLimit: {{ .Values.cron.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "ftl-cron.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "ftl-cron.selectorLabels" . | nindent 8 }}
{{- if .Values.cron.podAnnotations }}
annotations:
{{- toYaml .Values.cron.podAnnotations | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.cron.serviceAccountName }}
containers:
- name: app
image: "{{ .Values.cron.image.repository }}:{{ .Values.cron.image.tag | default $version }}"
imagePullPolicy: {{ .Values.cron.image.pullPolicy }}
{{- if .Values.cron.envFrom }}
envFrom:
{{- if .Values.cron.envFrom }}
{{- toYaml .Values.cron.envFrom | nindent 12 }}
{{- end }}
{{- end }}
env:
{{- if .Values.cron.env }}
{{- toYaml .Values.cron.env | nindent 12 }}
{{- end }}
{{- if .Values.cron.nodeSelector }}
nodeSelector:
{{- toYaml .Values.cron.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.cron.affinity }}
affinity:
{{- toYaml .Values.cron.affinity | nindent 8 }}
{{- end }}
{{- if .Values.cron.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.cron.topologySpreadConstraints | nindent 8 }}
{{- end }}
{{- if .Values.cron.tolerations }}
tolerations:
{{- toYaml .Values.cron.tolerations | nindent 8 }}
{{- end }}
2 changes: 0 additions & 2 deletions charts/ftl/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ spec:
name: ftl-controller-ingress
port:
number: 8891
{{- if .Values.provisioner.enabled }}
- path: /xyz.block.ftl.v1beta1.provisioner.ProvisionerService/
pathType: Prefix
backend:
service:
name: ftl-provisioner
port:
number: 8893
{{- end }}
{{- range $host := .Values.ingress.hosts }}
- host: "{{ $host.host }}"
http:
Expand Down
2 changes: 0 additions & 2 deletions charts/ftl/templates/provisioner-config-map.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.provisioner.enabled }}
{{- if eq .Values.provisioner.configMap "ftl-provisioner-default-config" }}
apiVersion: v1
kind: ConfigMap
Expand All @@ -12,5 +11,4 @@ data:
{ id = "cloudformation", resources = ["postgres"] },
{ id = "controller", resources = ["module"] },
]
{{- end}}
{{- end}}
4 changes: 1 addition & 3 deletions charts/ftl/templates/provisioner-services.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.provisioner.enabled }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -22,5 +21,4 @@ spec:
{{- end }}
selector:
{{- include "ftl-provisioner.selectorLabels" . | nindent 4 }}
type: {{ .Values.provisioner.service.type | default "ClusterIP" }}
{{- end }}
type: {{ .Values.provisioner.service.type | default "ClusterIP" }}
4 changes: 1 addition & 3 deletions charts/ftl/templates/provisioner.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if .Values.provisioner.enabled }}
{{ $version := printf "v%s" .Chart.Version -}}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -81,5 +80,4 @@ spec:
{{- if .Values.provisioner.tolerations }}
tolerations:
{{- toYaml .Values.provisioner.tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
21 changes: 19 additions & 2 deletions charts/ftl/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ controller:

provisioner:
provisionersRoleArn: arn:aws:iam::ftl-provisioners-irsa-role
enabled: false
replicas: 1
revisionHistoryLimit: 0
configMap: "ftl-provisioner-default-config"
Expand Down Expand Up @@ -131,7 +130,6 @@ provisioner:
valueFrom:
fieldRef:
fieldPath: status.hostIP

ports:
- name: http
containerPort: 8893
Expand Down Expand Up @@ -211,6 +209,25 @@ runner:
topologySpreadConstraints: null
tolerations: null


cron:
replicas: 1
revisionHistoryLimit: 0
image:
repository: "ftl0/ftl-cron"
pullPolicy: IfNotPresent

envFrom: null
serviceAccountName: ftl-cron

env:
- name: FTL_ENDPOINT
value: "http://ftl-controller:8892"
- name: LOG_LEVEL
value: "debug"
- name: LOG_JSON
value: "true"

postgresql:
enabled: true
architecture: standalone
Expand Down

0 comments on commit 1853a2b

Please sign in to comment.