Skip to content

Instantly share code, notes, and snippets.

Last active October 19, 2022 07:36
What would you like to do?
Subresources Validation Flowchart

LFX Mentorship Fall 2022

More support for subresources

flowchart TB
subgraph ide1 [policy/validate.go]
    A["validateKinds(..), Background scanning not allowed for subresources"]
subgraph ide2 [dclient/discovery.go]
    A --> C["FindResource(..)"] --- D["Iterate over server resources, support for subresources added"]
subgraph ide3 [policycache/cache.go]
    E["Adds policy to the cache store"] --- F["Set(..., client dclient.Interface)"] -- policy matches subresources --> C
ide1 --> G["Updating ValidatingWebhookConfiguration"] --> H{{Now Requests matching the webhook are accepted}} --> I[Get policies based on the Kind of Subresource] -...-> ide4
subgraph ide4 [engine/utils.go]
    J["checkKind(client dclient.Interface, ....)"] -- policy matches subresources --> C
ide4 --> K["Process Validation Rule"]
K --> L[Pass]
K --> M[Fail]
style L fill:green
style M fill:red
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment