Skip to content

Commit

Permalink
Make required fields mandatory
Browse files Browse the repository at this point in the history
Signed-off-by: Said Sef <saidsef@gmail.com>
  • Loading branch information
saidsef committed Sep 11, 2022
1 parent 114c4c1 commit c1d0ed5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/applicationset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: argocd-applicationsets-services
description: A HELM Chart for ArgoCD ApplicationSets for Kubernetes
type: application
version: &version "0.2.5"
version: &version "0.2.6"
appVersion: *version
kubeVersion: ">= 1.23"
home: https://github.com/saidsef/argocd-applicationsets-services
Expand Down
15 changes: 8 additions & 7 deletions charts/applicationset/templates/applicationsets-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- $label := .Values.label | squote -}}
{{- $project := .Values.project | squote -}}
{{- $refresh := .Values.requeueAfterSeconds -}}
{{- $owner := .Values.owner -}}
{{- $path := .Values.path | squote -}}
Expand All @@ -15,8 +16,8 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: '{{ $repo.name }}-github'
namespace: '{{ $namespace }}'
name: '{{ required "A valid repo name is required" $repo.name }}-github'
namespace: '{{ required "A valied namespace is required" $namespace }}'
annotations:
app.kubernetes.io/name: '{{ $repo.name }}'
app.kubernetes.io/managed-by: '{{ $.Release.Service }}'
Expand All @@ -29,16 +30,16 @@ spec:
generators:
- pullRequest:
github:
owner: '{{ $owner }}'
repo: '{{ $repo.name }}'
owner: '{{ required "A valid repo organization / owner is required" $owner }}'
repo: '{{ required "A valid repo name is required" $repo.name }}'
labels:
- {{ $label }}
- {{ required "A valied label(s) for PRs is required" $label }}
{{- if and ($secretName) ($secretKey) }}
tokenRef:
secretName: {{ $secretName }}
key: {{ $secretKey }}
{{- end }}
requeueAfterSeconds: {{ $refresh }}
requeueAfterSeconds: {{ $refresh | default 500 }}
template:
metadata:
name: '{{ $repo.name }}-{{ $dqf }}branch{{ $dqb }}-{{ $dqf }}number{{ $dqb }}'
Expand All @@ -64,7 +65,7 @@ spec:
{{- end }}
{{- end }}
path: {{ or $repo.path $path }}
project: 'default'
project: {{ $project | default "default" }}
syncPolicy:
automated:
prune: true
Expand Down

0 comments on commit c1d0ed5

Please sign in to comment.