Create a common PodFlags for both Service command and ContainerSource command #935
Labels
kind/cleanup
Categorizes issue or PR as related to cleaning up code, process, or technical debt.
kind/feature
New feature or request
Milestone
The specification of knative Service and eventing ContainerSource include common flags to describe the pod which will be created. I propose to create a common type under
pkg/kn/commands/flags
for these flags.The specification of knative Service includes a
corev1.PodSpec
, while ContainerSource includes acorev1.PodTemplateSpec
.corev1.PodTemplateSpec
includescorev1.PodSpec
. So both Service and ContainerSource commands could accept a dozen of common flags for create command and update command.In order to provide a unique interface and to leverage the existing code base, I propose to create a common
PodFlags
underpkg/kn/commands/flags
and move some flags inpkg/kn/commands/service/configuration_edit_flags.go
there. Then thisPodFlags
can be used in both Service commands and ContainerSource commands.I think below attributes in
ConfigurationEditFlags
are common to both Service and ContainerSource.The text was updated successfully, but these errors were encountered: