Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Commit

Permalink
[master] Auto-update dependencies (#1353)
Browse files Browse the repository at this point in the history
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign grantr ian-mi nachocano
/cc grantr ian-mi nachocano
  • Loading branch information
mattmoor authored Jun 26, 2020
1 parent f286ff4 commit f2baa17
Show file tree
Hide file tree
Showing 82 changed files with 6,835 additions and 38 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ require (
k8s.io/api v0.18.1
k8s.io/apimachinery v0.18.1
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
knative.dev/eventing v0.15.1-0.20200625112228-88aa030c747f
knative.dev/pkg v0.0.0-20200624210428-eb05e8dd5b5b
knative.dev/serving v0.15.1-0.20200625123828-2949259bd49e
knative.dev/test-infra v0.0.0-20200624184627-7eae2aae38e4 // indirect
knative.dev/eventing v0.15.1-0.20200625220028-1e3a03b620b6
knative.dev/pkg v0.0.0-20200626022628-f1ee372577e1
knative.dev/serving v0.15.1-0.20200626061427-ce9c1723e56a
knative.dev/test-infra v0.0.0-20200625195728-62651036b559 // indirect
sigs.k8s.io/yaml v1.2.0
)

Expand Down
21 changes: 10 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1548,12 +1548,12 @@ k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl
knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/caching v0.0.0-20200606210318-787aec80f71c/go.mod h1:rWD+0zSqcE7L//jJyt866xtXsOi9hCdB0FoD4w2Rygg=
knative.dev/eventing v0.15.1-0.20200625112228-88aa030c747f h1:8/VL8zHWQxa2VRsA1MC2OT2Hig1Yji8W+2bpV/F1Z78=
knative.dev/eventing v0.15.1-0.20200625112228-88aa030c747f/go.mod h1:hEWmYlRB75MtTa7rPhenkl4HACHd1VkKsgDB52uu1Z0=
knative.dev/eventing v0.15.1-0.20200625220028-1e3a03b620b6 h1:pdpg/78idzQcmb4SLDgCdVhn6E/rnax8sL0kFYPWcIE=
knative.dev/eventing v0.15.1-0.20200625220028-1e3a03b620b6/go.mod h1:ukYDH75Mpnr7kcLVfqh9z4zVeXKbUOzhVpciOndB95w=
knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/networking v0.0.0-20200623230227-53e376c3ec4c h1:X3745bB+9kan4DEjW55cZGZmo1OF5b92hINooN3BjQI=
knative.dev/networking v0.0.0-20200623230227-53e376c3ec4c/go.mod h1:MkVj0cihXadJkbhF8FT7fKr/pjU5oErvD687/Z07UeE=
knative.dev/networking v0.0.0-20200624161427-341a83759c17 h1:3t4xgm1d46lqNYbR4jeVj7EbEnwuHQOAag5QbnFY2Qo=
knative.dev/networking v0.0.0-20200624161427-341a83759c17/go.mod h1:490TiiMziOMk4zEAFQ+qo0dN1vKrW+dMARgJrJ+JOpQ=
knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20191111150521-6d806b998379/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
Expand All @@ -1567,16 +1567,16 @@ knative.dev/pkg v0.0.0-20200520073958-94316e20e860/go.mod h1:QgNZTxnwpB/oSpNcfnL
knative.dev/pkg v0.0.0-20200603222317-b79e4a24ca50 h1:sbJMCCtOENPgfE5dUSwBUxZtJzhfqORhExyWFX7L0Fk=
knative.dev/pkg v0.0.0-20200603222317-b79e4a24ca50/go.mod h1:8IfPj/lpuKHHg82xZCl2wuFZ3BM96To72sN1W8T9wjQ=
knative.dev/pkg v0.0.0-20200611204322-2ddcfef739a2/go.mod h1:rA+FklsrVahwF4a+D63NyHJlzDoAFH81K4J5CYuE3bA=
knative.dev/pkg v0.0.0-20200619020725-7df8fc5d7743/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200623024526-fb0320d9287e h1:fmsw4i/We4S9yyaZadL2z8DKDIz7XzcY/v4yPGUmUA4=
knative.dev/pkg v0.0.0-20200623024526-fb0320d9287e/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200623204627-e0a0d63a9e86/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200624155427-5be32bbb99ab/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200624210428-eb05e8dd5b5b h1:NFi5BVmuZ81bWigwn3s/NNaf+GeeOGtNlADAbXPYg+E=
knative.dev/pkg v0.0.0-20200624210428-eb05e8dd5b5b/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200626022628-f1ee372577e1 h1:4Fi/WnI7uwbop8gjebSfJbPdJd20XWt66ugzEYunlUA=
knative.dev/pkg v0.0.0-20200626022628-f1ee372577e1/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/sample-controller v0.0.0-20200510050845-bf7c19498b7e/go.mod h1:D2ZDLrR9Dq9LiiVN7TatzI7WMcEPgk1MHbbhgBKE6W8=
knative.dev/serving v0.15.1-0.20200625123828-2949259bd49e h1:x8ICcdUlkB7NQiGpT9/lpjQR3YVy9iPck0k1D1wbl2o=
knative.dev/serving v0.15.1-0.20200625123828-2949259bd49e/go.mod h1:FtRBxbs8obwxnQKKM6GXHxAdVpmum7acaeUu6KSSfDw=
knative.dev/serving v0.15.1-0.20200626061427-ce9c1723e56a h1:d/4jWE5/Upn2EkXwRNFtZXEMgx0nqBVNFrEZG6AUJ80=
knative.dev/serving v0.15.1-0.20200626061427-ce9c1723e56a/go.mod h1:sA9NfYRrX2qLfdVUUnjqkqr5ojU2t8gnPK0ixcNXW9M=
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
knative.dev/test-infra v0.0.0-20200508015845-8d7d46a46176/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
Expand All @@ -1588,12 +1588,11 @@ knative.dev/test-infra v0.0.0-20200522180958-6a0a9b9d893a/go.mod h1:n9eQkzmSNj8B
knative.dev/test-infra v0.0.0-20200606045118-14ebc4a42974/go.mod h1://I6IZIF0QDgs5wotU243ZZ5cTpm6/GthayjUenBBc0=
knative.dev/test-infra v0.0.0-20200617235125-6382dba95484 h1:5D1Fm6aA1T1QQXLb1HkJ5t8gB9pTkhLYak1CCqIP+pE=
knative.dev/test-infra v0.0.0-20200617235125-6382dba95484/go.mod h1:+BfrTJpc++rH30gX/C0QY6NT2eYVzycll52uw6CrQnc=
knative.dev/test-infra v0.0.0-20200623005026-1f7e5f05c52b h1:qQTd9xCiV3/PVt2LsmELMVL2gT4eAScMaFrPqiQnt1I=
knative.dev/test-infra v0.0.0-20200623005026-1f7e5f05c52b/go.mod h1:H8QEB2Y35+vAuVtDbn7QBD+NQr9zQbbxNiovCLNH7F4=
knative.dev/test-infra v0.0.0-20200623231727-6d5d6aeb457c/go.mod h1:qKM6vO6hD6aa0ZYGDdyr5YiXPQMhbix1K8UWPUvVlIE=
knative.dev/test-infra v0.0.0-20200624170028-94d227b0f50c/go.mod h1:6w3uf0+KfozLkrysBm3QqONrEMC6Uo/oEgS2BCdHJXo=
knative.dev/test-infra v0.0.0-20200624184627-7eae2aae38e4 h1:eB6B7ER/QPKNC2bBtkWmwzcGBp9f0/DQhRdNvxxuEt8=
knative.dev/test-infra v0.0.0-20200624184627-7eae2aae38e4/go.mod h1:6w3uf0+KfozLkrysBm3QqONrEMC6Uo/oEgS2BCdHJXo=
knative.dev/test-infra v0.0.0-20200625195728-62651036b559 h1:UnUP8ygaXWLi3LWSpoOvhLcHbOE/yf2De57/aBZIzTQ=
knative.dev/test-infra v0.0.0-20200625195728-62651036b559/go.mod h1:HZw00KOJoOIzWOSF6tn+0jfJZHpXRCIZkHooc+hh7yg=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand Down
20 changes: 20 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/flows/v1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1 is the v1 version of the API.
// +k8s:deepcopy-gen=package
// +groupName=flows.knative.dev
package v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
Copyright 2020 The Knative Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1

import (
"context"
"fmt"

"knative.dev/pkg/apis"
)

// ConvertTo implements apis.Convertible
func (source *Parallel) ConvertTo(ctx context.Context, sink apis.Convertible) error {
return fmt.Errorf("v1 is the highest known version, got: %T", sink)
}

// ConvertFrom implements apis.Convertible
func (sink *Parallel) ConvertFrom(ctx context.Context, source apis.Convertible) error {
return fmt.Errorf("v1 is the highest known version, got: %T", source)
}
56 changes: 56 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/flows/v1/parallel_defaults.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright 2020 The Knative Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package v1

import (
"context"

"knative.dev/eventing/pkg/apis/messaging/config"
messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
"knative.dev/pkg/apis"
)

func (p *Parallel) SetDefaults(ctx context.Context) {
withNS := apis.WithinParent(ctx, p.ObjectMeta)
if p != nil && p.Spec.ChannelTemplate == nil {
cfg := config.FromContextOrDefaults(ctx)
c, err := cfg.ChannelDefaults.GetChannelConfig(apis.ParentMeta(ctx).Namespace)

if err == nil {
p.Spec.ChannelTemplate = &messagingv1.ChannelTemplateSpec{
TypeMeta: c.TypeMeta,
Spec: c.Spec,
}
}
}
p.Spec.SetDefaults(withNS)
}

func (ps *ParallelSpec) SetDefaults(ctx context.Context) {
for _, branch := range ps.Branches {
if branch.Filter != nil {
branch.Filter.SetDefaults(ctx)
}
branch.Subscriber.SetDefaults(ctx)
if branch.Reply != nil {
branch.Reply.SetDefaults(ctx)
}
}
if ps.Reply != nil {
ps.Reply.SetDefaults(ctx)
}
}
205 changes: 205 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/flows/v1/parallel_lifecycle.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
/*
* Copyright 2020 The Knative Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package v1

import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
duckv1 "knative.dev/eventing/pkg/apis/duck/v1"
messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
"knative.dev/pkg/apis"
pkgduckv1 "knative.dev/pkg/apis/duck/v1"
)

var pCondSet = apis.NewLivingConditionSet(ParallelConditionReady, ParallelConditionChannelsReady, ParallelConditionSubscriptionsReady, ParallelConditionAddressable)

const (
// ParallelConditionReady has status True when all subconditions below have been set to True.
ParallelConditionReady = apis.ConditionReady

// ParallelConditionChannelsReady has status True when all the channels created as part of
// this parallel are ready.
ParallelConditionChannelsReady apis.ConditionType = "ChannelsReady"

// ParallelConditionSubscriptionsReady has status True when all the subscriptions created as part of
// this parallel are ready.
ParallelConditionSubscriptionsReady apis.ConditionType = "SubscriptionsReady"

// ParallelConditionAddressable has status true when this Parallel meets
// the Addressable contract and has a non-empty hostname.
ParallelConditionAddressable apis.ConditionType = "Addressable"
)

// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*Parallel) GetConditionSet() apis.ConditionSet {
return pCondSet
}

// GetGroupVersionKind returns GroupVersionKind for Parallel
func (*Parallel) GetGroupVersionKind() schema.GroupVersionKind {
return SchemeGroupVersion.WithKind("Parallel")
}

// GetUntypedSpec returns the spec of the Parallel.
func (p *Parallel) GetUntypedSpec() interface{} {
return p.Spec
}

// GetCondition returns the condition currently associated with the given type, or nil.
func (ps *ParallelStatus) GetCondition(t apis.ConditionType) *apis.Condition {
return pCondSet.Manage(ps).GetCondition(t)
}

// IsReady returns true if the resource is ready overall.
func (ps *ParallelStatus) IsReady() bool {
return pCondSet.Manage(ps).IsHappy()
}

// InitializeConditions sets relevant unset conditions to Unknown state.
func (ps *ParallelStatus) InitializeConditions() {
pCondSet.Manage(ps).InitializeConditions()
}

// PropagateSubscriptionStatuses sets the ParallelConditionSubscriptionsReady based on
// the status of the incoming subscriptions.
func (ps *ParallelStatus) PropagateSubscriptionStatuses(filterSubscriptions []*messagingv1.Subscription, subscriptions []*messagingv1.Subscription) {
if ps.BranchStatuses == nil {
ps.BranchStatuses = make([]ParallelBranchStatus, len(subscriptions))
}
allReady := true
// If there are no subscriptions, treat that as a False branch. Could go either way, but this seems right.
if len(subscriptions) == 0 {
allReady = false
}

for i, s := range subscriptions {
ps.BranchStatuses[i].SubscriptionStatus = ParallelSubscriptionStatus{
Subscription: corev1.ObjectReference{
APIVersion: s.APIVersion,
Kind: s.Kind,
Name: s.Name,
Namespace: s.Namespace,
},
}

readyCondition := s.Status.GetTopLevelCondition()
if readyCondition != nil {
ps.BranchStatuses[i].SubscriptionStatus.ReadyCondition = *readyCondition
if readyCondition.Status != corev1.ConditionTrue {
allReady = false
}
} else {
allReady = false
}

fs := filterSubscriptions[i]
ps.BranchStatuses[i].FilterSubscriptionStatus = ParallelSubscriptionStatus{
Subscription: corev1.ObjectReference{
APIVersion: fs.APIVersion,
Kind: fs.Kind,
Name: fs.Name,
Namespace: fs.Namespace,
},
}
readyCondition = fs.Status.GetCondition(messagingv1.SubscriptionConditionReady)
if readyCondition != nil {
ps.BranchStatuses[i].FilterSubscriptionStatus.ReadyCondition = *readyCondition
if readyCondition.Status != corev1.ConditionTrue {
allReady = false
}
} else {
allReady = false
}

}
if allReady {
pCondSet.Manage(ps).MarkTrue(ParallelConditionSubscriptionsReady)
} else {
ps.MarkSubscriptionsNotReady("SubscriptionsNotReady", "Subscriptions are not ready yet, or there are none")
}
}

// PropagateChannelStatuses sets the ChannelStatuses and ParallelConditionChannelsReady based on the
// status of the incoming channels.
func (ps *ParallelStatus) PropagateChannelStatuses(ingressChannel *duckv1.Channelable, channels []*duckv1.Channelable) {
if ps.BranchStatuses == nil {
ps.BranchStatuses = make([]ParallelBranchStatus, len(channels))
}
allReady := true

ps.IngressChannelStatus.Channel = corev1.ObjectReference{
APIVersion: ingressChannel.APIVersion,
Kind: ingressChannel.Kind,
Name: ingressChannel.Name,
Namespace: ingressChannel.Namespace,
}

address := ingressChannel.Status.AddressStatus.Address
if address != nil {
ps.IngressChannelStatus.ReadyCondition = apis.Condition{Type: apis.ConditionReady, Status: corev1.ConditionTrue}
} else {
ps.IngressChannelStatus.ReadyCondition = apis.Condition{Type: apis.ConditionReady, Status: corev1.ConditionFalse, Reason: "NotAddressable", Message: "Channel is not addressable"}
allReady = false
}
ps.setAddress(address)

for i, c := range channels {
ps.BranchStatuses[i].FilterChannelStatus = ParallelChannelStatus{
Channel: corev1.ObjectReference{
APIVersion: c.APIVersion,
Kind: c.Kind,
Name: c.Name,
Namespace: c.Namespace,
},
}
// TODO: Once the addressable has a real status to dig through, use that here instead of
// addressable, because it might be addressable but not ready.
address := c.Status.AddressStatus.Address
if address != nil {
ps.BranchStatuses[i].FilterChannelStatus.ReadyCondition = apis.Condition{Type: apis.ConditionReady, Status: corev1.ConditionTrue}
} else {
ps.BranchStatuses[i].FilterChannelStatus.ReadyCondition = apis.Condition{Type: apis.ConditionReady, Status: corev1.ConditionFalse, Reason: "NotAddressable", Message: "Channel is not addressable"}
allReady = false
}
}
if allReady {
pCondSet.Manage(ps).MarkTrue(ParallelConditionChannelsReady)
} else {
ps.MarkChannelsNotReady("ChannelsNotReady", "Channels are not ready yet, or there are none")
}
}

func (ps *ParallelStatus) MarkChannelsNotReady(reason, messageFormat string, messageA ...interface{}) {
pCondSet.Manage(ps).MarkFalse(ParallelConditionChannelsReady, reason, messageFormat, messageA...)
}

func (ps *ParallelStatus) MarkSubscriptionsNotReady(reason, messageFormat string, messageA ...interface{}) {
pCondSet.Manage(ps).MarkFalse(ParallelConditionSubscriptionsReady, reason, messageFormat, messageA...)
}

func (ps *ParallelStatus) MarkAddressableNotReady(reason, messageFormat string, messageA ...interface{}) {
pCondSet.Manage(ps).MarkFalse(ParallelConditionAddressable, reason, messageFormat, messageA...)
}

func (ps *ParallelStatus) setAddress(address *pkgduckv1.Addressable) {
ps.Address = address
if address == nil {
pCondSet.Manage(ps).MarkFalse(ParallelConditionAddressable, "emptyAddress", "addressable is nil")
} else {
pCondSet.Manage(ps).MarkTrue(ParallelConditionAddressable)
}
}
Loading

0 comments on commit f2baa17

Please sign in to comment.