kubernetes-sigs / kubetest2

Kubetest2 is the framework for launching and running end-to-end tests on Kubernetes.
Apache License 2.0
325 stars 105 forks source link

Add DeployerWithFinish interface #255

Closed cartermckinnon closed 5 months ago

cartermckinnon commented 6 months ago

Similar to #253, adding the ability to define a finalizer function that is called regardless of whether --down is used. This can be used to e.g. emit metrics, a lifecycle event, etc.

linux-foundation-easycla[bot] commented 6 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

cartermckinnon commented 6 months ago

/retest

cartermckinnon commented 5 months ago

@dims do you have an opinion on this one? It would give me a more natural place to emit metrics here: https://github.com/aws/aws-k8s-tester/pull/404

I could also change DeployerWithInit to DeployerWithLifecycle and roll this into that interface. It was only added a few weeks ago so I'm not really concerned about breakage.

dims commented 5 months ago

/approve /lgtm

works for me @cartermckinnon

jbpratt commented 5 months ago

/approve

k8s-ci-robot commented 5 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cartermckinnon, dims, jbpratt, upodroid

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](https://github.com/kubernetes-sigs/kubetest2/blob/master/OWNERS)~~ [jbpratt] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment