Skip to content

Commit 456e869

Browse files
author
TheCodingSheikh
committed
feat: update kubecodex chart
1 parent d87d09a commit 456e869

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

charts/kubecodex/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: kubecodex
33
description: A Helm chart for deploying kubecodex style projects
44
type: application
5-
version: 1.1.0
5+
version: 1.0.0
66
appVersion: "1.0.0"
77
keywords:
88
- kubecodex

charts/kubecodex/templates/applicationset.yaml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ kind: ApplicationSet
44
metadata:
55
annotations:
66
argocd.argoproj.io/sync-wave: "0"
7-
name: "{{ . }}"
8-
namespace: "{{ $.Values.argoNamespace }}"
7+
name: "{{ .name }}"
8+
namespace: "{{ $.Values.namespace }}"
99
spec:
1010
goTemplate: true
1111
goTemplateOptions: ["missingkey=default"]
@@ -15,7 +15,7 @@ spec:
1515
revision: "HEAD"
1616
requeueAfterSeconds: 20
1717
files:
18-
- path: "apps/*/{{ . }}/**/config.yaml"
18+
- path: "apps/*/{{ .name }}/**/config.yaml"
1919
values:
2020
cluster: "{{ `{{index .path.segments 1}}` }}"
2121
project: "{{ `{{index .path.segments 2`}} }}"
@@ -24,7 +24,7 @@ spec:
2424
template:
2525
metadata:
2626
name: '{{ `{{ default ( printf "%s-%s" .values.cluster ( .values.app_path | replace "/" "-" | trimPrefix ( printf "apps-%s-%s-" .values.cluster .values.project ) ) ) .appName }}` }}'
27-
namespace: "{{ $.Values.argoNamespace }}"
27+
namespace: "{{ $.Values.namespace }}"
2828
spec:
2929
destination:
3030
namespace: '{{ `{{ default ( .values.app_path | replace "/" "-" | trimPrefix ( printf "apps-%s-%s-" .values.cluster .values.project ) ) .destNamespace }}` }}'
@@ -66,6 +66,18 @@ spec:
6666
prune: false
6767
selfHeal: false
6868
{{ `{{- end }}` }}
69+
syncOptions:
70+
{{ `{{- if ne .createNamespace false }}` }}
71+
- CreateNamespace=true
72+
{{ `{{- end }}` }}
73+
{{ `{{- range .additionalSyncOptions }}` }}
74+
- {{ `{{ . }}` }}
75+
{{ `{{- end }}` }}
76+
{{- if .preserveResourcesOnDeletion }}
77+
syncPolicy:
78+
preserveResourcesOnDeletion: true
79+
{{ else }}
6980
syncPolicy: {}
81+
{{ end }}
7082
---
7183
{{- end }}

charts/kubecodex/templates/appproject.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ metadata:
55
annotations:
66
argocd.argoproj.io/sync-options: PruneLast=true
77
argocd.argoproj.io/sync-wave: "-2"
8-
name: "{{ . }}"
9-
namespace: "{{ $.Values.argoNamespace }}"
8+
name: "{{ .name }}"
9+
namespace: "{{ $.Values.namespace }}"
1010
spec:
1111
clusterResourceWhitelist:
1212
- group: "*"

charts/kubecodex/values.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
argoNamespace: argocd
21
repoURL: https://github.com/TheCodingSheikh/kubecodex
2+
namespace: argocd
33
projects:
4-
- project-1
4+
- name: project-1
5+
preserveResourcesOnDeletion: true

0 commit comments

Comments
 (0)