Skip to content

Commit

Permalink
Merge branch 'sebastian/prod-2981-set-up-catalog-pipeline' of github.…
Browse files Browse the repository at this point in the history
…com:pluralsh/scaffolds into sebastian/prod-2981-set-up-catalog-pipeline
  • Loading branch information
floreks committed Dec 13, 2024
2 parents 63f68b8 + 50080f9 commit e64a8a2
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 150 deletions.
13 changes: 13 additions & 0 deletions catalogs/security/gatekeeper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Gatekeeper

This is a baseline, prod-ready OPA Gatekeeper installation using Plural. Besides Gatekeeper installation, it includes a policy bundle and set of constraints.

You might want to slightly tweak the default setup for a few reasons:

- only want to set up policy enforcement on a subset of your fleet (it's fleet-wide by default)
- prefer to choose a different policy bundle
- tweaking namespace names, crd names, etc. for your organization's preferences

## Contributing

If there are any features or documentation you'd like to add to this setup, please feel free to contribute back at https://github.com/pluralsh/scaffolds.
14 changes: 14 additions & 0 deletions catalogs/security/gatekeeper/gatekeeper-constraints.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: deployments.plural.sh/v1alpha1
kind: GlobalService
metadata:
name: gatekeeper-constraints
spec:
template:
name: gatekeeper-constraints
namespace: policy
git:
folder: resources/policy/constraints
ref: main
repositoryRef:
kind: GitRepository
name: bootstrap
15 changes: 15 additions & 0 deletions catalogs/security/gatekeeper/gatekeeper-policy-bundle.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: deployments.plural.sh/v1alpha1
kind: GlobalService
metadata:
name: gatekeeper-policy-bundle
namespace: apps
spec:
template:
name: gatekeeper-policy-bundle
namespace: policy
git:
folder: resources/policy/bundles/{{ context.bundle }}
ref: main
repositoryRef:
kind: GitRepository
name: bootstrap
13 changes: 13 additions & 0 deletions catalogs/security/gatekeeper/gatekeeper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: deployments.plural.sh/v1alpha1
kind: GlobalService
metadata:
name: gatekeeper
namespace: apps
spec:
template:
name: gatekeeper
namespace: policy
helm:
url: https://open-policy-agent.github.io/gatekeeper/charts
version: 3.15.1
chart: gatekeeper
7 changes: 0 additions & 7 deletions catalogs/security/opa-gatekeeper/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions catalogs/security/opa-gatekeeper/helmrepository.yaml

This file was deleted.

69 changes: 0 additions & 69 deletions catalogs/security/opa-gatekeeper/servicedeployments.yaml.liquid

This file was deleted.

8 changes: 0 additions & 8 deletions catalogs/security/trivy-operator/helmrepository.yaml

This file was deleted.

26 changes: 0 additions & 26 deletions catalogs/security/trivy-operator/servicedeployment.yaml.liquid

This file was deleted.

16 changes: 16 additions & 0 deletions catalogs/security/trivy-operator/trivy-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: deployments.plural.sh/v1alpha1
kind: GlobalService
metadata:
name: trivy-operator
namespace: apps
spec:
template:
name: trivy-operator
namespace: trivy-system
helm:
url: https://aquasecurity.github.io/helm-charts/
chart: trivy-operator
version: 'x.x.x'
values:
trivy:
additionalVulnerabilityReportFields: Description,Links,CVSS,Target
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
apiVersion: deployments.plural.sh/v1alpha1
kind: PrAutomation
metadata:
name: opa-gatekeeper
name: gatekeeper
spec:
name: opa-gatekeeper
name: gatekeeper
icon: https://www.openpolicyagent.org/img/logos/opa-no-text-color.png
documentation: |
Sets up OPA Gatekeeper policy controller
documentation: Sets up Gatekeeper policy controller.
creates:
git:
ref: sebastian/prod-2981-set-up-catalog-pipeline # TODO set to main
folder: catalogs/security/opa-gatekeeper
folder: catalogs/security/gatekeeper
templates:
- source: README.md
destination: documentation/opa-gatekeeper/README.md
destination: documentation/gatekeeper/README.md
external: true
- source: helmrepository.yaml
destination: "bootstrap/apps/opa-gatekeeper/{{ context.cluster }}/helmrepository.yaml"
- source: gatekeeper.yaml
destination: bootstrap/apps/gatekeeper/gatekeeper.yaml
external: true
- source: servicedeployments.yaml.liquid
destination: "bootstrap/apps/opa-gatekeeper/{{ context.cluster }}/servicedeployments.yaml"
- source: gatekeeper-constraints.yaml
destination: bootstrap/apps/gatekeeper/gatekeeper-constraints.yaml
external: true
- source: gatekeeper-policy-bundle.yaml
destination: bootstrap/apps/gatekeeper/gatekeeper-policy-bundle.yaml
external: true
repositoryRef:
name: scaffolds
catalogRef:
name: security
scmConnectionRef:
name: plural # you'll need to add this ScmConnection manually before this is functional
title: "OPA Gatekeeper setup ({{ context.cluster }})"
message: |
Sets up OPA Gatekeeper on {{ context.cluster }} cluster.
title: Gatekeeper setup
message: Sets up Gatekeeper, policy bundle and a set of constraints.
identifier: pluralsh/plrl-dev-aws # FIXME
configuration:
- name: cluster
type: STRING
documentation: the cluster you want to deploy to
- name: bundle
type: ENUM
documentation: the policy bundle you want to install
documentation: The policy bundle you want to install.
values:
- asm-policy-v0.0.1
- cis-k8s-v1.5.1
Expand Down
21 changes: 6 additions & 15 deletions setup/catalogs/security/trivy-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ metadata:
name: trivy-operator
spec:
name: trivy-operator
icon: https://aquasecurity.github.io/trivy-operator/latest/images/trivy-operator-logo.png
documentation: |
Sets up Trivy Operator security toolkit
icon: https://raw.githubusercontent.com/aquasecurity/trivy-vscode-extension/refs/tags/0.7.1/media/trivy.svg
documentation: Sets up Trivy Operator security toolkit.
creates:
git:
ref: sebastian/prod-2981-set-up-catalog-pipeline # TODO set to main
Expand All @@ -15,23 +14,15 @@ spec:
- source: README.md
destination: documentation/trivy-operator/README.md
external: true
- source: helmrepository.yaml
destination: "bootstrap/apps/trivy-operator/{{ context.cluster }}/helmrepository.yaml"
external: true
- source: servicedeployment.yaml.liquid
destination: "bootstrap/apps/trivy-operator/{{ context.cluster }}/servicedeployment.yaml"
- source: trivy-operator.yaml
destination: bootstrap/apps/trivy-operator/trivy-operator.yaml
external: true
repositoryRef:
name: scaffolds
catalogRef:
name: security
scmConnectionRef:
name: plural # you'll need to add this ScmConnection manually before this is functional
title: "Trivy Operator setup ({{ context.cluster }})"
message: |
Sets up Trivy Operator on {{ context.cluster }} cluster. Includes set of constraints and policy bundle.
title: Trivy Operator setup
message: Sets up Trivy Operator.
identifier: pluralsh/plrl-dev-aws # FIXME
configuration:
- name: cluster
type: STRING
documentation: the cluster you want to deploy to

0 comments on commit e64a8a2

Please sign in to comment.