pipecd icon indicating copy to clipboard operation
pipecd copied to clipboard

Cannot delete DatadogAgent Resource

Open peaceiris opened this issue 1 year ago • 0 comments

What happened:

In our KubernetesApp, I’m attempting to delete an obsolete DatadogAgent resource using the following kustomization.yaml file:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: datadog

According to a plan preview, the resource appears as a deletion target, as shown below:

--- Last Deploy
+++ Head Commit

- 1. name="datadog", kind="DatadogAgent", namespace="datadog", apiVersion="datadoghq.com/v2alpha1"

However, when deploying with PipeCD, it’s determined that the deletion target resource does not exist, resulting in the manifest remaining undeleted:

[2024-08-09 12:39:15 +09:00]
Preparing deploy source at target commit (abd85be16f883b98b6b94e27e936d89b892ac279)
[2024-08-09 12:39:24 +09:00]
Successfully cloned the target commit
[2024-08-09 12:39:24 +09:00]
Successfully loaded the application configuration file
[2024-08-09 12:39:25 +09:00]
Successfully prepared deploy source at target commit (abd85be16f883b98b6b94e27e936d89b892ac279)
[2024-08-09 12:39:25 +09:00]
Loading manifests at commit abd85be16f883b98b6b94e27e936d89b892ac279 for handling
[2024-08-09 12:39:25 +09:00]
Successfully loaded 0 manifests
[2024-08-09 12:39:25 +09:00]
Start applying 0 manifests to "datadog" namespace
[2024-08-09 12:39:25 +09:00]
Successfully applied 0 manifests
[2024-08-09 12:39:25 +09:00]
Waiting for the applied manifests to be stable
[2024-08-09 12:39:40 +09:00]
Start finding all running resources but no longer defined in Git
[2024-08-09 12:39:40 +09:00]
Successfully loaded 0 live resources
[2024-08-09 12:39:40 +09:00]
There are no live resources should be removed

How can we delete the DatadogAgent resource as intended?

What you expected to happen:

We expect the DatadogAgent to be deleted.

How to reproduce it:

Environment:

  • piped version: v0.48.3
  • control-plane version:
  • Others:
apiVersion: pipecd.dev/v1beta1
kind: KubernetesApp
spec:
  name: datadog-agent
  labels:
    env: REDACTED
    team: REDACTED
  input:
    namespace: datadog
    kustomizeVersion: 5.0.1
    kustomizeOptions:
      load-restrictor: "LoadRestrictionsNone"
  quickSync:
    prune: true

peaceiris avatar Nov 14 '24 07:11 peaceiris