-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aws: update chart settings and CI (#48)
* aws: update chart values * fluent-bit: moved up one directory * workflows: added auto-sync of releases * workflows: added chart linting Signed-off-by: Patrick Stephens <[email protected]>
- Loading branch information
1 parent
db1313e
commit d5c5e16
Showing
21 changed files
with
167 additions
and
41 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
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,63 @@ | ||
name: Sync latest core release | ||
# We pull from here to prevent too much coupling to the core repo. | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 23 * * *" | ||
|
||
jobs: | ||
sync-core-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
# Not required as we use CI_PAT directly so we can trigger workflows | ||
# pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.CI_PAT }} | ||
|
||
- id: get-fb-release | ||
run: | | ||
curl -sSfl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/calyptia/calyptia-fluent-bit/releases/latest | ||
LATEST_RELEASE_TAG=$(curl -sSfl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/calyptia/calyptia-fluent-bit/releases/latest|jq -r .tag_name) | ||
echo "Found tag for latest release: $LATEST_RELEASE_TAG" | ||
echo "tag=$LATEST_RELEASE_TAG" >> $GITHUB_OUTPUT | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CI_PAT }} | ||
|
||
# Note we assume a simple version update so no chart version update | ||
- name: Run the sed on the chart file | ||
run: | | ||
if [[ "$NEW_CALYPTIA_FB_VERSION" =~ ^v?([0-9]+\.[0-9]+\.[0-9]+)$ ]] ; then | ||
NEW_CALYPTIA_FB_VERSION=${BASH_REMATCH[1]} | ||
echo "Valid version string: $NEW_CALYPTIA_FB_VERSION" | ||
else | ||
echo "ERROR: Invalid semver string: $NEW_CALYPTIA_FB_VERSION" | ||
exit 1 | ||
fi | ||
sed -i "s/^version.*$/version: $NEW_CALYPTIA_FB_VERSION/g" ./charts/fluent-bit/Chart.yaml | ||
sed -i "s/^appVersion.*$/appVersion: v$NEW_CALYPTIA_FB_VERSION/g" ./charts/fluent-bit/Chart.yaml | ||
echo "chart version=$NEW_CALYPTIA_FB_VERSION" >> $GITHUB_OUTPUT | ||
echo "app version=v$NEW_CALYPTIA_FB_VERSION" >> $GITHUB_OUTPUT | ||
env: | ||
NEW_CALYPTIA_FB_VERSION: ${{ steps.get-fb-release.outputs.tag }} | ||
shell: bash | ||
|
||
- name: Generate PR | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
commit-message: 'ci: update to latest LTS version' | ||
signoff: true | ||
branch: ci_update_lts | ||
delete-branch: true | ||
title: 'ci: update to latest LTS version' | ||
# We need workflows permission so have to use the CI_PAT | ||
token: ${{ secrets.CI_PAT }} | ||
labels: ci,automerge | ||
body: | | ||
Update LTS version | ||
- Created by ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
- Auto-generated by create-pull-request: https://github.com/peter-evans/create-pull-request | ||
draft: false |
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 |
---|---|---|
|
@@ -21,3 +21,45 @@ jobs: | |
steps: | ||
- name: Run markdownlint | ||
uses: actionshub/[email protected] | ||
|
||
lint-chart: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.11.2 | ||
|
||
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and | ||
# yamllint (https://github.com/adrienverge/yamllint) which require Python | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
shell: bash | ||
|
||
- name: Run chart-testing (lint) | ||
run: ct lint --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
- name: Create kind cluster | ||
uses: helm/[email protected] | ||
if: steps.list-changed.outputs.changed == 'true' | ||
|
||
- name: Run chart-testing (install) | ||
run: ct install --target-branch ${{ github.event.repository.default_branch }} |
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 |
---|---|---|
|
@@ -18,8 +18,13 @@ jobs: | |
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
with: | ||
charts_dir: charts | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
|
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
File renamed without changes.
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,40 @@ | ||
# AWS Marketplace Calyptia Fluent Bit | ||
|
||
A helm chart intended to be used with the [AWS marketplace version of Calyptia Fluent Bit](https://aws.amazon.com/marketplace/pp/prodview-z2en74bwhkfug). | ||
|
||
## Usage | ||
|
||
Ensure a service account is set up with the `arn:aws:iam::aws:policy/AWSMarketplaceMeteringRegisterUsage` policy to register usage correctly. | ||
|
||
```shell | ||
eksctl create cluster | ||
|
||
eksctl utils associate-iam-oidc-provider --cluster=<clusterName> --approve | ||
|
||
eksctl create iamserviceaccount --cluster=<clusterName> --name=eks-calyptia-fluentbit --namespace=<serviceAccountNamespace> --attach-policy-arn=arn:aws:iam::aws:policy/AWSMarketplaceMeteringRegisterUsage --approve | ||
``` | ||
|
||
[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 has been set up correctly, add the repo as follows: | ||
|
||
```shell | ||
helm repo add calyptia https://calyptia.github.io/charts | ||
``` | ||
|
||
If you had already added this repo earlier, run `helm repo update` to retrieve | ||
the latest versions of the packages. You can then run `helm search repo | ||
<alias>` to see the charts. | ||
|
||
To install the calyptia-fluentbit chart: | ||
|
||
```shell | ||
helm install calyptia-fluentbit <alias>/<chart-name> | ||
``` | ||
|
||
To uninstall the chart: | ||
|
||
```shell | ||
helm delete calyptia-fluentbit | ||
``` |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
# See https://github.com/helm/chart-testing#configuration | ||
remote: origin | ||
chart-dirs: | ||
- charts | ||
helm-extra-args: --timeout=500s | ||
target-branch: main |