Documentation ¶
Index ¶
- func GenSchema(ctx context.Context, mc model.ClientSet, df *model.ResourceDefinition) error
- func MatchResourceDefinition(resourceDefinitions []*model.ResourceDefinition, ...) (*model.ResourceDefinition, *model.ResourceDefinitionMatchingRule)
- func SyncBuiltinResourceDefinitions(ctx context.Context, m builtin.BusMessage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenSchema ¶ added in v0.5.0
GenSchema generates the schema for the resource definition.
This function performs the following logic:
- Quickly perform schema aligning to select common parts between multiple rules' template.
- Refill the same default value to the variable schema if allowed. The default value comes from the SchemaDefaultValue of the matching rule.
func MatchResourceDefinition ¶ added in v0.5.0
func MatchResourceDefinition( resourceDefinitions []*model.ResourceDefinition, metadata types.MatchResourceMetadata, ) (*model.ResourceDefinition, *model.ResourceDefinitionMatchingRule)
MatchResourceDefinition takes a list of resource definitions and the resource metadata, and returns the matched resource definition and the matched matching rule. If no resource definition matches, it returns nil.
func SyncBuiltinResourceDefinitions ¶ added in v0.5.0
func SyncBuiltinResourceDefinitions(ctx context.Context, m builtin.BusMessage) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.