Skip to content

Commit

Permalink
Skip install loop for invalid patches (#3040)
Browse files Browse the repository at this point in the history
This should prevent the Fleet agent from repeatedly trying to install a
release with an invalid patch when trying to undo drift on a service's
ports, which can only be rolled back in force mode so far, ie by
uninstalling and reinstalling the release.
In turn, this may prevent the original, valid release revision from
disappearing, which caused discrepancies in version numbers between Helm
history and the bundle deployment status, leading to sets of resources
being emptied and eventually to bundles appearing as ready for drifting
bundle deployments.
  • Loading branch information
weyfonk authored Nov 8, 2024
1 parent 60e6d51 commit 02e4067
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/cmd/agent/deployer/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ func deployErrToStatus(err error, status fleet.BundleDeploymentStatus) (bool, fl
"(YAML parse error)|" + // YAML is broken in source files
"(Forbidden: updates to [0-9A-Za-z]+ spec for fields other than [0-9A-Za-z ']+ are forbidden)|" + // trying to update fields that cannot be updated
"(Forbidden: spec is immutable after creation)|" + // trying to modify immutable spec
"(cannot patch.*is invalid)|" + // trying to apply an invalid patch (eg. undoing a port edit on a Service)
"(chart requires kubeVersion: [0-9A-Za-z\\.\\-<>=]+ which is incompatible with Kubernetes)", // trying to deploy to incompatible Kubernetes
)
if re.MatchString(msg) {
Expand Down

0 comments on commit 02e4067

Please sign in to comment.