Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add policy schema display #1289

Merged
merged 7 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
</div>

<script async defer src="https://buttons.github.io/buttons.js"></script>
<script defer src="https://brianwendt.github.io/json-schema-md-doc/lib/JSONSchemaMarkdown.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.0/showdown.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions app/_src/policies/meshcircuitbreaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -579,3 +579,7 @@ spec:
We will apply the configuration with `kumactl apply -f [..]` or via the [HTTP API](/docs/{{ page.version }}/reference/http-api).
{% endtab %}
{% endtabs %}

## All policy options

{% policy_schema MeshCircuitBreaker %}
153 changes: 153 additions & 0 deletions app/docs/2.0.x/generated/DoNothingPolicy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
michaelbeaumont marked this conversation as resolved.
Show resolved Hide resolved
"properties": {
"type": {
"description": "",
"type": "string",
"enum": [
"DoNothingPolicy"
]
},
"mesh": {
"description": "Mesh is the name of the Kuma mesh this resource belongs to. It may be omitted for cluster-scoped resources.",
"type": "string"
},
"name": {
"description": "Name of the Kuma resource",
"type": "string"
},
"from": {
"description": "From list makes a match between clients and corresponding configurations",
"items": {
"properties": {
"default": {
"description": "Default is a configuration specific to the group of clients referenced in 'targetRef'",
"properties": {
"enableDoNothing": {
"description": "User defined fields Set true in case of doing nothing",
"type": "boolean"
}
},
"type": "object"
},
"targetRef": {
"description": "TargetRef is a reference to the resource that represents a group of clients.",
"properties": {
"kind": {
"description": "Kind of the referenced resource",
"enum": [
"Mesh",
"MeshSubset",
"MeshService",
"MeshServiceSubset",
"MeshGatewayRoute"
],
"type": "string"
},
"mesh": {
"description": "Mesh is reserved for future use to identify cross mesh resources.",
"type": "string"
},
"name": {
"description": "Name of the referenced resource. Can only be used with kinds: `MeshService`, `MeshServiceSubset` and `MeshGatewayRoute`",
"type": "string"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"description": "Tags used to select a subset of proxies by tags. Can only be used with kinds `MeshSubset` and `MeshServiceSubset`",
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
},
"targetRef": {
"description": "TargetRef is a reference to the resource the policy takes an effect on. The resource could be either a real store object or virtual resource defined inplace.",
"properties": {
"kind": {
"description": "Kind of the referenced resource",
"enum": [
"Mesh",
"MeshSubset",
"MeshService",
"MeshServiceSubset",
"MeshGatewayRoute"
],
"type": "string"
},
"mesh": {
"description": "Mesh is reserved for future use to identify cross mesh resources.",
"type": "string"
},
"name": {
"description": "Name of the referenced resource. Can only be used with kinds: `MeshService`, `MeshServiceSubset` and `MeshGatewayRoute`",
"type": "string"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"description": "Tags used to select a subset of proxies by tags. Can only be used with kinds `MeshSubset` and `MeshServiceSubset`",
"type": "object"
}
},
"type": "object"
},
"to": {
"description": "To list makes a match between the consumed services and corresponding configurations",
"items": {
"properties": {
"default": {
"description": "Default is a configuration specific to the group of destinations referenced in 'targetRef'",
"properties": {
"enableDoNothing": {
"description": "User defined fields Set true in case of doing nothing",
"type": "boolean"
}
},
"type": "object"
},
"targetRef": {
"description": "TargetRef is a reference to the resource that represents a group of destinations.",
"properties": {
"kind": {
"description": "Kind of the referenced resource",
"enum": [
"Mesh",
"MeshSubset",
"MeshService",
"MeshServiceSubset",
"MeshGatewayRoute"
],
"type": "string"
},
"mesh": {
"description": "Mesh is reserved for future use to identify cross mesh resources.",
"type": "string"
},
"name": {
"description": "Name of the referenced resource. Can only be used with kinds: `MeshService`, `MeshServiceSubset` and `MeshGatewayRoute`",
"type": "string"
},
"tags": {
"additionalProperties": {
"type": "string"
},
"description": "Tags used to select a subset of proxies by tags. Can only be used with kinds `MeshSubset` and `MeshServiceSubset`",
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"type": "array"
}
}
}
Loading