Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hubble port-forward: Don't generate Helm manifests #928

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hubble/hubble.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ type k8sHubbleImplementation interface {
ListCiliumEndpoints(ctx context.Context, namespace string, opts metav1.ListOptions) (*ciliumv2.CiliumEndpointList, error)
GetServerVersion() (*semver.Version, error)
GetHelmState(ctx context.Context, namespace string, secretName string) (*helm.State, error)
GetService(ctx context.Context, namespace, name string, opts metav1.GetOptions) (*corev1.Service, error)
}

type K8sHubble struct {
Expand Down
15 changes: 1 addition & 14 deletions hubble/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,24 +252,11 @@ func (k *K8sHubble) generateRelayCertificate(name string) (corev1.Secret, error)
}

func (k *K8sHubble) PortForwardCommand(ctx context.Context) error {
helmState, err := k.client.GetHelmState(ctx, k.params.Namespace, k.params.HelmValuesSecretName)
relaySvc, err := k.client.GetService(ctx, k.params.Namespace, "hubble-relay", metav1.GetOptions{})
if err != nil {
return err
}

// Generate the manifests has if hubble was being enabled so that we can
// retrieve all UI and Relay's resource names.
k.params.UI = true
k.params.Relay = true
err = k.generateManifestsEnable(ctx, false, helmState.Values)
if err != nil {
return err
}

relaySvc, err := k.generateRelayService()
if err != nil {
return err
}
args := []string{
"port-forward",
"-n", k.params.Namespace,
Expand Down