-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for monitoring istio sidecars (#35)
* feat: add support for monitoring istio sidecars * chore: update port in classes.yml * refactor: use status annotation for istio sidecar * chore: more changes after code review
- Loading branch information
Wojciech Kocjan
authored
Jun 23, 2020
1 parent
49196ec
commit 8cc0571
Showing
12 changed files
with
834 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package main | ||
|
||
// error that notifies the handler that error occurred, but the pod should be created | ||
type nonFatalError struct { | ||
err error | ||
message string | ||
} | ||
|
||
func newNonFatalError(err error, message string) error { | ||
return &nonFatalError{ | ||
err: err, | ||
message: message, | ||
} | ||
} | ||
|
||
func (e *nonFatalError) Error() string { | ||
return e.err.Error() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx-with-istio | ||
namespace: test | ||
spec: | ||
replicas: 3 | ||
selector: | ||
matchLabels: | ||
app: nginx-with-istio | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx-with-istio | ||
annotations: | ||
# this will cause istio to inject its sidecar, that telegraf will then monitor | ||
sidecar.istio.io/inject: "true" | ||
# inject the status of the istio sidecar to mimic istio being present | ||
sidecar.istio.io/status: "dummy" | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:alpine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.