Skip to content

Commit

Permalink
chore!: chart rename for better purpose representation
Browse files Browse the repository at this point in the history
Signed-off-by: Ievgenii Shepeliuk <[email protected]>
  • Loading branch information
eshepelyuk committed May 7, 2022
1 parent 2d3b6e9 commit b480788
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: "helm"
path: "opa-${{ steps.theVersion.outputs.theVersion }}.tgz"
path: "opa-kube-mgmt-${{ steps.theVersion.outputs.theVersion }}.tgz"

helm_job:
runs-on: ubuntu-latest
Expand Down
19 changes: 19 additions & 0 deletions charts/opa-kube-mgmt/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
appVersion: 0.0.0 # managed by git tag
version: 0.0.0 # managed by git tag
description: Manage OPA in Kubernetes with kube-mgmt sidecar.
name: opa-kube-mgmt
keywords:
- opa
- admission control
- policy
- kubernetes
- security
home: https://www.openpolicyagent.org
icon: https://raw.githubusercontent.com/open-policy-agent/opa/master/logo/logo.png
annotations:
artifacthub.io/links: |
- name: OPA source code
url: https://github.com/open-policy-agent/opa
- name: kube-mgmt source code
url: https://github.com/open-policy-agent/kube-mgmt
32 changes: 16 additions & 16 deletions charts/opa/README.md → charts/opa-kube-mgmt/README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
# OPA
# Manage OPA in Kubernetes with kube-mgmt sidecar.

[OPA](https://www.openpolicyagent.org) is an open-source general-purpose policy
engine designed for cloud-native environments.

## Prerequisites

- Kubernetes 1.9 (or newer) for validating and mutating webhook admission
controller support.
- Optional, cert-manager (https://docs.cert-manager.io/en/latest/)

## Overview

This helm chart installs `OPA` together with `kube-mgmt`
This helm chart installs `OPA` together with `kube-mgmt` sidecar,
that allows to manage OPA policies and data via Kubernetes ConfigMaps.

Optionally, the chart allows to install a [Kubernetes admission
controller](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/).

## Kick the tires
## Installation

If you just want to see something run, install the chart without any
configuration.
### Prerequisites

- Kubernetes 1.9 (or newer) for validating and mutating webhook admission
controller support.
- Optional, cert-manager (https://docs.cert-manager.io/en/latest/)

If you just want to see something run, install the chart with default configuration.

```bash
helm repo add opa https://open-policy-agent.github.io/kube-mgmt/charts
helm repo update
helm upgrade -i -n opa --create-namespace opa opa/opa
helm upgrade -i -n opa --create-namespace opa opa/opa-kube-mgmt
```

Once installed, the OPA will download a sample bundle from
https://www.openpolicyagent.org. The sample bundle contains a simple policy that
restricts the hostnames that can be specified on Ingress objects created in the
`opa-example` namespace. You can download the bundle and inspect it yourself:
Once installed, the OPA will download a sample bundle from https://www.openpolicyagent.org.
It contains a simple policy that restricts the hostnames that can be specified on Ingress objects created in the
`opa-example` namespace.

You can download the bundle and inspect it yourself:

```bash
mkdir example && cd example
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions charts/opa/Chart.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build-release:
docker tag $CURRENT $LATEST
docker push $LATEST

helm package charts/opa --version {{VERSION}} --app-version {{VERSION}}
helm package charts/opa-kube-mgmt --version {{VERSION}} --app-version {{VERSION}}

test-go:
go test ./...
Expand Down
2 changes: 1 addition & 1 deletion skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ deploy:
helm:
releases:
- name: kube-mgmt
chartPath: charts/opa
chartPath: charts/opa-kube-mgmt
wait: true
setValues:
e2e: true
Expand Down
16 changes: 8 additions & 8 deletions test/linter/test.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
#!/bin/bash

helm lint charts/opa --strict
helm lint charts/opa-kube-mgmt --strict
if [ $? -ne 0 ]; then
exit 1
fi

helm lint charts/opa --strict --set mgmt.enabled=true
helm lint charts/opa-kube-mgmt --strict --set mgmt.enabled=true
if [ $? -ne 0 ]; then
exit 1
fi

helm lint charts/opa --strict --set sar.enabled=true
helm lint charts/opa-kube-mgmt --strict --set sar.enabled=true
if [ $? -ne 0 ]; then
exit 1
fi

helm lint charts/opa --strict --set certManager.enabled=true
helm lint charts/opa-kube-mgmt --strict --set certManager.enabled=true
if [ $? -ne 0 ]; then
exit 1
fi

helm lint charts/opa --strict --set prometheus.enabled=true
helm lint charts/opa-kube-mgmt --strict --set prometheus.enabled=true
if [ $? -ne 0 ]; then
exit 1
fi

helm lint charts/opa --strict --set admissionController.enabled=true
helm lint charts/opa-kube-mgmt --strict --set admissionController.enabled=true
if [ $? -ne 0 ]; then
exit 1
fi

helm lint charts/opa --strict --set authz.enabled=true
helm lint charts/opa-kube-mgmt --strict --set authz.enabled=true
if [ $? -ne 0 ]; then
exit 1
fi

helm lint charts/opa --strict --set useHttps=false
helm lint charts/opa-kube-mgmt --strict --set useHttps=false
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down

0 comments on commit b480788

Please sign in to comment.