generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add helm charts for provisioner (#3133)
Co-authored-by: Juho Makinen <[email protected]>
- Loading branch information
1 parent
dae4903
commit 1cff731
Showing
13 changed files
with
231 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{- if .Values.provisioner.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
{{- include "ftl.labels" . | nindent 4 }} | ||
name: {{ include "ftl.fullname" . }}-provisioner | ||
{{- if .Values.provisioner.service.annotations }} | ||
annotations: | ||
{{- toYaml .Values.provisioner.service.annotations | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
ports: | ||
{{- range .Values.provisioner.service.ports }} | ||
- name: {{ .name }} | ||
port: {{ .port }} | ||
protocol: {{ .protocol | default "TCP" }} | ||
{{- if .appProtocol }} | ||
appProtocol: {{ .appProtocol }} | ||
{{- end }} | ||
targetPort: {{ .targetPort }} | ||
{{- end }} | ||
selector: | ||
{{- include "ftl-provisioner.selectorLabels" . | nindent 4 }} | ||
type: {{ .Values.provisioner.service.type | default "ClusterIP" }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{{- if .Values.provisioner.enabled }} | ||
{{ $version := printf "v%s" .Chart.Version -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "ftl.fullname" . }}-provisioner | ||
labels: | ||
{{- include "ftl.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.provisioner.replicas }} | ||
revisionHistoryLimit: {{ .Values.provisioner.revisionHistoryLimit }} | ||
selector: | ||
matchLabels: | ||
{{- include "ftl-provisioner.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
labels: | ||
{{- include "ftl-provisioner.selectorLabels" . | nindent 8 }} | ||
{{- if .Values.provisioner.podAnnotations }} | ||
annotations: | ||
{{- toYaml .Values.provisioner.podAnnotations | nindent 8 }} | ||
{{- end }} | ||
spec: | ||
serviceAccountName: {{ .Values.provisioner.serviceAccountName }} | ||
containers: | ||
- name: app | ||
image: "{{ .Values.provisioner.image.repository }}:{{ .Values.provisioner.image.tag | default $version }}" | ||
imagePullPolicy: {{ .Values.provisioner.image.pullPolicy }} | ||
{{- if .Values.provisioner.envFrom }} | ||
envFrom: | ||
{{- if .Values.provisioner.envFrom }} | ||
{{- toYaml .Values.provisioner.envFrom | nindent 12 }} | ||
{{- end }} | ||
{{- else if or .Values.secrets.logEncryptionKey .Values.secrets.asyncEncryptionKey }} | ||
envFrom: | ||
- secretRef: | ||
name: {{ include "ftl.fullname" . }}-secrets | ||
{{- end }} | ||
env: | ||
{{- if .Values.provisioner.env }} | ||
{{- toYaml .Values.provisioner.env | nindent 12 }} | ||
{{- end }} | ||
ports: | ||
{{- range .Values.provisioner.ports }} | ||
- name: {{ .name }} | ||
containerPort: {{ .containerPort }} | ||
protocol: {{ .protocol | default "TCP" }} | ||
{{- end }} | ||
readinessProbe: | ||
{{- if .Values.provisioner.readinessProbe }} | ||
{{- toYaml .Values.provisioner.readinessProbe | nindent 12 }} | ||
{{- else }} | ||
httpGet: | ||
path: /healthz | ||
port: 8893 | ||
initialDelaySeconds: 1 | ||
periodSeconds: 2 | ||
timeoutSeconds: 2 | ||
successThreshold: 1 | ||
failureThreshold: 15 | ||
{{- end }} | ||
{{- if .Values.provisioner.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml .Values.provisioner.nodeSelector | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.provisioner.affinity }} | ||
affinity: | ||
{{- toYaml .Values.provisioner.affinity | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.provisioner.topologySpreadConstraints }} | ||
topologySpreadConstraints: | ||
{{- toYaml .Values.provisioner.topologySpreadConstraints | nindent 8 }} | ||
{{- end }} | ||
{{- if .Values.provisioner.tolerations }} | ||
tolerations: | ||
{{- toYaml .Values.provisioner.tolerations | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM ubuntu:24.04 | ||
|
||
WORKDIR /root/ | ||
|
||
COPY docker-build/ftl-provisioner . | ||
COPY docker-build/ftl-provisioner-cloudformation /plugins/ | ||
COPY docker-build/ftl . | ||
EXPOSE 8893 | ||
# Temp hack, this should be a configmap | ||
COPY ftl-provisioner-config.toml /plugins/config.toml | ||
ENV FTL_PROVISIONER_PLUGIN_CONFIG_FILE="/plugins/config.toml" | ||
ENV PATH="$PATH:/plugins/" | ||
|
||
CMD ["/root/ftl-provisioner"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
default = "controller" | ||
plugins = [ | ||
{ id = "cloudformation", resources = ["postgres"] }, | ||
{ id = "controller", resources = ["module"] }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters