-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathTODO
126 lines (119 loc) · 4.23 KB
/
TODO
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
#### TODO
- TODO - 0
- Eliminate the need to check logs - Make it easy
- Store warnings, errors of all controllers in cstorpoolauto
- Store them against a CR
- Warn or error should have context info as well
- update go version
- use latest version of Metac
- Make use of github actions
- Update Makefile
- Update Dockerfile to include distroless binaries
- Add badges to README
- Make use of k8s/verify.go to avoid nested if conditions
- Add protection in form of finalizers to avoid accidental deletion of resources
- Need to have a CStorClusterDefault CR & corresponding reconciler
- Its job will be to set defaults to CStorClusterConfig
- Then set status.DefaultCompleted bool
- This condition will be looked up by the reconciler that creates
CStorClusterPlan
- This will eliminate the current hot loop path experienced by
CStorClusterConfig reconciler that sets the defaults.
- Create EVENTs against the watch instance in case of errors at reconciler
- Should we have a separate CR to hold errors across the operators if any
- Remove / Scale Down should be done to young disks
- current logic removes young nodes.
- however, young nodes may attach old disks i.e. bigger data
- Finish the TODO markers in the code
- Create/Update construction should be same **In Progress**
- This is very important to make the code adhere to being idempotent
- Check use of runtime.DefaultUnstructuredConverter.FromUnstructured(...)
- TODO - 1
- write delete contollers
- TODO - 2
- update storage provisioner codebase
- change ddp to dao
- add status.conditions to storage API
- set Storage's UID against PVC's annotations
- TODO - 3
- refactor clusterconfig reconciler - In Progress
- manage status/conditions of clusterconfig
- refactor reconcile logic to:
- Defaulter,
- CStorClusterPlanner &
- NodePlanner
- TODO - 4
- Demos - Done
- TODO - 5
- Unit Tests - In Progress
- TODO - 6
- refactor storage provisioner to use metac
- TODO - 7
- Unit Test storage provisioner
- TODO - 8
- Installer & UnInstaller for DAO
- TODO - 9
- e2e test controller(s) for cstorpoolauto
- TODO - 10
- e2e test controller(s) for storage provisioner
#### FUTURE
- pool spread logic might be required
- e.g. pool nodes should be unique in a cluster
- e.g. spread pools across zones, DCs etc
- e.g. pool node priority
- Note: this is different from NodeSelector
- below is a sample yaml fragment for pool spread logic
```yaml
poolSpreadPolicy:
type: roundrobin
terms:
- name: ABC
percent: 0.2
- name: DEF
percent: 0.8
```
- Cluster disruption budget may be required
```
clusterDisruptionBudget:
maxAvailable:
minAvailable:
```
### Old Design - v0.1.0
#### Sync CSPCAutoKeeper
- watch - CSPCAuto
- attachments - BlockDevices (available & annotated)
- sync - Create/Apply CSPCAutoKeeper with BlockDevices that are annotated
#### Sync Storage & BlockDevices
- watch - CSPCAuto
- attachments - BlockDevices (available)
- attachments - Storage (annotated)
- sync - Iterate BlockDevices:
- Build map of BlockDevices with Annotation
- Build map of BlockDevices without Annotation
- sync - Iterate Storage
- Build map of Storages with Annotation
- sync - Build missing CSPIList:
- Create Storage with Annotation
- sync - Update BlockDevices map with Annotation
#### Sync CSPC
- watch - cspcauto
- attachments - CSPCAutoKeeper
- attachments - CSPC (annotated/name)
- sync - Skip reconcile if CSPC is already available
- sync - Create CSPC if & only if CSPIList matches CSPCAutoKeeper
```yaml
kind: CSPCAutoKeeper
spec:
cspiList:
items:
- nodeLabel: map[string]string
diskCount: *int # desired disk count
diskCapacity: resource.Quantity # desired disk capacity
blockDevices: []string # actual block devices
lastUpdatedTimestamp: *time # TODO
lastTransitionTimestamp: *time # TODO
```
### TODO
- Validations against pool type
- UT on slice selector
- UT for all sync/reconcile functions