Skip to content

Commit

Permalink
Merge pull request #3 from Exafunction/nick/merge_remote
Browse files Browse the repository at this point in the history
[Sync] Sync with remote
  • Loading branch information
njiang747 authored Jul 30, 2024
2 parents 9104e39 + 6aec25e commit 7ea8e80
Show file tree
Hide file tree
Showing 31 changed files with 589 additions and 185 deletions.
1 change: 0 additions & 1 deletion .github/ct.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
helm-extra-args: --timeout 300s
check-version-increment: true
debug: true
upgrade: true
Expand Down
65 changes: 31 additions & 34 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: ci
on:
pull_request:
paths:
- 'charts/**/**'
- "charts/**/**"

jobs:
codespell:
name: codespell
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@master
with:
Expand All @@ -25,41 +25,42 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.11.1
- uses: actions/setup-python@v4
uses: azure/[email protected]
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.x'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.3.1
uses: helm/chart-testing-action@v2.6.1
- name: Run chart-testing (lint)
run: ct lint --config .github/ct.yaml

super-linter:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
# https://github.com/github/super-linter/issues/1397
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter@v4
uses: super-linter/super-linter@v6.5.0
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_JSCPD: false
VALIDATE_KUBERNETES_KUBEVAL: false
VALIDATE_YAML: false
VALIDATE_KUBERNETES_KUBECONFORM: false
VALIDATE_CHECKOV: false

kubeconform:
runs-on: ubuntu-latest
needs:
Expand All @@ -69,24 +70,22 @@ jobs:
strategy:
matrix:
k8s:
- 1.23.17
- 1.24.11
- 1.25.7
- 1.26.2
- 1.26.15
- 1.27.14
- 1.28.10
- 1.29.5
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup helm
uses: azure/setup-helm@v3
with:
version: 3.11.1
uses: azure/[email protected]
- name: Run kubeconform tests
run: .github/kubeconform.sh
env:
KUBERNETES_VERSION: ${{ matrix.k8s }}
KUBECONFORM_VERSION: v0.6.1
KUBECONFORM_VERSION: v0.6.6
- name: Create test summary
uses: test-summary/action@v2
with:
Expand All @@ -95,31 +94,29 @@ jobs:

install-chart:
name: install-chart
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs:
- kubeconform
strategy:
matrix:
k8s:
- v1.23.13
- v1.24.7
- v1.25.3
- v1.26.2
- v1.26.15
- v1.27.13
- v1.28.9
- v1.29.4
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.11.1
- uses: actions/setup-python@v4
uses: azure/[email protected]
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: '3.x'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.3.1
uses: helm/chart-testing-action@v2.6.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
Expand All @@ -128,7 +125,7 @@ jobs:
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create kind cluster
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1
if: steps.list-changed.outputs.changed == 'true'
with:
config: .github/kind-config.yaml
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -20,11 +20,9 @@ jobs:
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: 3.11.1
uses: azure/[email protected]

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
uses: helm/chart-releaser-action@v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 2 additions & 2 deletions .github/workflows/sync-readme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- run: |
cp -f README.md ${{ runner.temp }}/README.md
Expand Down
32 changes: 27 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Unleash Kubernetes Helm Chart

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Release Charts](https://github.com/unleash/helm-charts/workflows/release-chart/badge.svg?branch=main)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Release](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml)

## Usage

[Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

Once Helm is set up properly, add the repo as follows:
Once Helm is set up properly, add the repository as follows:

```console
helm repo add unleash https://docs.getunleash.io/helm-charts
Expand All @@ -22,8 +23,7 @@ You can then run `helm search repo unleash` to see the charts.

## Kubernetes support strategy

We'll build this repo on all k8s versions that have not reached End of Life according to the [Kubernetes support period](https://kubernetes.io/releases/patch-releases/#support-period).

We'll build this repository on all k8s versions that have not reached End of Life according to the [Kubernetes support period](https://kubernetes.io/releases/patch-releases/#support-period).

## Contributing

Expand All @@ -41,4 +41,26 @@ We'd love to have you contribute! Please refer to our [contribution guidelines](

## Helm charts build status

![Release Charts](https://github.com/unleash/helm-charts/workflows/release-chart/badge.svg?branch=main)
[![Release](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/Unleash/helm-charts/actions/workflows/release.yaml)

## Releasing the charts

To release new versions of the charts, you must update the chart version in the Chart.yaml file and then merge these modifications into the main branch. Following this, the workflow will detect these changes and automatically release a new version of the modified Helm chart.

## Helm repository

This repository employs a process that converts it into a Helm repository, specifically using the Helm Chart Releaser Action version 1.5.0. It leverages GitHub Pages for hosting the artifacts. Furthermore, the [Unleash documentation on Helm charts](https://docs.getunleash.io/helm-charts) utilizes a CNAME to direct to the GitHub Pages.

The specific workflow is outlined in the file located at .github/workflows/release.yml. This workflow activates whenever there's an update to the chart version, which consequently prompts an update to the repository with the new chart version.

## Testing the helm chart locally

To test the helm chart locally, first you should set up a local k8s environment. An easy way to do this is to set up kind, you can see instructions for setting it up [here](https://github.com/bricks-software/unleash-infra-docs/blob/main/commands/k8s.md).

Once you have your local k8s environment set up, you can run the following command to install the helm chart locally:

```bash
helm install --debug --generate-name . # this will install the chart using the local files provided you are in the folder that contains the chart
# To see the output of the helm chart without running it locally, you can run the following command:
helm install --debug --dry-run --generate-name .
```
12 changes: 9 additions & 3 deletions charts/unleash-edge/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
---
apiVersion: v2
name: unleash-edge
description: A Helm chart for deploying Unleash Edge to kubernetes
icon: https://docs.getunleash.io/img/logo.svg

type: application
version: 2.0.2

appVersion: "v11.0.2"
version: 2.6.5

appVersion: "v19.2.0"

maintainers:
- name: chriswk
- name: sighphyre
- name: nunogois
- name: gastonfournier

sources:
- https://github.com/Unleash/unleash-edge
- https://github.com/Unleash/helm-charts
14 changes: 14 additions & 0 deletions charts/unleash-edge/ci/unleash-edge-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,17 @@ ingress:

edge:
upstreamUrl: "http://unleash:4242"

readinessProbe:
enabled: true
path: /internal-backstage/health
initialDelaySeconds: 30
timeoutSeconds: 10
periodSeconds: 10
successThreshold: 5

livenessProbe:
enabled: true
path: /internal-backstage/health
initialDelaySeconds: 30
timeoutSeconds: 10
15 changes: 15 additions & 0 deletions charts/unleash-edge/examples/hostaliases.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
edge:
upstreamUrl: http://unleash.unleash:4242

hostAliases:
- ip: "127.0.0.1"
hostnames:
- "foo.local"

resources:
requests:
cpu: 100m
memory: 64Mi
limits:
cpu: 200m
memory: 64Mi
Loading

0 comments on commit 7ea8e80

Please sign in to comment.