Skip to content
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

Add helm test #209

Merged
merged 8 commits into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,18 @@ jobs:
python3 -m pytest --cov=graphscope --cov-config=.coveragerc --cov-report=xml \
--cov-report=term --exitfirst -s -vvv --log-cli-level=INFO \
./graphscope/deploy/tests/
- name: Helm test
run: |
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
cd charts
helm install graphscope --set coordinator.image.tag=${{ github.sha }} \
--set engines.gae.image.tag=${{ github.sha }} \
--set engines.gie.graph_manager.image.tag=${{ github.sha }} \
--set vineyard.image.tag=${{ github.sha }} \
--set imagePullPolicy=IfNotPresent \
./graphscope
helm test graphscope --timeout 5m0s

- name: Upload Coverage
uses: codecov/codecov-action@v1
with:
Expand All @@ -413,6 +425,8 @@ jobs:
run: |
sudo docker rmi -f registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${{ github.sha }} \
registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${{ github.sha }} || true
helm uninstall graphscope || true
kubectl delete pod graphscope-test-rpc-service --wait=false || true

gie-test:
runs-on: self-hosted
Expand Down Expand Up @@ -529,4 +543,4 @@ jobs:
sudo docker rmi -f registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:latest \
registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:latest \
registry.cn-hongkong.aliyuncs.com/graphscope/graphscope:${{ github.sha }} \
registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${{ github.sha }} || true
registry.cn-hongkong.aliyuncs.com/graphscope/maxgraph_standalone_manager:${{ github.sha }} || true
4 changes: 4 additions & 0 deletions charts/graphscope/templates/coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ spec:
- "--k8s_gie_graph_manager_mem"
- {{ .Values.engines.gie.graph_manager.resources.requests.memory }}
- "--k8s_vineyard_daemonset"
{{- if .Values.vineyard.daemonset }}
- {{ .Values.vineyard.daemonset }}
{{- else }}
- "\"\""
{{- end }}
- "--k8s_vineyard_cpu"
- {{ .Values.vineyard.resources.requests.cpu | quote }}
- "--k8s_vineyard_mem"
Expand Down
23 changes: 23 additions & 0 deletions charts/graphscope/templates/role_and_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "graphscope.fullname" . }}-role
namespace: {{ .Release.Namespace }}
rules:
- apiGroups: ["apps", ""]
resources: ["configmaps", "deployments", "deployments/status", "endpoints", "events", "pods", "pods/log", "pods/exec", "pods/status", "services", "replicasets"]
verbs: ["*"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "graphscope.fullname" . }}-role-binding
namespace: {{ .Release.Namespace }}
subjects:
- kind: ServiceAccount
name: default
namespace: {{ .Release.Namespace }}
roleRef:
kind: Role
name: {{ include "graphscope.fullname" . }}-role
apiGroup: rbac.authorization.k8s.io
4 changes: 2 additions & 2 deletions charts/graphscope/templates/test/test-rpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ spec:
containers:
- name: curl
image: curlimages/curl:7.65.3
command: ["curl"]
args: ['{{ include "graphscope.fullname" . }}-coordinator-service.{{ .Release.Namespace }}:59001', '--output', '-']
command: ['sh']
args: ['-c', 'while ! curl {{ include "graphscope.fullname" . }}-coordinator-service.{{ .Release.Namespace }}:59001 --output -; do sleep 1 && echo -n .; done']
restartPolicy: Never