Skip to content

Commit

Permalink
Merge branch 'main' into EVEREST-1595
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankshah1607 authored Oct 31, 2024
2 parents 7156445 + 9f2660a commit 138b7ef
Show file tree
Hide file tree
Showing 6 changed files with 128 additions and 10 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/everest-pr-checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Everest PR checks
on:
pull_request:
paths:
- 'charts/everest/**'
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.15.4

- uses: azure/setup-kubectl@v4

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config .github/ct.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
run: |
# Ensure common sub-chart is linted and has version increment
ct lint --config .github/ct.yaml --lint-conf .github/lintconf.yaml --chart-dirs=charts/everest/charts --excluded-charts=everest-db-namespace
# Ensure main chart is linted, skip version increment check
ct lint --config .github/ct.yaml --lint-conf .github/lintconf.yaml --check-version-increment=false
# Ensure all sub-charts are linted, skip version increment check
ct lint --config .github/ct.yaml --lint-conf .github/lintconf.yaml --chart-dirs=charts/everest/charts --check-version-increment=false
- name: Create kind cluster
uses: helm/[email protected]
# Only build a kind cluster if there are chart changes to test.
if: steps.list-changed.outputs.changed == 'true'

- name: Basic tests
run: |
# Install the chart
helm install everest-core ./charts/everest --create-namespace --namespace everest-system
# Wait for system components
kubectl wait --for=condition=available --timeout=60s deployment/percona-everest -n everest-system
kubectl wait --for=condition=available --timeout=60s deployment/everest-operator -n everest-system
# Provision DB namespace
kubectl create ns everest
kubectl label ns everest app.kubernetes.io/managed-by=everest
helm install everest ./charts/everest/charts/everest-db-namespace --namespace everest
# Ensure operators are installed
subs=$(kubectl -n everest get subscription -o jsonpath='{.items[*].metadata.name}')
for sub in $subs
do
echo "Waiting for InstallPlan to be created for Subscription $sub"
kubectl wait --for=jsonpath='.status.installplan.name' sub/$sub -n everest --timeout=600s
ip=$(kubectl -n everest get sub $sub -o jsonpath='{.status.installplan.name}')
echo "InstallPlan $ip created for Subscription $sub"
echo "Waiting for InstallPlan to be complete $ip"
kubectl wait --for=jsonpath='.status.phase'=Complete installplan/$ip -n everest --timeout=600s
csv=$(kubectl get sub $sub -n everest -o jsonpath='{.status.installedCSV}')
echo "Waiting for CSV $csv to succeed"
kubectl wait --for=jsonpath='.status.phase'=Succeeded csv/$csv -n everest --timeout=600s
done
# Uninstall
helm uninstall everest -n everest
kubectl delete ns everest
kubectl wait --for=delete namespace/everest --timeout=120s
helm uninstall everest-core -n everest-system
kubectl delete ns everest-system
kubectl wait --for=delete namespace/everest-system --timeout=120s
- name: Build chart package
run: |
changed=$(ct list-changed --config .github/ct.yaml)
[ $(echo -n "$changed" | grep -c '^') == 1 ] && helm package $changed || echo "skipping package"
- name: Upload helm chart
uses: actions/upload-artifact@v4
with:
path: ./*.tgz
retention-days: 30
if-no-files-found: ignore

6 changes: 3 additions & 3 deletions charts/everest/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: common
repository: file://charts/common
version: 0.0.1
version: 0.0.2
- name: everest-db-namespace
repository: file://charts/everest-db-namespace
version: 0.0.0
digest: sha256:c41bc5832c4bf3829a3ceabb7b3fcd2461035cc66986aa0acea8e7b366a6e036
generated: "2024-10-21T20:53:46.621274+05:30"
digest: sha256:c640ee1595ced2f8d4024f9f37b38d6ca685bc4edba9d451f9bcd56edc22ee23
generated: "2024-10-31T11:35:48.801214+05:30"
2 changes: 1 addition & 1 deletion charts/everest/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ maintainers:
email: [email protected]
dependencies:
- name: common
version: 0.0.1
version: 0.0.*
repository: "file://charts/common"
# This is not really a dependency, but we define it as one so that we're
# able to conditionally disable rendering these manifests along with the core chart manifests.
Expand Down
13 changes: 11 additions & 2 deletions charts/everest/charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@ apiVersion: v2
name: common
description: A library chart for Everest containing common resources.
type: library
version: 0.0.1
appVersion: "0.0.1"
version: 0.0.2
appVersion: "0.0.2"
maintainers:
- name: mayankshah1607
email: [email protected]
- name: oksana-grishchenko
email: [email protected]
- name: recharte
email: [email protected]
- name: michal-kralik
email: [email protected]
6 changes: 3 additions & 3 deletions charts/everest/charts/everest-db-namespace/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: common
repository: file://../common
version: 0.0.1
digest: sha256:a25c79b74ec6d89ca5c732e4222f8726ed02aa6a4a21f376afc499e53696c9b5
generated: "2024-10-05T15:02:38.315401+05:30"
version: 0.0.2
digest: sha256:e26bbcf7da416e9ea599f57a116c90e4a8b38bb7293945ef17a4f5243043cd99
generated: "2024-10-31T11:35:45.12716+05:30"
11 changes: 10 additions & 1 deletion charts/everest/charts/everest-db-namespace/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@ version: 0.0.0
appVersion: 0.0.0
dependencies:
- name: common
version: 0.0.1
version: 0.0.*
repository: "file://../common"
maintainers:
- name: mayankshah1607
email: [email protected]
- name: oksana-grishchenko
email: [email protected]
- name: recharte
email: [email protected]
- name: michal-kralik
email: [email protected]

0 comments on commit 138b7ef

Please sign in to comment.