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
The image-automation-controller knew about updated images and was trying to push new commits like this:
kubectl -n flux-system describe ImageUpdateAutomation
...
Status:
Conditions:
Last Transition Time: 2021-07-06T19:07:33Z
Message: committed and pushed f4785c946c7f006c85c29eef08a58ac878f7c7c8 to main
Reason: ReconciliationSucceeded
Status: True
Type: Ready
Last Automation Run Time: 2021-07-06T19:48:15Z
Last Push Commit: f4785c946c7f006c85c29eef08a58ac878f7c7c8
Last Push Time: 2021-07-06T19:48:15Z
Observed Generation: 1
logged
{"level":"info","ts":"2021-07-06T19:48:21.481Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"pushed commit to origin","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"tenants","namespace":"flux-system","revision":"f4785c946c7f006c85c29eef08a58ac878f7c7c8","branch":"main"}
That commit f4785c946c7f006c85c29eef08a58ac878f7c7c8 never appeared in the GitHub UI or manual pull or via a GitRepository resource. The GitHub repo had been configured with slightly-more-draconian push restrictions to the main branch. The GitRepository is using gitImplementation: libgit2.
I am presuming that Flux's push attempt would have gotten back something similar to a manual push like...
git push
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 12 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 286 bytes | 286.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: At least 1 approving review is required by reviewers with write access.
To github.com:org/repo.git
! [remote rejected] main -> main (protected branch hook declined)
error: failed to push some refs to 'github.com:org/repo.git'
When the branch restrictions were loosened a bit, a subsequent commit+push attempt succeeded.
Status:
Conditions:
Last Transition Time: 2021-07-06T19:07:33Z
Message: no updates made; last commit a0fc446 at 2021-07-06T19:52:39Z
Reason: ReconciliationSucceeded
Status: True
Type: Ready
Last Automation Run Time: 2021-07-06T19:54:51Z
Last Push Commit: a0fc4462ce7cd99c212ad4f512ec2ff7ac363fa3
Last Push Time: 2021-07-06T19:52:39Z
Observed Generation: 1
logged
{"level":"info","ts":"2021-07-06T19:52:46.033Z","logger":"controller-runtime.manager.controller.imageupdateautomation","msg":"pushed commit to origin","reconciler group":"image.toolkit.fluxcd.io","reconciler kind":"ImageUpdateAutomation","name":"tenants","namespace":"flux-system","revision":"a0fc4462ce7cd99c212ad4f512ec2ff7ac363fa3","branch":"main"}
Commit a0fc4462ce7cd99c212ad4f512ec2ff7ac363fa3 appeared in the GitHub UI & manual pull & via a GitRepository resource.
Concern:
Nothing in the kubectl describe output or controller logs reflected any push failure. I think the only way the above would have been logged is if this push() function didn't produce an err when this happened?
The
image-automation-controller
knew about updated images and was trying to push new commits like this:logged
That commit
f4785c946c7f006c85c29eef08a58ac878f7c7c8
never appeared in the GitHub UI or manual pull or via a GitRepository resource. The GitHub repo had been configured with slightly-more-draconian push restrictions to themain
branch. The GitRepository is usinggitImplementation: libgit2
.I am presuming that Flux's push attempt would have gotten back something similar to a manual push like...
When the branch restrictions were loosened a bit, a subsequent commit+push attempt succeeded.
logged
Commit
a0fc4462ce7cd99c212ad4f512ec2ff7ac363fa3
appeared in the GitHub UI & manual pull & via a GitRepository resource.Concern:
Nothing in the
kubectl describe
output or controller logs reflected any push failure. I think the only way the above would have been logged is if thispush()
function didn't produce an err when this happened?image-automation-controller/controllers/imageupdateautomation_controller.go
Lines 668 to 681 in 5711c59
The text was updated successfully, but these errors were encountered: