-
Notifications
You must be signed in to change notification settings - Fork 705
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
Configurable global ns for Helm in the plugin's config #5339
Changes from all commits
7243c9d
cf53faf
1250786
272639a
5eef4af
6100efe
33a5716
07d7f8c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -239,10 +239,15 @@ Returns a JSON list of cluster names only (without sensitive tokens etc.) | |
{{- end -}} | ||
|
||
{{/* | ||
Returns the name of the globalRepos namespace | ||
Returns the name of the global packaging namespace for the Helm plugin. | ||
It uses the value passed in the plugin's config, but falls back to the "release namespace + suffix" formula. | ||
*/}} | ||
{{- define "kubeapps.globalReposNamespace" -}} | ||
{{- printf "%s%s" .Release.Namespace .Values.apprepository.globalReposNamespaceSuffix -}} | ||
{{- define "kubeapps.helmGlobalPackagingNamespace" -}} | ||
{{- if .Values.kubeappsapis.pluginConfig.helm.packages.v1alpha1.globalPackagingNamespace }} | ||
{{- printf "%s" .Values.kubeappsapis.pluginConfig.helm.packages.v1alpha1.globalPackagingNamespace -}} | ||
{{- else -}} | ||
{{- printf "%s%s" .Release.Namespace .Values.apprepository.globalReposNamespaceSuffix -}} | ||
{{- end -}} | ||
Comment on lines
+246
to
+250
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perfect! We give now priority to the right plugin-scoped value. In the future we will deprecate the |
||
{{- end -}} | ||
|
||
{{/* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,7 +108,7 @@ spec: | |
- --pinniped-proxy-ca-cert=/etc/pinniped-proxy-tls/ca.crt | ||
{{- end }} | ||
{{- end }} | ||
- --global-repos-namespace={{ include "kubeapps.globalReposNamespace" . }} | ||
- --global-repos-namespace={{ include "kubeapps.helmGlobalPackagingNamespace" . }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't changed the I'd like to get rid of this command line "global repo" instead, but not right now for ensuring a smooth transition. |
||
{{- if .Values.kubeappsapis.qps }} | ||
- --kube-api-qps={{ .Values.kubeappsapis.qps }} | ||
{{- end }} | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{- if or .Values.apprepository.globalReposNamespaceSuffix .Values.kubeappsapis.pluginConfig.helm.packages.v1alpha1.globalPackagingNamespace }} | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }} | ||
{{- end }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -870,7 +870,7 @@ apprepository: | |
## - myRegistryKeySecretName | ||
## | ||
pullSecrets: [] | ||
## @param apprepository.globalReposNamespaceSuffix Suffix for the namespace of global repos. Defaults to empty for backwards compatibility. | ||
## @param apprepository.globalReposNamespaceSuffix Suffix for the namespace of global repos in the Helm plugin. Defaults to empty for backwards compatibility. Ignored if kubeappsapis.pluginConfig.helm.packages.v1alpha1.globalPackagingNamespace is set. | ||
## | ||
globalReposNamespaceSuffix: "" | ||
## @param apprepository.initialRepos [array] Initial chart repositories to configure | ||
|
@@ -1492,6 +1492,13 @@ kubeappsapis: | |
patch: 3 | ||
## @param kubeappsapis.pluginConfig.core.packages.v1alpha1.timeoutSeconds Value to wait for Kubernetes commands to complete | ||
timeoutSeconds: 300 | ||
helm: | ||
packages: | ||
v1alpha1: | ||
## @param kubeappsapis.pluginConfig.helm.packages.v1alpha1.globalPackagingNamespace Custom global packaging namespace. Using this value will override the current "kubeapps release namespace + suffix" pattern and will create a new namespace if not exists. | ||
globalPackagingNamespace: "" | ||
## @param kubeappsapis.pluginConfig.helm.packages.v1alpha1.userManagedSecrets Default policy for handling repository secrets, either managed by the user or by kubeapps-apis | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've squeezed this |
||
userManagedSecrets: false | ||
kappController: | ||
packages: | ||
v1alpha1: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were already using this helper function to retrieve the namespace, so I've changed it to: "use the globalPackagingNamespace in the plugin or fall back to the previous behavior"