Skip to content

Commit

Permalink
Merge pull request fluxcd#1166 from stephenmoloney/helm/add_ssh_dir
Browse files Browse the repository at this point in the history
Mount the sshdir into the helm-operator too
  • Loading branch information
squaremo authored Jun 28, 2018
2 parents 78b09f0 + e291e53 commit e0e6b70
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions chart/flux/templates/helm-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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 @@ -33,6 +37,10 @@ spec:
image: "{{ .Values.helmOperator.repository }}:{{ .Values.helmOperator.tag }}"
imagePullPolicy: {{ .Values.helmOperator.pullPolicy }}
volumeMounts:
- name: sshdir
mountPath: /root/.ssh/known_hosts
subPath: known_hosts
readOnly: true
- name: git-key
mountPath: /etc/fluxd/ssh
readOnly: true
Expand Down
14 changes: 14 additions & 0 deletions deploy-helm/helm-operator-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ spec:
spec:
serviceAccount: flux
volumes:
# The following volume is for using a customised known_hosts
# file file, which you will need to do if you host your own git
# repo rather than using github or the like. You'll also need to
# mount it into the container, below.
# - name: sshdir
# configMap:
# name: flux-ssh-config
# defaultMode: 0600
- name: git-key
secret:
secretName: flux-git-deploy
Expand All @@ -26,6 +34,12 @@ spec:
image: quay.io/weaveworks/helm-operator:0.1.0-alpha
imagePullPolicy: IfNotPresent
volumeMounts:
# Include this if you need to mount a customised known_hosts
# file; you'll also need the volume declared above.
# - name: sshdir
# mountPath: /root/.ssh/known_hosts
# subPath: known_hosts
# readOnly: true
- name: git-key
mountPath: /etc/fluxd/ssh
readOnly: true # this will be the case perforce in K8s >=1.10
Expand Down

0 comments on commit e0e6b70

Please sign in to comment.