Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/k8s.io/client-go-0.29.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vishal-chdhry authored Feb 26, 2024
2 parents 7a51c98 + 5905a17 commit 8286153
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 22 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: helm-release

permissions: {}

on:
push:
tags:
- 'reports-server-chart-*'

jobs:
helm-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
- name: Run chart-testing (lint)
run: |
set -e
ct lint --target-branch=main --check-version-increment=false
linter-artifacthub:
runs-on: ubuntu-latest
container:
image: artifacthub/ah
options: --user root
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Run ah lint
working-directory: ./charts/
run: ah lint

create-release:
runs-on: ubuntu-latest
needs: helm-tests
permissions:
contents: write
packages: write
id-token: write
pages: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.10.3

- name: Install Cosign
uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0

- name: Set version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Create charts tmp directory
run: |
mkdir charts-tmp
if [[ "$RELEASE_VERSION" = "reports-server-chart-"* ]]; then
cp -a charts/reports-server charts-tmp/reports-server
fi
- name: Run chart-releaser
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 #v1.7.0
with:
token: "${{ secrets.GITHUB_TOKEN }}"
linting: off
charts_dir: charts-tmp

- name: Login to GitHub Container Registry
run: |
helm registry login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
- name: Publish OCI Charts
run: |
for dir in `find charts-tmp -maxdepth 1 -mindepth 1 -type d -print`; do
chart=${dir##*/}
echo "Found chart: ${chart}"
helm package charts-tmp/${chart} --destination .dist
helm push .dist/${chart}-*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts |& tee .digest
cosign login --username ${GITHUB_ACTOR} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io
cosign sign --yes ghcr.io/${{ github.repository_owner }}/charts/${chart}@$(cat .digest | awk -F "[, ]+" '/Digest/{print $NF}')
done
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Benefits of reports server:

## Installation

reports server can be installed in a test cluster, directly from the YAML manifest or via the official Helm chart.
The reports server can be installed in a test cluster, directly from the YAML manifest or via the official Helm chart.

### Local Install
To locally install the reports server, run the following command:
Expand Down Expand Up @@ -54,4 +54,4 @@ Note: if you already have wgpolicy CRDs or kyverno CRDs installed, you won't be
helm install report-server --namespace kyverno --wait ./charts/reports-server/ --set apiServices.enabled=false # todo: use a offical helm chart
```

Now you can update the [apiservice samples](./config/samples/apiservices.yaml) with the right reports-server name and namespace and apply that manifest.
Now you can update the [apiservice samples](./config/samples/apiservices.yaml) with the right reports-server name and namespace and apply that manifest.
4 changes: 2 additions & 2 deletions charts/reports-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: reports-server
type: application
version: 0.0.1
appVersion: v0.0.1
version: 0.1.0-alpha.1
appVersion: v0.1.0-alpha.1
keywords:
- kubernetes
- policy reports storage
Expand Down
2 changes: 1 addition & 1 deletion charts/reports-server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# reports-server

![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.1](https://img.shields.io/badge/AppVersion-v0.0.1-informational?style=flat-square)
![Version: 0.1.0-alpha.1](https://img.shields.io/badge/Version-0.1.0--alpha.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.1.0-alpha.1](https://img.shields.io/badge/AppVersion-v0.1.0--alpha.1-informational?style=flat-square)

TODO

Expand Down
34 changes: 17 additions & 17 deletions config/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ metadata:
name: reports-server
namespace: reports-server
labels:
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
---
apiVersion: v1
Expand Down Expand Up @@ -49,10 +49,10 @@ metadata:
rbac.authorization.k8s.io/aggregate-to-admin: 'true'
rbac.authorization.k8s.io/aggregate-to-edit: 'true'
rbac.authorization.k8s.io/aggregate-to-view: 'true'
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
rules:
- apiGroups:
Expand Down Expand Up @@ -105,10 +105,10 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: reports-server
labels:
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -125,10 +125,10 @@ metadata:
name: reports-server
namespace: kube-system
labels:
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand Down Expand Up @@ -204,10 +204,10 @@ metadata:
name: reports-server
namespace: reports-server
labels:
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
spec:
type: ClusterIP
Expand All @@ -226,10 +226,10 @@ metadata:
name: reports-server
namespace: reports-server
labels:
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
spec:
strategy:
Expand Down Expand Up @@ -270,7 +270,7 @@ spec:
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
image: "ghcr.io/kyverno/reports-server:v0.0.1"
image: "ghcr.io/kyverno/reports-server:v0.1.0-alpha.1"
imagePullPolicy: IfNotPresent
ports:
- name: https
Expand Down Expand Up @@ -476,10 +476,10 @@ metadata:
name: v1alpha2.wgpolicyk8s.io
namespace: reports-server
labels:
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
kube-aggregator.kubernetes.io/automanaged: "false"
spec:
Expand All @@ -498,10 +498,10 @@ metadata:
name: v1.reports.kyverno.io
namespace: reports-server
labels:
helm.sh/chart: reports-server-0.0.1
helm.sh/chart: reports-server-0.1.0-alpha.1
app.kubernetes.io/name: reports-server
app.kubernetes.io/instance: reports-server
app.kubernetes.io/version: "v0.0.1"
app.kubernetes.io/version: "v0.1.0-alpha.1"
app.kubernetes.io/managed-by: Helm
kube-aggregator.kubernetes.io/automanaged: "false"
spec:
Expand Down

0 comments on commit 8286153

Please sign in to comment.