Skip to content
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

Kubernetes doesn't garbage collect child config maps in leader election #371

Closed
jkobejs opened this issue Jul 8, 2022 · 0 comments · Fixed by #372
Closed

Kubernetes doesn't garbage collect child config maps in leader election #371

jkobejs opened this issue Jul 8, 2022 · 0 comments · Fixed by #372

Comments

@jkobejs
Copy link
Contributor

jkobejs commented Jul 8, 2022

In leader election config map lock is created with owner resourceType instead of kind for kind field
Because of that Kubernetes cannot garbage collect lock

Current behaviour:

apiVersion: v1
kind: ConfigMap
metadata:
  name: lock
  namespace: deafult
  ownerReferences:
  - apiVersion: v1
    blockOwnerDeletion: true
    controller: true
    kind: pods
    name: pod-5c56676969-m5dtr
    uid: 1052063d-a0ae-4639-bcdc-ecc4d0d440c5

Expected

apiVersion: v1
kind: ConfigMap
metadata:
  name: lock
  namespace: deafult
  ownerReferences:
  - apiVersion: v1
    blockOwnerDeletion: true
    controller: true
    kind: Pod
    name: pod-5c56676969-m5dtr
    uid: 1052063d-a0ae-4639-bcdc-ecc4d0d440c5
@jkobejs jkobejs changed the title Kubernetes doesn't garbage collect orphan config maps in leader election Kubernetes doesn't garbage collect child config maps in leader election Jul 8, 2022
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.

1 participant