Skip to content

Commit

Permalink
fix: cleanup lease service in charts (#4281)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas authored Feb 4, 2025
1 parent 4a451c7 commit 253967e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 39 deletions.
12 changes: 5 additions & 7 deletions charts/ftl/templates/lease-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ metadata:
{{- end }}
spec:
ports:
{{- range .Values.lease.service.ports }}
- name: {{ .name }}
port: {{ .port }}
protocol: {{ .protocol | default "TCP" }}
targetPort: {{ .targetPort }}
{{- end }}
- name: "http2"
port: {{ .Values.lease.port }}
protocol: "TCP"
targetPort: {{ .Values.lease.port }}
selector:
{{- include "ftl-lease.selectorLabels" . | nindent 4 }}
type: {{ .Values.lease.service.type | default "ClusterIP" }}
type: "ClusterIP"
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ spec:
metadata:
labels:
{{- include "ftl-lease.selectorLabels" . | nindent 8 }}
{{- if .Values.lease.podAnnotations }}
annotations:
{{- if .Values.lease.podAnnotations }}
{{- toYaml .Values.lease.podAnnotations | nindent 8 }}
{{- end }}
{{ if .Values.istio.holdApplicationUntilProxyStarts }}
proxy.istio.io/config: |
holdApplicationUntilProxyStarts: true
{{- end }}
spec:
serviceAccountName: {{ .Values.lease.serviceAccountName }}
containers:
Expand All @@ -42,13 +46,21 @@ spec:
{{- if .Values.lease.env }}
{{- toYaml .Values.lease.env | nindent 12 }}
{{- end }}

- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: FTL_BIND
value: "http://0.0.0.0:8892"
- name: LOG_LEVEL
value: "{{ .Values.lease.logLevel }}"
- name: LOG_JSON
value: "{{ .Values.lease.logJson }}"
ports:
{{- range .Values.lease.ports }}
- name: {{ .name }}
containerPort: {{ .containerPort }}
protocol: {{ .protocol | default "TCP" }}
{{- end }}
- name: "http2"
containerPort: 8892
hostPort: {{ .Values.lease.port }}
protocol: "TCP"
readinessProbe:
{{- if .Values.lease.readinessProbe }}
{{- toYaml .Values.lease.readinessProbe | nindent 12 }}
Expand Down
31 changes: 6 additions & 25 deletions charts/ftl/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ postgresql:

istio:
enabled: false # set to true to have this chart install the grpc config to enable trailers
holdApplicationUntilProxyStarts: true

registry:
repository: ""
Expand Down Expand Up @@ -483,22 +484,10 @@ console:
tolerations: null

lease:
env:
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: FTL_BIND
value: "http://0.0.0.0:8892"
- name: LOG_LEVEL
value: "debug"
- name: LOG_JSON
value: "true"
ports:
- name: http2
containerPort: 8892
protocol: TCP
port: 8892
env: null
port: 8892
logLevel: debug
logJson: true

replicas: 1
revisionHistoryLimit: 0
Expand All @@ -521,17 +510,9 @@ lease:
readinessProbe: null

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

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

0 comments on commit 253967e

Please sign in to comment.