-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VEC-430 configure test and linting for all helm charts #48
Open
davi17g
wants to merge
17
commits into
main
Choose a base branch
from
VEC-430-configure-test-and-linting-for-all-helm-charts
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
f2ce3c7
Create lint-and-test-charts.yaml
davi17g c12524d
Update lint-and-test-charts.yaml
davi17g e90c98d
Update values.yaml
davi17g c54daa4
Update lint-and-test-charts.yaml
davi17g bdc3ff5
Update lint-and-test-charts.yaml
davi17g ec70d76
Update lint-and-test-charts.yaml
davi17g e284e33
Update lint-and-test-charts.yaml
davi17g ed31c17
Update lint-and-test-charts.yaml
davi17g c81c69e
Update Chart.yaml
davi17g 4d9c3a2
Update lint-and-test-charts.yaml
davi17g 25ab606
Update values.yaml
davi17g abc130f
Update lint-and-test-charts.yaml
davi17g 13b5ab7
Update lint-and-test-charts.yaml
davi17g f09601d
Update lint-and-test-charts.yaml
davi17g a13140f
Update lint-and-test-charts.yaml
davi17g 931a9e1
commit
davi17g 0363c56
Update lint-and-test-charts.yaml
davi17g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,191 @@ | ||
name: Lint and Test Charts | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
lint-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Helm | ||
uses: azure/[email protected] | ||
with: | ||
version: latest | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
check-latest: true | ||
|
||
- name: Set up chart-testing | ||
uses: helm/[email protected] | ||
|
||
- name: Run chart-testing (list-changed) | ||
id: list-changed | ||
run: | | ||
changed="$(ct list-changed --chart-dirs . --target-branch ${{ github.event.repository.default_branch }} \ | ||
| grep "aerospike-vector-search")" | ||
if [[ -n "$changed" ]]; then | ||
echo "changed=true" >> "$GITHUB_OUTPUT" | ||
fi | ||
|
||
- name: Run chart-testing (lint version bump) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
ct lint --chart-dirs . --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
- name: Run chart-testing (lint) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
cd aerospike-vector-search | ||
ct lint --chart-dirs . --charts . --target-branch ${{ github.event.repository.default_branch }} | ||
|
||
- name: Create kind cluster | ||
if: steps.list-changed.outputs.changed == 'true' | ||
uses: helm/[email protected] | ||
|
||
- name: Setup Prerequisites | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
|
||
echo "Deploying AKO" | ||
curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.30.0/install.sh \ | ||
| bash -s v0.30.0 | ||
|
||
kubectl create -f https://operatorhub.io/install/aerospike-kubernetes-operator.yaml | ||
echo "Waiting for AKO" | ||
while true; do | ||
if kubectl --namespace operators get deployment/aerospike-operator-controller-manager &> /dev/null; then | ||
kubectl --namespace operators wait \ | ||
--for=condition=available --timeout=180s deployment/aerospike-operator-controller-manager | ||
break | ||
fi | ||
done | ||
|
||
echo "Grant permissions to the target namespace" | ||
kubectl create namespace aerospike | ||
kubectl --namespace aerospike create serviceaccount aerospike-operator-controller-manager | ||
kubectl create clusterrolebinding aerospike-cluster \ | ||
--clusterrole=aerospike-cluster --serviceaccount=aerospike:aerospike-operator-controller-manager | ||
|
||
echo "Set Secrets for Aerospike Cluster" | ||
kubectl --namespace aerospike create secret generic aerospike-secret \ | ||
--from-literal=features.conf="$(echo "${{ secrets.FEATURES_CONF }}")" | ||
|
||
kubectl apply -f - <<-EOF | ||
apiVersion: asdb.aerospike.com/v1 | ||
kind: AerospikeCluster | ||
metadata: | ||
name: aerospike-cluster | ||
namespace: aerospike | ||
spec: | ||
size: 1 | ||
image: aerospike/aerospike-server-enterprise:7.0.0.5 | ||
podSpec: | ||
multiPodPerHost: true | ||
storage: | ||
filesystemVolumePolicy: | ||
cascadeDelete: true | ||
initMethod: deleteFiles | ||
volumes: | ||
- name: workdir | ||
source: | ||
persistentVolume: | ||
storageClass: standard | ||
volumeMode: Filesystem | ||
size: 3Gi | ||
aerospike: | ||
path: /opt/aerospike | ||
- name: nsvol1 | ||
aerospike: | ||
path: /mnt/disks/test | ||
source: | ||
persistentVolume: | ||
storageClass: standard | ||
volumeMode: Filesystem | ||
size: 16G | ||
- name: nsvol2 | ||
aerospike: | ||
path: /mnt/disks/avs-index | ||
source: | ||
persistentVolume: | ||
storageClass: standard | ||
volumeMode: Filesystem | ||
size: 16G | ||
- name: nsvol3 | ||
aerospike: | ||
path: /mnt/disks/avs-data | ||
source: | ||
persistentVolume: | ||
storageClass: standard | ||
volumeMode: Filesystem | ||
size: 16G | ||
- name: nsvol4 | ||
aerospike: | ||
path: /mnt/disks/avs-meta | ||
source: | ||
persistentVolume: | ||
storageClass: standard | ||
volumeMode: Filesystem | ||
size: 16G | ||
- name: aerospike-config-secret | ||
source: | ||
secret: | ||
secretName: aerospike-secret | ||
aerospike: | ||
path: /etc/aerospike/secret | ||
aerospikeConfig: | ||
service: | ||
feature-key-file: /etc/aerospike/secret/features.conf | ||
# security: {} | ||
network: | ||
service: | ||
port: 3000 | ||
fabric: | ||
port: 3001 | ||
heartbeat: | ||
port: 3002 | ||
namespaces: | ||
- name: test | ||
replication-factor: 2 | ||
storage-engine: | ||
type: device | ||
filesize: 17179869184 | ||
files: | ||
- /mnt/disks/test/test.dat | ||
- name: avs-index | ||
replication-factor: 2 | ||
storage-engine: | ||
type: device | ||
filesize: 17179869184 | ||
files: | ||
- /mnt/disks/avs-index/avs-index.dat | ||
- name: avs-data | ||
replication-factor: 2 | ||
storage-engine: | ||
type: device | ||
filesize: 17179869184 | ||
files: | ||
- /mnt/disks/avs-data/avs-data.dat | ||
- name: avs-meta | ||
nsup-period: 600 | ||
nsup-threads: 2 | ||
evict-tenths-pct: 5 | ||
replication-factor: 2 | ||
storage-engine: | ||
type: device | ||
filesize: 17179869184 | ||
files: | ||
- /mnt/disks/avs-meta/avs-meta.dat | ||
EOF | ||
|
||
- name: Run chart-testing (install) | ||
if: steps.list-changed.outputs.changed == 'true' | ||
run: | | ||
cd aerospike-vector-search | ||
ct install --namespace aerospike --chart-dirs . \ | ||
--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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
apiVersion: v2 | ||
name: aerospike-vector-search | ||
name: aerospike-vector-search | ||
description: A Helm chart for Aerospike Vector Search | ||
type: application | ||
icon: https://avatars0.githubusercontent.com/u/2214313?s=200&v=4 | ||
|
@@ -11,7 +11,7 @@ maintainers: | |
email: [email protected] | ||
|
||
# The helm chart version | ||
version: 0.6.0 | ||
version: 0.6.1 | ||
|
||
# The default version of Aerospike Vector Search | ||
appVersion: "0.11.1" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am reading this right, it checks if any chart has changed and if so runs lint on vector.
Is this generic? What does test do in this case? Do we need to install ako etc?