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

[ISSUE-802] Proposal for deploying csi on k3s #806

Merged
merged 9 commits into from
Apr 26, 2022

Conversation

AnnaDutova
Copy link
Contributor

@AnnaDutova AnnaDutova commented Apr 8, 2022

Purpose

Resolves #802

Add proposal for discussion steps of deploying csi on k3s

PR checklist

  • Add link to the issue
  • Choose Project
  • Choose PR label
  • New unit tests added
  • Modified code has meaningful comments
  • All TODOs are linked with the issues
  • All comments are resolved

Testing

csi-k3s-sles-micro-108:~ # kubectl logs csi-baremetal-se-66scm 
Apr  4 12:38:54.427 [INFO] Starting scheduler extender for CSI-Baremetal ...
Apr  4 12:38:55.042 [INFO] Starting extender on port 8889 ...
Apr  4 12:38:55.042 [INFO] Registering for filter stage ... 
Apr  4 12:38:55.042 [INFO] Registering for prioritize stage ... 
Apr  4 12:38:55.042 [INFO] Registering for bind stage ... 
Apr  4 12:38:55.042 [INFO] Starting Controller Health server
Apr  4 12:38:55.042 [INFO] Create server for endpoint ":9999" on "tcp" socket
Apr  4 12:38:55.042 [INFO] Registering health check service
Apr  4 12:38:55.043 [INFO] [ServerRunner] Starting gRPC server for endpoint :9999 and socket tcp
Apr  4 12:44:11.017 [INFO] [Extender] [FilterHandler] [1fea9810-fe1b-4320-a1c4-e2618f812748] Processing request: &{POST /filter HTTP/1.1 1 1 map[Accept-Encoding:[gzip] Content-Length:[27497] Content-Type:[application/json] User-Agent:[Go-http-client/1.1]] 0xc000740000 <nil> 27497 [] false 127.0.0.1:8889 map[] map[] <nil> map[] 127.0.0.1:47612 /filter <nil> <nil> <nil> 0xc000740040}
Apr  4 12:44:11.023 [INFO] [Extender] [FilterHandler] [web-0] [1fea9810-fe1b-4320-a1c4-e2618f812748] Filtering
Apr  4 12:44:11.033 [INFO] [KubeClient] [CreateCR] [1fea9810-fe1b-4320-a1c4-e2618f812748] Creating CR 'AvailableCapacityReservation': &{TypeMeta:{Kind:AvailableCapacityReservation APIVersion:csi-baremetal.dell.com/v1} ObjectMeta:{Name:default-web-0 GenerateName: Namespace: SelfLink: UID: ResourceVersion: Generation:0 CreationTimestamp:0001-01-01 00:00:00 +0000 UTC DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[] Annotations:map[] OwnerReferences:[] Finalizers:[] ClusterName: ManagedFields:[]} Spec:{Namespace:default Status:REQUESTED NodeRequests:Requested:"19182a40-315f-43c3-ab1b-720b9a1b8d6c" Requested:"301185b5-b345-45c3-93f4-b1bef214b43d" Requested:"183226f6-00f1-42da-acd2-70a3bf6cb6c4"  ReservationRequests:[CapacityRequest:<Name:"www-web-0" StorageClass:"ANY" Size:62914560 >  CapacityRequest:<Name:"data-web-0" StorageClass:"ANY" Size:62914560 >  CapacityRequest:<Name:"logs-web-0" StorageClass:"ANY" Size:62914560 > ] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}}
Apr  4 12:44:11.059 [INFO] [KubeClient] [CreateCR] [1fea9810-fe1b-4320-a1c4-e2618f812748] CR AvailableCapacityReservation default-web-0 created
Apr  4 12:44:11.060 [INFO] [Extender] [FilterHandler] [web-0] [1fea9810-fe1b-4320-a1c4-e2618f812748] Construct response. Get 3 nodes in request. Among them suitable nodes count is 0. Filtered out nodes - map[]
Apr  4 12:45:29.555 [INFO] [Extender] [FilterHandler] [d98523c2-1c26-4bbb-a790-8479363440e3] Processing request: &{POST /filter HTTP/1.1 1 1 map[Accept-Encoding:[gzip] Content-Length:[28009] Content-Type:[application/json] User-Agent:[Go-http-client/1.1]] 0xc0008a4580 <nil> 28009 [] false 127.0.0.1:8889 map[] map[] <nil> map[] 127.0.0.1:47612 /filter <nil> <nil> <nil> 0xc0008a45c0}
Apr  4 12:45:29.558 [INFO] [Extender] [FilterHandler] [web-0] [d98523c2-1c26-4bbb-a790-8479363440e3] Filtering
Apr  4 12:45:29.569 [INFO] [Extender] [FilterHandler] [web-0] [d98523c2-1c26-4bbb-a790-8479363440e3] Construct response. Get 3 nodes in request. Among them suitable nodes count is 3. Filtered out nodes - map[]
Apr  4 12:45:29.573 [INFO] [Extender] [PrioritizeHandler] [38a87d3e-915a-4382-b343-cda98ba9c8d9] Processing request: &{POST /prioritize HTTP/1.1 1 1 map[Accept-Encoding:[gzip] Content-Length:[28009] Content-Type:[application/json] User-Agent:[Go-http-client/1.1]] 0xc0008a56c0 <nil> 28009 [] false 127.0.0.1:8889 map[] map[] <nil> map[] 127.0.0.1:48076 /prioritize <nil> <nil> <nil> 0xc0008a5700}
Apr  4 12:45:29.576 [INFO] [Extender] [PrioritizeHandler] [38a87d3e-915a-4382-b343-cda98ba9c8d9] Scoring
Apr  4 12:45:29.576 [INFO] [Extender] [PrioritizeHandler] [38a87d3e-915a-4382-b343-cda98ba9c8d9] Score results: [{csi-k3s-sles-micro-109 0} {csi-k3s-sles-micro-110 0} {csi-k3s-sles-micro-108 0}]

k3s server log:

Apr 19 14:43:43 csi-k3s-sles-micro-108 k3s[6402]: time="2022-04-19T14:43:43Z" level=info msg="Running kube-scheduler --authentication-kubeconfig=/var/lib/rancher/k3s/server/cred/scheduler.kubeconfig --authorization-kubeconfig=/var/lib/rancher/k3s/server/cred/scheduler.kubeconfig --bind-address=127.0.0.1 --config=/var/lib/rancher/k3s/agent/pod-manifests/scheduler/config.yaml --kubeconfig=/var/lib/rancher/k3s/server/cred/scheduler.kubeconfig --leader-elect=false --profiling=false --secure-port=10259"

Signed-off-by: Dutova <Ann.Dutova@Dell.com>
Signed-off-by: Dutova <Ann.Dutova@Dell.com>
@AnnaDutova AnnaDutova added documentation Improvements or additions to documentation enhancement New feature or request labels Apr 8, 2022
@AnnaDutova AnnaDutova requested a review from a team as a code owner April 8, 2022 10:11
@codecov
Copy link

codecov bot commented Apr 8, 2022

Codecov Report

Merging #806 (d221cb6) into master (d5a7a39) will decrease coverage by 0.03%.
The diff coverage is 75.00%.

❗ Current head d221cb6 differs from pull request most recent head 5cdaff1. Consider uploading reports for the commit 5cdaff1 to get more accurate results

@@            Coverage Diff             @@
##           master     #806      +/-   ##
==========================================
- Coverage   71.91%   71.88%   -0.04%     
==========================================
  Files          61       61              
  Lines        6139     6142       +3     
==========================================
  Hits         4415     4415              
- Misses       1479     1481       +2     
- Partials      245      246       +1     
Flag Coverage Δ
unittests 71.88% <75.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/common/volume_operations.go 79.85% <71.42%> (-1.33%) ⬇️
pkg/base/k8s/cr_helper.go 56.77% <85.71%> (+1.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 255fbf4...5cdaff1. Read the comment docs.

docs/proposals/deploy-csi-to-k3s.md Show resolved Hide resolved
docs/proposals/deploy-csi-to-k3s.md Show resolved Hide resolved
docs/proposals/deploy-csi-to-k3s.md Outdated Show resolved Hide resolved
2. Pass it to the k3s application server with appropriate flag
3. Reload daemon
4. Test with temp pod

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess we should mention steps for CSI Uninstallation too

AnnaDutova and others added 2 commits April 13, 2022 02:43
- Rename proposal
- Rephrase background section
- Change purpose
- Add all commands
- Add Rationale section
- Mention Uninstall CSI in tasks

Signed-off-by: Dutova <Ann.Dutova@Dell.com>
@AnnaDutova
Copy link
Contributor Author

Should this branch contain the changes necessary for automation?

@safronovD
Copy link
Contributor

Should this branch contain the changes necessary for automation?

No, just a proposal for the beggining

@AnnaDutova AnnaDutova merged commit b48c7af into master Apr 26, 2022
@AnnaDutova AnnaDutova deleted the feature-issue-802-proposal-deploy-csi-on-k3s branch April 26, 2022 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal for deploying CSI on k3s
3 participants