Skip to content

Commit

Permalink
Merge pull request #111 from flipt-io/gm/ssh-known-hosts
Browse files Browse the repository at this point in the history
feat(ssh): add field for configuring ssh known hosts
  • Loading branch information
GeorgeMac authored Nov 14, 2023
2 parents d4ffdac + 91567d3 commit 96b3dd1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/flipt/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: flipt
home: https://flipt.io
description: Flipt is an open-source, self-hosted feature flag solution.
type: application
version: 0.44.2
version: 0.45.0
appVersion: v1.30.1
maintainers:
- name: Flipt
Expand Down
12 changes: 12 additions & 0 deletions charts/flipt/templates/configmap_ssh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if (.Values.ssh).knownHosts }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "flipt.fullname" . }}-ssh-known-hosts
labels:
{{- include "flipt.labels" . | nindent 4 }}
data:
ssh_known_hosts: |
{{- .Values.ssh.knownHosts | nindent 4 }}
{{- end }}
17 changes: 16 additions & 1 deletion charts/flipt/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
{{- if .Values.flipt.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.flipt.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
{{- if (.Values.ssh).knownHosts }}
- name: SSH_KNOWN_HOSTS
value: /etc/flipt/known_hosts
{{- end }}
volumeMounts:
- name: flipt-local-state
mountPath: /home/flipt/.config/flipt
Expand All @@ -55,7 +59,13 @@ spec:
{{- if .Values.persistence.subPath }}
subPath: {{ .Values.persistence.subPath }}
{{- end }}
{{ if .Values.extraVolumeMounts }}
{{- if (.Values.ssh).knownHosts }}
- name: flipt-ssh-known-hosts
mountPath: /etc/flipt/ssh_known_hosts
readOnly: true
subPath: ssh_known_hosts
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
{{- end }}
livenessProbe:
Expand Down Expand Up @@ -83,6 +93,11 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
{{- if (.Values.ssh).knownHosts }}
- name: flipt-ssh-known-hosts
configMap:
name: {{ include "flipt.fullname" . }}-ssh-known-hosts
{{- end }}
{{- if .Values.extraVolumes }}
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions charts/flipt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,9 @@ extraVolumeMounts: []
# secret:
# secretName: flit-git-ssh-key-secret
extraVolumes: []

# ssh contains some SSH specific configuration parameters
ssh:
# knownHosts is the contents of a custom known hosts file
# for use with SSH authentication and the Git backend for Flipt
knownHosts: ""

0 comments on commit 96b3dd1

Please sign in to comment.