Skip to content

Commit

Permalink
chore: doc cleanup (#505)
Browse files Browse the repository at this point in the history
## Description

We should change the contact email but for now I put mine. I think we
need to consider not including email addresses. If we use a Defense
Unicorns email it will likely need to change after donation? Maybe Slack
and GitHub are the best ways to be reached?

## Related Issue

Fixes #504 Doc Clean Up
<!-- or -->
Relates to #

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/pepr/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed

---------

Signed-off-by: Case Wylie <[email protected]>
  • Loading branch information
cmwylie19 authored Jan 24, 2024
1 parent c294567 commit 4e5606c
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 28 deletions.
18 changes: 9 additions & 9 deletions docs/030_user-guide/010_pepr-cli.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pepr CLI

## `pepr init`
## `npx pepr init`

Initialize a new Pepr Module.

Expand All @@ -11,7 +11,7 @@ Initialize a new Pepr Module.

---

## `pepr update`
## `npx pepr update`

Update the current Pepr Module to the latest SDK version and update the global Pepr CLI to the same version.

Expand All @@ -22,9 +22,9 @@ Update the current Pepr Module to the latest SDK version and update the global P

---

## `pepr dev`
## `npx pepr dev`

Connect a local cluster to a local version of the Pepr Controller to do real-time debugging of your module. Note the `pepr dev` assumes a K3d cluster is running by default. If you are working with Kind or another docker-based K8s distro, you will need to pass the `--host host.docker.internal` option to `pepr dev`. If working with a remote cluster you will have to give Pepr a host path to your machine that is reachable from the K8s cluster.
Connect a local cluster to a local version of the Pepr Controller to do real-time debugging of your module. Note the `npx pepr dev` assumes a K3d cluster is running by default. If you are working with Kind or another docker-based K8s distro, you will need to pass the `--host host.docker.internal` option to `npx pepr dev`. If working with a remote cluster you will have to give Pepr a host path to your machine that is reachable from the K8s cluster.

**Options:**

Expand All @@ -34,7 +34,7 @@ Connect a local cluster to a local version of the Pepr Controller to do real-tim

---

## `pepr deploy`
## `npx pepr deploy`

Deploy the current module into a Kubernetes cluster, useful for CI systems. Not recommended for production use.

Expand All @@ -46,14 +46,14 @@ Deploy the current module into a Kubernetes cluster, useful for CI systems. Not

---

## `pepr monitor`
## `npx pepr monitor`

Monitor Validations for a given Pepr Module.
Monitor Validations for a given Pepr Module or all Pepr Modules.

Usage:

```bash
npx pepr monitor [options] <module-uuid>
npx pepr monitor [options] [module-uuid]
```

**Options:**
Expand All @@ -63,7 +63,7 @@ npx pepr monitor [options] <module-uuid>

---

## `pepr build`
## `npx pepr build`

Create a [zarf.yaml](https://zarf.dev) and K8s manifest for the current module. This includes everything needed to deploy Pepr and the current module into production environments.

Expand Down
3 changes: 2 additions & 1 deletion docs/030_user-guide/020_pepr-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

## What is a Pepr Module?

A Pepr Module is a collection of files that can be used to create a new Pepr Project. A Pepr Module can be used to create a new Pepr Project by using the `pepr init` command. A Pepr Module can also be used to create a new Pepr Module by using the `pepr create-module` command.
A Pepr Module is a collection of files that can be used to create a new Pepr Project. A Pepr Module can be used to create a new Pepr Project by using the `npx pepr init` command.

4 changes: 2 additions & 2 deletions docs/030_user-guide/030_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For example, an action could be responsible for adding a specific label to a Kub

Actions are `Mutate()`, `Validate()`, or `Watch()`. Both Mutate and Validate actions run during the admission controller lifecycle, while Watch actions run in a separate controller that tracks changes to resources, including existing resources.

Let's look at some example actions that are included in the `HelloPepr` capability that is created for you when you [`pepr init`](./010_pepr-cli.md#pepr-init):
Let's look at some example actions that are included in the `HelloPepr` capability that is created for you when you [`npx pepr init`](./010_pepr-cli.md#pepr-init):

---

Expand Down Expand Up @@ -64,4 +64,4 @@ When(a.ConfigMap)
});
```

There are many more examples in the `HelloPepr` capability that you can use as a reference when creating your own actions. Note that each time you run [`pepr update`](./010_pepr-cli.md#pepr-update), Pepr will automatically update the `HelloPepr` capability with the latest examples and best practices for you to reference and test directly in your Pepr Module.
There are many more examples in the `HelloPepr` capability that you can use as a reference when creating your own actions. Note that each time you run [`npx pepr update`](./010_pepr-cli.md#pepr-update), Pepr will automatically update the `HelloPepr` capability with the latest examples and best practices for you to reference and test directly in your Pepr Module.
4 changes: 2 additions & 2 deletions docs/030_user-guide/040_capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

A capability is set of related [actions](./030_actions.md) that work together to achieve a specific transformation or operation on Kubernetes resources. Capabilities are user-defined and can include one or more actions. They are defined within a Pepr module and can be used in both MutatingWebhookConfigurations and ValidatingWebhookConfigurations. A Capability can have a specific scope, such as mutating or validating, and can be reused in multiple Pepr modules.

When you [`pepr init`](./010_pepr-cli.md#pepr-init), a `capabilities` directory is created for you. This directory is where you will define your capabilities. You can create as many capabilities as you need, and each capability can contain one or more actions. Pepr also automatically creates a `HelloPepr` capability with a number of example actions to help you get started.
When you [`npx pepr init`](./010_pepr-cli.md#pepr-init), a `capabilities` directory is created for you. This directory is where you will define your capabilities. You can create as many capabilities as you need, and each capability can contain one or more actions. Pepr also automatically creates a `HelloPepr` capability with a number of example actions to help you get started.

## Creating a Capability

Defining a new capability can be done via a [VSCode Snippet](https://code.visualstudio.com/docs/editor/userdefinedsnippets) generated during [`pepr init`](./010_pepr-cli.md#pepr-init).
Defining a new capability can be done via a [VSCode Snippet](https://code.visualstudio.com/docs/editor/userdefinedsnippets) generated during [`npx pepr init`](./010_pepr-cli.md#pepr-init).

1. Create a new file in the `capabilities` directory with the name of your capability. For example, `capabilities/my-capability.ts`.

Expand Down
19 changes: 10 additions & 9 deletions docs/040_pepr-tutorials/010_create-pepr-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

This tutorial will walk you through the process of creating a Pepr module.

Each Pepr Module is it's own Typescript project, produced by [`pepr init`](../030_user-guide/010_pepr-cli.md#pepr-init). Typically a module is maintained by a unique group or system. For example, a module for internal [Zarf](https://zarf.dev/) mutations would be different from a module for [Big Bang](https://p1.dso.mil/products/big-bang). An important idea with modules is that they are _wholly independent of one another_. This means that 2 different modules can be on completely different versions of Pepr and any other dependencies; their only interaction is through the standard K8s interfaces like any other webhook or controller.
Each Pepr Module is it's own Typescript project, produced by [`npx pepr init`](../030_user-guide/010_pepr-cli.md#pepr-init). Typically a module is maintained by a unique group or system. For example, a module for internal [Zarf](https://zarf.dev/) mutations would be different from a module for [Big Bang](https://p1.dso.mil/products/big-bang). An important idea with modules is that they are _wholly independent of one another_. This means that 2 different modules can be on completely different versions of Pepr and any other dependencies; their only interaction is through the standard K8s interfaces like any other webhook or controller.

## Prerequisites

## Steps

1. **Create the module**:

Use [`pepr init`](../030_user-guide/010_pepr-cli.md#pepr-init) to generate a new module.
Use [`npx pepr init`](../030_user-guide/010_pepr-cli.md#pepr-init) to generate a new module.

1. **Quickly validate system setup**:

Every new module includes a sample Pepr Capability called `HelloPepr`. By default,
this capability is deployed and monitoring the `pepr-demo` namespace. There is a sample
yaml also included you can use to see Pepr in your cluster. Here's the quick steps to do
that after `pepr init`:
that after `npx pepr init`:

```bash
# cd to the newly-created Pepr module folder
Expand All @@ -29,7 +29,7 @@ Each Pepr Module is it's own Typescript project, produced by [`pepr init`](../03
npm run k3d-setup

# Launch pepr dev mode
# If using another local K8s distro instead of k3d, use `pepr dev --host host.docker.internal`
# If using another local K8s distro instead of k3d, use `npx pepr dev --host host.docker.internal`
pepr dev

# From another terminal, apply the sample yaml
Expand All @@ -51,18 +51,18 @@ Each Pepr Module is it's own Typescript project, produced by [`pepr init`](../03
]);
```

_Note: if you also delete the `capabilities/hello-pepr.ts` file, it will be added again on the next [`pepr update`](../030_user-guide/010_pepr-cli.md#pepr-update) so you have the latest examples usages from the Pepr SDK. Therefore, it is sufficient to remove the entry from your `pepr.ts` module
_Note: if you also delete the `capabilities/hello-pepr.ts` file, it will be added again on the next [`npx pepr update`](../030_user-guide/010_pepr-cli.md#pepr-update) so you have the latest examples usages from the Pepr SDK. Therefore, it is sufficient to remove the entry from your `pepr.ts` module
config._

1. **Build and deploy the Pepr Module**

Most of the time, you'll likely be iterating on a module with `pepr dev` for real-time feedback and validation Once you are ready to move beyond the local dev environment, Pepr provides deployment and build tools you can use.
Most of the time, you'll likely be iterating on a module with `npx pepr dev` for real-time feedback and validation Once you are ready to move beyond the local dev environment, Pepr provides deployment and build tools you can use.

`pepr deploy` - you can use this command to build your module and deploy it into any K8s cluster your current `kubecontext` has access to. This setup is ideal for CI systems during testing, but is not recommended for production use. See [`pepr deploy`](../030_user-guide/010_pepr-cli.md#pepr-deploy) for more info.
`npx pepr deploy` - you can use this command to build your module and deploy it into any K8s cluster your current `kubecontext` has access to. This setup is ideal for CI systems during testing, but is not recommended for production use. See [`npx pepr deploy`](../030_user-guide/010_pepr-cli.md#pepr-deploy) for more info.

## Additional Information

By default, when you run `pepr init`, the module is not configured with any additional options. Currently, there are 3 options you can configure:
By default, when you run `npx pepr init`, the module is not configured with any additional options. Currently, there are 3 options you can configure:

- `deferStart` - if set to `true`, the module will not start automatically. You will need to call `start()` manually. This is useful if you want to do some additional setup before the module controller starts. You can also use this to change the default port that the controller listens on.

Expand Down Expand Up @@ -97,4 +97,5 @@ module.start();

## Summary

## What's next?
Checkout some examples of Pepr modules in the [excellent examples repo](https://github.com/defenseunicorns/pepr-excellent-examples). If you have questions after that, please reach out to us on [Slack](https://kubernetes.slack.com/archives/C06DGH40UCB) or [GitHub Issues](https://github.com/defenseunicorns/pepr/issues)

2 changes: 1 addition & 1 deletion docs/080_faq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Please report it by opening an issue in the [Pepr GitHub repository](https://git

## I've found a security issue, what should I do?

Security issues should be reported privately, via email, to the Pepr Security Team at [email](mailto:[email protected]). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.
Security issues should be reported privately, via [email](mailto:[email protected]). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.

## I have a feature request, what should I do?

Expand Down
5 changes: 3 additions & 2 deletions docs/090_roadmap/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Roadmap for Pepr
# Roadmap for Pepr

_2024 Roadmap_
## Phase 1: Preparation - Testing and Docs

- **Q1**:
Expand Down Expand Up @@ -53,4 +54,4 @@
- **Review Sandbox PR**
- Review PR for sandbox
- **Road to Incubation**:
- to come
- to come
3 changes: 1 addition & 2 deletions docs/120_contribute/020_code-of-conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ representative at an online or offline event.
## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
`pepr-complaints` `@` `defenseunicorns.com`.
reported to the community leaders responsible for enforcement at [`[email protected]`](mailto:[email protected]).
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down

0 comments on commit 4e5606c

Please sign in to comment.