This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new b105b5bbef NIFI-13454 Renamed FileParameterProvider to 
KubernetesSecretParameterProvider
b105b5bbef is described below

commit b105b5bbef5df022b3df0c96bb6af39b19691fa1
Author: Joe Gresock <jgres...@gmail.com>
AuthorDate: Wed Jun 26 10:40:22 2024 -0400

    NIFI-13454 Renamed FileParameterProvider to 
KubernetesSecretParameterProvider
    
    This closes #9008
    
    Signed-off-by: David Handermann <exceptionfact...@apache.org>
---
 ...ovider.java => KubernetesSecretParameterProvider.java} |  8 +++++---
 .../services/org.apache.nifi.parameter.ParameterProvider  |  2 +-
 .../additionalDetails.html                                | 15 ++++++++-------
 .../edit-parameter-provider.component.spec.ts             |  4 ++--
 .../fetch-parameter-provider-parameters.component.spec.ts |  4 ++--
 5 files changed, 18 insertions(+), 15 deletions(-)

diff --git 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/FileParameterProvider.java
 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/KubernetesSecretParameterProvider.java
similarity index 95%
rename from 
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/FileParameterProvider.java
rename to 
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/KubernetesSecretParameterProvider.java
index 959bf944a2..67a6e75ac1 100644
--- 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/FileParameterProvider.java
+++ 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/java/org/apache/nifi/parameter/KubernetesSecretParameterProvider.java
@@ -53,8 +53,10 @@ import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.Collectors;
 
 @Tags({"file"})
-@CapabilityDescription("Fetches parameters from files.  Parameter groups are 
indicated by a set of directories, and files within the directories map to 
parameter names. " +
-        "The content of the file becomes the parameter value.")
+@CapabilityDescription("Fetches parameters from files, in the format provided 
by Kubernetes mounted secrets.  " +
+        "Parameter groups are indicated by a set of directories, and files 
within the directories map to parameter names. " +
+        "The content of the file becomes the parameter value.  Since 
Kubernetes mounted Secrets are base64-encoded, the " +
+        "parameter provider defaults to Base64-decoding the value of the 
parameter from the file.")
 
 @Restricted(
         restrictions = {
@@ -63,7 +65,7 @@ import java.util.stream.Collectors;
                         explanation = "Provides operator the ability to read 
from any file that NiFi has access to.")
         }
 )
-public class FileParameterProvider extends AbstractParameterProvider 
implements VerifiableParameterProvider  {
+public class KubernetesSecretParameterProvider extends 
AbstractParameterProvider implements VerifiableParameterProvider  {
     private static final int MAX_SIZE_LIMIT = 8096;
     private static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
 
diff --git 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/META-INF/services/org.apache.nifi.parameter.ParameterProvider
 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/META-INF/services/org.apache.nifi.parameter.ParameterProvider
index 4c7481fb03..98a30c2106 100644
--- 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/META-INF/services/org.apache.nifi.parameter.ParameterProvider
+++ 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/META-INF/services/org.apache.nifi.parameter.ParameterProvider
@@ -13,6 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 org.apache.nifi.parameter.EnvironmentVariableParameterProvider
-org.apache.nifi.parameter.FileParameterProvider
+org.apache.nifi.parameter.KubernetesSecretParameterProvider
 org.apache.nifi.parameter.DatabaseParameterProvider
 org.apache.nifi.parameter.OnePasswordParameterProvider
diff --git 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/docs/org.apache.nifi.parameter.FileParameterProvider/additionalDetails.html
 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/docs/org.apache.nifi.parameter.KubernetesSecretParameterProvider/additionalDetails.html
similarity index 80%
rename from 
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/docs/org.apache.nifi.parameter.FileParameterProvider/additionalDetails.html
rename to 
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/docs/org.apache.nifi.parameter.KubernetesSecretParameterProvider/additionalDetails.html
index db62562264..31197cbb6f 100644
--- 
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/docs/org.apache.nifi.parameter.FileParameterProvider/additionalDetails.html
+++ 
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-parameter-providers/src/main/resources/docs/org.apache.nifi.parameter.KubernetesSecretParameterProvider/additionalDetails.html
@@ -16,23 +16,24 @@
 -->
 <head>
     <meta charset="utf-8" />
-    <title>FileParameterProvider</title>
+    <title>KubernetesSecretParameterProvider</title>
 
     <link rel="stylesheet" href="../../../../../css/component-usage.css" 
type="text/css" />
 </head>
 <body>
-    <h3>Deriving Parameters from Files</h3>
+    <h3>Deriving Parameters from mounted Kubernetes Secret files</h3>
 
     <p>
-        The FileParameterProvider maps a directory to a parameter group named 
after the directory, and the files
+        The KubernetesSecretParameterProvider maps a directory to a parameter 
group named after the directory, and the files
         within the directory to parameters.  Each file's name is mapped to a 
parameter, and the content of the file
         becomes the value.  Hidden files and nested directories are ignored.
     </p>
 
     <p>
-        While this provider can be useful in a range of cases, it particularly 
matches the mounted volume secret
-        structure in Kubernetes.  A full discussion of Kubernetes secrets is 
beyond the scope of this document,
-        but a brief overview can illustrate how these secrets can be mapped to 
parameter groups.
+        While this provider can be useful in a range of cases since it simply 
reads parameter values from local files, it
+        particularly matches the mounted volume secret structure in 
Kubernetes.  A full discussion of Kubernetes secrets
+        is beyond the scope of this document, but a brief overview can 
illustrate how these secrets can be mapped to
+        parameter groups.
     </p>
 
     <h3>Kubernetes Mounted Secrets Example</h3>
@@ -82,7 +83,7 @@ sys.access.key  sys.admin.password sys.admin.username
 
     <p>
         Therefore, to map this secret to a parameter group that will populate 
a Parameter Context named 'system-credentials',
-        you should simply provide the following configuration to the 
FileParameterProvider:
+        you should simply provide the following configuration to the 
KubernetesSecretParameterProvider:
 
         <ul>
             <li><b>Parameter Group Directories</b> - 
/etc/secrets/system-credentials</li>
diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/edit-parameter-provider/edit-parameter-provider.component.spec.ts
 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/edit-parameter-provider/edit-parameter-provider.component.spec.ts
index fd2c4972fc..993a8c8f11 100644
--- 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/edit-parameter-provider/edit-parameter-provider.component.spec.ts
+++ 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/edit-parameter-provider/edit-parameter-provider.component.spec.ts
@@ -43,8 +43,8 @@ describe('EditParameterProvider', () => {
             bulletins: [],
             component: {
                 id: '369487d7-018d-1000-817a-1d8d9a8f4a91',
-                name: 'Group 1 - FileParameterProvider',
-                type: 'org.apache.nifi.parameter.FileParameterProvider',
+                name: 'Group 1 - KubernetesSecretParameterProvider',
+                type: 
'org.apache.nifi.parameter.KubernetesSecretParameterProvider',
                 bundle: {
                     group: 'org.apache.nifi',
                     artifact: 'nifi-standard-nar',
diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/fetch-parameter-provider-parameters/fetch-parameter-provider-parameters.component.spec.ts
 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/fetch-parameter-provider-parameters/fetch-parameter-provider-parameters.component.spec.ts
index dc80c0e635..678e3ffa05 100644
--- 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/fetch-parameter-provider-parameters/fetch-parameter-provider-parameters.component.spec.ts
+++ 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/settings/ui/parameter-providers/fetch-parameter-provider-parameters/fetch-parameter-provider-parameters.component.spec.ts
@@ -45,8 +45,8 @@ describe('FetchParameterProviderParameters', () => {
             bulletins: [],
             component: {
                 id: '369487d7-018d-1000-817a-1d8d9a8f4a91',
-                name: 'Group 1 - FileParameterProvider',
-                type: 'org.apache.nifi.parameter.FileParameterProvider',
+                name: 'Group 1 - KubernetesSecretParameterProvider',
+                type: 
'org.apache.nifi.parameter.KubernetesSecretParameterProvider',
                 bundle: {
                     group: 'org.apache.nifi',
                     artifact: 'nifi-standard-nar',

Reply via email to