defenseunicorns / pepr

Type safe K8s middleware for humans
https://pepr.dev
Apache License 2.0
214 stars 17 forks source link

Strip out `kubectl` commands from journey tests #978

Open cmwylie19 opened 4 months ago

cmwylie19 commented 4 months ago

Describe what should be investigated or refactored

There are several instances that we are using kubectl instead of the native KFC commands to interact with kubernetes resources in the journey tests. This is tech debt since KFC is the native way we interact with K8s in Pepr and KFC has come a long way since the first journey tests were written

Links to any relevant code

journey/pepr-deploy.ts

Additional context

Add any other context or screenshots about the technical debt here.

cmwylie19 commented 4 months ago

In further review, it does not make sense to strip these out IMO.

Kubernetes-fluent-client needs a kind in which to apply, in some cases that use kubectl we are applying files with several types. Due to this, we would not be able to remove kubectl as a dependency.

Image

cmwylie19 commented 4 months ago

The path forward would be to parse the generated files and interpret the kinds and use KFC apply when the kinds are interpreted