upgrade to latest dependencies (#1085)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2020-11-03 02:01:04 -08:00 committed by GitHub
parent c60b85150c
commit 8a0067dc6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 198 additions and 37 deletions

10
go.mod
View File

@ -16,11 +16,11 @@ require (
k8s.io/cli-runtime v0.18.8 k8s.io/cli-runtime v0.18.8
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/code-generator v0.18.8 k8s.io/code-generator v0.18.8
knative.dev/eventing v0.18.1-0.20201029213834-0535f9b33fe8 knative.dev/eventing v0.18.1-0.20201102224004-f0648377057c
knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68 knative.dev/hack v0.0.0-20201102193445-9349aeeb6701
knative.dev/networking v0.0.0-20201029132834-0fb5d8bc0634 knative.dev/networking v0.0.0-20201101040934-f77f64474b76
knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6 knative.dev/pkg v0.0.0-20201102194004-c6a8219d518d
knative.dev/serving v0.18.1-0.20201029234034-837d1e442c34 knative.dev/serving v0.18.1-0.20201103004003-c6be4aec8dae
sigs.k8s.io/yaml v1.2.0 sigs.k8s.io/yaml v1.2.0
) )

23
go.sum
View File

@ -1988,17 +1988,17 @@ k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 h1:v8ud2Up6QK1lNOKFgiIVrZdMg7Mpm
k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200603063816-c1c6865ac451/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20190719140829-2032732871ff/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg= 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-20200116200605-67bca2c83dfa/go.mod h1:dHXFU6CGlLlbzaWc32g80cR92iuBSpsslDNBWI8C7eg=
knative.dev/caching v0.0.0-20201029015435-f2bc7482b39c/go.mod h1:s+IpuPu1pgzRrpFXi8zQ4bketnjwrC31OFgopPhN9f8= knative.dev/caching v0.0.0-20201029165635-7983fcd03d68/go.mod h1:IITT+yByNfodPX0JOxNvojV237O2PZjn/i8kZZh7hm8=
knative.dev/eventing v0.18.1-0.20201029213834-0535f9b33fe8 h1:1JUXDfc9fW3bR8K9PMIS5qKTdkujSWZS/PW2+Ujrrq0= knative.dev/eventing v0.18.1-0.20201102224004-f0648377057c h1:Z5q5HycLb4LS81uRNvT8vHfDSx5kZGFeSvpj+H6/dRA=
knative.dev/eventing v0.18.1-0.20201029213834-0535f9b33fe8/go.mod h1:4+DyEOeuGTrLXKpmfxJ612a6u6hIZ4wb9t4gw8PHQiw= knative.dev/eventing v0.18.1-0.20201102224004-f0648377057c/go.mod h1:5xnRo0y4YCoFY6+CNWGXRzR++BChSJc3f40lFSK1Q7A=
knative.dev/eventing-contrib v0.6.1-0.20190723221543-5ce18048c08b/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g= 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/eventing-contrib v0.11.2/go.mod h1:SnXZgSGgMSMLNFTwTnpaOH7hXDzTFtw0J8OmHflNx3g=
knative.dev/hack v0.0.0-20201027221733-0d7f2f064b7b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68 h1:ygwpOK8B0PXurq88GHhym2uxKiiMJ+bRFwFeZHqGJNc= knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68 h1:ygwpOK8B0PXurq88GHhym2uxKiiMJ+bRFwFeZHqGJNc=
knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/networking v0.0.0-20201029015534-8ec2eff034d5/go.mod h1:GLUFkkEsNCMHSXZDGHG0EFpiDHkWZWDvWJurG3VV8do= knative.dev/hack v0.0.0-20201102193445-9349aeeb6701 h1:at6mUfi8gHWlBRd/qNM66JvUQ4C964cOpsy9hzac+7c=
knative.dev/networking v0.0.0-20201029132834-0fb5d8bc0634 h1:PWOKjvIetCNvHR302XhGEBb/B2vt4dF1LuAwhKH5ViE= knative.dev/hack v0.0.0-20201102193445-9349aeeb6701/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/networking v0.0.0-20201029132834-0fb5d8bc0634/go.mod h1:MogwjngWMF4suyf8htoTj53UpY3CXNKn1pTpyeBtu2I= knative.dev/networking v0.0.0-20201101040934-f77f64474b76 h1:ZegSP/ZlnZCzzn4z/h85N4TVnM8baImsQv6JXpdJubI=
knative.dev/networking v0.0.0-20201101040934-f77f64474b76/go.mod h1:MogwjngWMF4suyf8htoTj53UpY3CXNKn1pTpyeBtu2I=
knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= 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-20191111150521-6d806b998379/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= knative.dev/pkg v0.0.0-20200207155214-fef852970f43/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
@ -2007,11 +2007,14 @@ knative.dev/pkg v0.0.0-20200505191044-3da93ebb24c2/go.mod h1:Q6sL35DdGs8hIQZKdaC
knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY= knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY=
knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA= knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8= knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8=
knative.dev/pkg v0.0.0-20201028171634-6a24d54694a8/go.mod h1:gSgUoSIvJZoCHurWwZJQHiVDTvMkAJd6OFe8KwtzdX0=
knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6 h1:J7VRiR73Mnc7UeiPo0mCPBIZVYcBBKZO+wPqFc8nlrM= knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6 h1:J7VRiR73Mnc7UeiPo0mCPBIZVYcBBKZO+wPqFc8nlrM=
knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6/go.mod h1:G805KH4tlnB6CIVHWIpE82pjx3/+2r9gUqNSOa78tns= knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6/go.mod h1:G805KH4tlnB6CIVHWIpE82pjx3/+2r9gUqNSOa78tns=
knative.dev/serving v0.18.1-0.20201029234034-837d1e442c34 h1:dJ9OdLDwAqEj6QghwzURmaBKSJ9o8n0rV0W9O61vqRI= knative.dev/pkg v0.0.0-20201030122234-256ae893994a/go.mod h1:G805KH4tlnB6CIVHWIpE82pjx3/+2r9gUqNSOa78tns=
knative.dev/serving v0.18.1-0.20201029234034-837d1e442c34/go.mod h1:9v6y2x9d9AUKqrw2dpcAb/pzlu1Gp3D7YV/RQ+cXhec= knative.dev/pkg v0.0.0-20201030200734-72451e0d5973/go.mod h1:G805KH4tlnB6CIVHWIpE82pjx3/+2r9gUqNSOa78tns=
knative.dev/pkg v0.0.0-20201102194004-c6a8219d518d h1:JrOfK/tIUnXfMNaNHAkfNswIVQ//OkbO1FMly+nQ9t8=
knative.dev/pkg v0.0.0-20201102194004-c6a8219d518d/go.mod h1:0/9g74jUIRReXdgCBFs85jHU3Ffyl1Fc9jxrllXYDVM=
knative.dev/serving v0.18.1-0.20201103004003-c6be4aec8dae h1:Ofuw6zbpDWGp1vhRsDhOX8YsehautugI3mSfhxWE1a0=
knative.dev/serving v0.18.1-0.20201103004003-c6be4aec8dae/go.mod h1:C3b8FljPut479w/vDDlNiMTj/1KeRtLzdfwzVRMMuSQ=
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= 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-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU=
knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE= knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=

View File

@ -512,6 +512,7 @@ function go_update_deps() {
export GO111MODULE=on export GO111MODULE=on
export GOFLAGS="" export GOFLAGS=""
export GOSUMDB=off # Do not use the sum.golang.org service.
echo "=== Update Deps for Golang" echo "=== Update Deps for Golang"

View File

@ -109,7 +109,7 @@ function update_clusters() {
# Run the perf-tests tool # Run the perf-tests tool
# Parameters: $1..$n - parameters passed to the tool # Parameters: $1..$n - parameters passed to the tool
function run_perf_cluster_tool() { function run_perf_cluster_tool() {
go run "${REPO_ROOT_DIR}"/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests $@ perf-tests $@
} }
# Delete the old clusters belonged to the current repo, and recreate them with the same configuration. # Delete the old clusters belonged to the current repo, and recreate them with the same configuration.

View File

@ -50,6 +50,10 @@ const (
// to indicate the namespace of the origin secret that the TLS secret is copied from. // to indicate the namespace of the origin secret that the TLS secret is copied from.
OriginSecretNamespaceLabelKey = GroupName + "/originSecretNamespace" OriginSecretNamespaceLabelKey = GroupName + "/originSecretNamespace"
// RolloutAnnotationKey is the annotation key for storing
// the rollout state in the Annotations of the Kingress or Route.Status.
RolloutAnnotationKey = GroupName + "/rollout"
// CertificateClassAnnotationKey is the annotation for the // CertificateClassAnnotationKey is the annotation for the
// explicit class of Certificate that a particular resource has // explicit class of Certificate that a particular resource has
// opted into. For example, // opted into. For example,

View File

@ -0,0 +1,24 @@
/*
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 v1alpha1
import "k8s.io/apimachinery/pkg/runtime/schema"
// GetGroupVersionKind returns SchemeGroupVersion of a ClusterDomainClaim.
func (*ClusterDomainClaim) GetGroupVersionKind() schema.GroupVersionKind {
return SchemeGroupVersion.WithKind("ClusterDomainClaim")
}

View File

@ -0,0 +1,54 @@
/*
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 v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/pkg/kmeta"
)
// +genclient
// +genclient:nonNamespaced
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterDomainClaim is a cluster-wide reservation for a particular domain name.
type ClusterDomainClaim struct {
metav1.TypeMeta `json:",inline"`
// Standard object's metadata.
// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
}
var (
// Check that we can create OwnerReferences to a ClusterDomainClaim.
_ kmeta.OwnerRefable = (*ClusterDomainClaim)(nil)
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// ClusterDomainClaimList is a collection of ClusterDomainClaim objects.
type ClusterDomainClaimList struct {
metav1.TypeMeta `json:",inline"`
// Standard object metadata.
// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
// +optional
metav1.ListMeta `json:"metadata,omitempty"`
// Items is the list of ClusterDomainClaim objects.
Items []ClusterDomainClaim `json:"items"`
}

View File

@ -54,6 +54,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
&ServerlessServiceList{}, &ServerlessServiceList{},
&Certificate{}, &Certificate{},
&CertificateList{}, &CertificateList{},
&ClusterDomainClaim{},
&ClusterDomainClaimList{},
) )
metav1.AddToGroupVersion(scheme, SchemeGroupVersion) metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
return nil return nil

View File

@ -136,6 +136,65 @@ func (in *CertificateStatus) DeepCopy() *CertificateStatus {
return out return out
} }
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterDomainClaim) DeepCopyInto(out *ClusterDomainClaim) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDomainClaim.
func (in *ClusterDomainClaim) DeepCopy() *ClusterDomainClaim {
if in == nil {
return nil
}
out := new(ClusterDomainClaim)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterDomainClaim) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterDomainClaimList) DeepCopyInto(out *ClusterDomainClaimList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]ClusterDomainClaim, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterDomainClaimList.
func (in *ClusterDomainClaimList) DeepCopy() *ClusterDomainClaimList {
if in == nil {
return nil
}
out := new(ClusterDomainClaimList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *ClusterDomainClaimList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Domain) DeepCopyInto(out *Domain) { func (in *Domain) DeepCopyInto(out *Domain) {
*out = *in *out = *in

View File

@ -78,17 +78,6 @@ const (
// PodAutoscalerSpec holds the desired state of the PodAutoscaler (from the client). // PodAutoscalerSpec holds the desired state of the PodAutoscaler (from the client).
type PodAutoscalerSpec struct { type PodAutoscalerSpec struct {
// DeprecatedGeneration was used prior in Kubernetes versions <1.11
// when metadata.generation was not being incremented by the api server
//
// This property will be dropped in future Knative releases and should
// not be used - use metadata.generation
//
// Tracking issue: https://github.com/knative/serving/issues/643
//
// +optional
DeprecatedGeneration int64 `json:"generation,omitempty"`
// ContainerConcurrency specifies the maximum allowed // ContainerConcurrency specifies the maximum allowed
// in-flight (concurrent) requests per container of the Revision. // in-flight (concurrent) requests per container of the Revision.
// Defaults to `0` which means unlimited concurrency. // Defaults to `0` which means unlimited concurrency.

View File

@ -24,6 +24,7 @@ import (
) )
var domainMappingCondSet = apis.NewLivingConditionSet( var domainMappingCondSet = apis.NewLivingConditionSet(
DomainMappingConditionDomainClaimed,
DomainMappingConditionIngressReady, DomainMappingConditionIngressReady,
) )
@ -62,6 +63,26 @@ func (dms *DomainMappingStatus) MarkIngressNotConfigured() {
"IngressNotConfigured", "Ingress has not yet been reconciled.") "IngressNotConfigured", "Ingress has not yet been reconciled.")
} }
// MarkDomainClaimed updates the DomainMappingConditionDomainClaimed condition
// to indicate that the domain was successfully claimed.
func (dms *DomainMappingStatus) MarkDomainClaimed() {
domainMappingCondSet.Manage(dms).MarkTrue(DomainMappingConditionDomainClaimed)
}
// MarkDomainClaimNotOwned updates the DomainMappingConditionDomainClaimed
// condition to indicate that the domain is already in use by another
// DomainMapping.
func (dms *DomainMappingStatus) MarkDomainClaimNotOwned() {
domainMappingCondSet.Manage(dms).MarkFalse(DomainMappingConditionDomainClaimed, "DomainAlreadyClaimed",
"The domain name is already in use by another DomainMapping")
}
// MarkDomainClaimFailed updates the DomainMappingConditionDomainClaimed
// condition to indicate that creating the ClusterDomainClaim failed.
func (dms *DomainMappingStatus) MarkDomainClaimFailed(reason string) {
domainMappingCondSet.Manage(dms).MarkFalse(DomainMappingConditionDomainClaimed, "DomainClaimFailed", reason)
}
// PropagateIngressStatus updates the DomainMappingConditionIngressReady // PropagateIngressStatus updates the DomainMappingConditionIngressReady
// condition according to the underlying Ingress's status. // condition according to the underlying Ingress's status.
func (dms *DomainMappingStatus) PropagateIngressStatus(cs netv1alpha1.IngressStatus) { func (dms *DomainMappingStatus) PropagateIngressStatus(cs netv1alpha1.IngressStatus) {

View File

@ -98,6 +98,10 @@ const (
// DomainMappingConditionIngressReady reflects the readiness of the // DomainMappingConditionIngressReady reflects the readiness of the
// underlying Ingress resource. // underlying Ingress resource.
DomainMappingConditionIngressReady apis.ConditionType = "IngressReady" DomainMappingConditionIngressReady apis.ConditionType = "IngressReady"
// DomainMappingConditionDomainClaimed reflects that the ClusterDomainClaim
// for this DomainMapping exists, and is owned by this DomainMapping.
DomainMappingConditionDomainClaimed apis.ConditionType = "DomainClaimed"
) )
// GetStatus retrieves the status of the DomainMapping. Implements the KRShaped interface. // GetStatus retrieves the status of the DomainMapping. Implements the KRShaped interface.

View File

@ -17,18 +17,18 @@ limitations under the License.
package labels package labels
import ( import (
v1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
network "knative.dev/networking/pkg" network "knative.dev/networking/pkg"
"knative.dev/serving/pkg/apis/serving" "knative.dev/serving/pkg/apis/serving"
) )
// IsObjectLocalVisibility returns whether an ObjectMeta is of cluster-local visibility // IsObjectLocalVisibility returns whether an ObjectMeta is of cluster-local visibility
func IsObjectLocalVisibility(meta *v1.ObjectMeta) bool { func IsObjectLocalVisibility(meta *metav1.ObjectMeta) bool {
return meta.Labels[network.VisibilityLabelKey] != "" || meta.Labels[serving.VisibilityLabelKeyObsolete] != "" return meta.Labels[network.VisibilityLabelKey] != "" || meta.Labels[serving.VisibilityLabelKeyObsolete] != ""
} }
// SetVisibility sets the visibility on an ObjectMeta // SetVisibility sets the visibility on an ObjectMeta
func SetVisibility(meta *v1.ObjectMeta, isClusterLocal bool) { func SetVisibility(meta *metav1.ObjectMeta, isClusterLocal bool) {
if isClusterLocal { if isClusterLocal {
SetLabel(meta, network.VisibilityLabelKey, serving.VisibilityClusterLocal) SetLabel(meta, network.VisibilityLabelKey, serving.VisibilityClusterLocal)
} else { } else {
@ -37,7 +37,7 @@ func SetVisibility(meta *v1.ObjectMeta, isClusterLocal bool) {
} }
// SetLabel sets/update the label of the an ObjectMeta // SetLabel sets/update the label of the an ObjectMeta
func SetLabel(meta *v1.ObjectMeta, key, value string) { func SetLabel(meta *metav1.ObjectMeta, key, value string) {
if meta.Labels == nil { if meta.Labels == nil {
meta.Labels = make(map[string]string, 1) meta.Labels = make(map[string]string, 1)
} }
@ -46,6 +46,6 @@ func SetLabel(meta *v1.ObjectMeta, key, value string) {
} }
// DeleteLabel removes a label from the ObjectMeta // DeleteLabel removes a label from the ObjectMeta
func DeleteLabel(meta *v1.ObjectMeta, key string) { func DeleteLabel(meta *metav1.ObjectMeta, key string) {
delete(meta.Labels, key) delete(meta.Labels, key)
} }

10
vendor/modules.txt vendored
View File

@ -816,7 +816,7 @@ k8s.io/kube-openapi/pkg/util/sets
k8s.io/utils/buffer k8s.io/utils/buffer
k8s.io/utils/integer k8s.io/utils/integer
k8s.io/utils/trace k8s.io/utils/trace
# knative.dev/eventing v0.18.1-0.20201029213834-0535f9b33fe8 # knative.dev/eventing v0.18.1-0.20201102224004-f0648377057c
## explicit ## explicit
knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/configs knative.dev/eventing/pkg/apis/configs
@ -845,15 +845,15 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/eventing/v1beta1/fake
knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1 knative.dev/eventing/pkg/client/clientset/versioned/typed/messaging/v1beta1
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake
# knative.dev/hack v0.0.0-20201028205534-fe80f1c8af68 # knative.dev/hack v0.0.0-20201102193445-9349aeeb6701
## explicit ## explicit
knative.dev/hack knative.dev/hack
# knative.dev/networking v0.0.0-20201029132834-0fb5d8bc0634 # knative.dev/networking v0.0.0-20201101040934-f77f64474b76
## explicit ## explicit
knative.dev/networking/pkg knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1 knative.dev/networking/pkg/apis/networking/v1alpha1
# knative.dev/pkg v0.0.0-20201029122234-6d905b3f84a6 # knative.dev/pkg v0.0.0-20201102194004-c6a8219d518d
## explicit ## explicit
knative.dev/pkg/apis knative.dev/pkg/apis
knative.dev/pkg/apis/duck knative.dev/pkg/apis/duck
@ -893,7 +893,7 @@ knative.dev/pkg/tracing/config
knative.dev/pkg/tracing/propagation knative.dev/pkg/tracing/propagation
knative.dev/pkg/tracing/propagation/tracecontextb3 knative.dev/pkg/tracing/propagation/tracecontextb3
knative.dev/pkg/tracker knative.dev/pkg/tracker
# knative.dev/serving v0.18.1-0.20201029234034-837d1e442c34 # knative.dev/serving v0.18.1-0.20201103004003-c6be4aec8dae
## explicit ## explicit
knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1 knative.dev/serving/pkg/apis/autoscaling/v1alpha1