-
Notifications
You must be signed in to change notification settings - Fork 712
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
kubernetes: Add StatefulSets and CronJobs #2724
Conversation
f295ed4
to
ce3fc0c
Compare
probe/kubernetes/deployment.go
Outdated
desiredReplicas := 1 | ||
if d.Spec.Replicas != nil { | ||
desiredReplicas = int(*d.Spec.Replicas) | ||
} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
ce3fc0c
to
1c65505
Compare
Since renderKubernetesTopologies was getting unweildy, refactored into a form which was a bit clearer, if a bit more verbose.
Most of the time you only care about cronjobs, not the jobs that make them up, so we only collect full cronjob data. We associate pods of jobs with the parent cronjob
Spec.Replicas is a *int32, with a value of nil occurring when the user doesn't set it. In this case k8s defaults to 1, so we mimic this to show the effective value.
1c65505
to
38814d5
Compare
Forgot to add the cronjob and statefulset files :S fixed |
probe/kubernetes/cronjob.go
Outdated
break | ||
} | ||
} | ||
} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
CronJob: MakeTopology(). | ||
WithShape(Triangle). | ||
WithLabel("cron job", "cron jobs"), | ||
|
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Final list of shapes for controllers view, with rationale: Heptagon for Deployment - same shape as Service, which typically have a corresponding Deployment Triangle for CronJob - weird shape for weird thing Pentagon for DaemonSet - because pentagons and daemon worship :P Octagon for StatefulSet - last shape left
Currently joining the two lists is O(mn), by putting into a hashmap first it's O(m+n)
PTAL |
LGTM. Please file issues for the future work you listed above. |
related to #2620 |
Fixes #2239. Fixes #2571.
Most basic info is in metadata. Future work: