Skip to content

Commit

Permalink
docs: review variables used in mkdocs (#860)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Pacak <[email protected]>
  • Loading branch information
danielpacak authored Dec 17, 2021
1 parent 7687ef9 commit 539d3f7
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 61 deletions.
8 changes: 4 additions & 4 deletions docs/cli/installation/docker.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Docker

We also release Docker images `aquasec/starboard:{{ var.build.version }}` and
`public.ecr.aws/aquasecurity/starboard:{{ var.build.version }}` to run Starboard as a Docker container or to manually
We also release Docker images `aquasec/starboard:{{ git.tag[1:] }}` and
`public.ecr.aws/aquasecurity/starboard:{{ git.tag[1:] }}` to run Starboard as a Docker container or to manually
schedule Kubernetes scan Jobs in your cluster.

```console
$ docker container run --rm public.ecr.aws/aquasecurity/starboard:{{ var.build.version }} version
Starboard Version: {Version:{{ var.build.version }} Commit:{{ var.build.commit }} Date:{{ var.build.date }}}
$ docker container run --rm public.ecr.aws/aquasecurity/starboard:{{ git.tag[1:] }} version
Starboard Version: {Version:{{ git.tag[1:] }} Commit:{{ git.commit }} Date:{{ git.date.isoformat() }}}
```
2 changes: 1 addition & 1 deletion docs/cli/installation/source.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version of Starboard.
You must have a working Go environment.

```
git clone --depth 1 --branch {{ var.tag }} [email protected]:aquasecurity/starboard.git
git clone --depth 1 --branch {{ git.tag }} [email protected]:aquasecurity/starboard.git
cd starboard
make
```
Expand Down
26 changes: 13 additions & 13 deletions docs/crds/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@
This project houses CustomResourceDefinitions (CRDs) related to security and compliance checks along with the code
generated by Kubernetes [code generators][k8s-code-generator] to write such custom resources in a programmable way.

| NAME | SHORTNAMES | APIGROUP | NAMESPACED | KIND |
| ----------------------------- | ------------------------- | ---------------------- | ---------- | ----- |
| [vulnerabilityreports] | vulns,vuln | aquasecurity.github.io | true | [VulnerabilityReport](./vulnerability-report.md) |
| NAME | SHORTNAMES | APIGROUP | NAMESPACED | KIND |
|-------------------------------|---------------------------|------------------------|------------|----------------------------------------------------------------|
| [vulnerabilityreports] | vulns,vuln | aquasecurity.github.io | true | [VulnerabilityReport](./vulnerability-report.md) |
| [clustervulnerabilityreports] | clustervulns, clustervuln | aquasecurity.github.io | false | [ClusterVulnerabilityReport](./clustervulnerability-report.md) |
| [configauditreports] | configaudit | aquasecurity.github.io | true | [ConfigAuditReport](./configaudit-report.md) |
| [clusterconfigauditreports] | clusterconfigaudit | aquasecurity.github.io | false | [ClusterConfigAuditReport](./clusterconfigaudit-report.md) |
| [ciskubebenchreports] | kubebench | aquasecurity.github.io | false | [CISKubeBenchReport](./ciskubebench-report.md) |
| [kubehunterreports] | kubehunter | aquasecurity.github.io | false | [KubeHunterReport](./kubehunter-report.md) |
| [configauditreports] | configaudit | aquasecurity.github.io | true | [ConfigAuditReport](./configaudit-report.md) |
| [clusterconfigauditreports] | clusterconfigaudit | aquasecurity.github.io | false | [ClusterConfigAuditReport](./clusterconfigaudit-report.md) |
| [ciskubebenchreports] | kubebench | aquasecurity.github.io | false | [CISKubeBenchReport](./ciskubebench-report.md) |
| [kubehunterreports] | kubehunter | aquasecurity.github.io | false | [KubeHunterReport](./kubehunter-report.md) |

!!! note
We are open to suggestions for adding new or changes to the existing CRDs in the case that would enable
additional third-party integrations.

[k8s-code-generator]: https://github.com/kubernetes/code-generator

[vulnerabilityreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/vulnerabilityreports.crd.yaml
[clustervulnerabilityreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/clustervulnerabilityreports.crd.yaml
[ciskubebenchreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/ciskubebenchreports.crd.yaml
[kubehunterreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/kubehunterreports.crd.yaml
[configauditreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/configauditreports.crd.yaml
[clusterconfigauditreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/clusterconfigauditreports.crd.yaml
[vulnerabilityreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/vulnerabilityreports.crd.yaml
[clustervulnerabilityreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/clustervulnerabilityreports.crd.yaml
[ciskubebenchreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/ciskubebenchreports.crd.yaml
[kubehunterreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/kubehunterreports.crd.yaml
[configauditreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/configauditreports.crd.yaml
[clusterconfigauditreports]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/clusterconfigauditreports.crd.yaml
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Starboard can be used:
[Custom Resource Definitions]: ./crds/index.md
[cli]: cli/index.md
[Kubernetes operator]: operator/index.md
[Go module]: https://pkg.go.dev/github.com/aquasecurity/starboard@{{ var.tag }}
[Go module]: https://pkg.go.dev/github.com/aquasecurity/starboard@{{ git.tag }}
[Octant Plugin]: ./integrations/octant.md
[Lens Extension]: integrations/lens.md
[kubectl]: https://kubernetes.io/docs/reference/kubectl/
Expand Down
4 changes: 2 additions & 2 deletions docs/integrations/config-checkers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ These are currently integrated configuration checkers:
* See the explanation and demo of configuration auditing with Polaris on the
[Automating Configuration Auditing with Starboard Operator By Aqua][blog] blog.

[plugin-interface]: https://pkg.go.dev/github.com/aquasecurity/starboard@{{ var.tag }}/pkg/configauditreport#Plugin
[Polaris plugin]: https://github.com/aquasecurity/starboard/blob/{{ var.tag }}/pkg/plugin/polaris/plugin.go
[plugin-interface]: https://pkg.go.dev/github.com/aquasecurity/starboard@{{ git.tag }}/pkg/configauditreport#Plugin
[Polaris plugin]: https://github.com/aquasecurity/starboard/blob/{{ git.tag }}/pkg/plugin/polaris/plugin.go
[blog]: https://blog.aquasec.com/automating-configuration-auditing-starboard-operator
18 changes: 9 additions & 9 deletions docs/integrations/config-checkers/polaris.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ The [default][config-default] Polaris [configuration] can be customized to do th

## Settings

| CONFIGMAP KEY | DEFAULT | DESCRIPTION |
| ------------------------------------ | ------------------------------------------------------ | ----------- |
| `polaris.imageRef` | `quay.io/fairwinds/polaris:4.2` | Polaris image reference |
| `polaris.config.yaml` | [Check the default value here][default-polaris-config] | Polaris configuration file |
| `polaris.resources.request.cpu` | `50m` | The minimum amount of CPU required to run Polaris scanner pod. |
| `polaris.resources.request.memory` | `50M` | The minimum amount of memory required to run Polaris scanner pod. |
| `polaris.resources.limit.cpu` | `300m` | The maximum amount of CPU allowed to run Polaris scanner pod. |
| `polaris.resources.limit.memory` | `300M` | The maximum amount of memory allowed to run polaris scanner pod. |
| CONFIGMAP KEY | DEFAULT | DESCRIPTION |
|------------------------------------|--------------------------------------------------------|-------------------------------------------------------------------|
| `polaris.imageRef` | `quay.io/fairwinds/polaris:4.2` | Polaris image reference |
| `polaris.config.yaml` | [Check the default value here][default-polaris-config] | Polaris configuration file |
| `polaris.resources.request.cpu` | `50m` | The minimum amount of CPU required to run Polaris scanner pod. |
| `polaris.resources.request.memory` | `50M` | The minimum amount of memory required to run Polaris scanner pod. |
| `polaris.resources.limit.cpu` | `300m` | The maximum amount of CPU allowed to run Polaris scanner pod. |
| `polaris.resources.limit.memory` | `300M` | The maximum amount of memory allowed to run polaris scanner pod. |

## What's Next?

- See the Polaris documentation for the list of [security], [efficiency], and [reliability] checks.

[Polaris]: https://github.com/FairwindsOps/polaris
[config-default]: https://github.com/aquasecurity/starboard/blob/{{ var.tag }}/deploy/static/05-starboard-operator.config.yaml#L24
[config-default]: https://github.com/aquasecurity/starboard/blob/{{ git.tag }}/deploy/static/05-starboard-operator.config.yaml#L24
[configuration]: https://polaris.docs.fairwinds.com/customization/configuration/
[checks]: https://polaris.docs.fairwinds.com/customization/checks/
[custom checks]: https://polaris.docs.fairwinds.com/customization/custom-checks/
Expand Down
8 changes: 4 additions & 4 deletions docs/operator/installation/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespaces:

1. Clone the chart directory:
```
git clone --depth 1 --branch {{ var.tag }} https://github.com/aquasecurity/starboard.git
git clone --depth 1 --branch {{ git.tag }} https://github.com/aquasecurity/starboard.git
cd starboard
```
Or add Aqua chart repository:
Expand All @@ -34,14 +34,14 @@ namespaces:
--create-namespace \
--set="targetNamespaces=default" \
--set="trivy.ignoreUnfixed=true" \
--version {{ var.chart.version }}
--version {{ var.chart_version }}
```
There are many [values] in the chart that can be set to configure Starboard.
3. Check that the `starboard-operator` Helm release is created in the `starboard-system` namespace:
```console
$ helm list -n starboard-system
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
starboard-operator starboard-system 1 2021-01-27 20:09:53.158961 +0100 CET deployed starboard-operator-{{ var.chart.version }} {{ var.build.version }}
starboard-operator starboard-system 1 2021-01-27 20:09:53.158961 +0100 CET deployed starboard-operator-{{ var.chart_version }} {{ git.tag[1:] }}
```
To confirm that the operator is running, check the number of replicas created by the `starboard-operator` Deployment
in the `starboard-system` namespace:
Expand Down Expand Up @@ -79,4 +79,4 @@ You have to manually delete custom resource definitions created by the `helm ins

[Helm]: https://helm.sh/
[charts]: https://helm.sh/docs/topics/charts/
[values]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/helm/values.yaml
[values]: https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/helm/values.yaml
32 changes: 16 additions & 16 deletions docs/operator/installation/kubectl.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ namespace:

1. Send custom resource definitions to the Kubernetes API:
```
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/vulnerabilityreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/configauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/clusterconfigauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/ciskubebenchreports.crd.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/vulnerabilityreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/configauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/clusterconfigauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/ciskubebenchreports.crd.yaml
```
2. Send the following Kubernetes objects definitions to the Kubernetes API:
```
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/01-starboard-operator.ns.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/02-starboard-operator.rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/01-starboard-operator.ns.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/02-starboard-operator.rbac.yaml
```
3. (Optional) Configure Starboard by creating the `starboard` ConfigMap and the `starboard` secret in
the `starboard-system` namespace. For example, you can use Trivy
Expand All @@ -26,15 +26,15 @@ namespace:
If you skip this step, the operator will ensure [configuration objects](./../../settings.md)
on startup with the default settings:
```
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/03-starboard-operator.config.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/03-starboard-operator.config.yaml
```
Review the default values and makes sure the operator is configured properly:
```
kubectl describe cm starboard starboard-trivy-config starboard-polaris-config -n starboard-system
```
4. Finally, create the `starboard-operator` Deployment in the `starboard-system` namespace to start the operator's pod:
```
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/04-starboard-operator.deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/04-starboard-operator.deployment.yaml
```
5. To confirm that the operator is running, check the number of replicas created by the `starboard-operator` Deployment
in the `starboard-system` namespace:
Expand All @@ -53,10 +53,10 @@ namespace:
You can uninstall the operator with the following command:

```
kubectl delete -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/04-starboard-operator.deployment.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/03-starboard-operator.config.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/02-starboard-operator.rbac.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/01-starboard-operator.ns.yaml
kubectl delete -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/04-starboard-operator.deployment.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/03-starboard-operator.config.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/02-starboard-operator.rbac.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/01-starboard-operator.ns.yaml
```
Delete custom resources definitions:
Expand All @@ -65,10 +65,10 @@ Delete custom resources definitions:
Deleting custom resource definitions will also delete all security reports generated by the operator.
```
kubectl delete -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/vulnerabilityreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/configauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/clusterconfigauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/crd/ciskubebenchreports.crd.yaml
kubectl delete -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/vulnerabilityreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/configauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/clusterconfigauditreports.crd.yaml \
-f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/crd/ciskubebenchreports.crd.yaml
```

[Kustomize]: https://kustomize.io
6 changes: 3 additions & 3 deletions docs/operator/installation/olm.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ configure it to watch the `default` namespaces:
If you skip this step, the operator will ensure [configuration objects](./../../settings.md)
on startup with the default settings:
```
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ var.tag }}/deploy/static/03-starboard-operator.config.yaml
kubectl apply -f https://raw.githubusercontent.com/aquasecurity/starboard/{{ git.tag }}/deploy/static/03-starboard-operator.config.yaml
```
Review the default values and makes sure the operator is configured properly:
```
Expand Down Expand Up @@ -82,7 +82,7 @@ configure it to watch the `default` namespaces:
```console
$ kubectl get clusterserviceversions -n starboard-system
NAME DISPLAY VERSION REPLACES PHASE
starboard-operator.{{ var.tag }} Starboard Operator {{ var.build.version }} starboard-operator.{{ var.tag_prev }} Succeeded
starboard-operator.{{ git.tag }} Starboard Operator {{ git.tag[1:] }} starboard-operator.{{ var.prev_git_tag }} Succeeded
```
If the above command succeeds and the ClusterServiceVersion has transitioned from `Installing` to `Succeeded` phase
you will also find the operator's Deployment in the same namespace where the Subscription is:
Expand All @@ -102,7 +102,7 @@ To uninstall the operator delete the Subscription, the ClusterServiceVersion, an

```
kubectl delete subscription starboard-operator -n starboard-system
kubectl delete clusterserviceversion starboard-operator.{{ var.tag }} -n starboard-system
kubectl delete clusterserviceversion starboard-operator.{{ git.tag }} -n starboard-system
kubectl delete operatorgroup starboard-operator -n starboard-system
kubectl delete ns starboard-system
```
Expand Down
10 changes: 2 additions & 8 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,8 @@ extra:
version:
provider: mike
var:
tag: "v0.13.1"
tag_prev: "v0.13.0"
build:
version: "0.13.1"
commit: "e9cd6e1467f942ce114468f4d30012bd4256fa9c"
date: "2021-12-01T14:31:52Z"
chart:
version: 0.8.1
prev_git_tag: "v0.13.0"
chart_version: 0.8.1

# Requires pip install mkdocs-macros-plugin
plugins:
Expand Down

0 comments on commit 539d3f7

Please sign in to comment.