You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user specifies a CA in a GitRepo resource, the CA data should be put into a secret. The job that clones the repo and creates the bundle mounts the secret.
The secret was never created. However, the secret was mounted on the job's pod, so the job would never start. K8s will emit an event like this:
MountVolume.SetUp failed for volume "additional-ca" : secret "simple-cabundle" not found
Solution
The code to create the secret was re-added.
Testing
Engineering Testing
Manual Testing
We created the secret manually and observed the job to complete. We then added the code to create it, added a GitRepo with an arbitrary CA bundle and the job completed.
After deleting the GitRepo, the secret is removed, too.
Automated Testing
We only test that gitcloner works with a CA, apparently we don't have a test that makes sure the gitops controller creates the secret for the job.
The text was updated successfully, but these errors were encountered:
Create CA bundle by adding in option Select TLS Certificate Verification -> Specified additional certificates to be accepted and example Certificate as this one.
Create git repo
Checked CABundle secret is created and Gitrepo successfully deployed both in local and downstream clusters. In the screenshot can be seen before / after fix: Before fix: After fix:
Checked secret is removed after Gitrepo deletion
Checked after non-working example with fleet:v0.10.0 upgrading to rancher/fleet:v0.10.2-rc.4 and forcing update it works.
Further steps:
Added this example into QASE under https://app.qase.io/case/FLEET-142 to be automated
We will automate CA Bundle creation, ensure secret for this purpose is created and also removed after gitjob deletion.
Backport of #2824
Pull request content for Rancher QA verification.
Problem
When a user specifies a CA in a GitRepo resource, the CA data should be put into a secret. The job that clones the repo and creates the bundle mounts the secret.
The secret was never created. However, the secret was mounted on the job's pod, so the job would never start. K8s will emit an event like this:
fleet-local 46s Warning FailedMount pod/simple-aa0c4-4lrcx
Solution
The code to create the secret was re-added.
Testing
Engineering Testing
Manual Testing
We created the secret manually and observed the job to complete. We then added the code to create it, added a GitRepo with an arbitrary CA bundle and the job completed.
After deleting the GitRepo, the secret is removed, too.
Automated Testing
We only test that gitcloner works with a CA, apparently we don't have a test that makes sure the gitops controller creates the secret for the job.
The text was updated successfully, but these errors were encountered: