diff --git a/kubernetes_json_schema/schema/v1.23.6-standalone-strict/config-embeddedcluster-v1beta1.json b/kubernetes_json_schema/schema/v1.23.6-standalone-strict/config-embeddedcluster-v1beta1.json new file mode 100644 index 0000000..28f5ec1 --- /dev/null +++ b/kubernetes_json_schema/schema/v1.23.6-standalone-strict/config-embeddedcluster-v1beta1.json @@ -0,0 +1,242 @@ +{ + "description": "Config is the Schema for the configs API", + "type": "object", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "type": "object" + }, + "spec": { + "description": "ConfigSpec defines the desired state of Config", + "type": "object", + "properties": { + "extensions": { + "type": "object", + "properties": { + "helm": { + "description": "HelmExtensions specifies settings for cluster helm based extensions", + "type": "object", + "properties": { + "charts": { + "description": "ChartsSettings charts settings", + "type": "array", + "items": { + "description": "Chart single helm addon", + "type": "object", + "properties": { + "chartname": { + "type": "string" + }, + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + }, + "order": { + "type": "integer" + }, + "timeout": { + "description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.", + "type": "integer", + "format": "int64" + }, + "values": { + "type": "string" + }, + "version": { + "type": "string" + } + } + } + }, + "concurrencyLevel": { + "type": "integer" + }, + "repositories": { + "description": "RepositoriesSettings repository settings", + "type": "array", + "items": { + "description": "Repository describes single repository entry. Fields map to the CLI flags for the \"helm add\" command", + "type": "object", + "properties": { + "caFile": { + "type": "string" + }, + "certFile": { + "type": "string" + }, + "insecure": { + "type": "boolean" + }, + "keyfile": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string" + }, + "url": { + "type": "string" + }, + "username": { + "type": "string" + } + } + } + } + } + } + } + }, + "roles": { + "description": "Roles is the various roles in the cluster.", + "type": "object", + "properties": { + "controller": { + "description": "NodeRole is the role of a node in the cluster.", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "nodeCount": { + "description": "NodeCount holds a series of rules for a given node role.", + "type": "object", + "properties": { + "range": { + "description": "NodeRange contains a min and max or only one of them (conflicts\nwith Values).", + "type": "object", + "properties": { + "max": { + "description": "Max is the maximum number of nodes.", + "type": "integer" + }, + "min": { + "description": "Min is the minimum number of nodes.", + "type": "integer" + } + } + }, + "values": { + "description": "Values holds a list of allowed node counts.", + "type": "array", + "items": { + "type": "integer" + } + } + } + } + } + }, + "custom": { + "type": "array", + "items": { + "description": "NodeRole is the role of a node in the cluster.", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "type": "string" + }, + "nodeCount": { + "description": "NodeCount holds a series of rules for a given node role.", + "type": "object", + "properties": { + "range": { + "description": "NodeRange contains a min and max or only one of them (conflicts\nwith Values).", + "type": "object", + "properties": { + "max": { + "description": "Max is the maximum number of nodes.", + "type": "integer" + }, + "min": { + "description": "Min is the minimum number of nodes.", + "type": "integer" + } + } + }, + "values": { + "description": "Values holds a list of allowed node counts.", + "type": "array", + "items": { + "type": "integer" + } + } + } + } + } + } + } + } + }, + "unsupportedOverrides": { + "description": "UnsupportedOverrides holds the config overrides used to configure\nthe cluster.", + "type": "object", + "properties": { + "builtInExtensions": { + "description": "BuiltInExtensions holds overrides for the default add-ons we ship\nwith Embedded Cluster.", + "type": "array", + "items": { + "description": "BuiltInExtension holds the override for a built-in extension (add-on).", + "type": "object", + "required": [ + "name", + "values" + ], + "properties": { + "name": { + "description": "The name of the helm chart to override values of, for instance `openebs`.", + "type": "string" + }, + "values": { + "description": "YAML-formatted helm values that will override those provided to the\nchart by Embedded Cluster. Properties are overridden individually -\nsetting a new value for `images.tag` here will not prevent Embedded\nCluster from setting `images.pullPolicy = IfNotPresent`, for example.", + "type": "string" + } + } + } + }, + "k0s": { + "description": "K0s holds the overrides used to configure k0s. These overrides\nare merged on top of the default k0s configuration. As the data\nlayout inside this configuration is very dynamic we have chosen\nto use a string here.", + "type": "string" + } + } + }, + "version": { + "type": "string" + } + } + }, + "status": { + "description": "ConfigStatus defines the observed state of Config", + "type": "object" + } + } +} \ No newline at end of file diff --git a/pkg/kots/lint_test.go b/pkg/kots/lint_test.go index 3c31c28..59a683c 100644 --- a/pkg/kots/lint_test.go +++ b/pkg/kots/lint_test.go @@ -1642,6 +1642,29 @@ spec: }, expect: []LintExpression{}, }, + { + name: "embedded cluster no errors", + specFiles: SpecFiles{ + { + Name: "ec-config.yaml", + Path: "ec-config.yaml", + Content: `apiVersion: embeddedcluster.replicated.com/v1beta1 +kind: Config +spec: + version: "1.2.2+k8s-1.29" + roles: + controller: + name: management + labels: + management: "true" + custom: + - name: app + labels: + app: "true"`, + }, + }, + expect: []LintExpression{}, + }, } for _, test := range tests {