-
Notifications
You must be signed in to change notification settings - Fork 706
/
apprepositories.yaml
78 lines (77 loc) · 3.12 KB
/
apprepositories.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.packaging.helm.enabled }}
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apprepository.image "chart" .Chart ) ) }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
{{- range .Values.apprepository.initialRepos }}
apiVersion: kubeapps.com/v1alpha1
kind: AppRepository
metadata:
name: {{ .name }}
namespace: {{ default (include "kubeapps.helmGlobalPackagingNamespace" $) .namespace | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
{{- if $.Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
type: {{ default "helm" .type }}
url: {{ .url }}
{{- if .ociRepositories }}
ociRepositories:
{{- range .ociRepositories }}
- {{ . }}
{{- end }}
{{- end }}
{{- if or $.Values.apprepository.podSecurityContext.enabled $.Values.apprepository.containerSecurityContext.enabled $.Values.apprepository.initialReposProxy.enabled .nodeSelector .tolerations}}
syncJobPodTemplate:
spec:
{{- if or $.Values.apprepository.initialReposProxy.enabled $.Values.apprepository.containerSecurityContext.enabled }}
containers:
-
{{- if $.Values.apprepository.initialReposProxy.enabled }}
env:
- name: https_proxy
value: {{ $.Values.apprepository.initialReposProxy.httpsProxy }}
- name: http_proxy
value: {{ $.Values.apprepository.initialReposProxy.httpProxy }}
- name: no_proxy
value: {{ $.Values.apprepository.initialReposProxy.noProxy }}
{{- end }}
{{- if $.Values.apprepository.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.apprepository.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
{{- end }}
{{- if $.Values.apprepository.podSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" $.Values.apprepository.podSecurityContext "context" $) | nindent 8 }}
{{- end }}
{{- if .nodeSelector }}
nodeSelector: {{- toYaml .nodeSelector | nindent 8 }}
{{- end }}
{{- if .tolerations }}
tolerations: {{- toYaml .tolerations | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .caCert .authorizationHeader .basicAuth }}
auth:
{{- if .caCert }}
customCA:
secretKeyRef:
key: ca.crt
name: {{ printf "apprepo-%s-secrets" .name }}
{{- end }}
{{- if or .authorizationHeader .basicAuth }}
header:
secretKeyRef:
key: authorizationHeader
name: {{ printf "apprepo-%s-secrets" .name }}
{{- end }}
{{- end }}
{{- if .filterRule }}
filterRule:
{{- toYaml .filterRule | nindent 4 }}
{{- end }}
---
{{ end -}}
{{- end -}}