Skip to content

Log every command run by the operator #18

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

Draft
wants to merge 1 commit into
base: flyio-2.6.0
Choose a base branch
from
Draft
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
5 changes: 5 additions & 0 deletions percona/clientcmd/clientcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package clientcmd
import (
"context"
"io"
"log"

"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -52,6 +53,10 @@ func NewClient() (*Client, error) {
func (c *Client) Exec(ctx context.Context, pod *corev1.Pod, containerName string, stdin io.Reader, stdout, stderr io.Writer, command ...string) error {
// Prepare the API URL used to execute another process within the Pod.
// In this case, we'll run a remote shell.

log.Printf("Execing in pod namespace=%q, pod=%q, container=%q, command=%v\n",
pod.Namespace, pod.Name, containerName, command)

tty := false
req := c.client.RESTClient().
Post().
Expand Down
Loading