@@ -38,44 +38,46 @@ type Config struct {
3838 Status ConfigStatus `json:"status,omitempty"`
3939}
4040
41- // Spec defines the desired state of the bpfman-operator.
41+ // spec defines the desired state of the bpfman-operator.
4242type ConfigSpec struct {
43- // Agent holds the configuration for the bpfman agent.
43+ // agent holds the configuration for the bpfman agent.
4444 // +required
45- Agent AgentSpec `json:"agent,omitempty "`
46- // Configuration holds the content of bpfman.toml.
45+ Agent AgentSpec `json:"agent"`
46+ // configuration holds the content of bpfman.toml.
4747 // +required
48- // +kubebuilder:validation:Required
4948 // +kubebuilder:validation:MinLength=1
5049 Configuration string `json:"configuration"`
51- // Image holds the image of the bpfman DaemonSets.
50+ // image sets the image of the bpfman DaemonSets.
5251 // +required
53- // +kubebuilder:validation:Required
5452 // +kubebuilder:validation:MinLength=1
5553 Image string `json:"image"`
56- // LogLevel holds the log level for the bpfman-operator.
54+ // logLevel sets the log level for the bpfman's DaemonSets via the RUST_LOG environment variable.
55+ // The RUST_LOG environment variable controls logging with the syntax: RUST_LOG=[target][=][level][,...].
56+ // For further information, see https://docs.rs/env_logger/latest/env_logger/.
5757 // +optional
5858 LogLevel string `json:"logLevel,omitempty"`
59- // Namespace holds the namespace where bpfman-operator resources shall be
60- // deployed.
59+ // namespace sets the namespace where bpfman-operator resources shall be
60+ // deployed. If not specified, resources will be deployed in the default
61+ // bpfman namespace.
62+ // +optional
6163 Namespace string `json:"namespace,omitempty"`
6264}
6365
6466// AgentSpec defines the desired state of the bpfman agent.
6567type AgentSpec struct {
66- // HealthProbePort holds the health probe bind port for the bpfman agent.
68+ // healthProbePort configures the health probe bind port for the bpfman agent.
69+ // If unspecified, the default port will be used.
6770 // +optional
68- // +kubebuilder:default=8175
69- // +kubebuilder:validation:Minimum=1
71+ // +kubebuilder:validation:Minimum=0
7072 // +kubebuilder:validation:Maximum=65535
71- HealthProbePort int `json:"healthProbePort"`
72- // Image holds the image for the bpfman agent.
73+ HealthProbePort int32 `json:"healthProbePort,omitempty "`
74+ // image holds the image for the bpfman agent.
7375 // +required
74- // +kubebuilder:validation:Required
75- // +kubebuilder:validation:MinLength=1
7676 Image string `json:"image"`
77- // LogLevel holds the log level for the bpfman agent.
77+ // logLevel holds the log level for the bpfman agent.
78+ // Valid values are: "", "info", "debug", "trace".
7879 // +optional
80+ // +kubebuilder:validation:Enum="";info;debug;trace
7981 LogLevel string `json:"logLevel,omitempty"`
8082}
8183
@@ -101,10 +103,14 @@ type ConfigList struct {
101103 Items []Config `json:"items"`
102104}
103105
106+ // ConfigComponentStatus holds the status of a single Config component.
104107type ConfigComponentStatus string
105108
106109const (
107- ConfigStatusUnknown ConfigComponentStatus = "Unknown"
110+ // ConfigStatusUnknown indicates the component state cannot be determined.
111+ ConfigStatusUnknown ConfigComponentStatus = "Unknown"
112+ // ConfigStatusProgressing indicates the component is being updated or reconciled.
108113 ConfigStatusProgressing ConfigComponentStatus = "Progressing"
109- ConfigStatusReady ConfigComponentStatus = "Ready"
114+ // ConfigStatusReady indicates the component is fully operational and ready.
115+ ConfigStatusReady ConfigComponentStatus = "Ready"
110116)
0 commit comments