diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml new file mode 100644 index 0000000000..f507810838 --- /dev/null +++ b/.github/workflows/helm-release.yaml @@ -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 diff --git a/charts/kyverno/Chart.yaml b/charts/kyverno/Chart.yaml index 048d983557..412ac77b62 100644 --- a/charts/kyverno/Chart.yaml +++ b/charts/kyverno/Chart.yaml @@ -1,4 +1,4 @@ -apiVersion: v2 +apiVersion: v1 name: kyverno version: 0.0.1 appVersion: v1.1.5 diff --git a/gh-pages/README.md b/gh-pages/README.md deleted file mode 100644 index 71a742be86..0000000000 --- a/gh-pages/README.md +++ /dev/null @@ -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 -```` diff --git a/gh-pages/archetypes/default.md b/gh-pages/archetypes/default.md deleted file mode 100644 index 00e77bd79b..0000000000 --- a/gh-pages/archetypes/default.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} -draft: true ---- - diff --git a/gh-pages/config.toml b/gh-pages/config.toml deleted file mode 100644 index e1419187e4..0000000000 --- a/gh-pages/config.toml +++ /dev/null @@ -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)" diff --git a/gh-pages/content/features.md b/gh-pages/content/features.md deleted file mode 100644 index 07aacf794c..0000000000 --- a/gh-pages/content/features.md +++ /dev/null @@ -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 - - -
-Ready for more? Read the docs, write a policy, or try Kyverno in your cluster! -
\ No newline at end of file diff --git a/gh-pages/content/img/kyverno.png b/gh-pages/content/img/kyverno.png deleted file mode 100644 index a4e8dec82b..0000000000 Binary files a/gh-pages/content/img/kyverno.png and /dev/null differ diff --git a/gh-pages/publish-to-gh-pages.sh b/gh-pages/publish-to-gh-pages.sh deleted file mode 100644 index 98da6b8513..0000000000 --- a/gh-pages/publish-to-gh-pages.sh +++ /dev/null @@ -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!" -