csharp icon indicating copy to clipboard operation
csharp copied to clipboard

remove unused util code

Open tg123 opened this issue 3 years ago • 4 comments

  • remove duplicated generic code which impled
  • remove unfinished cache/informer code (still missing informer reflector ...)

tg123 avatar Sep 30 '22 00:09 tg123

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tg123

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 avatar Sep 30 '22 00:09 k8s-ci-robot

#846

tg123 avatar Sep 30 '22 00:09 tg123

We used in our code the GenericKubernetesApi to watch kubernetes resources (namespaces scoped and global), this class was removed from nuget 9.0.x

// constructor
_genericClient = new GenericClient(_kubernetesClient, GROUP, VERSION, PLURAL);
_genericKubernetesApi = new GenericKubernetesApi(GROUP, VERSION, PLURAL, _kubernetesClient);
// later
var watcher = _genericKubernetesApi.Watch(NAMESPACE, onEvent, onError, onClosed, cancellationToken);

We are using this approach to be able to reconnect when the connection is lost (onClosed) and for the error logging. With removing of the API, I think we need to change to, the way shown in Watch Example.

But how can we deal with reconnect and error logging in that case?

koepalex avatar Sep 30 '22 08:09 koepalex

thanks for reporting, will add watch as requested

tg123 avatar Sep 30 '22 18:09 tg123

@tg123 will watch be added to this PR? Or in a follow up?

brendandburns avatar Dec 05 '22 16:12 brendandburns

@tg123 will watch be added to this PR? Or in a follow up?

lets do it in followup

tg123 avatar Dec 05 '22 16:12 tg123

/lgtm /approve

brendandburns avatar Dec 06 '22 18:12 brendandburns

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, tg123

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~~ [brendandburns,tg123]

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 avatar Dec 06 '22 18:12 k8s-ci-robot