You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At startup, the operator registers all the CRDs with the k8s api server. It does that calling client.RegisterCRDs.
To allow cleaner separation of concerns, it is possible to develop a cell the invokes the CRDs registration.
This should be done just once after the operator has been elected leader. Since the Invoke calls are executed in order by the hive, this means that the CRDs registration invoke should be the first one to be added in WithLeaderLifecycle.
A further improvement may be to refactor what is currently done in the agent to wait for the registration of the CRDs.
Success Criteria
The CRDs registration is moved into an independent cell.Invoke
The CRDs registration should be the first operation to be invoked after the operator is elected leader.
If the operation is not carried out synchronously, we should verify that the log is not flooded with errors due to temporary missing CRDs.
Fixes: cilium#24068
1. Move CRD registration to a separate cell inside the client package,
and add a `--skip-crd-creation` flag.
2. Remove the `SkipCRDOption` from the `operatorOption.OperatorConfig` struct,
alongside any reference to it in `operator/cmd/fags.go`,
`operator/option/config.go` and `pkg/option/config.go`
3. Update cmdref
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
Fixes: #24068
1. Move CRD registration to a separate cell inside the client package,
and add a `--skip-crd-creation` flag.
2. Remove the `SkipCRDOption` from the `operatorOption.OperatorConfig` struct,
alongside any reference to it in `operator/cmd/fags.go`,
`operator/option/config.go` and `pkg/option/config.go`
3. Update cmdref
Signed-off-by: Jian Zeng <anonymousknight96@gmail.com>
What
At startup, the operator registers all the CRDs with the k8s api server. It does that calling
client.RegisterCRDs
.To allow cleaner separation of concerns, it is possible to develop a cell the invokes the CRDs registration.
This should be done just once after the operator has been elected leader. Since the
Invoke
calls are executed in order by the hive, this means that the CRDs registration invoke should be the first one to be added inWithLeaderLifecycle
.A further improvement may be to refactor what is currently done in the agent to wait for the registration of the CRDs.
Success Criteria
cell.Invoke
Scope:
operator/cmd/root.go
Related: #23425
The text was updated successfully, but these errors were encountered: