Skip to content

Commit

Permalink
docs: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Windemiatrix committed Jun 4, 2024
1 parent a1c6c3f commit 9e05d69
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 62 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
## Topics

- [Key Generation](./docs/key-management.md)
- [Configure Policy controller in kubernetes cluster](./docs/policy-controller.md)
- [Create Policies](./docs/policy.md)
- [Configure Kubernetes cluster](./docs/k8s.md)

## Input Variables

Expand Down
68 changes: 68 additions & 0 deletions docs/k8s.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Configure Kubernetes cluster

## Requirements

If you still haven't key pairs to sign the images, please read [Key Generation](./docs/key-management.md) article

## Configure Policy controller

Install helm chart from official repository:

1. Add the Sigstore Helm repository:

```sh
helm repo add sigstore https://sigstore.github.io/helm-charts
```

2. Update your local Helm chart repository cache:

```sh
helm repo update
```

3. Install the `policy-controller` chart from the Sigstore repository:

```sh
helm install policy-controller sigstore/policy-controller
```

Using a `values.yaml` file:

```sh
helm install policy-controller sigstore/policy-controller -f values.yaml
```

For more documentation, refer to: [artifacthub.io/packages/helm/sigstore/policy-controller](https://artifacthub.io/packages/helm/sigstore/policy-controller)

## Create Policy

Create policy with public certificate:

```yaml
apiVersion: policy.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: custom-key-attestation-sbom-spdxjson
spec:
images:
- glob: "**"
authorities:
- name: custom-key
key:
data: |
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOc6HkISHzVdUbtUsdjYtPuyPYBeg
4FCemyVurIM4KEORQk4OAu8ZNwxvGSoY3eAabYaFIPPQ8ROAjrbdPwNdJw==
-----END PUBLIC KEY-----
```

For more documentation and sample policies, refer to: [docs.sigstore.dev/policy-controller/sample-policies](https://docs.sigstore.dev/policy-controller/sample-policies/)

## Configure namespace

The `policy-controller` admission controller will by default only validate resources in namespaces that have chosen to opt-in. This can be done by adding the label `policy.sigstore.dev/include: "true"` to the namespace resource.

```sh
kubectl label namespace my-secure-namespace policy.sigstore.dev/include=true
```
For more documentation, refer to: [docs.sigstore.dev/policy-controller/overview](https://docs.sigstore.dev/policy-controller/overview/)
30 changes: 0 additions & 30 deletions docs/policy-controller.md

This file was deleted.

30 changes: 0 additions & 30 deletions docs/policy.md

This file was deleted.

0 comments on commit 9e05d69

Please sign in to comment.