2019-02-13 17:05:18 +01:00
|
|
|
{ config, lib, kubenix, ... }:
|
|
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
cfg = config.kubernetes.api.customresourcedefinitions.crontabs;
|
|
|
|
|
in {
|
2019-03-07 23:23:07 +01:00
|
|
|
imports = with kubenix.modules; [ test k8s ];
|
2019-02-13 17:05:18 +01:00
|
|
|
|
|
|
|
|
test = {
|
2019-02-20 23:09:08 +01:00
|
|
|
name = "k8s-1.13-crd";
|
2019-02-13 17:05:18 +01:00
|
|
|
description = "Simple test tesing CRD for k8s 1.13";
|
|
|
|
|
enable = builtins.compareVersions config.kubernetes.version "1.13" >= 0;
|
|
|
|
|
assertions = [{
|
|
|
|
|
message = "should have versions set";
|
|
|
|
|
assertion = (head cfg.spec.versions).name == "v1";
|
|
|
|
|
}];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
kubernetes.api.customresourcedefinitions.crontabs = {
|
|
|
|
|
metadata.name = "crontabs.stable.example.com";
|
|
|
|
|
spec = {
|
|
|
|
|
group = "stable.example.com";
|
|
|
|
|
versions = [{
|
|
|
|
|
name = "v1";
|
|
|
|
|
served = true;
|
|
|
|
|
storage = true;
|
|
|
|
|
}];
|
|
|
|
|
scope = "Namespaced";
|
|
|
|
|
names = {
|
|
|
|
|
plural = "crontabs";
|
|
|
|
|
singular = "crontab";
|
|
|
|
|
kind = "CronTab";
|
|
|
|
|
shortNames = ["ct"];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|