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

pkarwasz pushed a commit to branch 2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/2.x by this push:
     new 7a81b2253d Fix typo in Kubernetes configuration
7a81b2253d is described below

commit 7a81b2253d2928ea29a7caf296d455e182fec040
Author: Piotr P. Karwasz <[email protected]>
AuthorDate: Thu Jan 4 11:46:42 2024 +0100

    Fix typo in Kubernetes configuration
---
 .../java/org/apache/logging/log4j/kubernetes/ContainerUtil.java  | 3 ++-
 .../logging/log4j/kubernetes/KubernetesClientProperties.java     | 8 ++++++--
 src/changelog/.2.x.x/fix_typo_kubernetes.xml                     | 9 +++++++++
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git 
a/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/ContainerUtil.java
 
b/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/ContainerUtil.java
index 0d8499591f..814b2c11cf 100644
--- 
a/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/ContainerUtil.java
+++ 
b/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/ContainerUtil.java
@@ -40,8 +40,9 @@ public class ContainerUtil {
      * been much nicer if Kubernetes would just put the container id in a 
standard environment variable.
      *
      * @see <a 
href="http://stackoverflow.com/a/25729598/12916";>Stackoverflow</a> for a 
discussion on retrieving the containerId.
-     * @see <a 
href="https://github.com/jenkinsci/docker-workflow-plugin/blob/master/src/main/java/org/jenkinsci/plugins/docker/workflow/client/ControlGroup.java>ControlGroup</a>
+     * @see <a 
href="https://github.com/jenkinsci/docker-workflow-plugin/blob/master/src/main/java/org/jenkinsci/plugins/docker/workflow/client/ControlGroup.java";>ControlGroup</a>
      * for the original version of this. Not much is actually left but it 
provided good inspiration.
+     * @return The container id.
      */
     public static String getContainerId() {
         try {
diff --git 
a/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/KubernetesClientProperties.java
 
b/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/KubernetesClientProperties.java
index 98f68be599..0e3bac3811 100644
--- 
a/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/KubernetesClientProperties.java
+++ 
b/log4j-kubernetes/src/main/java/org/apache/logging/log4j/kubernetes/KubernetesClientProperties.java
@@ -32,7 +32,8 @@ public class KubernetesClientProperties {
     private static final String CLIENT_CERT_FILE = "clientCertFile";
     private static final String CLIENT_CERT_DATA = "clientCertData";
     private static final String CLIENT_KEY_FILE = "clientKeyFile";
-    private static final String CLIENT_KEY_DATA = "cientKeyData";
+    private static final String CLIENT_KEY_DATA = "clientKeyData";
+    private static final String CLIENT_KEY_DATA_TYPO = "cientKeyData";
     private static final String CLIENT_KEY_ALGO = "clientKeyAlgo";
     private static final String CLIENT_KEY_PASSPHRASE = "clientKeyPassphrase";
     private static final String CONNECTION_TIMEOUT = "connectionTimeout";
@@ -84,7 +85,10 @@ public class KubernetesClientProperties {
     }
 
     public String getClientKeyData() {
-        return props.getStringProperty(PREFIXES, CLIENT_KEY_DATA, 
base::getClientKeyData);
+        return props.getStringProperty(
+                PREFIXES,
+                CLIENT_KEY_DATA,
+                () -> props.getStringProperty(PREFIXES, CLIENT_KEY_DATA_TYPO, 
base::getClientKeyData));
     }
 
     public String getClientKeyAlgo() {
diff --git a/src/changelog/.2.x.x/fix_typo_kubernetes.xml 
b/src/changelog/.2.x.x/fix_typo_kubernetes.xml
new file mode 100644
index 0000000000..4758190445
--- /dev/null
+++ b/src/changelog/.2.x.x/fix_typo_kubernetes.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xmlns="http://logging.apache.org/log4j/changelog";
+       xsi:schemaLocation="http://logging.apache.org/log4j/changelog 
https://logging.apache.org/log4j/changelog-0.1.2.xsd";
+       type="fixed">
+  <description format="asciidoc">
+    Fix typo in Kubernetes `clientKeyData` configuration property.
+  </description>
+</entry>

Reply via email to