Issue #1411 - Document private repository configuration (#1515)

This commit is contained in:
Alexander Matyushentsev
2019-04-24 10:26:07 -07:00
committed by Alex Collins
parent e75a7a5dea
commit 3b71bd05a4
6 changed files with 157 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# Argo CD ssh_known_hosts file customization
The directory contains sample kustomize application which customizes `/etc/ssh/ssh_known_hosts` file in Argo CD. This is useful if you want to disable SSL cert validation
for Git repositories connected using SSL urls:
- `argocd-known-hosts-mounts.yaml` - define merge patches which inject `/etc/ssh/ssh_known_hosts` file mount into all Argo CD deployments.
- `argocd-known-hosts.yaml` - defines `ConfigMap` which includes `/etc/ssh/ssh_known_hosts` file content.
- `kustomization.yaml` - Kustomize application which bundles stable version of Argo CD and apply `argocd-known-hosts-mounts.yaml` patches on top.
!!! note
The `/etc/ssh/ssh_known_hosts` should include Git host on each Argo CD deployment as well as on a computer where `argocd repo add` is executed. After resolving issue
[#1514](https://github.com/argoproj/argo-cd/issues/1514) only `argocd-repo-server` deployment has to be customized.

View File

@@ -0,0 +1,54 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-server
spec:
template:
spec:
containers:
- name: argocd-server
volumeMounts:
- name: known-hosts
mountPath: /etc/ssh/ssh_known_hosts
subPath: known_hosts
volumes:
- name: known-hosts
configMap:
name: argocd-known-hosts
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-repo-server
spec:
template:
spec:
containers:
- name: argocd-repo-server
volumeMounts:
- name: known-hosts
mountPath: /etc/ssh/ssh_known_hosts
subPath: known_hosts
volumes:
- name: known-hosts
configMap:
name: argocd-known-hosts
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: argocd-application-controller
spec:
template:
spec:
containers:
- name: argocd-application-controller
volumeMounts:
- name: known-hosts
mountPath: /etc/ssh/ssh_known_hosts
subPath: known_hosts
volumes:
- name: known-hosts
configMap:
name: argocd-known-hosts

View File

@@ -0,0 +1,8 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-known-hosts
data:
known_hosts: |-
<known_hosts file content>

View File

@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- github.com/argoproj/argo-cd//manifests/cluster-install?ref=stable
patchesStrategicMerge:
- argocd-known-hosts-mounts.yaml
resources:
- argocd-known-hosts.yaml