So secrets are not correctly handle. Am I falling inside the situation as describe is the doc ?:
Unlike docker pipelines, the pipeline status is passed to steps by file as opposed to environment variable. Existing plugins may not be compatible with kubernetes pipelines and will need to be patched accordingly. See how we patched the Slack plugin.
Ok, I fork the drone-mvn-auth plugin to add the code that handle kubernetes environment file
// If kubernetes env file exist, load it and overwrite existing env variable.
// @see https://docs.drone.io/runner/kubernetes/overview/ Known Issues / Differences
log(`Kubernetes mode: ${fs.existsSync('/run/drone/env')}`);
if(fs.existsSync('/run/drone/env')) {
const envConfig = dotenv.parse(fs.readFileSync('/run/drone/env'));
for (const k in envConfig) {
log(`Kubernetes env: ${k} : ${envConfig[k]}`);
process.env[k] = envConfig[k];
}
}
But the secret are not present in environment. I re-read the doc that says i must deploy drone-secret inside the same pod as drone-runner. Ok it’s done. it does not work. Debugging the runner, i can see this:
Ok I Just tried to defined secret repository via drone web ui. This does not work too. when i log the settings passed to the plugin, i get this from process.env.
I do not think that is an accurate statement. You can use secrets with this and any plugin, but you cannot use from_secret in nested attributes. You can use from_secret with the top level attributes, like this:
settings:
servers:
from_secret: ....
… where the secret contains the JSON representation of the servers value (similar to this comment). Taking a step back, plugins should only use primitive types and arrays of primitive types as settings, and should not use complex objects in the settings section. This particular plugin does not follow these guidelines, hence the confusion you are facing.