The private key in configuration-as-code placed under referenceContent of EC2 cloud is successfully imported, however jobs fail to connect to EC2 slaves. Once the (SAME) private key is configured MANUALLY through the UI, it works fine.
Steps to reproduce:
Install Jenkins using Helm chart (codecentric) and configure private key in values.yaml for this chart.
Run helm install
Run a job that uses EC2 slave
Job fails
Manually import private key in Jenkins system config