question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CustomResourceDefinition validation fails for type map[string]string

See original GitHub issue

Describe the bug Applying a custom resource definition with type map[string]string for a field to a Kubernetes v1.20 cluster yields a validation error

The CustomResourceDefinition "{mycrd.com}" is invalid: {long path into the crd}.type: Unsupported value: "map[string]string": supported values: "array", "boolean", "integer", "number", "object", "string"

which makes Dictionary<string, string> as a data type for a custom resource unusable.

To Reproduce Define entities for a custom resource definition with the data type Dictionary<string,string> . (Try to) apply the CRD generated by KubeOps to your Kubernetes cluster.

Expected behavior Validation should succeed and the CRD should be registered in the cluster.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
anekdoticommented, Feb 21, 2022

Can you provide some information? Do you know why Kubernetes does not accept it? Because the discussion over here: #348 @hypnopotamus stated that is should be possible.

Thank you very much for rolling this feature back. Sorry for my very late reply - I lost track of the thread. As @hypnopotamus also said, I think it was just never a feature of the schema definitions - the error message was also clear about the types that are supported.

0reactions
github-actions[bot]commented, Feb 13, 2022

🎉 This issue has been resolved in version 6.2.10 🎉

The release is available on:

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

CustomResourceDefinitions should support maps in ...
I'm getting an error while trying to use patternProperties : PatternProperties: map[string]apiext_v1b1.JSONSchemaProps{ ".*": { Type ...
Read more >
Extend the Kubernetes API with CustomResourceDefinitions
The request of CRDs create/update will fail if compilation of validation rules fail. Compilation process includes type checking as well. The ...
Read more >
kubernetes.apiextensions.k8s.io.v1beta1. ...
CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.
Read more >
kubernetes.apiextensions.k8s.io.v1. ...
reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status...
Read more >
Deploy Kubernetes Custom Resources using CRDs
If the steadyStateCondition fails, Harness logs the following error message: Status check for resources in namespace [[namespace]] failed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found