@@ -14,7 +14,6 @@ See the License for the specific language governing permissions and
1414limitations under the License.
1515*/
1616
17- // +kubebuilder:validation:Required
1817package v1alpha1
1918
2019import (
@@ -187,21 +186,27 @@ const (
187186// ByteCodeSelector defines the various ways to reference bpf bytecode objects.
188187type ByteCodeSelector struct {
189188 // image used to specify a bytecode container image.
189+ // +optional
190190 Image * ByteCodeImage `json:"image,omitempty"`
191191
192192 // path is used to specify a bytecode object via filepath.
193+ // +kubebuilder:validation:Pattern=`^(/[^/\0]+)+/?$`
194+ // +optional
193195 Path * string `json:"path,omitempty"`
194196}
195197
196198// ByteCodeImage defines how to specify a bytecode container image.
197199type ByteCodeImage struct {
198200 // url is a valid container image URL used to reference a remote bytecode image.
201+ // +kubebuilder:validation:Required
202+ // +kubebuilder:validation:MaxLength:=525
203+ // +kubebuilder:validation:Pattern=`[a-zA-Z0-9_][a-zA-Z0-9._-]{0,127}`
199204 Url string `json:"url"`
200205
201206 // pullPolicy describes a policy for if/when to pull a bytecode image. Defaults to IfNotPresent.
202207 // +kubebuilder:default:=IfNotPresent
203208 // +optional
204- ImagePullPolicy PullPolicy `json:"imagePullPolicy"`
209+ ImagePullPolicy PullPolicy `json:"imagePullPolicy,omitempty "`
205210
206211 // imagePullSecret is the name of the secret bpfman should use to get remote image
207212 // repository secrets.
0 commit comments