mirror of
https://github.com/helm/helm.git
synced 2026-02-11 06:43:21 -05:00
Update based on review comments
Signed-off-by: Chris Berry <bez625@gmail.com>
This commit is contained in:
parent
a55a477069
commit
3d4e679d9f
3 changed files with 12 additions and 6 deletions
|
|
@ -199,7 +199,7 @@ func (cfg *Configuration) outputLogsByPolicy(h *release.Hook, releaseNamespace s
|
|||
|
||||
func (cfg *Configuration) outputContainerLogsForListOptions(namespace string, listOptions metav1.ListOptions) error {
|
||||
// TODO Helm 4: Remove this check when GetPodList and OutputContainerLogsForPodList are moved from InterfaceExt to Interface
|
||||
if kubeClient, ok := cfg.KubeClient.(kube.InterfaceExt); ok {
|
||||
if kubeClient, ok := cfg.KubeClient.(kube.InterfaceLogs); ok {
|
||||
podList, err := kubeClient.GetPodList(namespace, listOptions)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"helm.sh/helm/v3/pkg/chart"
|
||||
kubefake "helm.sh/helm/v3/pkg/kube/fake"
|
||||
"helm.sh/helm/v3/pkg/release"
|
||||
"helm.sh/helm/v4/pkg/chart"
|
||||
kubefake "helm.sh/helm/v4/pkg/kube/fake"
|
||||
"helm.sh/helm/v4/pkg/release"
|
||||
)
|
||||
|
||||
func podManifestWithOutputLogs(hookDefinitions []release.HookOutputLogPolicy) string {
|
||||
|
|
|
|||
|
|
@ -68,13 +68,18 @@ type Interface interface {
|
|||
IsReachable() error
|
||||
}
|
||||
|
||||
// InterfaceExt is introduced to avoid breaking backwards compatibility for Interface implementers.
|
||||
// InterfaceExt was introduced to avoid breaking backwards compatibility for Interface implementers.
|
||||
//
|
||||
// TODO Helm 4: Remove InterfaceExt and integrate its method(s) into the Interface.
|
||||
type InterfaceExt interface {
|
||||
// WaitForDelete wait up to the given timeout for the specified resources to be deleted.
|
||||
WaitForDelete(resources ResourceList, timeout time.Duration) error
|
||||
}
|
||||
|
||||
// InterfaceLogs was introduced to avoid breaking backwards compatibility for Interface implementers.
|
||||
//
|
||||
// TODO Helm 4: Remove InterfaceLogs and integrate its method(s) into the Interface.
|
||||
type InterfaceLogs interface {
|
||||
// GetPodList list all pods that match the specified listOptions
|
||||
GetPodList(namespace string, listOptions metav1.ListOptions) (*v1.PodList, error)
|
||||
|
||||
|
|
@ -86,7 +91,7 @@ type InterfaceExt interface {
|
|||
//
|
||||
// TODO Helm 4: Remove InterfaceDeletionPropagation and integrate its method(s) into the Interface.
|
||||
type InterfaceDeletionPropagation interface {
|
||||
// Delete destroys one or more resources. The deletion propagation is handled as per the given deletion propagation value.
|
||||
// DeleteWithPropagationPolicy destroys one or more resources. The deletion propagation is handled as per the given deletion propagation value.
|
||||
DeleteWithPropagationPolicy(resources ResourceList, policy metav1.DeletionPropagation) (*Result, []error)
|
||||
}
|
||||
|
||||
|
|
@ -114,5 +119,6 @@ type InterfaceResources interface {
|
|||
|
||||
var _ Interface = (*Client)(nil)
|
||||
var _ InterfaceExt = (*Client)(nil)
|
||||
var _ InterfaceLogs = (*Client)(nil)
|
||||
var _ InterfaceDeletionPropagation = (*Client)(nil)
|
||||
var _ InterfaceResources = (*Client)(nil)
|
||||
|
|
|
|||
Loading…
Reference in a new issue