From 4a4e47742ba47fd8f538c48c2a824f43a2435eb7 Mon Sep 17 00:00:00 2001 From: Stephen Moloney Date: Sat, 23 Jun 2018 10:42:33 +0100 Subject: [PATCH 1/2] Mount the sshdir into the helm-operator too What is this MR for ? - Mounting the sshdir into the helm operator container - The known_hosts is only mounted in the flux container thus far. --- chart/flux/templates/helm-operator-deployment.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chart/flux/templates/helm-operator-deployment.yaml b/chart/flux/templates/helm-operator-deployment.yaml index 050bb89f3..f9a589a98 100644 --- a/chart/flux/templates/helm-operator-deployment.yaml +++ b/chart/flux/templates/helm-operator-deployment.yaml @@ -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 @@ -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 From e291e5390092c5492ea90bcee7a8b4c10e1564db Mon Sep 17 00:00:00 2001 From: Stephen Moloney Date: Thu, 28 Jun 2018 12:07:08 +0100 Subject: [PATCH 2/2] Add commented out sshdir changes into helm-operator-deployment.yaml. What does this MR do? - Adds the changes for the sshdir configmap and volume into the helm-operator-deployment.yaml file - Comments the sshdir configmap and volume --- deploy-helm/helm-operator-deployment.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/deploy-helm/helm-operator-deployment.yaml b/deploy-helm/helm-operator-deployment.yaml index 6dd466bec..ebb8feb24 100644 --- a/deploy-helm/helm-operator-deployment.yaml +++ b/deploy-helm/helm-operator-deployment.yaml @@ -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 @@ -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