Skip to content

Commit

Permalink
Merge pull request #6 from Prateeknandle/main
Browse files Browse the repository at this point in the history
updating docs
  • Loading branch information
Prateeknandle authored Dec 4, 2023
2 parents 0663b97 + f488af4 commit 98f0c1a
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ before:
- go test ./...
# As part of the release doc files are included as a separate deliverable for
# consumption by Packer.io. To include a separate docs.zip uncomment the following command.
#- make ci-release-docs
- make ci-release-docs
# Check plugin compatibility with required version of the Packer SDK
- make plugin-check
builds:
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ packer {
source = "github.com/hashicorp/ansible"
version = "~> 1"
}
kubearmor = {
version = ">= 0.0.1"
source = "github.com/hashicorp/kubearmor"
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# KubeArmor Plugins

A plugin for Packer which provides [KubeArmor Hardening Host Security policies](https://docs.kubearmor.io/kubearmor/use-cases/hardening_guide) for the build workloads.

> [KubeArmor](https://docs.kubearmor.io/kubearmor/) is a security solution for the Kubernetes and cloud native platforms that helps protect your workloads from attacks and threats. It does this by providing a set of hardening policies that are based on industry-leading compliance and attack frameworks such as CIS, MITRE, NIST-800-53, and STIGs. These policies are designed to help you secure your workloads in a way that is compliant with these frameworks and recommended best practices.
The KubeArmor provisioner will configure the build and provide the [KubeArmor Hardening Host Security Policies](https://docs.kubearmor.io/kubearmor/use-cases/hardening_guide). These hardening policies will be in the context of your workload, so you can see how they will be applied and what impact they will have on your system. This allows you to make informed decisions about which policies to apply, and helps you understand the trade-offs between security and functionality.

<!--
Include a short overview about the plugin.
Expand All @@ -25,9 +31,9 @@ Then, run [`packer init`](https://www.packer.io/docs/commands/init).
```hcl
packer {
required_plugins {
name = {
kubearmor = {
version = ">= 0.0.1"
source = "github.com/hashicorp/name"
source = "github.com/hashicorp/kubearmor"
}
}
}
Expand Down
47 changes: 47 additions & 0 deletions docs/provisioners/kubearmor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Type: `kubearmor`

### Example Usage

With docker uase case :

```hcl
packer {
Expand All @@ -28,6 +29,10 @@ packer {
version = ">= 0.0.7"
source = "github.com/hashicorp/docker"
}
kubearmor = {
version = ">= 0.0.1"
source = "github.com/hashicorp/kubearmor"
}
}
}

Expand All @@ -47,4 +52,46 @@ build {
}
}

```

With virtualbox use case :

```
packer {
required_plugins {
virtualbox-ovf = {
source = "github.com/hashicorp/virtualbox"
version = "~> 1"
}
ansible = {
source = "github.com/hashicorp/ansible"
version = "~> 1"
}
kubearmor = {
version = ">= 0.0.1"
source = "github.com/hashicorp/kubearmor"
}
}
}

source "virtualbox-ovf" "basic-example" {
source_path = "ubuntu20.ova"
ssh_username = ""
ssh_password = ""
shutdown_command = "echo 'packer' | sudo -S shutdown -P now"
}

build {
name = "learn-packer"
sources = ["sources.virtualbox-ovf.basic-example"]


provisioner "ansible" {
playbook_file = "./ansible/conf.yml"
}

provisioner "kubearmor" {
policyPath = "/home/prateek/policies"
}
}
```
4 changes: 4 additions & 0 deletions example/build.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ packer {
version = ">= 0.0.7"
source = "github.com/hashicorp/docker"
}
kubearmor = {
version = ">= 0.0.1"
source = "github.com/hashicorp/kubearmor"
}
}
}

Expand Down

0 comments on commit 98f0c1a

Please sign in to comment.