Skip to content

Commit f82bfc1

Browse files
authored
Publish 0.0.1 (#13)
1 parent 0a365ad commit f82bfc1

File tree

2 files changed

+53
-6
lines changed

2 files changed

+53
-6
lines changed

CHANGELOG.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Change Log
22

3-
## [Unreleased]
3+
## 0.0.1
44

5-
- Initial release
5+
* Browse templates and constraints in Cluster Explorer
6+
* View constraint violations
7+
* View templates and constraints
8+
* Deploy templates from `.rego` files with associated schemas
9+
* Create schema from `.rego` file or navigate to associated schema
10+
* Warn if `.rego` file refers to undefined parameters
11+
* Scaffold constraints from templates
12+
* Change constraint enforcement action
13+
* Delete templates and constraints

README.md

+43-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,55 @@
11
# gatekeeper-vscode
22

3-
Rapidly develop and test Gatekeeper policies
3+
Rapidly develop, test and deploy Gatekeeper policies for your Kubernetes cluster.
44

55
## Features
66

7+
* Install Gatekeeper into a development cluster
8+
* Browse constraints and constraint templates in the Kubernetes cluster explorer
9+
* See which constraints have violations, and view violation details
10+
* Deploy a constraint template directly from a Rego file and a JSON schema
11+
* Scaffold a constraint from a constraint template
12+
* Scaffold a JSON schema from constraint template Rego
13+
* See a warning if template Rego uses a parameter not defined in the schema
14+
* Switch a constraint's enforcement action between Deny and Dry Run
15+
* View the constraint and template YAML definitions, and template Rego
16+
17+
## Authoring Constraint Templates and Constraints
18+
19+
**NOTE: This workflow is an alpha proposal, and may change based on feedback!**
20+
21+
A constraint template consists of some Rego, defining the policy, and a CRD definition,
22+
specifying the names (e.g. the manifest kind) and validation schema for constraint
23+
resources, all bundled together into a YAML resource declaration. You probably don't
24+
want to have to work directly on such YAML: you'd rather, for example, create your Rego
25+
in a separate where the OPA extension can give you syntax highlighting and testing features.
26+
27+
The Gatekeeper extension addresses this by allowing you to author your constraint template
28+
in two separate files, which are linked by a naming convention:
29+
30+
* `<name>.rego` - the Rego policy definition for the constraint template
31+
* `<name>.schema.json` - the JSON schema for the parameters
32+
33+
With this convention in place, you can right-click in the Rego file and choose
34+
**Deploy as Gatekeeper Constraint Template**. The extension will merge the Rego and
35+
the parameter schema to create a YAML resource declaration, and display the
36+
resulting YAML for you to confirm and deploy.
37+
38+
The `.rego/.schema.json` convention is also used for checks of the Rego file - for
39+
example if the Rego refers to `input.parameters.<name>` then the extension will
40+
warn if the `.schema.json` does not contain a declaration for `<name>`.
41+
42+
**Please give me feedback on this convention through [GitHub issues](https://github.com/deislabs/gatekeeper-vscode/issues)!**
43+
Let me know if it causes problems, runs into limitations or is just fiddly to work with. Thanks!
44+
745
## Requirements
846

9-
## Extension Settings
47+
You will need the following VS Code extensions:
1048

11-
## Known Issues
49+
* Kubernetes (https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.vscode-kubernetes-tools)
50+
* OPA (https://marketplace.visualstudio.com/items?itemName=ms-kubernetes-tools.kubernetes-opa-vscode)
1251

13-
## Release Notes
52+
These are automatically installed if you install this extension from the Visual Studio Marketplace.
1453

1554
## Contributing
1655

0 commit comments

Comments
 (0)