From 645098fb860977394144fea761552991986e7f32 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Jan 2025 13:29:35 +0100 Subject: [PATCH 1/4] Move lago chart to a more standard chart structure --- .github/workflows/chart-testing.yml | 12 ++++++------ Chart.yaml => charts/lago/Chart.yaml | 0 charts/{ => lago/charts}/minio-5.2.0.tgz | Bin charts/{ => lago/charts}/postgresql-13.2.2.tgz | Bin charts/{ => lago/charts}/redis-18.2.1.tgz | Bin cr.yaml => charts/lago/cr.yaml | 0 {templates => charts/lago/templates}/_helpers.tpl | 0 .../lago/templates}/api-deployment.yaml | 0 .../lago/templates}/api-service.yaml | 0 .../lago/templates}/billing-worker-deployment.yaml | 0 .../lago/templates}/clock-deployment.yaml | 0 .../lago/templates}/clock-worker-deployment.yaml | 0 .../lago/templates}/events-worker-deployment.yaml | 0 .../lago/templates}/front-deployment.yaml | 0 .../lago/templates}/front-service.yaml | 0 {templates => charts/lago/templates}/ingress.yaml | 0 .../lago/templates}/migrate-job.yaml | 0 .../lago/templates}/network-policy.yaml | 0 .../lago/templates}/pdf-deployment.yaml | 0 .../lago/templates}/pdf-service.yaml | 0 .../lago/templates}/pdf-worker-deployment.yaml | 0 {templates => charts/lago/templates}/secrets.yaml | 0 .../lago/templates}/serviceaccount.yml | 0 .../storage-data-persistentvolumeclaim.yaml | 0 .../lago/templates}/webhook-worker-deployment.yaml | 0 .../lago/templates}/worker-deployment.yaml | 0 values.yaml => charts/lago/values.yaml | 0 ct.yaml | 8 ++++++++ 28 files changed, 14 insertions(+), 6 deletions(-) rename Chart.yaml => charts/lago/Chart.yaml (100%) rename charts/{ => lago/charts}/minio-5.2.0.tgz (100%) rename charts/{ => lago/charts}/postgresql-13.2.2.tgz (100%) rename charts/{ => lago/charts}/redis-18.2.1.tgz (100%) rename cr.yaml => charts/lago/cr.yaml (100%) rename {templates => charts/lago/templates}/_helpers.tpl (100%) rename {templates => charts/lago/templates}/api-deployment.yaml (100%) rename {templates => charts/lago/templates}/api-service.yaml (100%) rename {templates => charts/lago/templates}/billing-worker-deployment.yaml (100%) rename {templates => charts/lago/templates}/clock-deployment.yaml (100%) rename {templates => charts/lago/templates}/clock-worker-deployment.yaml (100%) rename {templates => charts/lago/templates}/events-worker-deployment.yaml (100%) rename {templates => charts/lago/templates}/front-deployment.yaml (100%) rename {templates => charts/lago/templates}/front-service.yaml (100%) rename {templates => charts/lago/templates}/ingress.yaml (100%) rename {templates => charts/lago/templates}/migrate-job.yaml (100%) rename {templates => charts/lago/templates}/network-policy.yaml (100%) rename {templates => charts/lago/templates}/pdf-deployment.yaml (100%) rename {templates => charts/lago/templates}/pdf-service.yaml (100%) rename {templates => charts/lago/templates}/pdf-worker-deployment.yaml (100%) rename {templates => charts/lago/templates}/secrets.yaml (100%) rename {templates => charts/lago/templates}/serviceaccount.yml (100%) rename {templates => charts/lago/templates}/storage-data-persistentvolumeclaim.yaml (100%) rename {templates => charts/lago/templates}/webhook-worker-deployment.yaml (100%) rename {templates => charts/lago/templates}/worker-deployment.yaml (100%) rename values.yaml => charts/lago/values.yaml (100%) create mode 100644 ct.yaml diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml index fc136fb..09c9db7 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -10,29 +10,29 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - + - name: Set up Helm uses: azure/setup-helm@v3 with: version: v3.12.1 - + - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" check-latest: true - + - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.0 - name: Run chart-testing (list-changed) id: list-changed run: | - changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + changed=$(ct list-changed --config ct.yaml) if [[ -n "$changed" ]]; then echo "changed=true" >> "$GITHUB_OUTPUT" fi - + - name: Run chart-testing (lint) if: steps.list-changed.outputs.changed == 'true' run: ct lint --target-branch ${{ github.event.repository.default_branch }} diff --git a/Chart.yaml b/charts/lago/Chart.yaml similarity index 100% rename from Chart.yaml rename to charts/lago/Chart.yaml diff --git a/charts/minio-5.2.0.tgz b/charts/lago/charts/minio-5.2.0.tgz similarity index 100% rename from charts/minio-5.2.0.tgz rename to charts/lago/charts/minio-5.2.0.tgz diff --git a/charts/postgresql-13.2.2.tgz b/charts/lago/charts/postgresql-13.2.2.tgz similarity index 100% rename from charts/postgresql-13.2.2.tgz rename to charts/lago/charts/postgresql-13.2.2.tgz diff --git a/charts/redis-18.2.1.tgz b/charts/lago/charts/redis-18.2.1.tgz similarity index 100% rename from charts/redis-18.2.1.tgz rename to charts/lago/charts/redis-18.2.1.tgz diff --git a/cr.yaml b/charts/lago/cr.yaml similarity index 100% rename from cr.yaml rename to charts/lago/cr.yaml diff --git a/templates/_helpers.tpl b/charts/lago/templates/_helpers.tpl similarity index 100% rename from templates/_helpers.tpl rename to charts/lago/templates/_helpers.tpl diff --git a/templates/api-deployment.yaml b/charts/lago/templates/api-deployment.yaml similarity index 100% rename from templates/api-deployment.yaml rename to charts/lago/templates/api-deployment.yaml diff --git a/templates/api-service.yaml b/charts/lago/templates/api-service.yaml similarity index 100% rename from templates/api-service.yaml rename to charts/lago/templates/api-service.yaml diff --git a/templates/billing-worker-deployment.yaml b/charts/lago/templates/billing-worker-deployment.yaml similarity index 100% rename from templates/billing-worker-deployment.yaml rename to charts/lago/templates/billing-worker-deployment.yaml diff --git a/templates/clock-deployment.yaml b/charts/lago/templates/clock-deployment.yaml similarity index 100% rename from templates/clock-deployment.yaml rename to charts/lago/templates/clock-deployment.yaml diff --git a/templates/clock-worker-deployment.yaml b/charts/lago/templates/clock-worker-deployment.yaml similarity index 100% rename from templates/clock-worker-deployment.yaml rename to charts/lago/templates/clock-worker-deployment.yaml diff --git a/templates/events-worker-deployment.yaml b/charts/lago/templates/events-worker-deployment.yaml similarity index 100% rename from templates/events-worker-deployment.yaml rename to charts/lago/templates/events-worker-deployment.yaml diff --git a/templates/front-deployment.yaml b/charts/lago/templates/front-deployment.yaml similarity index 100% rename from templates/front-deployment.yaml rename to charts/lago/templates/front-deployment.yaml diff --git a/templates/front-service.yaml b/charts/lago/templates/front-service.yaml similarity index 100% rename from templates/front-service.yaml rename to charts/lago/templates/front-service.yaml diff --git a/templates/ingress.yaml b/charts/lago/templates/ingress.yaml similarity index 100% rename from templates/ingress.yaml rename to charts/lago/templates/ingress.yaml diff --git a/templates/migrate-job.yaml b/charts/lago/templates/migrate-job.yaml similarity index 100% rename from templates/migrate-job.yaml rename to charts/lago/templates/migrate-job.yaml diff --git a/templates/network-policy.yaml b/charts/lago/templates/network-policy.yaml similarity index 100% rename from templates/network-policy.yaml rename to charts/lago/templates/network-policy.yaml diff --git a/templates/pdf-deployment.yaml b/charts/lago/templates/pdf-deployment.yaml similarity index 100% rename from templates/pdf-deployment.yaml rename to charts/lago/templates/pdf-deployment.yaml diff --git a/templates/pdf-service.yaml b/charts/lago/templates/pdf-service.yaml similarity index 100% rename from templates/pdf-service.yaml rename to charts/lago/templates/pdf-service.yaml diff --git a/templates/pdf-worker-deployment.yaml b/charts/lago/templates/pdf-worker-deployment.yaml similarity index 100% rename from templates/pdf-worker-deployment.yaml rename to charts/lago/templates/pdf-worker-deployment.yaml diff --git a/templates/secrets.yaml b/charts/lago/templates/secrets.yaml similarity index 100% rename from templates/secrets.yaml rename to charts/lago/templates/secrets.yaml diff --git a/templates/serviceaccount.yml b/charts/lago/templates/serviceaccount.yml similarity index 100% rename from templates/serviceaccount.yml rename to charts/lago/templates/serviceaccount.yml diff --git a/templates/storage-data-persistentvolumeclaim.yaml b/charts/lago/templates/storage-data-persistentvolumeclaim.yaml similarity index 100% rename from templates/storage-data-persistentvolumeclaim.yaml rename to charts/lago/templates/storage-data-persistentvolumeclaim.yaml diff --git a/templates/webhook-worker-deployment.yaml b/charts/lago/templates/webhook-worker-deployment.yaml similarity index 100% rename from templates/webhook-worker-deployment.yaml rename to charts/lago/templates/webhook-worker-deployment.yaml diff --git a/templates/worker-deployment.yaml b/charts/lago/templates/worker-deployment.yaml similarity index 100% rename from templates/worker-deployment.yaml rename to charts/lago/templates/worker-deployment.yaml diff --git a/values.yaml b/charts/lago/values.yaml similarity index 100% rename from values.yaml rename to charts/lago/values.yaml diff --git a/ct.yaml b/ct.yaml new file mode 100644 index 0000000..38d65e3 --- /dev/null +++ b/ct.yaml @@ -0,0 +1,8 @@ +remote: origin +target-branch: main +chart-dirs: + - charts +chart-repos: + - bitnami=https://charts.bitnami.com/bitnami + - minio=https://charts.min.io/ +validate-maintainers: false From 98fe72aa2621e9a2fcb137a187a359c97816b664 Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Jan 2025 13:31:06 +0100 Subject: [PATCH 2/4] move cr.yml --- charts/{lago => }/cr.yaml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename charts/{lago => }/cr.yaml (100%) diff --git a/charts/lago/cr.yaml b/charts/cr.yaml similarity index 100% rename from charts/lago/cr.yaml rename to charts/cr.yaml From 0e60674271f84c73e4d6d3746df1b2fef0c4260f Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Jan 2025 13:33:44 +0100 Subject: [PATCH 3/4] Fix values.yaml to comply with linting --- charts/lago/values.yaml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/charts/lago/values.yaml b/charts/lago/values.yaml index 00be471..3e31254 100644 --- a/charts/lago/values.yaml +++ b/charts/lago/values.yaml @@ -2,8 +2,8 @@ version: 1.17.4 # Required: Set the URLs for your API and Frontend services # Replace these placeholders with the actual domain names. -apiUrl: "" # Example: https://api.mydomain.dev -frontUrl: "" # Example: https://app.mydomain.dev +apiUrl: "" # Example: https://api.mydomain.dev +frontUrl: "" # Example: https://app.mydomain.dev # Only for Development, Staging or PoC, you should use a managed Redis instance for Production redis: @@ -24,12 +24,12 @@ postgresql: global: # Define your Lago Premium License - #license: + # license: # If you use a managed PG instance # Should respect this format postgresql://USER:PASSWORD@HOST:PORT/DATABASE_NAME - #databaseUrl: + # databaseUrl: # Should respect standard redis URL format redis://..., redis+sentinel://... - #redisUrl: + # redisUrl: # If you wish to provide an existing secret with credentials in, then you can do so here. # The following fields are required: @@ -39,7 +39,7 @@ global: # - awsS3SecretAccessKey: # - smtpUsername: # - smtpPassword: - #existingSecret: "lago-credentials" + # existingSecret: "lago-credentials" # Not required if using existingSecret postgresql: auth: @@ -56,23 +56,23 @@ global: s3: enabled: false # accessKeyId and secretAccessKey are not required here if using existingSecret - #accessKeyId: "" - #secretAccessKey: "" - #bucket: "" - #region: "" - #endpoint: "https://s3..amazonaws.com" # Leave empty for default AWS S3 endpoint + # accessKeyId: "" + # secretAccessKey: "" + # bucket: "" + # region: "" + # endpoint: "https://s3..amazonaws.com" # Leave empty for default AWS S3 endpoint smtp: # username and password are not required here if using existingSecret enabled: false - #address: - #username: - #password: - #port: - #fromEmail: + # address: + # username: + # password: + # port: + # fromEmail: newRelic: enabled: false - #key: + # key: # You can disable Lago's signup signup: @@ -90,10 +90,10 @@ global: egress: [] ingress: [] - #serviceAccountName: + # serviceAccountName: # If kubectlVersion is not supplied it will be inferred using the version of the cluster that Lago is deployed on. - #kubectlVersion: 1.29 + # kubectlVersion: 1.29 front: replicas: 1 From 1ec65a7df35c3f4c9363b0e321d5b6b2145fa7fb Mon Sep 17 00:00:00 2001 From: Toon Willems Date: Tue, 14 Jan 2025 13:35:42 +0100 Subject: [PATCH 4/4] use ct.yaml when linting --- .github/workflows/chart-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml index 09c9db7..da034d9 100644 --- a/.github/workflows/chart-testing.yml +++ b/.github/workflows/chart-testing.yml @@ -35,4 +35,4 @@ jobs: - name: Run chart-testing (lint) if: steps.list-changed.outputs.changed == 'true' - run: ct lint --target-branch ${{ github.event.repository.default_branch }} + run: ct lint --config ct.yaml