controller-tools
controller-tools copied to clipboard
auto generate sample yaml spec
/kind feature
This this my api type:
// BridgeSpec defines the desired state of Bridge
type BridgeSpec struct {
// INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
// Important: Run "make" to regenerate code after modifying this file
VpcName string `json:"vpcname"`
// ovn-nbctl set Logical_Switch vpc1 other_config:subnet=172.66.1.10/24
Subnet string `json:"subnet"`
Gateway string `json:"gateway"`
}
After generating yamls:
make && make install && make run
apiVersion: infra.genos.io/v1
kind: Bridge
metadata:
name: bridge-sample
spec:
# Add fields here
foo: bar
The spec is foo:bar
, auto-generate spec may be more convenience
/help
The end goal for this is pretty clear, but I'm not sure how, exactly, to get to the destination. We could possible use fuzzing to generate example values, or just use the empty value. In either case, we'd probably generate invalid values (due to validation), but we could maybe hook up the openapi validator to skip these, or teach the fuzzer about openapi.
@DirectXMan12: This request has been marked as needing help from a contributor.
Please ensure the request meets the requirements listed here.
If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help
command.
In response to this:
/help
The end goal for this is pretty clear, but I'm not sure how, exactly, to get to the destination. We could possible use fuzzing to generate example values, or just use the empty value. In either case, we'd probably generate invalid values (due to validation), but we could maybe hook up the openapi validator to skip these, or teach the fuzzer about openapi.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/lifecycle frozen
Doesn't the request meed the requirements listed ? I want to +1 this request. Would have been useful for me too.
yes, it meets the requirements -- "frozen" means don't bug us about issues going stale. However, we're still waiting on a proposal of how to accomplish this (some sort of design/prototype/whatever)
HI @DirectXMan12,
Should not it be better addressed in the controller-tools? WDYT about we raise it there and close this one?
Transferred the issue for this repo since the change would need to get done in the controller-gen.