Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Expand Standard Values #4

@RichiCoder1

Description

@RichiCoder1

A lot of helm charts follow standard values. Fields like serviceAccount, image, resources, etc...

It'd be cool if, either via a comment like # $type: resources, or just smart detection, schema gen could "fill-in" the schema for standard fields.

So resources would from

        "resources": {
            "type": "object"
        },

to

              "resources": {
                "description": "ResourceRequirements describes the compute resource requirements.",
                "properties": {
                  "limits": {
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      ]
                    },
                    "description": "Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/",
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "requests": {
                    "additionalProperties": {
                      "oneOf": [
                        {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        {
                          "type": [
                            "number",
                            "null"
                          ]
                        }
                      ]
                    },
                    "description": "Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/",
                    "type": [
                      "object",
                      "null"
                    ]
                  }
                },
                "type": [
                  "object",
                  "null"
                ]
              },

Could possibly use https://github.com/instrumenta/kubernetes-json-schema as an update to date src for these fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions