Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Make it easier to mount known_hosts from a ConfigMap in Helm chart #1142

Merged
merged 1 commit into from
Jun 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions chart/flux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ The following tables lists the configurable parameters of the Weave Flux chart a
| `git.email` | Email to use as git committer | `[email protected]`
| `git.chartsPath` | Path within git repo to locate Helm charts (relative path) | `charts`
| `git.pollInterval` | Period at which to poll git repo for new commits | `30s`
| `ssh.known_hosts` | The contents of an SSH `known_hosts` file, if you need to supply host key(s) |
| `helmOperator.create` | If `true`, install the Helm operator | `false`
| `helmOperator.repository` | Helm operator image repository | `quay.io/weaveworks/helm-operator`
| `helmOperator.tag` | Helm operator image tag | `0.1.0-alpha`
Expand Down
7 changes: 7 additions & 0 deletions chart/flux/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ spec:
serviceAccountName: {{ template "flux.serviceAccountName" . }}
{{- end }}
volumes:
- name: sshdir
configMap:
name: {{ template "flux.fullname" . }}-ssh-config
defaultMode: 0600
- name: git-key
secret:
secretName: {{ template "flux.fullname" . }}-git-deploy
Expand All @@ -39,6 +43,9 @@ spec:
containerPort: 3030
protocol: TCP
volumeMounts:
- name: sshdir
mountPath: /root/.ssh
readOnly: true
- name: git-key
mountPath: /etc/fluxd/ssh
readOnly: true
Expand Down
6 changes: 6 additions & 0 deletions chart/flux/templates/ssh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "flux.fullname" . }}-ssh-config
data:
known_hosts: {{ .Values.ssh.known_hosts }}
5 changes: 5 additions & 0 deletions chart/flux/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@ git:
chartsPath: "charts"
# Period at which to poll git repo for new commits
pollInterval: "30s"

ssh:
# Overrides for git over SSH. If you use your own git server, you
# will likely need to provide a host key for it in this field.
known_hosts: ""