Skip to content

Commit

Permalink
feat: add structs for vcluster configuration defaults & validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lizardruss committed Feb 27, 2024
1 parent 87dac6b commit 56a1d92
Show file tree
Hide file tree
Showing 4,412 changed files with 99,838 additions and 19 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 7 additions & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
__webpack_public_path__ = "/docs/";

const resolveGlob = require('resolve-glob');

module.exports = {
title: "vcluster docs | Virtual Clusters for Kubernetes",
tagline: "Virtual Clusters for Kubernetes",
Expand Down Expand Up @@ -77,11 +79,15 @@ module.exports = {
editUrl: "https://github.com/loft-sh/vcluster/edit/main/docs/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
// customCss: require.resolve("./src/css/custom.css"),
customCss: resolveGlob.sync(['./src/css/**/*.scss'])
},
},
],
],
plugins: [
'docusaurus-plugin-sass',
],
scripts: [
{
src: "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",
Expand Down
5 changes: 4 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
"@docusaurus/preset-classic": "^2.4.1",
"classnames": "^2.2.6",
"docusaurus-gtm-plugin": "^0.0.2",
"docusaurus-plugin-sass": "^0.2.5",
"mdx-link-checker": "^0.1.1",
"react": "^16.8.4",
"react-dom": "^16.8.4"
"react-dom": "^16.8.4",
"resolve-glob": "^1.0.0",
"sass": "^1.71.1"
},
"browserslist": {
"production": [
Expand Down
17 changes: 17 additions & 0 deletions docs/pages/configuration/_partials/access.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialAccessreference from "./access_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

## `access` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access}



</summary>

<PartialAccessreference />


</details>
17 changes: 17 additions & 0 deletions docs/pages/configuration/_partials/access/audit.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialAuditreference from "./audit_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

### `audit` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit}



</summary>

<PartialAuditreference />


</details>
13 changes: 13 additions & 0 deletions docs/pages/configuration/_partials/access/audit/enabled.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

#### `enabled` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">boolean</span> <span className="config-field-default">false</span> <span className="config-field-enum"></span> {#access-audit-enabled}



</summary>



</details>
13 changes: 13 additions & 0 deletions docs/pages/configuration/_partials/access/audit/level.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

#### `level` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">integer</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-level}

TODO validate log levels

</summary>



</details>
17 changes: 17 additions & 0 deletions docs/pages/configuration/_partials/access/audit/policy.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialPolicyreference from "./policy_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

#### `policy` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy}



</summary>

<PartialPolicyreference />


</details>
17 changes: 17 additions & 0 deletions docs/pages/configuration/_partials/access/audit/policy/rules.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialRulesreference from "./rules_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

##### `rules` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object[]</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy-rules}



</summary>

<PartialRulesreference />


</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

<details className="config-field" data-expandable="false" open>
<summary>

###### `apiGroups` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string[]</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy-rules-apiGroups}

APIGroups is the name of the APIGroup that contains the resources. If multiple API groups are specified, any action requested against one of
the enumerated resources in any API group will be allowed. "" represents the core API group and "*" represents all API groups.

</summary>



</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

<details className="config-field" data-expandable="false" open>
<summary>

###### `nonResourceURLs` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string[]</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy-rules-nonResourceURLs}

NonResourceURLs is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path
Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding.
Rules can either apply to API resources (such as "pods" or "secrets") or non-resource URL paths (such as "/api"), but not both.

</summary>



</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

###### `resourceNames` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string[]</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy-rules-resourceNames}

ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.

</summary>



</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

###### `resources` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string[]</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy-rules-resources}

Resources is a list of resources this rule applies to. '*' represents all resources.

</summary>



</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

###### `verbs` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string[]</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy-rules-verbs}

Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. '*' represents all verbs.

</summary>



</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

import PartialVerbs from "./rules/verbs.mdx"
import PartialApigroups from "./rules/apiGroups.mdx"
import PartialResources from "./rules/resources.mdx"
import PartialResourcenames from "./rules/resourceNames.mdx"
import PartialNonresourceurls from "./rules/nonResourceURLs.mdx"

<PartialVerbs />


<PartialApigroups />


<PartialResources />


<PartialResourcenames />


<PartialNonresourceurls />
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialRulesreference from "./policy/rules_reference.mdx"


<details className="config-field" data-expandable="true">
<summary>

##### `rules` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">object[]</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy-rules}



</summary>

<PartialRulesreference />


</details>
25 changes: 25 additions & 0 deletions docs/pages/configuration/_partials/access/audit_reference.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

import PartialEnabled from "./audit/enabled.mdx"
import PartialLevel from "./audit/level.mdx"
import PartialPolicyreference from "./audit/policy_reference.mdx"

<PartialEnabled />


<PartialLevel />



<details className="config-field" data-expandable="true">
<summary>

#### `policy` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit-policy}



</summary>

<PartialPolicyreference />


</details>
17 changes: 17 additions & 0 deletions docs/pages/configuration/_partials/access_reference.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialAuditreference from "./access/audit_reference.mdx"


<details className="config-field" data-expandable="true">
<summary>

### `audit` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#access-audit}



</summary>

<PartialAuditreference />


</details>
17 changes: 17 additions & 0 deletions docs/pages/configuration/_partials/controlPlane.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialControlplanereference from "./controlPlane_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

## `controlPlane` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#controlPlane}



</summary>

<PartialControlplanereference />


</details>
17 changes: 17 additions & 0 deletions docs/pages/configuration/_partials/controlPlane/advanced.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialAdvancedreference from "./advanced_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

### `advanced` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#controlPlane-advanced}



</summary>

<PartialAdvancedreference />


</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

#### `defaultImageRegistry` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">string</span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#controlPlane-advanced-defaultImageRegistry}



</summary>



</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

<details className="config-field" data-expandable="false" open>
<summary>

#### `headless` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type">boolean</span> <span className="config-field-default">false</span> <span className="config-field-enum"></span> {#controlPlane-advanced-headless}



</summary>



</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialMetadatareference from "./metadata_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

#### `metadata` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#controlPlane-advanced-metadata}



</summary>

<PartialMetadatareference />


</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

import PartialAllresourcesreference from "./allResources_reference.mdx"


<details className="config-field" data-expandable="true" open>
<summary>

##### `allResources` <span className="config-field-required" data-required="false">required</span> <span className="config-field-type"></span> <span className="config-field-default"></span> <span className="config-field-enum"></span> {#controlPlane-advanced-metadata-allResources}



</summary>

<PartialAllresourcesreference />


</details>
Loading

0 comments on commit 56a1d92

Please sign in to comment.