You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the Node Resources, a user may want to template the outcome message with the values retrieved from the node/cluster, so that the outcome messages don't have to be static as they are today. For example, a user may want to write the following spec:
apiVersion: troubleshoot.sh/v1beta2kind: Preflightmetadata:
name: samplespec:
analyzers:
- nodeResources:
filters:
cpuArchitecture: amd64checkName: Must have at least 3 nodes in the clusteroutcomes:
- fail:
when: "count() < 3"message: This application requires at least 3 nodes. Only {{ .NodeCount }} nodes found.
- pass:
message: This cluster has enough nodes.
Describe the feature
A user would be able to include certain values gathered by the Node Resources as templates in the outcome message, so they can generate more dynamic messages. The templates we allow for usage in the outcome message would need to account for mulit-node clusters and when filters like cpuArchitecture are used in the spec. For example, in a 10 node cluster where only half the node are amd64, if the {{ .NodeCount }} template was used in conjunction with a filter for `amd64, it should only return the 5 nodes that match that filter.
Describe alternatives you've considered
Describe alternative solutions here. Include any workarounds you've considered.
Additional context
Add additional context about the feature request. If the change is substantial, consider attaching files to the issue outlining architectural changes, data flows, file formats etc., anything that helps describe the requested change.
The text was updated successfully, but these errors were encountered:
I'll add that I really want this capability for our host preflights for EC too. We want EC to be self-documenting and guide the user through any failures. So I'd love for our preflights to say "You need 4 CPU cores but you have 2" instead of just "You need 4 CPU cores." This will make it abundantly clear what users need to do, how far off they are (if the disk can't be more than 80% full, am I close to that threshold or way over it), etc.
So consider me a +1 for this issue, and it would be great for this kind of templating to be available for several of the analyzers we use in our host preflights, including CPU, memory, and disk usage.
Describe the rationale for the suggested feature.
When using the Node Resources, a user may want to template the outcome message with the values retrieved from the node/cluster, so that the outcome messages don't have to be static as they are today. For example, a user may want to write the following spec:
Describe the feature
A user would be able to include certain values gathered by the Node Resources as templates in the outcome message, so they can generate more dynamic messages. The templates we allow for usage in the outcome message would need to account for mulit-node clusters and when
filters
likecpuArchitecture
are used in the spec. For example, in a 10 node cluster where only half the node areamd64
, if the{{ .NodeCount }}
template was used in conjunction with a filter for `amd64, it should only return the 5 nodes that match that filter.Describe alternatives you've considered
Describe alternative solutions here. Include any workarounds you've considered.
Additional context
Add additional context about the feature request. If the change is substantial, consider attaching files to the issue outlining architectural changes, data flows, file formats etc., anything that helps describe the requested change.
The text was updated successfully, but these errors were encountered: