Skip to content

Commit

Permalink
upgrade to latest dependencies (knative#1826)
Browse files Browse the repository at this point in the history
bumping knative.dev/serving 6fa0f6d...b02cc68:
  > 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)
bumping knative.dev/caching 5206966...46bd851:
  > 46bd851 upgrade to latest dependencies (# 876)
  > 0520b50 upgrade to latest dependencies (# 875)
bumping knative.dev/pkg fc0720b...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)
bumping knative.dev/eventing 36c904a...922edf2:
  > 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)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Jun 26, 2024
1 parent ab1ddf6 commit eaa7220
Show file tree
Hide file tree
Showing 78 changed files with 288 additions and 203 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ require (
k8s.io/client-go v0.29.2
k8s.io/code-generator v0.29.2
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
knative.dev/caching v0.0.0-20240619192417-52069666b596
knative.dev/eventing v0.41.1-0.20240624104714-36c904a473c0
knative.dev/caching v0.0.0-20240625184806-46bd851751d2
knative.dev/eventing v0.41.1-0.20240626113428-922edf285258
knative.dev/hack v0.0.0-20240607132042-09143140a254
knative.dev/pkg v0.0.0-20240621201938-fc0720b7a660
knative.dev/serving v0.41.1-0.20240624124043-6fa0f6df513a
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4
knative.dev/serving v0.41.1-0.20240626122742-b02cc68c4b6c
sigs.k8s.io/yaml v1.4.0
)

Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,10 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
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 v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
Expand Down Expand Up @@ -1359,18 +1359,18 @@ k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
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/caching v0.0.0-20240619192417-52069666b596 h1:Oud+fSVC6WXC4RBjm9G1Ie86NwPTyPxioibetwDIVRY=
knative.dev/caching v0.0.0-20240619192417-52069666b596/go.mod h1:v47kV6eUvPx/F5giRYB/OrfQDfHf/DE2bEVMLhphbJU=
knative.dev/eventing v0.41.1-0.20240624104714-36c904a473c0 h1:KTnnZMri43OzO+toJrTML9zU2FwnuCQGOHEArphLGAA=
knative.dev/eventing v0.41.1-0.20240624104714-36c904a473c0/go.mod h1:o6FjbuGhX9faLv57flszVIvbEw++dBpeuD/xExAEagc=
knative.dev/caching v0.0.0-20240625184806-46bd851751d2 h1:F8tTwbjbdBCs8me2sDcLJM8QwcBq88e8wycgktC9onE=
knative.dev/caching v0.0.0-20240625184806-46bd851751d2/go.mod h1:ZJP86cE+y+I+kikQ3syK7dwma8Lw2iwb2ryEVUeNk+Y=
knative.dev/eventing v0.41.1-0.20240626113428-922edf285258 h1:kS7QyqeQsaEsvy8FBMKUD2eZbE0Rih6gZ+5fL3efCyw=
knative.dev/eventing v0.41.1-0.20240626113428-922edf285258/go.mod h1:TfF4KWA9K++M5dGYGBaDWPrs0hzv0UqXsLZsuG01YS4=
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-20240621201938-fc0720b7a660 h1:SYPUGNPA/egS+u6oa6q1kN3Ec+z+we/hPrWie7qhLUg=
knative.dev/pkg v0.0.0-20240621201938-fc0720b7a660/go.mod h1:Wikg4u73T6vk9TctrxZt60VXzqmGEQIx0iKfk1+9o4c=
knative.dev/serving v0.41.1-0.20240624124043-6fa0f6df513a h1:Vz8kJgNZrYFt2lu0gxGgmK2I2CSs4ZhrdoiaqPpo67k=
knative.dev/serving v0.41.1-0.20240624124043-6fa0f6df513a/go.mod h1:oGaoAMr3BxppUzuzg0YNiNrL1pRR0WSkoHTYnKQkZUM=
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.20240626122742-b02cc68c4b6c h1:/n7KB+P3sLSeK7NfVz5n1LADWv18BDxrODwjMQNBOMo=
knative.dev/serving v0.41.1-0.20240626122742-b02cc68c4b6c/go.mod h1:hJmsIYz96VulSSDCPYfUIA14cwZAT6ehMST3zMfmUmU=
nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
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.

38 changes: 38 additions & 0 deletions vendor/knative.dev/eventing/pkg/reconciler/testing/v1/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import (
"fmt"
"time"

"knative.dev/eventing/pkg/apis/eventing/v1alpha1"
"knative.dev/eventing/pkg/apis/feature"

"k8s.io/apimachinery/pkg/types"

v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -159,6 +162,41 @@ func WithChannelDLSUnknown() ChannelOption {
}
}

func WithChannelEventPoliciesReady() ChannelOption {
return func(c *eventingv1.Channel) {
c.Status.MarkEventPoliciesTrue()
}
}

func WithChannelEventPoliciesNotReady(reason, message string) ChannelOption {
return func(c *eventingv1.Channel) {
c.Status.MarkEventPoliciesFailed(reason, message)
}
}

func WithChannelEventPoliciesListed(policyNames ...string) ChannelOption {
return func(c *eventingv1.Channel) {
for _, name := range policyNames {
c.Status.Policies = append(c.Status.Policies, eventingduckv1.AppliedEventPolicyRef{
APIVersion: v1alpha1.SchemeGroupVersion.String(),
Name: name,
})
}
}
}

func WithChannelEventPoliciesReadyBecauseOIDCDisabled() ChannelOption {
return func(c *eventingv1.Channel) {
c.Status.MarkEventPoliciesTrueWithReason("OIDCDisabled", "Feature %q must be enabled to support Authorization", feature.OIDCAuthentication)
}
}

func WithChannelEventPoliciesReadyBecauseNoPolicyAndOIDCEnabled() ChannelOption {
return func(c *eventingv1.Channel) {
c.Status.MarkEventPoliciesTrueWithReason("DefaultAuthorizationMode", "Default authz mode is %q", feature.AuthorizationAllowSameNamespace)
}
}

func WithChannelDLSResolvedFailed() ChannelOption {
return func(c *eventingv1.Channel) {
c.Status.MarkDeadLetterSinkResolvedFailed(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,28 @@ func WithUnreadyEventPolicyCondition(ep *v1alpha1.EventPolicy) {
}
}

func WithEventPolicyTo(tos ...v1alpha1.EventPolicySpecTo) EventPolicyOption {
return func(ep *v1alpha1.EventPolicy) {
ep.Spec.To = append(ep.Spec.To, tos...)
}
}

func WithEventPolicyToRef(ref v1alpha1.EventPolicyToReference) EventPolicyOption {
func WithEventPolicyToRef(gvk metav1.GroupVersionKind, name string) EventPolicyOption {
return func(ep *v1alpha1.EventPolicy) {
ep.Spec.To = append(ep.Spec.To, v1alpha1.EventPolicySpecTo{
Ref: &ref,
Ref: &v1alpha1.EventPolicyToReference{
APIVersion: apiVersion(gvk),
Kind: gvk.Kind,
Name: name,
},
})
}
}

func WithEventPolicyFrom(froms ...v1alpha1.EventPolicySpecFrom) EventPolicyOption {
func WithEventPolicyFrom(gvk metav1.GroupVersionKind, name, namespace string) EventPolicyOption {
return func(ep *v1alpha1.EventPolicy) {
ep.Spec.From = append(ep.Spec.From, froms...)
ep.Spec.From = append(ep.Spec.From, v1alpha1.EventPolicySpecFrom{
Ref: &v1alpha1.EventPolicyFromReference{
APIVersion: apiVersion(gvk),
Kind: gvk.Kind,
Name: name,
Namespace: namespace,
},
})
}
}

Expand All @@ -92,10 +97,8 @@ func WithEventPolicyLabels(labels map[string]string) EventPolicyOption {
}
}

func WithEventPolicyOwnerReference(ownerRef metav1.OwnerReference) EventPolicyOption {
func WithEventPolicyOwnerReferences(ownerRefs ...metav1.OwnerReference) EventPolicyOption {
return func(ep *v1alpha1.EventPolicy) {
ep.ObjectMeta.OwnerReferences = []metav1.OwnerReference{
ownerRef,
}
ep.ObjectMeta.OwnerReferences = append(ep.ObjectMeta.OwnerReferences, ownerRefs...)
}
}
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
Loading

0 comments on commit eaa7220

Please sign in to comment.