Skip to content

bug: resource not been full cleaned after using helm uninstall #1583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
liolay opened this issue Apr 25, 2025 · 2 comments
Open

bug: resource not been full cleaned after using helm uninstall #1583

liolay opened this issue Apr 25, 2025 · 2 comments

Comments

@liolay
Copy link

liolay commented Apr 25, 2025

Describe the issue

im using helm install fluent-operator, and after helm uninstall it ,operator removed first, pod which name start with fluent-bit is still keeps running, seems Own Ref (DaemonSet) not works as expected

To Reproduce

helm install...
all pods running...
helm uninstall...
fluent-operator been removed,and fluent-bit pods keeps running
helm install....
fluent-bit pods removed

Expected behavior

all resources should been cleared after helm charts be uninstalled

Your Environment

- Fluent Operator version:
- Container Runtime:
- Operating system:
- Kernel version:

How did you install fluent operator?

No response

Additional context

No response

@cw-Guo
Copy link
Collaborator

cw-Guo commented Apr 25, 2025

I am not familiar with helm uninstall, but to uninstall all stuffs, you have to make sure the operator pod itself is running when deleting the other custom resources. The operator itself should be deleted at the last.

@liolay
Copy link
Author

liolay commented Apr 27, 2025

I am not familiar with helm uninstall, but to uninstall all stuffs, you have to make sure the operator pod itself is running when deleting the other custom resources. The operator itself should be deleted at the last.

currently,we defined a clean job and annotated it with helm hook

{{- if .Values.operator.enable }}
apiVersion: batch/v1
kind: Job
metadata:
  name: pre-delete-fluent-bit-hook
  namespace: {{ .Release.Namespace }}
  annotations:
    "helm.sh/hook": pre-delete
    "helm.sh/hook-weight": "0"
    "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
spec:
  template:
    spec:
      serviceAccountName: fluent-operator
      containers:
        - name: cleanup
          image: {{.Values.cleanImage}}
          imagePullPolicy: IfNotPresent
          command:
            - "kubectl"
            - "delete"
            - "FluentBit"
            - "fluent-bit"
            - "--namespace={{ .Release.Namespace }}"
      restartPolicy: Never
{{- end }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants