mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-17 02:12:55 +02:00
Add argo vault plugin
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: cmp-plugin
|
||||||
|
data:
|
||||||
|
avp.yaml: |
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: ConfigManagementPlugin
|
||||||
|
metadata:
|
||||||
|
name: argocd-vault-plugin
|
||||||
|
spec:
|
||||||
|
allowConcurrency: true
|
||||||
|
discover:
|
||||||
|
find:
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- "-c"
|
||||||
|
- "find . -name '*.yaml' | xargs -I {} grep \"<path\\|avp\\.kubernetes\\.io\" {} | grep ."
|
||||||
|
generate:
|
||||||
|
command:
|
||||||
|
- argocd-vault-plugin
|
||||||
|
- generate
|
||||||
|
- "."
|
||||||
|
lockRepo: false
|
||||||
|
---
|
||||||
@@ -8,8 +8,8 @@ namespace: argocd
|
|||||||
resources:
|
resources:
|
||||||
- https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/install.yaml?ref=stable
|
- https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/install.yaml?ref=stable
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
# - cmp-plugin.yaml
|
- cmp-plugin.yaml
|
||||||
|
|
||||||
# changes to config maps
|
# changes to config maps
|
||||||
# patches:
|
patches:
|
||||||
# - path: overlays/cmp-plugin-patch.yaml
|
- path: overlays/cmp-plugin-patch.yaml
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: argocd-repo-server
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
automountServiceAccountToken: true
|
||||||
|
volumes:
|
||||||
|
- configMap:
|
||||||
|
name: cmp-plugin
|
||||||
|
name: cmp-plugin
|
||||||
|
- name: custom-tools
|
||||||
|
emptyDir: {}
|
||||||
|
initContainers:
|
||||||
|
- name: download-tools
|
||||||
|
image: registry.access.redhat.com/ubi8
|
||||||
|
env:
|
||||||
|
- name: AVP_VERSION
|
||||||
|
value: 1.16.1
|
||||||
|
command: [sh, -c]
|
||||||
|
args:
|
||||||
|
- >-
|
||||||
|
curl -L https://github.com/argoproj-labs/argocd-vault-plugin/releases/download/v$(AVP_VERSION)/argocd-vault-plugin_$(AVP_VERSION)_linux_amd64 -o argocd-vault-plugin &&
|
||||||
|
chmod +x argocd-vault-plugin &&
|
||||||
|
mv argocd-vault-plugin /custom-tools/
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /custom-tools
|
||||||
|
name: custom-tools
|
||||||
|
containers:
|
||||||
|
- name: avp
|
||||||
|
command: [/var/run/argocd/argocd-cmp-server]
|
||||||
|
image: registry.access.redhat.com/ubi8
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 999
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/run/argocd
|
||||||
|
name: var-files
|
||||||
|
- mountPath: /home/argocd/cmp-server/plugins
|
||||||
|
name: plugins
|
||||||
|
- mountPath: /tmp
|
||||||
|
name: tmp
|
||||||
|
|
||||||
|
# Register plugins into sidecar
|
||||||
|
- mountPath: /home/argocd/cmp-server/config/plugin.yaml
|
||||||
|
subPath: avp.yaml
|
||||||
|
name: cmp-plugin
|
||||||
|
|
||||||
|
# Important: Mount tools into $PATH
|
||||||
|
- name: custom-tools
|
||||||
|
subPath: argocd-vault-plugin
|
||||||
|
mountPath: /usr/local/bin/argocd-vault-plugin
|
||||||
Reference in New Issue
Block a user