Cannot delete DatadogAgent Resource
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.4k
- Forks
- 364
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 84
Description
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:
pipedversion:v0.48.3control-planeversion:- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the deployment with the KubernetesApp configuration, kustomization.yaml, and piped v0.48.3 described here. Trace the prune flow from loading zero manifests through finding live resources, then verify that an obsolete DatadogAgent is detected and deleted when prune is enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100