Cert-manager: podLabels should be podSpecs

Created on 31 May 2020  路  4Comments  路  Source: jetstack/cert-manager

Describe the bug:
Declaration of podLabels.podDnsConfig in values.yaml has no effect, even causes an error, as this information should get to the spec instead of labels.

Expected behaviour:
Generated Deployment should have following template-specs

      dnsConfig:
        nameservers:
        - 8.8.8.8
      dnsPolicy: None

when declaring these in the values.yaml

What happens instead:

error: error validating "STDIN": error validating data: ValidationError(Deployment.spec.template.metadata.labels.podDnsConfig): invalid type for io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.labels: got "map", expected "string"; if you choose to ignore these errors, turn validation off with --validate=false

this happens because we cannot fit a map into a label

Steps to reproduce the bug:
Set values here https://github.com/jetstack/cert-manager/blob/bd5cd5169b0035c7a1e7e1282e0b4fa347a147dd/deploy/charts/cert-manager/values.yaml#L121
and install via helm

Anything else we need to know?:

Environment details::

  • Kubernetes version : v1.15.11
  • Cloud-provider/provisioner : AKS
  • cert-manager version : v0.15.1
  • Install method: helm

/kind bug

kinbug

All 4 comments

The podDnsConfig block should not be nested under podLabels. These are two distinct top level fields.

It may be worth us adding a bit of extra whitespace into that values.yaml file to make this clearer 馃槃

Oh this is embarassing!

Thanks for the clarification!

This can be closed as far as Im concerned :)

I had a feeling you wouldn't be the last one to think this so I added a new line in https://github.com/jetstack/cert-manager/pull/2976

Was this page helpful?
0 / 5 - 0 ratings