-
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.
Merge pull request #83 from kube-logging/helm-chart
feat(charts): create helm chart for telemetry controller
- Loading branch information
Showing
17 changed files
with
24,927 additions
and
55 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 |
---|---|---|
|
@@ -26,6 +26,15 @@ on: | |
container-image-ref: | ||
description: Container image ref | ||
value: ${{ jobs.container-image.outputs.ref }} | ||
helm-chart-name: | ||
description: Helm chart OCI name | ||
value: ${{ jobs.helm-chart.outputs.name }} | ||
helm-chart-tag: | ||
description: Helm chart tag | ||
value: ${{ jobs.helm-chart.outputs.tag }} | ||
helm-chart-package: | ||
description: Helm chart package name | ||
value: ${{ jobs.helm-chart.outputs.package }} | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -142,3 +151,93 @@ jobs: | |
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5 | ||
with: | ||
sarif_file: trivy-results.sarif | ||
helm-chart: | ||
name: Helm chart | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
id-token: write | ||
security-events: write | ||
|
||
outputs: | ||
name: ${{ steps.oci-chart-name.outputs.value }} | ||
tag: ${{ steps.version.outputs.value }} | ||
package: ${{ steps.build.outputs.package }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
|
||
- name: Set chart name | ||
id: chart-name | ||
run: echo "value=${{ github.event.repository.name }}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Set OCI registry name | ||
id: oci-registry-name | ||
run: echo "value=ghcr.io/${{ github.repository_owner }}/helm-charts" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Set OCI chart name | ||
id: oci-chart-name | ||
run: echo "value=${{ steps.oci-registry-name.outputs.value }}/${{ steps.chart-name.outputs.value }}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Helm lint | ||
run: helm lint charts/${{ steps.chart-name.outputs.value }} | ||
|
||
- name: Determine raw version | ||
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1 | ||
id: version | ||
with: | ||
cond: ${{ inputs.release }} | ||
if_true: ${{ github.ref_name }} | ||
if_false: 0.0.0 | ||
|
||
- name: Helm package | ||
id: build | ||
run: | | ||
helm package charts/${{ steps.chart-name.outputs.value }} --version ${{ steps.version.outputs.value }} --app-version ${{ steps.version.outputs.value }} | ||
echo "package=${{ steps.chart-name.outputs.value }}-${{ steps.version.outputs.value }}.tgz" >> "$GITHUB_OUTPUT" | ||
- name: Upload chart as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "[${{ github.job }}] Helm chart" | ||
path: ${{ steps.build.outputs.package }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ github.token }} | ||
if: inputs.publish && inputs.release | ||
|
||
- name: Helm push | ||
run: helm push ${{ steps.build.outputs.package }} oci://${{ steps.oci-registry-name.outputs.value }} | ||
env: | ||
HELM_REGISTRY_CONFIG: ~/.docker/config.json | ||
if: inputs.publish && inputs.release | ||
|
||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0 | ||
with: | ||
scan-type: config | ||
scan-ref: charts/${{ steps.chart-name.outputs.value }} | ||
format: sarif | ||
output: trivy-results.sarif | ||
|
||
- name: Upload Trivy scan results as artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "[${{ github.job }}] Trivy scan results" | ||
path: trivy-results.sarif | ||
retention-days: 5 | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8 | ||
with: | ||
sarif_file: trivy-results.sarif |
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 |
---|---|---|
|
@@ -31,4 +31,4 @@ crddir | |
|
||
.DS_Store | ||
|
||
go.work.sum | ||
go.work.sum |
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
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
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.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 @@ | ||
dependencies: | ||
- name: opentelemetry-operator | ||
repository: https://open-telemetry.github.io/opentelemetry-helm-charts | ||
version: 0.68.1 | ||
digest: sha256:39aeb55ab857b7c6aed36ed56825444dd8143b772288c7dcfeb4227cd19d6461 | ||
generated: "2024-09-02T16:06:49.084247+02:00" |
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,13 @@ | ||
apiVersion: v2 | ||
name: telemetry-controller | ||
description: A Helm chart for deploying telemetry-controller | ||
|
||
type: application | ||
|
||
version: 0.0.0 | ||
appVersion: latest | ||
|
||
dependencies: | ||
- name: opentelemetry-operator | ||
version: 0.68.1 | ||
repository: https://open-telemetry.github.io/opentelemetry-helm-charts |
Binary file not shown.
Oops, something went wrong.