Currently, this plugin will use secret's name as the credential ID to create a credential. It may cause problems when there are secrets have the same name but in different namespaces.

      It is better to use namespace and name to generate the credential ID - like '{namespace}-{name}'.

          [JENKINS-57328] Should not use secret name as credential ID

          James Nord added a comment -

          we only support a single namespace so this should not be an issue unless JENKINS-57329 is implemented

          James Nord added a comment - we only support a single namespace so this should not be an issue unless JENKINS-57329 is implemented

          Ankur Patel added a comment -

          For my case, I am using a Helm Chart to deploy Jenkins and its naming standard prefixes the secret names with the chart name. (ex: '{chartName}-{credname}'.)   I've resolved to modify the secret template and use the name as written to get around this, so breaking convention to workaround it.

          Another issue is that, Kubernetes naming convention doesn't allow mixed-case names.  So credential names are forced to follow the same convention. ("lower case alphanumeric characters, -, and .")   Not a terrible issue, just forced to update all the pipelines.

          So this change would afford a good deal of flexibility.

          Ankur Patel added a comment - For my case, I am using a Helm Chart to deploy Jenkins and its naming standard prefixes the secret names with the chart name. (ex: '{chartName}-{credname}'.)   I've resolved to modify the secret template and use the name as written to get around this, so breaking convention to workaround it. Another issue is that, Kubernetes naming convention doesn't allow mixed-case names.  So credential names are forced to follow the same convention. ("lower case alphanumeric characters, - , and . ")   Not a terrible issue, just forced to update all the pipelines. So this change would afford a good deal of flexibility.

          Gareth Evans added a comment -

          Gareth Evans added a comment - https://github.com/jenkinsci/kubernetes-credentials-provider-plugin/pull/53 may help here

            teilo James Nord
            cizezsy Shenyu Zheng
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: