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

feat: add helm deploy for edge #1056

Merged
merged 3 commits into from
May 27, 2024

Conversation

vie-serendipity
Copy link
Contributor

What type of PR is this?

/kind feature

What this PR does / why we need it:

Deploy multi daemonsets using values-nodepools according to affinity. And csi config will overwrite the original config.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 10, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @vie-serendipity. Thanks for your PR.

I'm waiting for a kubernetes-sigs 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 10, 2024
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: csi-plugin
namespace: {{ .Release.Namespace }}
name: {{ .name }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use the key in .Values.nodepools as the name? e.g.

{{ if eq $key "default" }}
name: csi-plugin
{{ else }}
name: csi-pluign-{{ $key }}
{{ end }}

We can avoid possible duplicated name in this way.

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 personally think it's more readable to explicitly clarify names of each node pool. It makes no real difference compared to using $key as we do now.

Copy link
Contributor

@huww98 huww98 May 10, 2024

Choose a reason for hiding this comment

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

OK. But this way we lost a level of abstraction. e.g. kubectl get pods -l nodepool=edge seems more reasonable than -l nodepool=csi-plugin-edge

How about

{{ if eq $key "default" }}
name: csi-plugin
{{ else }}
name: csi-pluign-{{ .name }}
{{ end }}

the name of default pool can still be used in label.

deploy/chart/templates/plugin.yaml Outdated Show resolved Hide resolved
deploy/chart/templates/plugin.yaml Outdated Show resolved Hide resolved
@huww98
Copy link
Contributor

huww98 commented May 10, 2024

values-edge.yaml is the config we use in our ACK Edge cluster. I think we'd better keep its name.

deploy/chart/values.yaml Outdated Show resolved Hide resolved
deploy/chart/values-edge.yaml Outdated Show resolved Hide resolved
deploy/chart/templates/plugin.yaml Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 17, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 19, 2024
Copy link
Contributor

@huww98 huww98 left a comment

Choose a reason for hiding this comment

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

Please rebase and apply these change

diff --git a/deploy/chart/templates/plugin.yaml b/deploy/chart/templates/plugin.yaml
index 2ee66ad7..3092b4dd 100644
--- a/deploy/chart/templates/plugin.yaml
+++ b/deploy/chart/templates/plugin.yaml
@@ -148,7 +148,7 @@ spec:
               mountPath: /var/lib/kubelet/
               mountPropagation: "Bidirectional"
 {{- range $key := tuple "disk" "nas" "oss" }}
-  {{- with index $.Values.csi $key -}}
+  {{- with index $nodePool.csi $key -}}
     {{- if .enabled }}
             - name: {{ $key }}-plugin-dir
               mountPath: /csi/{{ $key }}plugin.csi.alibabacloud.com
@@ -301,7 +301,7 @@ spec:
           hostPath:
             path: /var/lib/kubelet
             type: Directory
-{{- range $key, $val := .Values.csi }}
+{{- range $key, $val := $nodePool.csi }}
 {{- if $val.enabled }}
         - name: {{ $key }}-plugin-dir
           hostPath:

@mowangdk
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 27, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: huww98, mowangdk, vie-serendipity

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:

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 27, 2024
@k8s-ci-robot k8s-ci-robot merged commit a43ad7b into kubernetes-sigs:master May 27, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants