diff --git a/applyconfigurations/admissionregistration/v1alpha1/validation.go b/applyconfigurations/admissionregistration/v1alpha1/validation.go index 43916603..9a5fc847 100644 --- a/applyconfigurations/admissionregistration/v1alpha1/validation.go +++ b/applyconfigurations/admissionregistration/v1alpha1/validation.go @@ -25,9 +25,10 @@ import ( // ValidationApplyConfiguration represents an declarative configuration of the Validation type for use // with apply. type ValidationApplyConfiguration struct { - Expression *string `json:"expression,omitempty"` - Message *string `json:"message,omitempty"` - Reason *v1.StatusReason `json:"reason,omitempty"` + Expression *string `json:"expression,omitempty"` + Message *string `json:"message,omitempty"` + Reason *v1.StatusReason `json:"reason,omitempty"` + MessageExpression *string `json:"messageExpression,omitempty"` } // ValidationApplyConfiguration constructs an declarative configuration of the Validation type for use with @@ -59,3 +60,11 @@ func (b *ValidationApplyConfiguration) WithReason(value v1.StatusReason) *Valida b.Reason = &value return b } + +// WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the MessageExpression field is set to the value of the last call. +func (b *ValidationApplyConfiguration) WithMessageExpression(value string) *ValidationApplyConfiguration { + b.MessageExpression = &value + return b +} diff --git a/applyconfigurations/internal/internal.go b/applyconfigurations/internal/internal.go index cde5e823..1dd82912 100644 --- a/applyconfigurations/internal/internal.go +++ b/applyconfigurations/internal/internal.go @@ -404,6 +404,9 @@ var schemaYAML = typed.YAMLObject(`types: - name: message type: scalar: string + - name: messageExpression + type: + scalar: string - name: reason type: scalar: string diff --git a/go.mod b/go.mod index dd6fc160..5283bcce 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( golang.org/x/term v0.5.0 golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 google.golang.org/protobuf v1.28.1 - k8s.io/api v0.0.0-20230314010636-4c844db47d54 + k8s.io/api v0.0.0-20230314051611-bd0ab2c00ff0 k8s.io/apimachinery v0.0.0-20230314010357-128166500c57 k8s.io/klog/v2 v2.90.1 k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a @@ -59,6 +59,6 @@ require ( ) replace ( - k8s.io/api => k8s.io/api v0.0.0-20230314010636-4c844db47d54 + k8s.io/api => k8s.io/api v0.0.0-20230314051611-bd0ab2c00ff0 k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20230314010357-128166500c57 ) diff --git a/go.sum b/go.sum index 723f4bff..b83ea0ed 100644 --- a/go.sum +++ b/go.sum @@ -473,8 +473,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.0.0-20230314010636-4c844db47d54 h1:0VSpq40qYJx9GN/G+BzJiVgcz3cR3xPc+xn3nQLAoZ8= -k8s.io/api v0.0.0-20230314010636-4c844db47d54/go.mod h1:YsFNxBfPYQZAIBg0XvL94rxDDVZvQQQUlo4KbwEEqNU= +k8s.io/api v0.0.0-20230314051611-bd0ab2c00ff0 h1:cklt3bA2So9x6tHCIjg2iGCS6K5bRv/aYPR0/KIah3U= +k8s.io/api v0.0.0-20230314051611-bd0ab2c00ff0/go.mod h1:YsFNxBfPYQZAIBg0XvL94rxDDVZvQQQUlo4KbwEEqNU= k8s.io/apimachinery v0.0.0-20230314010357-128166500c57 h1:Vr1geeI+at1NNCWyTN70NtPSNcveZ+fAcbZivzwHknM= k8s.io/apimachinery v0.0.0-20230314010357-128166500c57/go.mod h1:1AlvkfXatlv5Kq9dCZg3Ksdu/DyrZ31Q0CncRqQ8Q9I= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw=