UNCLASSIFIED - NO CUI

Skip to content

Resolve "Update k3d config api version"

razzle requested to merge 47-update-k3d-config-api-version into master

Closes #47 (closed)

Schema for k3d config file changed: https://github.com/k3d-io/k3d/blob/main/pkg/config/v1alpha3/schema.json#L24 --> https://github.com/k3d-io/k3d/blob/main/pkg/config/v1alpha4/schema.json#L17 .

name property is no longer top level. It is metadata.name instead.

Discovered using the JS library json-schema:

var Validator = require("jsonschema").Validator;
var v = new Validator();

const schema = require("./schema.json"); // schema from https://github.com/k3d-io/k3d/blob/main/pkg/config/v1alpha4/schema.json

const yaml = require("js-yaml");
const fs = require("fs");

const doc = yaml.load(fs.readFileSync("./clusters/k3d/dependencies/k3d/config.yaml", "utf8"));

const isValid = v.validate(doc, schema);

console.log(isValid);
...
  errors: [
    ValidationError {
      path: [],
      property: 'instance',
      message: 'is not allowed to have the additional property "name"',
      schema: [Object],
      instance: [Object],
      name: 'additionalProperties',
      argument: 'name',
      stack: 'instance is not allowed to have the additional property "name"'
    }
  ],
...

(previous) Failing pipeline: https://repo1.dso.mil/platform-one/big-bang/pipeline-templates/package-validation/-/pipelines/794671

Passing pipeline: https://repo1.dso.mil/platform-one/big-bang/pipeline-templates/package-validation/-/pipelines/794685

Edited by razzle

Merge request reports