Skip to content

Commit fb993e1

Browse files
dennisvankekemsrodenhuisferruhcihan
authored
feat: APL-556, Add self-service option for admins to add external helm charts to the catalog (#1979)
Co-authored-by: Sander Rodenhuis <[email protected]> Co-authored-by: Ferruh Cihan <[email protected]>
1 parent 24b45e9 commit fb993e1

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

charts/team-ns/templates/argocd/argocd-applicationset.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ spec:
1818
template:
1919
metadata:
2020
name: 'team-{{ $v.teamId }}-{{ .name }}'
21-
{{- if or (eq $a.type "digest") (eq $a.type "semver") }}
2221
annotations:
22+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
23+
{{- if or (eq $a.type "digest") (eq $a.type "semver") }}
2324
argocd-image-updater.argoproj.io/team-{{ $v.teamId }}-{{ .name }}.force-update: 'true'
2425
argocd-image-updater.argoproj.io/team-{{ $v.teamId }}-{{ .name }}.pull-secret: 'pullsecret:argocd/copy-team-{{ $v.teamId }}-harbor-pullsecret'
2526
argocd-image-updater.argoproj.io/git-branch: main
@@ -52,6 +53,11 @@ spec:
5253
# The argocd template the values parameter is taken from the git generator path
5354
values: '{{ "{{values}}" }}'
5455
releaseName: '{{ .name }}'
56+
{{- if and (.sidecarInject) (.createNamespace) }}
57+
parameters:
58+
- name: sidecar.istio.io/inject
59+
value: 'true'
60+
{{- end }}
5561
syncPolicy:
5662
automated:
5763
allowEmpty: false
@@ -65,6 +71,10 @@ spec:
6571
{{- if eq $v.teamId "admin" }}
6672
syncOptions:
6773
- RespectIgnoreDifferences=true
74+
- ServerSideApply=true
75+
{{- if .createNamespace }}
76+
- CreateNamespace=true
77+
{{- end }}
6878
ignoreDifferences:
6979
- group: admissionregistration.k8s.io
7080
kind: ValidatingWebhookConfiguration

tests/fixtures/env/teams/workloads.admin.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ teamConfig:
55
url: https://myrepo.local/mychart.git
66
path: /
77
revision: HEAD
8+
namespace: kserve
9+
createNamespace: true
10+
sidecarInject: true
811
- name: wa2
912
url: https://myregistry.local/mychart
1013
chart: mychart

values-schema.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -1421,6 +1421,12 @@ definitions:
14211421
namespace:
14221422
description: Workload namespace. Applicable only for team-admin. Default value is 'team-<team_id>'
14231423
$ref: '#/definitions/idName'
1424+
createNamespace:
1425+
type: boolean
1426+
default: false
1427+
sidecarInject:
1428+
type: boolean
1429+
default: false
14241430
imageUpdateStrategy:
14251431
description: Automatically update the image. Only supported wit Helm charts in local Gitea repository and images stored in Harbor.
14261432
title: Auto Image Updater

0 commit comments

Comments
 (0)