mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-05 15:37:19 +00:00
Merge pull request #881 from evalsocket/fix-875
helm release workflow added
This commit is contained in:
commit
ecf66c5948
8 changed files with 46 additions and 119 deletions
45
.github/workflows/helm-release.yaml
vendored
Normal file
45
.github/workflows/helm-release.yaml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
name: helm-package
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
paths:
|
||||||
|
- 'charts/kyverno/**'
|
||||||
|
env:
|
||||||
|
HELM_CHART_URL: "https://nirmata.github.io/kyverno/helm-charts/"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Install Helm
|
||||||
|
run: |
|
||||||
|
curl -sSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get
|
||||||
|
chmod 700 get_helm.sh
|
||||||
|
./get_helm.sh
|
||||||
|
helm init --client-only
|
||||||
|
- name: Check Chart Version
|
||||||
|
run: |
|
||||||
|
helm repo add evalsocket ${{ env.HELM_CHART_URL }} || (echo "Kyverno Repository not available")
|
||||||
|
helm search nirmata/kyverno --version `cat charts/kyverno/Chart.yaml | grep '^version: [[:alnum:]]' | awk '{print $2}'` > HELM_CHART_STATUS.txt
|
||||||
|
HELM_CHART_STATUS=`cat HELM_CHART_STATUS.txt`
|
||||||
|
if [ "${HELM_CHART_STATUS}" != 'No results found' ]; then
|
||||||
|
echo 'Version already exist, impossible to continue...'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Check sintax
|
||||||
|
run: helm lint charts/kyverno/
|
||||||
|
- name: Create package
|
||||||
|
run: |
|
||||||
|
mkdir -p output/helm-charts/
|
||||||
|
helm package charts/kyverno/ -d output/helm-charts/
|
||||||
|
- name: Release
|
||||||
|
uses: JamesIves/github-pages-deploy-action@releases/v3
|
||||||
|
with:
|
||||||
|
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
BRANCH: gh-pages
|
||||||
|
FOLDER: output
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: v2
|
apiVersion: v1
|
||||||
name: kyverno
|
name: kyverno
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
appVersion: v1.1.5
|
appVersion: v1.1.5
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
# Kyverno Web Site
|
|
||||||
|
|
||||||
This folder contains the https://kyverno.io website.
|
|
||||||
|
|
||||||
The site is published in the gh_pages branch. To build the site:
|
|
||||||
|
|
||||||
1. Clone the Hugo template:
|
|
||||||
|
|
||||||
````bash
|
|
||||||
cd themes
|
|
||||||
git clone https://github.com/nirmata/github-project-landing-page
|
|
||||||
````
|
|
||||||
|
|
||||||
2. Make changes as needed. Then publish using:
|
|
||||||
|
|
||||||
````bash
|
|
||||||
publish-to-gh-pages.sh
|
|
||||||
````
|
|
||||||
|
|
||||||
To build and test locally, install and run hugo:
|
|
||||||
|
|
||||||
````bash
|
|
||||||
hugo server
|
|
||||||
````
|
|
|
@ -1,6 +0,0 @@
|
||||||
---
|
|
||||||
title: "{{ replace .Name "-" " " | title }}"
|
|
||||||
date: {{ .Date }}
|
|
||||||
draft: true
|
|
||||||
---
|
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
baseURL = "https://kyverno.io/"
|
|
||||||
themesDir = "themes"
|
|
||||||
theme = "github-project-landing-page"
|
|
||||||
title = "Kyverno"
|
|
||||||
canonifyURLs=true
|
|
||||||
relativeURLs=true
|
|
||||||
|
|
||||||
[params]
|
|
||||||
description = "Kubernetes Native Policy Management"
|
|
||||||
long_description = '''
|
|
||||||
Manage policies as Kubernetes resources. Validate, mutate, and generate configurations.
|
|
||||||
Select resources based on labels and wildcards. View policy enforcement as events. Detect
|
|
||||||
policy violations for existing resources.'''
|
|
||||||
author_name = "Nirmata"
|
|
||||||
author_url = "https://nirmata.com"
|
|
||||||
project_url = "https://github.com/nirmata/kyverno/"
|
|
||||||
project_documentation = "https://github.com/nirmata/kyverno/blob/master/README.md"
|
|
||||||
github_project_name = "kyverno"
|
|
||||||
github_user_name = "nirmata"
|
|
||||||
logo = "img/kyverno.png"
|
|
||||||
|
|
||||||
first_color="#f8f8f8"
|
|
||||||
first_border_color="#e7e7e7"
|
|
||||||
first_text_color="#333"
|
|
||||||
|
|
||||||
second_color="white"
|
|
||||||
second_text_color="#333"
|
|
||||||
|
|
||||||
header_color="#f8f8f8"
|
|
||||||
header_text_color="rgb(51, 51, 51)"
|
|
||||||
|
|
||||||
header_link_color="#777"
|
|
||||||
header_link_hover_color="rgb(51, 51, 51)"
|
|
|
@ -1,24 +0,0 @@
|
||||||
# Features
|
|
||||||
|
|
||||||
* Policy definitions as Kubernetes resources
|
|
||||||
|
|
||||||
* Validate, mutate, or generate Kubernetes resources
|
|
||||||
|
|
||||||
* Match resources using label selectors and wildcards
|
|
||||||
|
|
||||||
* Mutate using overlays (like Kustomize) or JSON Patch
|
|
||||||
|
|
||||||
* Validate using overlays and powerful conditionals
|
|
||||||
|
|
||||||
* Generate default resources during namespace creation
|
|
||||||
|
|
||||||
* Reporting of policy violations for existing resources
|
|
||||||
|
|
||||||
* Kubernetes events for resource changes and policy enforcement
|
|
||||||
|
|
||||||
* Test policy changes using kubectl
|
|
||||||
|
|
||||||
|
|
||||||
<p style="margin-top: 30px; margin-left:15px; font-size: 110%;">
|
|
||||||
Ready for more? <a href="https://github.com/nirmata/kyverno/blob/master/README.md">Read the docs</a>, <a href="https://github.com/nirmata/kyverno/blob/master/documentation/writing-policies.md">write a policy</a>, or <a href="https://github.com/nirmata/kyverno/blob/master/documentation/installation.md">try Kyverno in your cluster</a>!
|
|
||||||
</p>
|
|
Binary file not shown.
Before Width: | Height: | Size: 248 KiB |
|
@ -1,31 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DIR=$(dirname "$0")
|
|
||||||
|
|
||||||
if [[ $(git status -s) ]]
|
|
||||||
then
|
|
||||||
echo "The working directory is dirty. Please commit any pending changes."
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Deleting old publication"
|
|
||||||
rm -rf public
|
|
||||||
mkdir public
|
|
||||||
git worktree prune
|
|
||||||
rm -rf .git/worktrees/public/
|
|
||||||
|
|
||||||
echo "Checking out gh-pages branch into public"
|
|
||||||
git worktree add -B gh-pages public origin/gh-pages
|
|
||||||
|
|
||||||
echo "Removing existing files"
|
|
||||||
rm -rf public/*
|
|
||||||
|
|
||||||
echo "Generating site"
|
|
||||||
hugo
|
|
||||||
|
|
||||||
echo "Updating gh-pages branch"
|
|
||||||
cd public && git add --all && git commit -m "Publishing to gh-pages (publish.sh)"
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
echo "done!"
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue