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 the helm chart for vineyard runtime. #3624

Merged

Conversation

dashanji
Copy link
Contributor

@dashanji dashanji commented Dec 7, 2023

Ⅰ. Describe what this PR does

Add the helm chart for vineyard runtime including the master, worker and fuse.

Ⅱ. Does this pull request fix one issue?

A follow-up of #3555 and fix parts of #3528

Copy link

fluid-e2e-bot bot commented Dec 7, 2023

Hi @dashanji. Thanks for your PR.

I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@@ -130,11 +130,6 @@ master:
# mountPath: /data/secrets/mySecretVolume/
# - name: myConfigMapVolume
# mountPath: /data/configmap/myConfigMapVolume/
# volumeMounts:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to change alluxio chart?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it's a dummy part here.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (69539a3) 64.26% compared to head (bd96909) 64.26%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3624   +/-   ##
=======================================
  Coverage   64.26%   64.26%           
=======================================
  Files         443      443           
  Lines       26755    26755           
=======================================
  Hits        17194    17194           
  Misses       7546     7546           
  Partials     2015     2015           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

{{- $fullName := include "vineyard.fullname" . }}
{{- $chart := include "vineyard.chart" . }}

{{- if not .Values.master.externalEndpoint }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide the reason of providing both service and headless service reason for master?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The headless service is used for internal communication between master pods, and the service provides external access entry for worker.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it imperative to use different ways to access master pods from masters and workers? According to my knowledge, Kubernetes API Server connects multiple endpoints.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I will try to use the headless service only.

@@ -0,0 +1,91 @@
# Copyright 2020-2023 Alibaba Group Holding Limited.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use fluid copyright once contributing this to fluid project.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@@ -0,0 +1,124 @@
# Copyright 2020-2023 Alibaba Group Holding Limited.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

image: {{ .Values.master.image }}:{{ .Values.master.imageTag }}
imagePullPolicy: {{ .Values.master.imagePullPolicy }}
securityContext:
privileged: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason of using privileged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dashanji
Copy link
Contributor Author

dashanji commented Dec 8, 2023

@cheyang, could you please take a look at this?

* Add an option for worker to wait for the master ready.
* Delete the option 'etcd.prefix' in ExternalEndpoint as user can set it in the worker's options.
* Add the kubebuilder markers to the vineyard runtime API.

Signed-off-by: Ye Cao <[email protected]>
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/instance
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label app.kubernetes.io/instance seems missing in Vineyard worker's Pod metadata?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my fault. Thanks for pointing out.

- key: app.kubernetes.io/instance
operator: In
values:
- {{ .Release.Namespace -}} - {{- .Release.Name }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using

Suggested change
- {{ .Release.Namespace -}} - {{- .Release.Name }}
- {{ .Release.Namespace }}-{{ .Release.Name }}

Comment on lines 69 to 85
- /bin/bash
- -c
- >
/usr/local/bin/vineyardd
--socket /var/run/vineyard/vineyard.sock
--size {{ include "vineyard.worker.size" . }}
{{- if eq (toString (index .Values.worker.options "vineyardd.reserve.memory")) "true" }}
--reserve_memory
{{- end }}
--meta_timeout {{ default "120" (index .Values.worker.options "wait.etcd.timeout") }}
--etcd_prefix {{ default "/vineyard" (index .Values.worker.options "etcd.prefix") }}
--etcd_endpoint {{ include "vineyard.master.endpoint" . }}
{{- if eq (include "vineyard.checkTieredStore" .) "true" }}
--spill_path {{ include "vineyard.spill.path" . }}
--spill_lower_rate {{ include "vineyard.spill.lowerRate" . }}
--spill_upper_rate {{ include "vineyard.spill.upperRate" . }}
{{- end }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think better to directly use /usr/local/bin/vineyard as the entrypoint command. Seems that bash -c is not necessary here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

kind: VineyardRuntime
listKind: VineyardRuntimeList
plural: vineyardruntimes
shortNames:
- vineyard
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using v6d for shortname?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just kidding. You can decide by yourself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using v6d for shortname?

Make sense.

Copy link

sonarcloud bot commented Dec 21, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.5% Duplication on New Code

See analysis details on SonarCloud

@cheyang cheyang self-requested a review December 22, 2023 02:41
Copy link
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Copy link

fluid-e2e-bot bot commented Dec 22, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang, TrafalgarZZZ

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [TrafalgarZZZ,cheyang]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fluid-e2e-bot fluid-e2e-bot bot merged commit 7221cf3 into fluid-cloudnative:master Dec 22, 2023
10 checks passed
@dashanji dashanji deleted the add-vineyard-runtime-charts branch December 22, 2023 02:55
xliuqq pushed a commit to xliuqq/fluid that referenced this pull request Dec 23, 2023
* * Add the helm chart for Vineyard Runtime.
* Add an option for worker to wait for the master ready.
* Delete the option 'etcd.prefix' in ExternalEndpoint as user can set it in the worker's options.
* Add the kubebuilder markers to the vineyard runtime API.

Signed-off-by: Ye Cao <[email protected]>

* Add the app.kubernetes.io/instance label to the vineyard worker.

Signed-off-by: Ye Cao <[email protected]>

* Change the short name of vineyard to v6d.

Signed-off-by: Ye Cao <[email protected]>

---------

Signed-off-by: Ye Cao <[email protected]>
privileged: false
command:
- etcd
- --name=$(POD_NAME)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to give a full url like <pod_name>.<svc_name>.namespace.svc.cluster.local, I'm not sure if users may have customized domain intead of svc.cluster.local?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean --name=<pod_name>.<svc_name>.namespace.svc.cluster.local? Actually, the name is just used in the internal etcd cluster.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean --name=<pod_name>.<svc_name>.namespace.svc.cluster.local?

Yes, willcluster.local be configured globally in coreDNS config? Refering to https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/#coredns-configmap-options. I'm not sure if it can be modified.

- --listen-peer-urls=http://0.0.0.0:{{ $peerPort }}
- --advertise-client-urls=http://$(POD_NAME).{{ $etcdServiceName }}.{{ .Release.Namespace }}.svc.cluster.local:{{ $clientPort }}
- --listen-client-urls=http://0.0.0.0:{{ $clientPort }}
- --initial-cluster-token=my-etcd-cluster
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing it with a helm release related name looks better to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me.

{{- range $e, $i := until $replicas }}
{{- $initialCluster = append $initialCluster (printf "%s-%d=http://%s-%d.%s.%s.svc.cluster.local:%d" $etcdFullname $i $etcdFullname $i $etcdServiceName $releaseNamespace $peerPort) }}
{{- end }}
- --initial-cluster={{ join "," $initialCluster }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to reuse the helm func {{ include "vineyard.master.endpoint" . }} here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, "vineyard.master.endpoint" use the client port, but we need the peer port here. We could make the helm func suitable for the master port and the client port.

claimName: {{ .name }}
{{- else }}
- name: {{ $mediumName }}
emptyDir:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should consider mediumtype for emptyDir? when mediumtype=="MEM", emptyDir.meidum should be "Memory"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@@ -0,0 +1,17 @@
apiVersion: v1
appVersion: 0.18.2
version: 0.18.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better not relate version to appVersion according to Helm‘s doc .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants