Skip to content

Commit

Permalink
Update charts
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Dec 12, 2024
1 parent 83f018f commit a1c861b
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 2 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.409.0
appVersion: 0.409.0
version: 0.410.0
appVersion: 0.410.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 @@ -67,3 +67,8 @@ app.kubernetes.io/name: {{ include "ftl.fullname" . }}
app.kubernetes.io/component: lease
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
{{- define "ftl-console.selectorLabels" -}}
app.kubernetes.io/name: {{ include "ftl.fullname" . }}
app.kubernetes.io/component: console
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}
85 changes: 85 additions & 0 deletions charts/ftl/templates/console-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{{- if .Values.console.enabled }}
{{ $version := printf "v%s" .Chart.Version -}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "ftl.fullname" . }}-console
labels:
{{- include "ftl.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.console.replicas }}
revisionHistoryLimit: {{ .Values.console.revisionHistoryLimit }}
selector:
matchLabels:
{{- include "ftl-console.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "ftl-console.selectorLabels" . | nindent 8 }}
{{- if .Values.console.podAnnotations }}
annotations:
{{- toYaml .Values.console.podAnnotations | nindent 8 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.console.serviceAccountName }}
containers:
- name: app
image: "{{ .Values.console.image.repository }}:{{ .Values.console.image.tag | default $version }}"
imagePullPolicy: {{ .Values.console.image.pullPolicy }}
resources:
limits:
cpu: "{{ .Values.console.resources.limits.cpu }}"
memory: "{{ .Values.console.resources.limits.memory }}"
requests:
cpu: "{{ .Values.console.resources.requests.cpu }}"
memory: "{{ .Values.console.resources.requests.memory }}"
{{- if .Values.console.envFrom }}
envFrom:
{{- if .Values.console.envFrom }}
{{- toYaml .Values.console.envFrom | nindent 12 }}
{{- end }}
{{- end }}
env:
{{- if .Values.console.env }}
{{- toYaml .Values.console.env | nindent 12 }}
{{- end }}
- name: FTL_TIMELINE_ENDPOINT
value: "http://{{ .Values.timeline.service.name }}:{{ .Values.timeline.service.port }}"
- name: FTL_ENDPOINT
value: "http://ftl-controller:8892"
ports:
{{- range .Values.console.ports }}
- name: {{ .name }}
containerPort: {{ .containerPort }}
protocol: {{ .protocol | default "TCP" }}
{{- end }}
readinessProbe:
{{- if .Values.console.readinessProbe }}
{{- toYaml .Values.console.readinessProbe | nindent 12 }}
{{- else }}
httpGet:
path: /healthz
port: 8892
initialDelaySeconds: 1
periodSeconds: 2
timeoutSeconds: 2
successThreshold: 1
failureThreshold: 15
{{- end }}
{{- if .Values.console.nodeSelector }}
nodeSelector:
{{- toYaml .Values.console.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.console.affinity }}
affinity:
{{- toYaml .Values.console.affinity | nindent 8 }}
{{- end }}
{{- if .Values.console.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml .Values.console.topologySpreadConstraints | nindent 8 }}
{{- end }}
{{- if .Values.console.tolerations }}
tolerations:
{{- toYaml .Values.console.tolerations | nindent 8 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/ftl/templates/console-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- if .Values.console.enabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.console.serviceAccountName }}
namespace: {{ .Release.Namespace }}

{{- end }}
24 changes: 24 additions & 0 deletions charts/ftl/templates/console-services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{- if .Values.console.enabled }}
apiVersion: v1
kind: Service
metadata:
labels:
{{- include "ftl.labels" . | nindent 4 }}
name: {{ include "ftl.fullname" . }}-console
{{- if .Values.console.service.annotations }}
annotations:
{{- toYaml .Values.console.service.annotations | nindent 4 }}
{{- end }}
spec:
ports:
{{- range .Values.console.service.ports }}
- name: {{ .name }}
port: {{ .port }}
protocol: {{ .protocol | default "TCP" }}
targetPort: {{ .targetPort }}
{{- end }}
selector:
{{- include "ftl-console.selectorLabels" . | nindent 4 }}
type: {{ .Values.console.service.type | default "ClusterIP" }}

{{- end }}
2 changes: 2 additions & 0 deletions charts/ftl/templates/runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ data:
value: "http://0.0.0.0:{{ (index .Values.runner.ports 0).containerPort }}"
- name: FTL_LEASE_ENDPOINT
value: http://ftl-lease:8892
- name: FTL_TIMELINE_ENDPOINT
value: "http://{{ .Values.timeline.service.name }}:{{ .Values.timeline.service.port }}"
- name: FTL_ARTEFACT_REGISTRY_ALLOW_INSECURE
value: "{{ .Values.registry.allowInsecure }}"
- name: FTL_ARTEFACT_REGISTRY_USERNAME
Expand Down
59 changes: 59 additions & 0 deletions charts/ftl/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,65 @@ timeline:
topologySpreadConstraints: null
tolerations: null

console:
enabled: true
env:
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: FTL_ENDPOINT
value: "http://ftl-controller:8892"
- name: FTL_BIND
value: "http://$(MY_POD_IP):8892"
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP

ports:
- name: http
containerPort: 8892
protocol: TCP
port: 8892

replicas: 1
revisionHistoryLimit: 0

image:
repository: "ftl0/ftl-console"
pullPolicy: IfNotPresent

resources:
requests:
memory: 512Mi
cpu: 10m
limits:
memory: 512Mi
cpu: 2

envFrom: null
serviceAccountName: ftl-console

readinessProbe: null

service:
type: ClusterIP
annotations: null
ports:
- name: "http-8892"
port: 8892
protocol: TCP
targetPort: 8892

podAnnotations:
proxy.istio.io/config: |
holdApplicationUntilProxyStarts: true
nodeSelector: null
affinity: null
topologySpreadConstraints: null
tolerations: null

lease:
env:
- name: MY_POD_IP
Expand Down

0 comments on commit a1c861b

Please sign in to comment.