fix: kubezero git-sync fixes

This commit is contained in:
Stefan Reimer 2021-08-30 14:12:50 +02:00
parent d11417b81c
commit 423f02d4c9
4 changed files with 72 additions and 4 deletions

View File

@ -0,0 +1,24 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-client
labels:
app: redis-client
spec:
selector:
matchLabels:
app: redis-client
replicas: 1
template:
metadata:
labels:
app: redis-client
spec:
containers:
- name: redis-client
image: redis
resources:
requests:
cpu: 100m
memory: 100Mi

View File

@ -0,0 +1,13 @@
apiVersion: v2
name: kubezero-git-sync
description: KubeZero Git Sync Argo Application to track cluster values via git
type: application
version: 0.1
home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
keywords:
- kubezero
- argocd
maintainers:
- name: Quarky9
kubeVersion: ">= 1.18.0"

View File

@ -0,0 +1,29 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: kubezero
namespace: argocd
spec:
project: kubezero
source:
repoURL: https://zero-down-time.github.io/kubezero
chart: kubezero
targetRevision: {{ .Values.kubezero.version }}
helm:
parameters:
# We use this to detect if we are called from ArgoCD
- name: argocdAppName
value: $ARGOCD_APP_NAME
# This breaks the recursion, otherwise we install another kubezero project and app
- name: installKubeZero
value: "false"
values: |
{{- toYaml .Values | nindent 8 }}
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true

View File

@ -56,14 +56,16 @@ spec:
targetRevision: {{ .Values.kubezero.gitSync.targetRevision }}
path: {{ .Values.kubezero.gitSync.path }}
directory:
recurse: true
directory:
recurse: true
destination:
server: https://kubernetes.default.svc
namespace: argocd
{{- with .Values.kubezero.syncPolicy }}
syncPolicy:
automated:
prune: true
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}