[master] Auto-update dependencies (#286)

Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
This commit is contained in:
Matt Moore 2020-07-14 10:59:30 -07:00 committed by GitHub
parent 90ce4328c6
commit 11f3ba7a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 43 deletions

4
go.mod
View File

@ -16,8 +16,8 @@ require (
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/code-generator v0.18.0
k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29
knative.dev/pkg v0.0.0-20200713031612-b09a159e12c9
knative.dev/test-infra v0.0.0-20200713045417-850e4e37918d
knative.dev/pkg v0.0.0-20200714070918-ac02cac99b88
knative.dev/test-infra v0.0.0-20200713220518-5a4c4cad5372
)
replace (

7
go.sum
View File

@ -1642,11 +1642,12 @@ k8s.io/utils v0.0.0-20200124190032-861946025e34/go.mod h1:sZAwmy6armz5eXlNoLmJcl
knative.dev/caching v0.0.0-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20200713031612-b09a159e12c9 h1:YSapebbZZbpH31YMSF0Egt7+IDi/og4S574eWqEXReo=
knative.dev/pkg v0.0.0-20200713031612-b09a159e12c9/go.mod h1:aWPsPIHISvZetAm/2pnz+v6Ro5EYaX704Z/Zd9rTZ4M=
knative.dev/test-infra v0.0.0-20200710160019-5b9732bc24f7/go.mod h1:vtT6dLs/iNj8pKcfag8CSVqHKNMgyCFtU/g1pV7Bovs=
knative.dev/pkg v0.0.0-20200714070918-ac02cac99b88 h1:qcOoc14NrP2T0mB7I/e6Fl6JdvWEOwE1kJkrqsqqPJU=
knative.dev/pkg v0.0.0-20200714070918-ac02cac99b88/go.mod h1:2xVLIH5SNUripobZvOEz3w/Ta9xqMkw7QmFIa2cbDFY=
knative.dev/test-infra v0.0.0-20200713045417-850e4e37918d h1:Q3LrAYSi+Ii2yZVUiA5Y3Jr4TCU6g/XN9ClVosejpJk=
knative.dev/test-infra v0.0.0-20200713045417-850e4e37918d/go.mod h1:vtT6dLs/iNj8pKcfag8CSVqHKNMgyCFtU/g1pV7Bovs=
knative.dev/test-infra v0.0.0-20200713220518-5a4c4cad5372 h1:NZzdNmKYP3L7fut/SNOxLgTgXVvQrygXiYpAeIMGMwM=
knative.dev/test-infra v0.0.0-20200713220518-5a4c4cad5372/go.mod h1:vtT6dLs/iNj8pKcfag8CSVqHKNMgyCFtU/g1pV7Bovs=
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=

View File

@ -52,11 +52,6 @@ func NewConfigFromMap(data map[string]string) (*Config, error) {
cm.AsDuration("retryPeriod", &config.RetryPeriod),
cm.AsUint32("buckets", &config.Buckets),
// enabledComponents are not validated here, because they are dependent on
// the component. Components should provide additional validation for this
// field.
cm.AsStringSet("enabledComponents", &config.EnabledComponents),
); err != nil {
return nil, err
}
@ -84,45 +79,42 @@ func NewConfigFromConfigMap(configMap *corev1.ConfigMap) (*Config, error) {
// contained within a single namespace. Typically these will correspond to a
// single source repository, viz: serving or eventing.
type Config struct {
ResourceLock string
Buckets uint32
LeaseDuration time.Duration
RenewDeadline time.Duration
RetryPeriod time.Duration
ResourceLock string
Buckets uint32
LeaseDuration time.Duration
RenewDeadline time.Duration
RetryPeriod time.Duration
// This field is deprecated and will be removed once downstream
// repositories have removed their validation of it.
// TODO(https://github.com/knative/pkg/issues/1478): Remove this field.
EnabledComponents sets.String
}
func (c *Config) GetComponentConfig(name string) ComponentConfig {
if c.EnabledComponents.Has(name) {
return ComponentConfig{
Component: name,
LeaderElect: true,
Buckets: c.Buckets,
ResourceLock: c.ResourceLock,
LeaseDuration: c.LeaseDuration,
RenewDeadline: c.RenewDeadline,
RetryPeriod: c.RetryPeriod,
}
return ComponentConfig{
Component: name,
Buckets: c.Buckets,
ResourceLock: c.ResourceLock,
LeaseDuration: c.LeaseDuration,
RenewDeadline: c.RenewDeadline,
RetryPeriod: c.RetryPeriod,
}
return defaultComponentConfig(name)
}
func defaultConfig() *Config {
return &Config{
ResourceLock: "leases",
Buckets: 1,
LeaseDuration: 15 * time.Second,
RenewDeadline: 10 * time.Second,
RetryPeriod: 2 * time.Second,
EnabledComponents: sets.NewString(),
ResourceLock: "leases",
Buckets: 1,
LeaseDuration: 15 * time.Second,
RenewDeadline: 10 * time.Second,
RetryPeriod: 2 * time.Second,
}
}
// ComponentConfig represents the leader election config for a single component.
type ComponentConfig struct {
Component string
LeaderElect bool
Buckets uint32
ResourceLock string
LeaseDuration time.Duration
@ -165,13 +157,6 @@ func newStatefulSetConfig() (*statefulSetConfig, error) {
return ssc, nil
}
func defaultComponentConfig(name string) ComponentConfig {
return ComponentConfig{
Component: name,
LeaderElect: false,
}
}
// ConfigMapName returns the name of the configmap to read for leader election
// settings.
func ConfigMapName() string {

View File

@ -498,6 +498,27 @@ function start_latest_knative_eventing() {
start_knative_eventing "${KNATIVE_EVENTING_RELEASE}"
}
# Install Knative Eventing extension in the current cluster.
# Parameters: $1 - Knative Eventing extension manifest.
# $2 - Namespace to look for ready pods into
function start_knative_eventing_extension() {
header "Starting Knative Eventing Extension"
echo "Installing Extension CRDs from $1"
kubectl apply -f "$1"
wait_until_pods_running "$2" || return 1
}
# Install the stable release of eventing extension sugar controller in the current cluster.
# Parameters: $1 - Knative Eventing release version, e.g. 0.16.0
function start_release_eventing_sugar_controller() {
start_knative_eventing_extension "https://storage.googleapis.com/knative-releases/eventing/previous/v$1/eventing-sugar-controller.yaml" "knative-eventing"
}
# Install the sugar cotroller eventing extension
function start_latest_eventing_sugar_controller() {
start_knative_eventing_extension "${KNATIVE_EVENTING_SUGAR_CONTROLLER_RELEASE}" "knative-eventing"
}
# Run a go tool, installing it first if necessary.
# Parameters: $1 - tool package/dir for go get/install.
# $2 - tool to run.
@ -754,3 +775,4 @@ readonly KNATIVE_SERVING_RELEASE_CORE="$(get_latest_knative_yaml_source "serving
readonly KNATIVE_NET_ISTIO_RELEASE="$(get_latest_knative_yaml_source "net-istio" "net-istio")"
readonly KNATIVE_EVENTING_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing")"
readonly KNATIVE_MONITORING_RELEASE="$(get_latest_knative_yaml_source "serving" "monitoring")"
readonly KNATIVE_EVENTING_SUGAR_CONTROLLER_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing-sugar-controller")"

4
vendor/modules.txt vendored
View File

@ -728,7 +728,7 @@ k8s.io/kube-openapi/pkg/util/sets
k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/trace
# knative.dev/pkg v0.0.0-20200713031612-b09a159e12c9
# knative.dev/pkg v0.0.0-20200714070918-ac02cac99b88
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck/ducktypes
@ -751,7 +751,7 @@ knative.dev/pkg/metrics/metricskey
knative.dev/pkg/network
knative.dev/pkg/reconciler
knative.dev/pkg/system
# knative.dev/test-infra v0.0.0-20200713045417-850e4e37918d
# knative.dev/test-infra v0.0.0-20200713220518-5a4c4cad5372
## explicit
knative.dev/test-infra/scripts
knative.dev/test-infra/tools/dep-collector