Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added sync options to values as list #141

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This helm chart implements Pull Request generator of ApplicationSet, it uses API

Services that should already be installed and/or running.

- Kubernetes Cluster >= 1.23
- Kubernetes Cluster >= 1.26
- [ArgoCD ApplicationSet Controller](https://argo-cd.readthedocs.io/en/stable/user-guide/application-set/) >= v2.5.8
- [HELM](https://helm.sh/docs/intro/install/) >= v3.9

Expand Down
8 changes: 5 additions & 3 deletions charts/applicationset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: v2
name: argocd-applicationsets-services
description: A Helm chart for ArgoCD ApplicationSets, a declarative, GitOps continuous delivery tool for Kubernetes
type: application
version: &version "0.12.5"
version: &version "0.13.0"
appVersion: *version
kubeVersion: ">= 1.23"
kubeVersion: ">= 1.26"
home: https://github.com/saidsef/argocd-applicationsets-services
icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png
keywords:
Expand All @@ -23,8 +23,10 @@ sources:
annotations:
artifacthub.io/license: "Apache-2.0"
artifacthub.io/changes: |
- kind: added
description: Added syncOptions and variable
- kind: changed
description: Include repo name in the PR/MR application name
description: Updated minimum Kubernetes version to v1.26
artifacthub.io/links: |
- name: README
url: https://raw.githubusercontent.com/saidsef/argocd-applicationsets-services/main/README.md
Expand Down
7 changes: 4 additions & 3 deletions charts/applicationset/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# argocd-applicationsets-services

![Version: 0.12.5](https://img.shields.io/badge/Version-0.12.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.12.5](https://img.shields.io/badge/AppVersion-0.12.5-informational?style=flat-square)
![Version: 0.13.0](https://img.shields.io/badge/Version-0.13.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.13.0](https://img.shields.io/badge/AppVersion-0.13.0-informational?style=flat-square)

A Helm chart for ArgoCD ApplicationSets, a declarative, GitOps continuous delivery tool for Kubernetes

Expand All @@ -18,22 +18,23 @@ A Helm chart for ArgoCD ApplicationSets, a declarative, GitOps continuous delive

## Requirements

Kubernetes: `>= 1.23`
Kubernetes: `>= 1.26`

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| github | object | `{"api":"https://api.github.com","label":"preview","owner":"saidsef","path":"deployment","secretKey":"","secretName":""}` | GitHub repo configuration parameters |
| gitlab | object | `{"api":"https://gitlab.com","group":"saidsef","label":"preview","path":"deployment","secretKey":"","secretName":""}` | GitLab repo configuration parameters |
| globals | object | `{"deployToNamespace":"previews","label":"preview","notificationChannel":"argocd","requeueAfterSeconds":500,"retryBackoffDuration":"10s","revisionHistoryLimit":2,"server":"https://kubernetes.default.svc"}` | Global default variables |
| globals | object | `{"deployToNamespace":"previews","label":"preview","notificationChannel":"argocd","requeueAfterSeconds":500,"retryBackoffDuration":"10s","revisionHistoryLimit":2,"server":"https://kubernetes.default.svc","syncOptions":["ApplyOutOfSyncOnly=true","CreateNamespace=true","PruneLast=true","PrunePropagationPolicy=foreground","RespectIgnoreDifferences=true","Validate=false"]}` | Global default variables |
| globals.deployToNamespace | string | `"previews"` | Kubernetes namespace to deploy previews |
| globals.label | string | `"preview"` | GitHub label to filter PRs that you want to target |
| globals.notificationChannel | string | `"argocd"` | ArgoCD Slack notification channel |
| globals.requeueAfterSeconds | int | `500` | GitHub polling rate (seconds) |
| globals.retryBackoffDuration | string | `"10s"` | The amount to back off retries of failed syncs |
| globals.revisionHistoryLimit | int | `2` | How many old objects should be retained |
| globals.server | string | `"https://kubernetes.default.svc"` | ArgoCD server address, use 'all' to use cluster generator |
| globals.syncOptions | list | `["ApplyOutOfSyncOnly=true","CreateNamespace=true","PruneLast=true","PrunePropagationPolicy=foreground","RespectIgnoreDifferences=true","Validate=false"]` | syncOptions how it syncs the desired state in the target cluster |
| name | string | `"pr-reviews"` | ApplicationSet name |
| namespace | string | `"argocd"` | ArgoCD controller Namespace deployed |
| project | object | `{"clusterResourceBlacklist":[{"group":"apiextensions.k8s.io","kind":"CustomResourceDefinition"}],"clusterResourceWhitelist":[{"group":"*","kind":"*"}],"destinations":[{"name":"*","namespace":"previews","server":"*"}],"enabled":false,"namespaceResourceBlacklist":[{"group":"argoproj.io","kind":"AppProject"}],"namespaceResourceWhitelist":[{"group":"*","kind":"*"}],"orphanedResources":{"warn":false},"permitOnlyProjectScopedClusters":false,"roles":[],"sourceRepos":["*"],"syncWindows":[]}` | ArgoCD Project parameters |
Expand Down
9 changes: 6 additions & 3 deletions charts/applicationset/templates/github-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ spec:
allowEmpty: true
prune: true
selfHeal: true
managedNamespaceMetadata:
labels:
app.kubernetes.io/created-by: {{ $repo.name }}
syncOptions:
- CreateNamespace=true
- Prune=true
- PruneLast=true
{{- range $s := $globals.syncOptions }}
- {{ $s }}
{{- end }}
retry:
backoff:
duration: {{ $retryBackoffDuration }}
Expand Down
6 changes: 3 additions & 3 deletions charts/applicationset/templates/gitlab-mr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ spec:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
- Prune=true
- PruneLast=true
{{- range $s := $globals.syncOptions }}
- {{ $s }}
{{- end }}
retry:
backoff:
duration: {{ $retryBackoffDuration }}
Expand Down
9 changes: 9 additions & 0 deletions charts/applicationset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ globals:
# -- GitHub label to filter PRs that you want to target
label: 'preview'

# -- syncOptions how it syncs the desired state in the target cluster
syncOptions:
- ApplyOutOfSyncOnly=true
- CreateNamespace=true
- PruneLast=true
- PrunePropagationPolicy=foreground
- RespectIgnoreDifferences=true
- Validate=false

# -- ArgoCD Project parameters
project:
enabled: false
Expand Down
Loading