Skip to content

Commit

Permalink
upgrade to latest dependencies (#536)
Browse files Browse the repository at this point in the history
bumping knative.dev/serving 6d90f54...a043ddf:
  > a043ddf Drop duplicate test case - TestActivatorInRequestPathPossibly (# 15361)
  > 95c751a upgrade to latest dependencies (# 15353)
  > 25783ae Update net-contour nightly (# 15356)
  > b02cc68 Update net-istio nightly (# 15358)
  > 1dff15d feat: add defaults configurable runtimeClassName (# 15271)
  > 5558435 Update net-contour nightly (# 15350)
  > 2ac8b35 add tests to validate uptime of services during user pod deletion (# 15284)
  > 7193018 upgrade to latest dependencies (# 15351)
  > d6d8525 use wait.Interrupted (# 15342)
  > 48d3196 Update net-gateway-api nightly (# 15349)
  > 866782a Update net-istio nightly (# 15348)
  > 226c771 Bump ko-build/setup-ko from 0.6 to 0.7 (# 15346)
  > 6fa0f6d upgrade to latest dependencies (# 15344)
  > a5ad85b Update net-gateway-api nightly (# 15337)
  > b22e06c Update net-kourier nightly (# 15340)
  > de3b9ba upgrade to latest dependencies (# 15341)
bumping knative.dev/pkg 915c009...3f6a546:
  > 3f6a546 Fix rand source in name (# 3070)
  > ee1db86 Update linter config and address lint warnings/failures (# 3068)
  > 26bc7b4 Register AuthenticatableType in schema (# 3069)
  > 8535fcc gofumpt the repo (# 3067)
  > fc0720b [logstream] test polling should use a different context (# 3066)
  > 51dec91 drop test-infra code (# 3065)
  > b5bb12c drop unused OWNERS files and update script (# 3064)
bumping knative.dev/eventing f84a98c...a6ac811:
  > a6ac811 [main] Upgrade to latest dependencies (# 8032)
  > c5ac18a Update Github actions automatically (# 7942)
  > e36a2cf Use `knative/actions/setup-go` to be in sync with other projects (# 8044)
  > 922edf2 Remove unneeded replaces in go.mod (# 8033)
  > 0f71292 [main] Upgrade to latest dependencies (# 8029)
  > 9cf272a Event Type API: updated test name to avoid confusion (# 8030)
  > 6352784 Updating RetryableHttp lib to latest (# 8026)
  > d4e647d List applying policies in Channel and propagate EventPolicies to underlying channel (# 8014)
  > 7253b36 Add EventPolicy resource for rekt tests (# 8010)
  > e21311d [main] Upgrade to latest dependencies (# 8019)
  > 36c904a Fix test case in `TestCreateExpectedEventDeliveryMap` (# 8023)
  > 825202f Fix test case in TestCreateExpectedEventPatterns (# 8022)
  > c9deeb9 Add JobSink to storage version migration (# 8020)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation authored Jun 27, 2024
1 parent 91827d0 commit 96b691d
Show file tree
Hide file tree
Showing 70 changed files with 250 additions and 189 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require (
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
knative.dev/eventing v0.41.1-0.20240620173702-f84a98c60901
knative.dev/eventing v0.41.1-0.20240627060150-a6ac8111e82f
knative.dev/hack v0.0.0-20240607132042-09143140a254
knative.dev/pkg v0.0.0-20240620215714-915c00977757
knative.dev/serving v0.41.1-0.20240620131618-6d90f5493686
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4
knative.dev/serving v0.41.1-0.20240626185720-a043ddf2770a
)

require (
Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2z
github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg=
github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-retryablehttp v0.6.7 h1:8/CAEZt/+F7kR7GevNHulKkUjLht3CPmn7egmhieNKo=
github.com/hashicorp/go-retryablehttp v0.6.7/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c=
Expand Down Expand Up @@ -723,16 +723,16 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.41.1-0.20240620173702-f84a98c60901 h1:f+8MaSnRI5U7hjTf4V8xhF4ppd3UvcJVJB7w0Z1WPMo=
knative.dev/eventing v0.41.1-0.20240620173702-f84a98c60901/go.mod h1:o6FjbuGhX9faLv57flszVIvbEw++dBpeuD/xExAEagc=
knative.dev/eventing v0.41.1-0.20240627060150-a6ac8111e82f h1:FuJQSlda7F1Yk1eaSSvWXq7ic9h4Lo/s9EjMnKCoFcg=
knative.dev/eventing v0.41.1-0.20240627060150-a6ac8111e82f/go.mod h1:3h0QrfHELs61mrTI4GDPEQh4rwsap0YYA5XgRrNgnlc=
knative.dev/hack v0.0.0-20240607132042-09143140a254 h1:1YFnu3U6dWZg0oxm6GU8kEdA9A+BvSWKJO7sg3N0kq8=
knative.dev/hack v0.0.0-20240607132042-09143140a254/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20240611072033-3b8764c0bb4c h1:Q+DdJYzvhwAVWMQtP6mbEr5dNxpr+K9HAF9RqJmZefY=
knative.dev/networking v0.0.0-20240611072033-3b8764c0bb4c/go.mod h1:WhZLv94eOMDGHbdZiMrw6cnRfN3WEcFgpjUcV0A48pI=
knative.dev/pkg v0.0.0-20240620215714-915c00977757 h1:vjPAW4ll00Yu0H/avu1vkjbHHh9n0DlukvWGl2eHrs4=
knative.dev/pkg v0.0.0-20240620215714-915c00977757/go.mod h1:uqK/Rec08I8njY3r2y8aY90Lmt/a8cUwm8H2XI9jHZk=
knative.dev/serving v0.41.1-0.20240620131618-6d90f5493686 h1:vsVRBvxZrC312+j3q/fhBJfHAsx+4DcOOChWZOP3CdE=
knative.dev/serving v0.41.1-0.20240620131618-6d90f5493686/go.mod h1:zvjO9iWedTW7/heF8A6rouZP47g4ZvmtDjUW2f88KQo=
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4 h1:slPKf3UKdBFZlz+hFy+KXzTgY9yOePLzRuEhKzgc5a4=
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4/go.mod h1:Wikg4u73T6vk9TctrxZt60VXzqmGEQIx0iKfk1+9o4c=
knative.dev/serving v0.41.1-0.20240626185720-a043ddf2770a h1:HAhAQRkvCMr1CBGtmUghy9DseqcTFs4SFNb/slg5ics=
knative.dev/serving v0.41.1-0.20240626185720-a043ddf2770a/go.mod h1:7+wAf1rE/O2O+92Ft8Bfw3LnDirkg4c/+jKU3giMIoc=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ type ChannelableStatus struct {
// resolved delivery options.
// +optional
DeliveryStatus `json:",inline"`
// AppliedEventPoliciesStatus contains the list of EventPolicies which apply to this Channel
// +optional
AppliedEventPoliciesStatus `json:",inline"`
}

var (
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var chCondSet = apis.NewLivingConditionSet(
ChannelConditionBackingChannelReady,
ChannelConditionAddressable,
ChannelConditionDeadLetterSinkResolved,
ChannelConditionEventPoliciesReady,
)

const (
Expand All @@ -45,6 +46,10 @@ const (
// ChannelConditionDeadLetterSinkResolved has status True when there is a Dead Letter Sink ref or URI
// defined in the Spec.Delivery, is a valid destination and its correctly resolved into a valid URI
ChannelConditionDeadLetterSinkResolved apis.ConditionType = "DeadLetterSinkResolved"

// ChannelConditionEventPoliciesReady has status True when all the EventPolicies which reference this
// Channel are Ready too.
ChannelConditionEventPoliciesReady apis.ConditionType = "EventPoliciesReady"
)

// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
Expand Down Expand Up @@ -146,3 +151,19 @@ func (cs *ChannelStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat
cs.DeliveryStatus = eventingduck.DeliveryStatus{}
chCondSet.Manage(cs).MarkFalse(ChannelConditionDeadLetterSinkResolved, reason, messageFormat, messageA...)
}

func (cs *ChannelStatus) MarkEventPoliciesFailed(reason, messageFormat string, messageA ...interface{}) {
chCondSet.Manage(cs).MarkFalse(ChannelConditionEventPoliciesReady, reason, messageFormat, messageA...)
}

func (cs *ChannelStatus) MarkEventPoliciesUnknown(reason, messageFormat string, messageA ...interface{}) {
chCondSet.Manage(cs).MarkUnknown(ChannelConditionEventPoliciesReady, reason, messageFormat, messageA...)
}

func (cs *ChannelStatus) MarkEventPoliciesTrue() {
chCondSet.Manage(cs).MarkTrue(ChannelConditionEventPoliciesReady)
}

func (cs *ChannelStatus) MarkEventPoliciesTrueWithReason(reason, messageFormat string, messageA ...interface{}) {
chCondSet.Manage(cs).MarkTrueWithReason(ChannelConditionEventPoliciesReady, reason, messageFormat, messageA...)
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ type InMemoryChannelSpec struct {
type InMemoryChannelStatus struct {
// Channel conforms to Duck type ChannelableStatus.
eventingduckv1.ChannelableStatus `json:",inline"`

// AppliedEventPoliciesStatus contains the list of EventPolicies which apply to this Broker
// +optional
eventingduckv1.AppliedEventPoliciesStatus `json:",inline"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions vendor/knative.dev/eventing/pkg/auth/event_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ import (
"fmt"
"strings"

eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1"
"knative.dev/eventing/pkg/apis/feature"

"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/tools/cache"

Expand Down Expand Up @@ -287,3 +290,52 @@ func EventPolicyEventHandler(indexer cache.Indexer, gk schema.GroupKind, enqueue
},
}
}

type EventPolicyStatusMarker interface {
MarkEventPoliciesFailed(reason, messageFormat string, messageA ...interface{})
MarkEventPoliciesUnknown(reason, messageFormat string, messageA ...interface{})
MarkEventPoliciesTrue()
MarkEventPoliciesTrueWithReason(reason, messageFormat string, messageA ...interface{})
}

func UpdateStatusWithEventPolicies(featureFlags feature.Flags, status *eventingduckv1.AppliedEventPoliciesStatus, statusMarker EventPolicyStatusMarker, eventPolicyLister listerseventingv1alpha1.EventPolicyLister, gvk schema.GroupVersionKind, objectMeta metav1.ObjectMeta) error {
status.Policies = nil

applyingEvenPolicies, err := GetEventPoliciesForResource(eventPolicyLister, gvk, objectMeta)
if err != nil {
statusMarker.MarkEventPoliciesFailed("EventPoliciesGetFailed", "Failed to get applying event policies")
return fmt.Errorf("unable to get applying event policies: %w", err)
}

if len(applyingEvenPolicies) > 0 {
unreadyEventPolicies := []string{}
for _, policy := range applyingEvenPolicies {
if !policy.Status.IsReady() {
unreadyEventPolicies = append(unreadyEventPolicies, policy.Name)
} else {
// only add Ready policies to the list
status.Policies = append(status.Policies, eventingduckv1.AppliedEventPolicyRef{
Name: policy.Name,
APIVersion: v1alpha1.SchemeGroupVersion.String(),
})
}
}

if len(unreadyEventPolicies) == 0 {
statusMarker.MarkEventPoliciesTrue()
} else {
statusMarker.MarkEventPoliciesFailed("EventPoliciesNotReady", "event policies %s are not ready", strings.Join(unreadyEventPolicies, ", "))
}
} else {
// we have no applying event policy. So we set the EP condition to True
if featureFlags.IsOIDCAuthentication() {
// in case of OIDC auth, we also set the message with the default authorization mode
statusMarker.MarkEventPoliciesTrueWithReason("DefaultAuthorizationMode", "Default authz mode is %q", featureFlags[feature.AuthorizationDefaultMode])
} else {
// in case OIDC is disabled, we set EP condition to true too, but give some message that authz (EPs) require OIDC
statusMarker.MarkEventPoliciesTrueWithReason("OIDCDisabled", "Feature %q must be enabled to support Authorization", feature.OIDCAuthentication)
}
}

return nil
}
6 changes: 3 additions & 3 deletions vendor/knative.dev/pkg/apis/condition_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ limitations under the License.
package apis

import (
"errors"
"fmt"
"reflect"
"sort"
"time"

"fmt"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -234,7 +234,7 @@ func (r conditionsImpl) ClearCondition(t ConditionType) error {
}
// Terminal conditions are not handled as they can't be nil
if r.isTerminal(t) {
return fmt.Errorf("clearing terminal conditions not implemented")
return errors.New("clearing terminal conditions not implemented")
}
cond := r.GetCondition(t)
if cond == nil {
Expand Down
2 changes: 0 additions & 2 deletions vendor/knative.dev/pkg/apis/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func ConvertToViaProxy(
ctx context.Context,
source, proxy, sink Convertible,
) error {

if err := source.ConvertTo(ctx, proxy); err != nil {
return err
}
Expand All @@ -38,7 +37,6 @@ func ConvertFromViaProxy(
ctx context.Context,
source, proxy, sink Convertible,
) error {

if err := proxy.ConvertFrom(ctx, source); err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/deprecated.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func getPrefixedNamedFieldValues(prefix string, obj interface{}) (map[string]ref
return fields, inlined
}

for i := 0; i < objValue.NumField(); i++ {
for i := range objValue.NumField() {
tf := objValue.Type().Field(i)
if v := objValue.Field(i); v.IsValid() {
jTag := tf.Tag.Get("json")
Expand Down
6 changes: 2 additions & 4 deletions vendor/knative.dev/pkg/apis/duck/v1/addressable_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ type Addressable struct {
Audience *string `json:"audience,omitempty"`
}

var (
// Addressable is a Convertible type.
_ apis.Convertible = (*Addressable)(nil)
)
// Addressable is a Convertible type.
var _ apis.Convertible = (*Addressable)(nil)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/pkg/apis/duck/v1/destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ func (d *Destination) SetDefaults(ctx context.Context) {
}
}

func validateCACerts(CACert *string) *apis.FieldError {
func validateCACerts(caCert *string) *apis.FieldError {
// Check the object.
var errs *apis.FieldError

block, err := pem.Decode([]byte(*CACert))
block, err := pem.Decode([]byte(*caCert))
if err != nil && block == nil {
errs = errs.Also(apis.ErrInvalidValue("CA Cert provided is invalid", "caCert"))
return errs
Expand Down
1 change: 0 additions & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/knative_reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ func (kr *KReference) Validate(ctx context.Context) *apis.FieldError {
Details: fmt.Sprintf("parent namespace: %q does not match ref: %q", parentNS, kr.Namespace),
})
}

}
}
return errs
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/kresource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t *KResource) Populate() {
// Populate ALL fields
Type: "Birthday",
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
Reason: "Celebrate",
Message: "n3wScott, find your party hat :tada:",
}}
Expand Down
2 changes: 2 additions & 0 deletions vendor/knative.dev/pkg/apis/duck/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
(&KResource{}).GetListType(),
&AddressableType{},
(&AddressableType{}).GetListType(),
&AuthenticatableType{},
(&AuthenticatableType{}).GetListType(),
&Source{},
(&Source{}).GetListType(),
&WithPod{},
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s *Source) Populate() {
// Populate ALL fields
Type: SourceConditionSinkProvided,
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
}}
s.Status.SinkURI = &apis.URL{
Scheme: "https",
Expand Down
1 change: 0 additions & 1 deletion vendor/knative.dev/pkg/apis/duck/v1/status_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func (s *Status) ConvertTo(ctx context.Context, sink *Status, predicates ...func

conditions := make(apis.Conditions, 0, len(s.Conditions))
for _, c := range s.Conditions {

// Copy over the "happy" condition, which is the only condition that
// we can reliably transfer.
if c.Type == apis.ConditionReady || c.Type == apis.ConditionSucceeded {
Expand Down
5 changes: 3 additions & 2 deletions vendor/knative.dev/pkg/apis/duck/v1beta1/destination.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,12 @@ func validateDestinationRef(ref corev1.ObjectReference) *apis.FieldError {

return errs
}
func validateCACerts(CACert *string) *apis.FieldError {

func validateCACerts(caCert *string) *apis.FieldError {
// Check the object.
var errs *apis.FieldError

block, err := pem.Decode([]byte(*CACert))
block, err := pem.Decode([]byte(*caCert))
if err != nil && block == nil {
errs = errs.Also(apis.ErrInvalidValue("CA Cert provided is invalid", "caCert"))
return errs
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/duck/v1beta1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (s *Source) Populate() {
// Populate ALL fields
Type: SourceConditionSinkProvided,
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
}}
s.Status.SinkURI = &apis.URL{
Scheme: "https",
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (t *KResource) Populate() {
// Populate ALL fields
Type: "Birthday",
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 02, 28, 18, 52, 00, 00, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
Reason: "Celebrate",
Message: "n3wScott, find your party hat :tada:",
}}
Expand Down
6 changes: 4 additions & 2 deletions vendor/knative.dev/pkg/apis/duck/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ import (
"knative.dev/pkg/kmp"
)

type Implementable = ducktypes.Implementable
type Populatable = ducktypes.Populatable
type (
Implementable = ducktypes.Implementable
Populatable = ducktypes.Populatable
)

// VerifyType verifies that a particular concrete resource properly implements
// the provided Implementable duck type. It is expected that under the resource
Expand Down
5 changes: 2 additions & 3 deletions vendor/knative.dev/pkg/apis/kind2resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package apis

import (
"fmt"
"strings"

"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -41,7 +40,7 @@ func KindToResource(gvk schema.GroupVersionKind) schema.GroupVersionResource {
func pluralizeKind(kind string) string {
ret := strings.ToLower(kind)
if strings.HasSuffix(ret, "s") {
return fmt.Sprintf("%ses", ret)
return ret + "es"
}
return fmt.Sprintf("%ss", ret)
return ret + "s"
}
8 changes: 4 additions & 4 deletions vendor/knative.dev/pkg/codegen/cmd/injection-gen/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package args

import (
"fmt"
"errors"

"github.com/spf13/pflag"
"k8s.io/gengo/args"
Expand Down Expand Up @@ -59,13 +59,13 @@ func Validate(genericArgs *args.GeneratorArgs) error {
customArgs := genericArgs.CustomArgs.(*CustomArgs)

if len(genericArgs.OutputPackagePath) == 0 {
return fmt.Errorf("output package cannot be empty")
return errors.New("output package cannot be empty")
}
if len(customArgs.VersionedClientSetPackage) == 0 {
return fmt.Errorf("versioned clientset package cannot be empty")
return errors.New("versioned clientset package cannot be empty")
}
if len(customArgs.ExternalVersionsInformersPackage) == 0 {
return fmt.Errorf("external versions informers package cannot be empty")
return errors.New("external versions informers package cannot be empty")
}

return nil
Expand Down
Loading

0 comments on commit 96b691d

Please sign in to comment.