Reloader: [BUG] The deployment "reloader-reloader" is invalid

Describe the bug After namespace fields have been added to Reloader in https://github.com/stakater/Reloader/commit/cca62bd458e154029f3cbf8397e36fd36baa14bb my Reloader Kubernetes deployment fails. I’m using Reloader with Kustomize and get the following error:

The Deployment “reloader-reloader” is invalid: spec.template.metadata.labels: Invalid value: map[string]string(nil): selector does not match template labels

To Reproduce I have a Kustomization file that looks as follows:

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

bases:
  - https://github.com/stakater/Reloader/deployments/kubernetes

resources:
  - namespace.yaml

namespace: reloader

and a namespace.yaml file that looks like this:

apiVersion: v1
kind: Namespace
metadata:
  name: reloader
  labels:
    name: reloader

Expected behavior Reloader was working fine until yesterday.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (11 by maintainers)

Most upvoted comments

Thanks a lot. It does work again now 😄

@casper-onboard in that case, could you please close the issue?

Thanks a lot. It does work again now 😄

I’m not a 100% sure on how to fix it. My guess would be to add the following to deployment.yaml, but I’m not sure.

spec:
  template:
    metadata:
      labels:
        app: reloader-reloader
        release: "reloader"

So if you have time to create a PR for this and fix it that would be great actually.