feat(argocd-apps): adopt additional Applications/Projects to argocd-apps chart (#1356)

Signed-off-by: yu-croco <yuki.kita22@gmail.com>
pull/1416/head argocd-apps-0.0.1
Aikawa 2022-08-22 21:32:07 +09:00 committed by GitHub
parent 914021b38a
commit 798c8107c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 260 additions and 0 deletions

View File

@ -22,6 +22,7 @@ body:
- argo-rollouts
- argo-workflows
- argocd-image-updater
- argocd-apps
- other
validations:
required: true

View File

@ -24,6 +24,7 @@ body:
- argo-rollouts
- argo-workflows
- argocd-image-updater
- argocd-apps
- other
validations:
required: true

View File

@ -12,3 +12,6 @@ argo-workflows:
argocd-image-updater:
- charts/argocd-image-updater/**/*
argocd-apps:
- charts/argocd-apps/**/*

View File

@ -0,0 +1,17 @@
apiVersion: v2
name: argocd-apps
description: A Helm chart for managing additional Argo CD Applications and Projects
type: application
version: 0.0.1
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
keywords:
- argoproj
- argocd
- gitops
maintainers:
- name: argoproj
url: https://argoproj.github.io/
annotations:
artifacthub.io/changes: |
- "[Added]: Add additional Applications and Projects"

View File

@ -0,0 +1,31 @@
# argocd-apps
A Helm chart for managing additional Argo CD Applications and Projects
To regenerate this document, from the root of this chart directory run:
```shell
docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
```
## Prerequisites
- Helm v3.0.0+
- CRDs (Application and AppProject)
- You need to install them via [argo-cd Helm chart](../argo-cd) or upstream.
## Installation
```console
$ helm repo add argo https://argoproj.github.io/argo-helm
$ helm install my-release argo/argocd-apps
```
## Values
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| applications | list | `[]` (See [values.yaml]) | Deploy Argo CD Applications within this helm release |
| projects | list | `[]` (See [values.yaml]) | Deploy Argo CD Projects within this helm release |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)

View File

@ -0,0 +1,26 @@
{{ template "chart.header" . }}
{{ template "chart.description" . }}
To regenerate this document, from the root of this chart directory run:
```shell
docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest
```
## Prerequisites
- Helm v3.0.0+
- CRDs (Application and AppProject)
- You need to install them via [argo-cd Helm chart](../argo-cd) or upstream.
## Installation
```console
$ helm repo add argo https://argoproj.github.io/argo-helm
$ helm install my-release argo/argocd-apps
```
{{ template "chart.valuesSection" . }}
----------------------------------------------
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)

View File

@ -0,0 +1 @@
# Test with default values

View File

@ -0,0 +1,42 @@
{{- range .Values.applications }}
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
{{- with .additionalAnnotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- with .additionalLabels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .name }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}
{{- with .finalizers }}
finalizers:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
project: {{ tpl .project $ }}
source:
{{- toYaml .source | nindent 4 }}
destination:
{{- toYaml .destination | nindent 4 }}
{{- with .syncPolicy }}
syncPolicy:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .ignoreDifferences }}
ignoreDifferences:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .info }}
info:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,62 @@
{{- range .Values.projects }}
---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
{{- with .additionalAnnotations }}
annotations:
{{- range $key, $value := . }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- end }}
{{- with .additionalLabels }}
labels:
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .name }}
{{- with .namespace }}
namespace: {{ . }}
{{- end }}
{{- with .finalizers }}
finalizers:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
description: {{ .description }}
sourceRepos:
{{- toYaml .sourceRepos | nindent 4 }}
destinations:
{{- toYaml .destinations | nindent 4 }}
{{- with .clusterResourceWhitelist }}
clusterResourceWhitelist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .clusterResourceBlacklist }}
clusterResourceBlacklist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .namespaceResourceBlacklist }}
namespaceResourceBlacklist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .namespaceResourceWhitelist }}
namespaceResourceWhitelist:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .orphanedResources }}
orphanedResources:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .roles }}
roles:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .syncWindows }}
syncWindows:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .signatureKeys }}
signatureKeys:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,76 @@
# -- Deploy Argo CD Applications within this helm release
# @default -- `[]` (See [values.yaml])
## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/
applications: []
# - name: guestbook
# namespace: argocd
# additionalLabels: {}
# additionalAnnotations: {}
# finalizers:
# - resources-finalizer.argocd.argoproj.io
# project: guestbook
# source:
# repoURL: https://github.com/argoproj/argocd-example-apps.git
# targetRevision: HEAD
# path: guestbook
# directory:
# recurse: true
# destination:
# server: https://kubernetes.default.svc
# namespace: guestbook
# syncPolicy:
# automated:
# prune: false
# selfHeal: false
# ignoreDifferences:
# - group: apps
# kind: Deployment
# jsonPointers:
# - /spec/replicas
# info:
# - name: url
# value: https://argoproj.github.io/
# -- Deploy Argo CD Projects within this helm release
# @default -- `[]` (See [values.yaml])
## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/
projects: []
# - name: guestbook
# namespace: argocd
# additionalLabels: {}
# additionalAnnotations: {}
# finalizers:
# - resources-finalizer.argocd.argoproj.io
# description: Example Project
# sourceRepos:
# - '*'
# destinations:
# - namespace: guestbook
# server: https://kubernetes.default.svc
# clusterResourceWhitelist: []
# clusterResourceBlacklist: []
# namespaceResourceBlacklist:
# - group: ''
# kind: ResourceQuota
# - group: ''
# kind: LimitRange
# - group: ''
# kind: NetworkPolicy
# orphanedResources: {}
# roles: []
# namespaceResourceWhitelist:
# - group: 'apps'
# kind: Deployment
# - group: 'apps'
# kind: StatefulSet
# orphanedResources: {}
# roles: []
# syncWindows:
# - kind: allow
# schedule: '10 1 * * *'
# duration: 1h
# applications:
# - '*-prod'
# manualSync: true
# signatureKeys:
# - keyID: ABCDEF1234567890