Skip to content

Commit

Permalink
Prepare dependencies for 0.21.0 (#28)
Browse files Browse the repository at this point in the history
* Prepare dependencies for 0.21.0

* chore: Temporary pointing go.mod to pending PR dependency

* add missing file, bump up test deps

* Remove go.mod replace for temporary redirect

* cleanup
  • Loading branch information
rhuss authored Feb 24, 2021
1 parent a770ca6 commit 0bea7be
Show file tree
Hide file tree
Showing 17 changed files with 92 additions and 133 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ module knative.dev/kn-plugin-source-kafka
go 1.15

require (
github.com/maximilien/kn-source-pkg v0.6.2-0.20210219230238-c655d7ca141e
github.com/maximilien/kn-source-pkg v0.6.3
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
gotest.tools/v3 v3.0.3
k8s.io/apimachinery v0.19.7
k8s.io/client-go v0.19.7
knative.dev/client v0.20.1-0.20210219184703-18ff59604195
knative.dev/eventing-kafka v0.19.1-0.20210219230103-ae8020f1c58b
knative.dev/client v0.21.0
knative.dev/eventing-kafka v0.21.0
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
knative.dev/pkg v0.0.0-20210219164703-8a9bf766d36d
knative.dev/pkg v0.0.0-20210216013737-584933f8280b
)

replace github.com/go-openapi/spec => github.com/go-openapi/spec v0.19.3
22 changes: 10 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182aff
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
github.com/maxbrunsfeld/counterfeiter/v6 v6.3.0/go.mod h1:fcEyUyXZXoV4Abw8DX0t7wyL8mCDxXyU4iAFZfT3IHw=
github.com/maximilien/kn-source-pkg v0.6.2-0.20210219230238-c655d7ca141e h1:I6C6PGN+ozRgK9+A57cYK8eyWYEBkjRw3KLqOoO0hUE=
github.com/maximilien/kn-source-pkg v0.6.2-0.20210219230238-c655d7ca141e/go.mod h1:IgDTyFJ2oxU0VRzpNe/oszbJGsGf0H81awjkdcShsQ0=
github.com/maximilien/kn-source-pkg v0.6.3 h1:5S9jgof8KSvde/hrM0VaOMZ6LmBPTIMO05fdDpbVbvI=
github.com/maximilien/kn-source-pkg v0.6.3/go.mod h1:3Nym+ahhV18lkHutauJdw1r3PmlDfu/DoTUuF8ySMt4=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/miekg/dns v1.1.17/go.mod h1:WgzbA6oji13JREwiNsRDNfl7jYdPnmz+VEuLrA+/48M=
github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
Expand Down Expand Up @@ -1429,12 +1429,12 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20210215030244-1212288570f0/go.mod h1:rAPalJe9Lx3jHffJpackk5WjZYl3j2QvXUgw0GPllxQ=
knative.dev/client v0.20.1-0.20210219184703-18ff59604195 h1:jwR5Z5wljpa0LbQt9t/P68X+7yyTlXUm85lXFDa8AMc=
knative.dev/client v0.20.1-0.20210219184703-18ff59604195/go.mod h1:is1fmAT7Osn/Yfw65B3AqI8gCBpxXadDudgAOfMzvKE=
knative.dev/eventing v0.20.1-0.20210219125302-4e5bdf97930a h1:3cqlUxlZ6M+EZA80OTroRXz7XNNImc4Qix01jqOA1Bo=
knative.dev/eventing v0.20.1-0.20210219125302-4e5bdf97930a/go.mod h1:JjbVEOTJJHqo9CTxbTfrMn018hG8fOr3UfBoCJ7KWaA=
knative.dev/eventing-kafka v0.19.1-0.20210219230103-ae8020f1c58b h1:6pdsLZrbHg3wd8Ou2eXtvjPkHdf21rOs3Iyhw5Zvk74=
knative.dev/eventing-kafka v0.19.1-0.20210219230103-ae8020f1c58b/go.mod h1:mRGIPGpaOvtpFgTlc+XR5O6aH8Yo8jkfjQ5o8WsGegw=
knative.dev/client v0.21.0 h1:VWgxFKClPe26PsSigiPoTx6zYBcMmLWv3I7cQsIfGw8=
knative.dev/client v0.21.0/go.mod h1:1En9uxMhk62EReWR1d66/d3tnpkot/D3vBRfmuidFNc=
knative.dev/eventing v0.21.0 h1:oZoL0lXXslUClNvoi5mLO2YI6zn2C8qg80mz8Y6Vmkg=
knative.dev/eventing v0.21.0/go.mod h1:JjbVEOTJJHqo9CTxbTfrMn018hG8fOr3UfBoCJ7KWaA=
knative.dev/eventing-kafka v0.21.0 h1:DJ9HGLjQBA0zJC4FTjAGH+FWEroNfj+Jti/EQ7pahxQ=
knative.dev/eventing-kafka v0.21.0/go.mod h1:4dmXMBHTToZJSYKnFv3guSPMYdMHPs5xRcXS7BiJvyQ=
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf h1:u4cY4jr2LYvhoz/1HBWEPsMiLkm0HMdDTfmmw1RE8zE=
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/networking v0.0.0-20210215030235-088986a1c2a3/go.mod h1:pmAMQjMqQUxpK0UyjE71KljMs6rwDMVIAlvrZsU3I6Y=
Expand All @@ -1444,11 +1444,9 @@ knative.dev/pkg v0.0.0-20210212203835-448ae657fb5f/go.mod h1:TJSdebQOWX5N2bszohO
knative.dev/pkg v0.0.0-20210215165523-84c98f3c3e7a/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/pkg v0.0.0-20210216013737-584933f8280b h1:2v+GBBenjPXhtk3KX/YqxCQVBU6o/AaRkkqE58lgFRQ=
knative.dev/pkg v0.0.0-20210216013737-584933f8280b/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/pkg v0.0.0-20210219164703-8a9bf766d36d h1:qiLJrG5YYX0foHLzedhXjx5IPPSzZN9PffN8iEeWBKg=
knative.dev/pkg v0.0.0-20210219164703-8a9bf766d36d/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/reconciler-test v0.0.0-20210216030508-77f50054d024/go.mod h1:RP/K5xJylB72Go6eAsXYEsQHp4zCCNMNjmsqhvq7wko=
knative.dev/serving v0.20.1-0.20210219075403-2516dae3d46e h1:nPwnrjTsPdf4eVlhHDPckURcKIZwe4lXoiIeMHcQ6TU=
knative.dev/serving v0.20.1-0.20210219075403-2516dae3d46e/go.mod h1:PU9k1Y6YMG27XQldEu5agNkcebvSafUXKXPircQYCsE=
knative.dev/serving v0.21.0 h1:bdg0JqNovzlMQB2IxXU/iJKF2zPZH6/yXiwiUtr7vtY=
knative.dev/serving v0.21.0/go.mod h1:PU9k1Y6YMG27XQldEu5agNkcebvSafUXKXPircQYCsE=
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
6 changes: 3 additions & 3 deletions test/e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export PATH=$PATH:${REPO_ROOT_DIR}
# Will create and delete this namespace (used for all tests, modify if you want a different one used)
export KN_E2E_NAMESPACE=kne2etests

export KNATIVE_EVENTING_VERSION="0.20.0"
export KNATIVE_SERVING_VERSION="0.20.0"
export KNATIVE_EVENTING_VERSION="0.21.0"
export KNATIVE_SERVING_VERSION="0.21.0"

# Strimzi installation config template used for starting up Kafka clusters.
readonly STRIMZI_INSTALLATION_CONFIG_TEMPLATE="${REPO_ROOT_DIR}/test/config/100-strimzi-cluster-operator-0.20.0.yaml"
Expand All @@ -42,7 +42,7 @@ readonly KAFKA_CRD_CONFIG_TEMPLATE="400-kafka-config.yaml"
# Real Kafka channel CRD config , generated from the template directory and modified template file.
readonly KAFKA_CRD_CONFIG_DIR="$(mktemp -d)"
# Kafka channel CRD config template directory.
readonly KAFKA_SOURCE_CRD_YAML="https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.20.0/source.yaml"
readonly KAFKA_SOURCE_CRD_YAML="https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.21.0/source.yaml"

run() {
# Create cluster
Expand Down
17 changes: 13 additions & 4 deletions vendor/knative.dev/client/pkg/kn/commands/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import (
type KnParams struct {
Output io.Writer
KubeCfgPath string
KubeContext string
KubeCluster string
ClientConfig clientcmd.ClientConfig
NewServingClient func(namespace string) (clientservingv1.KnServingClient, error)
NewGitopsServingClient func(namespace string, dir string) (clientservingv1.KnServingClient, error)
Expand Down Expand Up @@ -167,14 +169,21 @@ func (params *KnParams) RestConfig() (*rest.Config, error) {
// GetClientConfig gets ClientConfig from KubeCfgPath
func (params *KnParams) GetClientConfig() (clientcmd.ClientConfig, error) {
loadingRules := clientcmd.NewDefaultClientConfigLoadingRules()
configOverrides := &clientcmd.ConfigOverrides{}
if params.KubeContext != "" {
configOverrides.CurrentContext = params.KubeContext
}
if params.KubeCluster != "" {
configOverrides.Context.Cluster = params.KubeCluster
}
if len(params.KubeCfgPath) == 0 {
return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}), nil
return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, configOverrides), nil
}

_, err := os.Stat(params.KubeCfgPath)
if err == nil {
loadingRules.ExplicitPath = params.KubeCfgPath
return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, &clientcmd.ConfigOverrides{}), nil
return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loadingRules, configOverrides), nil
}

if !os.IsNotExist(err) {
Expand All @@ -183,8 +192,8 @@ func (params *KnParams) GetClientConfig() (clientcmd.ClientConfig, error) {

paths := filepath.SplitList(params.KubeCfgPath)
if len(paths) > 1 {
return nil, fmt.Errorf("Can not find config file. '%s' looks like a path. "+
return nil, fmt.Errorf("can not find config file. '%s' looks like a path. "+
"Please use the env var KUBECONFIG if you want to check for multiple configuration files", params.KubeCfgPath)
}
return nil, fmt.Errorf("Config file '%s' can not be found", params.KubeCfgPath)
return nil, fmt.Errorf("config file '%s' can not be found", params.KubeCfgPath)
}
31 changes: 16 additions & 15 deletions vendor/knative.dev/client/pkg/serving/v1/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ type KnServingClient interface {

// UpdateService updates the given service. For a more robust variant with automatic
// conflict resolution see UpdateServiceWithRetry
UpdateService(service *servingv1.Service) error
UpdateService(service *servingv1.Service) (bool, error)

// UpdateServiceWithRetry updates service and retries if there is a version conflict.
// The updateFunc receives a deep copy of the existing service and can add update it in
// place.
UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, nrRetries int) error
// place. Return if the service creates a new generation or not
UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, nrRetries int) (bool, error)

// Apply a service's definition to the cluster. The full service declaration needs to be provided,
// which is different to UpdateService which can also do a partial update. If the given
Expand Down Expand Up @@ -241,36 +241,37 @@ func (cl *knServingClient) CreateService(service *servingv1.Service) error {
}

// Update the given service
func (cl *knServingClient) UpdateService(service *servingv1.Service) error {
_, err := cl.client.Services(cl.namespace).Update(context.TODO(), service, v1.UpdateOptions{})
func (cl *knServingClient) UpdateService(service *servingv1.Service) (bool, error) {
updated, err := cl.client.Services(cl.namespace).Update(context.TODO(), service, v1.UpdateOptions{})
if err != nil {
return err
return false, err
}
return updateServingGvk(service)
changed := service.ObjectMeta.Generation != updated.ObjectMeta.Generation
return changed, updateServingGvk(service)
}

// Update the given service with a retry in case of a conflict
func (cl *knServingClient) UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, nrRetries int) error {
func (cl *knServingClient) UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, nrRetries int) (bool, error) {
return updateServiceWithRetry(cl, name, updateFunc, nrRetries)
}

// Extracted to be usable with the Mocking client
func updateServiceWithRetry(cl KnServingClient, name string, updateFunc ServiceUpdateFunc, nrRetries int) error {
func updateServiceWithRetry(cl KnServingClient, name string, updateFunc ServiceUpdateFunc, nrRetries int) (bool, error) {
var retries = 0
for {
service, err := cl.GetService(name)
if err != nil {
return err
return false, err
}
if service.GetDeletionTimestamp() != nil {
return fmt.Errorf("can't update service %s because it has been marked for deletion", name)
return false, fmt.Errorf("can't update service %s because it has been marked for deletion", name)
}
updatedService, err := updateFunc(service.DeepCopy())
if err != nil {
return err
return false, err
}

err = cl.UpdateService(updatedService)
changed, err := cl.UpdateService(updatedService)
if err != nil {
// Retry to update when a resource version conflict exists
if apierrors.IsConflict(err) && retries < nrRetries {
Expand All @@ -279,9 +280,9 @@ func updateServiceWithRetry(cl KnServingClient, name string, updateFunc ServiceU
time.Sleep(time.Second)
continue
}
return fmt.Errorf("giving up after %d retries: %w", nrRetries, err)
return false, fmt.Errorf("giving up after %d retries: %w", nrRetries, err)
}
return nil
return changed, nil
}
}

Expand Down
10 changes: 5 additions & 5 deletions vendor/knative.dev/client/pkg/serving/v1/client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ func (c *MockKnServingClient) CreateService(service *servingv1.Service) error {
}

// Update the given service
func (sr *ServingRecorder) UpdateService(service interface{}, err error) {
sr.r.Add("UpdateService", []interface{}{service}, []interface{}{err})
func (sr *ServingRecorder) UpdateService(service interface{}, hasChanged bool, err error) {
sr.r.Add("UpdateService", []interface{}{service}, []interface{}{hasChanged, err})
}

func (c *MockKnServingClient) UpdateService(service *servingv1.Service) error {
func (c *MockKnServingClient) UpdateService(service *servingv1.Service) (bool, error) {
call := c.recorder.r.VerifyCall("UpdateService", service)
return mock.ErrorOrNil(call.Result[0])
return call.Result[0].(bool), mock.ErrorOrNil(call.Result[1])
}

// Delegate to shared retry method
func (c *MockKnServingClient) UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, maxRetry int) error {
func (c *MockKnServingClient) UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, maxRetry int) (bool, error) {
return updateServiceWithRetry(c, name, updateFunc, maxRetry)
}

Expand Down
8 changes: 4 additions & 4 deletions vendor/knative.dev/client/pkg/serving/v1/gitops.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ func writeFile(obj runtime.Object, fp, format string) error {

// UpdateService updates the service in
// the local directory
func (cl *knServingGitOpsClient) UpdateService(service *servingv1.Service) error {
func (cl *knServingGitOpsClient) UpdateService(service *servingv1.Service) (bool, error) {
// check if file exist
if _, err := cl.GetService(service.ObjectMeta.Name); err != nil {
return err
return false, err
}
// replace file
return cl.CreateService(service)
return true, cl.CreateService(service)
}

// UpdateServiceWithRetry updates the service in the local directory
func (cl *knServingGitOpsClient) UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, nrRetries int) error {
func (cl *knServingGitOpsClient) UpdateServiceWithRetry(name string, updateFunc ServiceUpdateFunc, nrRetries int) (bool, error) {
return updateServiceWithRetry(cl, name, updateFunc, nrRetries)
}

Expand Down
21 changes: 12 additions & 9 deletions vendor/knative.dev/client/pkg/wait/wait_for_ready.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ func (w *waitForReadyConfig) waitForReadyCondition(watcher watch.Interface, star
return true, false, nil
}

// Check whether resource is in sync already (meta.generation == status.observedGeneration)
inSync, err := generationCheck(event.Object)
if err != nil {
return false, false, err
}

// Skip events if generations has not yet been consolidated, regardless of type.
// Wait for the next event to come in until the generations align
if !inSync {
continue
}

// Skip event if its not a MODIFIED event, as only MODIFIED events update the condition
// we are looking for.
// This will filter out all synthetic ADDED events that created bt the API server for
Expand All @@ -180,15 +192,6 @@ func (w *waitForReadyConfig) waitForReadyCondition(watcher watch.Interface, star
continue
}

// Skip event if generations has not yet been consolidated
inSync, err := generationCheck(event.Object)
if err != nil {
return false, false, err
}
if !inSync {
continue
}

conditions, err := w.conditionsExtractor(event.Object)
if err != nil {
return false, false, err
Expand Down
7 changes: 0 additions & 7 deletions vendor/knative.dev/pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,6 @@ func FilterControllerGK(gk schema.GroupKind) func(obj interface{}) bool {
}
}

// FilterController makes it simple to create FilterFunc's for use with
// cache.FilteringResourceEventHandler that filter based on the
// controlling resource.
func FilterController(r kmeta.OwnerRefable) func(obj interface{}) bool {
return FilterControllerGK(r.GetGroupVersionKind().GroupKind())
}

// FilterWithName makes it simple to create FilterFunc's for use with
// cache.FilteringResourceEventHandler that filter based on a name.
func FilterWithName(name string) func(obj interface{}) bool {
Expand Down
8 changes: 1 addition & 7 deletions vendor/knative.dev/pkg/metrics/resource_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,10 @@ func cleanup() {
expiryCutoff := allMeters.clock.Now().Add(-1 * maxMeterExporterAge)
allMeters.lock.Lock()
defer allMeters.lock.Unlock()
resourceViews.lock.Lock()
defer resourceViews.lock.Unlock()
for key, meter := range allMeters.meters {
if key != "" && meter.t.Before(expiryCutoff) {
flushGivenExporter(meter.e)
// Make a copy of views to avoid data races
viewsCopy := copyViews(resourceViews.views)
meter.m.Unregister(viewsCopy...)
delete(allMeters.meters, key)
meter.m.Stop()
}
}
}
Expand Down Expand Up @@ -145,7 +139,7 @@ func RegisterResourceView(views ...*view.View) error {
return nil
}

// UnregisterResourceView is similar to view.Unregister(), except that it will
// UnregisterResourceView is similar to view.Unregiste(), except that it will
// unregister the view across all Resources tracked byt he system, rather than
// simply the default view.
func UnregisterResourceView(views ...*view.View) {
Expand Down
6 changes: 2 additions & 4 deletions vendor/knative.dev/pkg/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,18 @@ const (
// uses to find out which version of the networking config is deployed.
HashHeaderName = "K-Network-Hash"

// KubeProbeUAPrefix is the prefix for the User-Agent header.
// Since K8s 1.8, prober requests have
// User-Agent = "kube-probe/{major-version}.{minor-version}".
KubeProbeUAPrefix = "kube-probe/"

// KubeletProbeHeaderName is the header name to augment the probes, because
// Istio with mTLS rewrites probes, but their probes pass a different
// user-agent.
// user-agent. So we augment the probes with this header.
KubeletProbeHeaderName = "K-Kubelet-Probe"
)

// IsKubeletProbe returns true if the request is a Kubernetes probe.
func IsKubeletProbe(r *http.Request) bool {
return strings.HasPrefix(r.Header.Get(UserAgentKey), KubeProbeUAPrefix) ||
return strings.HasPrefix(r.Header.Get("User-Agent"), KubeProbeUAPrefix) ||
r.Header.Get(KubeletProbeHeaderName) != ""
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package v1

import (
"context"
"strings"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/apis"
Expand Down Expand Up @@ -63,19 +62,8 @@ func (cs *ConfigurationSpec) Validate(ctx context.Context) *apis.FieldError {

// validateLabels function validates configuration labels
func (c *Configuration) validateLabels() (errs *apis.FieldError) {
for key, val := range c.GetLabels() {
switch key {
case serving.RouteLabelKey,
serving.ConfigurationUIDLabelKey,
serving.ServiceUIDLabelKey:
// Known valid labels - so just skip them
case serving.ServiceLabelKey:
errs = errs.Also(verifyLabelOwnerRef(val, serving.ServiceLabelKey, "Service", c.GetOwnerReferences()))
default:
if strings.HasPrefix(key, serving.GroupNamePrefix) {
errs = errs.Also(apis.ErrInvalidKeyName(key, apis.CurrentField))
}
}
if val, ok := c.Labels[serving.ServiceLabelKey]; ok {
errs = errs.Also(verifyLabelOwnerRef(val, serving.ServiceLabelKey, "Service", c.GetOwnerReferences()))
}
return errs
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ type RevisionSpec struct {
// +optional
ContainerConcurrency *int64 `json:"containerConcurrency,omitempty"`

// TimeoutSeconds holds the max duration the instance is allowed for
// responding to a request. If unspecified, a system default will
// be provided.
// TimeoutSeconds is the maximum duration in seconds that the request routing
// layer will wait for a request delivered to a container to begin replying
// (send network traffic). If unspecified, a system default will be provided.
// +optional
TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty"`
}
Expand Down
Loading

0 comments on commit 0bea7be

Please sign in to comment.