-
Notifications
You must be signed in to change notification settings - Fork 3
176 lines (163 loc) · 6.25 KB
/
lint-and-test-charts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
name: Lint and Test Charts
#on: pull_request
on:
push:
branches:
- "VEC-430-configure-test-and-linting-for-all-helm-charts"
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: v3.14.4
- 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 (lint)
run: |
cd aerospike-vector-search
ct lint --chart-dirs . --charts . --target-branch ${{ github.event.repository.default_branch }}
- name: Create kind cluster
uses: helm/[email protected]
- name: Setup Prerequisites
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)
run: |
cd aerospike-vector-search
ct install --namespace aerospike --chart-dirs . \
--target-branch ${{ github.event.repository.default_branch }}