OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

Kubernetes object status check not finishing while all objects are shown as successful #8206

Closed ghost closed 1 year ago

ghost commented 1 year ago

Severity

A few customers are affected, workarounds exist

Version

This issue is to track the release of a fixed bug. It is fixed as of 2023.3.4068

Latest Version

Not applicable

What happened?

When I enable the Kubernetes Object Status Check feature on a "Deploy a Kubernetes Container" step, all the resources listed on the "OBJECT STATUS" tab are deployed successfully, but the status check keeps running rather than completing the deployment. If I also have an execution timeout defined for the step, the execution will timeout eventually.

Screenshot 2023-06-19 at 2 37 29 PM

Note in this screenshot, all objects are deployed successfully, but the status check keeps running.

Reproduction

Create a Deploy a Kubernetes Container step, enable the Kubernetes Object Status option (which is enabled by default).

Make sure at least one of the ConfigMap or Secret section is left empty. This is the key of reproducing this issue.

Screenshot 2023-06-19 at 2 35 46 PM

Create deployment, observe that the deployment does not complete despite all resources are deploy successfully.

Error and Stacktrace

When this bug is encountered, we should see task log similar to this:

02:40:13   Verbose  |       Performing resource status checks on the following resources:
02:40:13   Verbose  |       - Secret/octopus-feedcred-feeds-1041 in namespace robe-namespace
02:40:13   Verbose  |       - Deployment/test in namespace robe-namespace
02:40:13   Verbose  |       - Secret/#{Octopus.Action.KubernetesContainers.SecretName}-deployments-463 in namespace robe-namespace
02:40:13   Verbose  |       - ConfigMap/#{Octopus.Action.KubernetesContainers.ConfigMapName}-deployments-463 in namespace robe-namespace

Note that there are #{Octopus.Action.KubernetesContainers.SecretName} and #{Octopus.Action.KubernetesContainers.ConfigMapName} unsubstituted.

More Information

This bug has already been fixed in https://github.com/OctopusDeploy/Calamari/pull/1065.

It is on its way of being released. The fix should be available after release 2023.3.4068.

Workaround

If you are experiencing this bug, you can work around this by manually turn off the "ConfigMap" and "Secret" features that are not used.

On the process configuration page, go "CONFIGURE FEATURES", then unselected the unused "ConfigMap" and "Secret" features.

Screenshot 2023-06-19 at 2 37 51 PM Screenshot 2023-06-19 at 2 38 01 PM

Create another deployment, this time it should work.

Screenshot 2023-06-19 at 2 46 39 PM
Octobob commented 1 year ago

:tada: The fix for this issue has been released in:

Release stream Release
2023.3 2023.3.3705
2023.4+ all releases