Closed dashashutosh24 closed 1 year ago
Seems like you are missing knows_hosts file for ssh. You can manually add known_hosts file or choose one of the strategies under manage Jenkins -> configure global security and pick one of the strategies like ‘Accept first connection’ etc.
I have added the proper keys in the form of secrets and configured the same as part of spec.seedJobs for jenkins master. Shouldn’t the operator take care of populating the known hosts file on the seed agent with the mentioned secret? I can see the secret was successfully added as credential in jenkins but operator didn’t add this secret to known hosts file on the seed agent.
This part of the configuration is done by Jenkins CASC, you can populate the know hosts via the webui and then save that part of the casc as part of the jekins configuration, more specifically:
security:
[....]
gitHostKeyVerificationConfiguration:
sshHostKeyVerificationStrategy:
manuallyProvidedKeyVerificationStrategy:
approvedHostKeys: "<HERE>"
[....]
to configure the casc you can check the chart values: https://github.com/jenkinsci/kubernetes-operator/blob/a690c7cc6c037bb1662ab7ef358ed320880916a7/chart/jenkins-operator/values.yaml#L273-L278 and the link to the operator site as example :)
Thanks a lot! This worked. Closing this issue now.
I am facing an issue with running seed jobs via jenkins operator. I have configured the git repo and ssh creds where jobs written in dsl are present. The seed agent is also properly spinning up and I can see the ssh key under credentials as well. But still I am facing this issue. I checked the logs as well, but I cannot find anything unusual.