pipe-cd / pipe-cd/pipecd

Can't delete the resources when enabling the prune option in K8S_PRIMARY_ROLLOUT after deleting the manifests

Open
#4,933 1 comment 1 reaction 1 assignee View on GitHub

@ffjlabo is already working on this.

Since May 31, 2024.

kind/bug
Dominant language
Go
Stars
1.4k
Forks
364
Avg merge
1d 4h
Merged PRs (30d)
84

Description

What happened:

When I use the PipelineSync, including K8S_PRIMARY_ROLLOUT, sometimes the pruning doesn't work.

What you expected to happen:

It would be nice to delete resources when enabling the prune option in K8S_PRIMARY_ROLLOUT after deleting the manifests.

How to reproduce it:

Using the config below, do the step-by-step instructions.

1. Delete target manifests
Deelte_deploymnt_by_ffjlabo_·_Pull_Request__92_·_ca-dp_ffjlabo-dev

2. set prune: true for the K8S_PRIMARY_ROLLOUT stage
add_prune_option_by_ffjlabo_·_Pull_Request__93_·_ca-dp_ffjlabo-dev

3. re PipelineSync
pruning is working but don't detect the diff with the livestate.
PipeCD


refecence

app.pipecd.yaml
apiVersion: pipecd.dev/v1beta1
kind: KubernetesApp
spec:
  name: canary
  labels:
    env: example
    team: product
  planner:
    alwaysUsePipeline: true
  pipeline:
    stages:
      # Deploy the workloads of CANARY variant. In this case, the number of
      # workload replicas of CANARY variant is 10% of the replicas number of PRIMARY variant.
      - name: K8S_CANARY_ROLLOUT
        with:
          replicas: 10%
      # Wait 10 seconds before going to the next stage.
      - name: WAIT
        with:
          duration: 10s
      # Update the workload of PRIMARY variant to the new version.
      - name: K8S_PRIMARY_ROLLOUT
        with:
          prune: true
      # Destroy all workloads of CANARY variant.
      - name: K8S_CANARY_CLEAN
  description: |
    This app demonstrates how to deploy a Kubernetes app by Canary strategy without requering any mesh.\
    References: [adding a new app](https://pipecd.dev/docs/user-guide/managing-application/adding-an-application/), [app configuration](https://pipecd.dev/docs/user-guide/configuration-reference/)

target resource

- deployment

Environment:

  • piped version:
  • control-plane version:
  • Others:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.