-
Notifications
You must be signed in to change notification settings - Fork 79
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
gRPC - App logs #205
gRPC - App logs #205
Conversation
with some relevant methods on K8sAppOperations
using oficial k8s client-go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, maybe the interface can be simplified:
PodsLogs(namespace string, lines int64, follow bool) (io.ReadCloser, error)
This way the app pkg doesn't need to know about pod status
pkg/server/app/fake.go
Outdated
} | ||
if follow { | ||
rand.Seed(42) // The Anwser | ||
for i := 0; i <= rand.Intn(5); i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: Answer
pkg/server/app/app.go
Outdated
a := new(App) | ||
if err := json.Unmarshal([]byte(annotation), a); err != nil { | ||
return "", nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess return "", err
, right?
"Comment": "v2.0.0", | ||
"Rev": "e121606b0d09b2e1c467183ee46217fa85a6b672" | ||
}, | ||
{ | ||
"ImportPath": "k8s.io/kubernetes/pkg/api", | ||
"Comment": "v1.4.0-alpha.2-550-gda53a24", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if these k8s.io/apimachinery
shoud be here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tried to remove from Godeps.json and run godeps save ./...
, but it's back again 😞
@aguerra I don't understand, are you suggest to remove arg |
As we talked in person this way is more granular so ok4me. |
now we log all pods with any status
pkg/server/app/app.go
Outdated
found = true | ||
break | ||
} | ||
} | ||
return found | ||
} | ||
|
||
func (ops *AppOperations) getAppTeam(appName string) (string, error) { | ||
annotation, err := ops.kops.NamespaceAnnotation(appName, TeresaAnnotation) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to Label
instead of Annotation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔁
client-go
(related #203 )
This change is