From 2f8ad166399d9a76725107778a856fc27c204ed9 Mon Sep 17 00:00:00 2001 From: soharab-ic <156293296+soharab-ic@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:42:19 +0530 Subject: [PATCH] Warning: Deprecation warning for cross namespace parameters (#3026) * Deprecation warning for cross namespace parameters `builderNamespace`, `functionNamespace` and `disableOwnerReference` flag. * Do not mention the version --------- Signed-off-by: Md Soharab Ansari --- charts/fission-all/templates/NOTES.txt | 2 ++ .../templates/_deprecation-warnings.tpl | 21 +++++++++++++++++++ charts/fission-all/values.yaml | 7 +++++++ 3 files changed, 30 insertions(+) create mode 100644 charts/fission-all/templates/_deprecation-warnings.tpl diff --git a/charts/fission-all/templates/NOTES.txt b/charts/fission-all/templates/NOTES.txt index 79c5ab67..09a03ef2 100644 --- a/charts/fission-all/templates/NOTES.txt +++ b/charts/fission-all/templates/NOTES.txt @@ -1,3 +1,5 @@ +{{ template "deprecationWarnings" . }} + 1. Install the client CLI. Mac: diff --git a/charts/fission-all/templates/_deprecation-warnings.tpl b/charts/fission-all/templates/_deprecation-warnings.tpl new file mode 100644 index 00000000..3612230a --- /dev/null +++ b/charts/fission-all/templates/_deprecation-warnings.tpl @@ -0,0 +1,21 @@ +{{- define "deprecationWarnings" -}} +{{- $deprecations := list -}} + +{{- if .Values.builderNamespace -}} +{{- $deprecations = append $deprecations "The 'builderNamespace' parameter is deprecated and will be removed in future release." -}} +{{- end -}} + +{{- if .Values.functionNamespace -}} +{{- $deprecations = append $deprecations "The 'functionNamespace' parameter is deprecated and will be removed in future release." -}} +{{- end -}} + +{{- if .Values.disableOwnerReference -}} +{{- $deprecations = append $deprecations "The 'disableOwnerReference' flag is temporary addition and will be removed in future release." -}} +{{- end -}} + +{{- if $deprecations -}} +{{- range $deprecations }} +{{- printf "WARNING: %s" . | nindent 0 }} +{{- end -}} +{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/fission-all/values.yaml b/charts/fission-all/values.yaml index 2df82478..5dc57af2 100644 --- a/charts/fission-all/values.yaml +++ b/charts/fission-all/values.yaml @@ -67,12 +67,16 @@ defaultNamespace: default ## if builderNamespace is set to empty then builder resources will be created in the same namespace as the Fission resources. ## This is different from the release namespace. ## +## Note: This parameter is deprecated and will be removed in future fission releases. +## builderNamespace: "" ## functionNamespace represents the namespace in which Fission Function resources will be created. ## if functionNamespace is set to empty then function resources will be created in the same namespace as the Fission resources. ## This is different from the release namespace. ## +## Note: This parameter is deprecated and will be removed in future fission releases. +## functionNamespace: "" ## Fission will watch the following namespaces along with the `defaultNamespace` for fission custom resources. @@ -93,6 +97,9 @@ createNamespace: true ## Set to false if you want to add OwnerReference to K8s resources created by Fission. ## ## Set to true if you are using cross namespace meaning `builderNamespace` and `functionNamespace` are set. +## +## Note: This flag is temporary addition and would be removed in future fission releases. +## disableOwnerReference: false ## enableIstio indicates whether to enable istio integration.