0

In the data: section of my values.yaml, I have a schema that gets a bit unwieldy. This schema is used in a configMap. Later, a Spark job uses this configMap to create tables. This file is getting big, so I am trying to split off each schema definition in its own file:

"schemas": {
        "core": {
            "tables": {
                "books": { "$ref": "../schemas/core/books.json"},
                "trucks": {"$ref": "../schemas/core/trucks.json"},
                "lanes": {"$ref": "../schemas/core/lanes.json"}
            }
        },
        "dashboards": {
             "tables": {
                 ...

The problem is $ref pointing to an outside file, doesn't work. The tables specified with $ref do not work. If I substitute the values with explicit JSON objects, it does. Does the $ref keyword, valid in JSON, work for this purpose? If not, what is the best way to approach referencing external files?

My directory structure:

// top
/provisioning
    /schemas
       /core
          ..books.json
          ..trucks.json
          ..lanes.json
       /dashboards
    /templates
       /values.yaml

Is what I'm doing possible? Are my directories and files set up correctly to do this?

Snap E Tom
  • 101
  • 1

0 Answers0