-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: implement Helm chart repository
- Loading branch information
0 parents
commit fbe8eba
Showing
7 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
helm_version: [3.11.1] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: '${{ matrix.helm_version }}' | ||
|
||
- name: Helm version | ||
run: helm version -c | ||
|
||
- name: Run lint | ||
run: helm lint . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
packages: write # needed for ghcr access | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install deps | ||
run: npm i -q --no-save @semantic-release/exec @semantic-release/git | ||
|
||
- name: Release a new version | ||
run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to GHCR | ||
run: helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push charts to GHCR | ||
run: helm push sniffer-chart oci://ghcr.io/${GITHUB_REPOSITORY_OWNER} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
charts/* | ||
.idea | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.github/* | ||
docs/* | ||
.git/* | ||
.gitignore | ||
CONTRIBUTING.md | ||
test/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"parserOpts": { | ||
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "angular", | ||
"parserOpts": { | ||
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES"] | ||
}, | ||
"writerOpts": { | ||
"commitsSort": ["subject", "scope"] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "case $OSTYPE in darwin*) SEDOPTION=\" \";; esac && sed -i$SEDOPTION'' -e 's/version:.*/version: ${nextRelease.version}/g' Chart.yaml" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["**/Chart.yaml"], | ||
"message": "chore(release): cut the ${nextRelease.version} release [skip ci]" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"labels": false, | ||
"releasedLabels": false, | ||
"failTitle": false, | ||
"failComment": false, | ||
"successComment": false | ||
} | ||
] | ||
], | ||
"branches": [ | ||
"main" | ||
], | ||
"ci": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Bright Security | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Helm Chart for Bright Sniffer | ||
|
||
[Helm](https://helm.sh/) must be installed to use the charts. Please refer to Helm's [documentation](https://helm.sh/docs/) to get started. | ||
|
||
## Clone the repository: | ||
|
||
```shell | ||
git clone [email protected]:NeuraLegion/sniffer-helm.git --depth 1 | ||
cd ./sniffer-helm | ||
``` | ||
|
||
## Render the Helm templates: | ||
|
||
```shell | ||
helm template . | ||
``` | ||
|
||
## Install the agent: | ||
|
||
Use the Helm command to install the Sniffer agent: | ||
|
||
```shell | ||
helm install sniffer-agent . -f values.yaml | ||
``` | ||
|
||
## Override default configurations (using values.yaml): | ||
|
||
To customize configurations, modify the `values.yaml` file as follows: | ||
|
||
```yaml | ||
api: | ||
apiKey: '<your API key with entry-points:manage or entry-points:admin scopes>' | ||
apiURL: 'https://app.brightsec.com/' | ||
projectID: '<your Bright project ID>' | ||
|
||
sniffer: | ||
image: | ||
pullPolicy: Always | ||
|
||
extraArgs: | ||
group-public-ips: true | ||
send-traffic-delta: true | ||
ebpf-dns-tracer-enabled: false | ||
``` | ||
## Uninstall the agent: | ||
To remove the Sniffer agent, use the following command: | ||
```shell | ||
helm uninstall sniffer-agent | ||
``` | ||
|
||
## License | ||
|
||
Copyright © 2024 [Bright Security](https://brightsec.com/). | ||
|
||
This project is licensed under the MIT License - see the [LICENSE file](LICENSE) for details. |