mirror of https://github.com/knative/client.git
upgrade to latest dependencies (#1252)
bumping knative.dev/eventing 554c1cc...6136d09: > 6136d09 rename mtbroker dirs / package to just broker (# 5021) > e8bc8ed Change more internal usages of v1beta1 to v1 (# 5020) > 536e0aa sugar uses v1 versions of broker / trigger (# 5019) > f736471 Format markdown (# 5014) > 15c4916 upgrade to latest dependencies (# 5006) > 9d73c4d remove v1alpha.configmappropagations (# 5018) bumping knative.dev/hack 8368e1f...f99a255: > f99a255 Schema tool for reflective schema generation. (# 51) bumping knative.dev/networking f813b59...1b3d24e: > 1b3d24e upgrade to latest dependencies (# 362) bumping knative.dev/pkg 8fbab7e...737401c: > 737401c upgrade to latest dependencies (# 2047) > 7f753ea Slash off 5s from TestAdmissionValidResponseForResource (# 2046) > 1002883 Add kn-plugin-admin to downstream tests (# 1983) > 04fdbd7 Add WaitForCacheSyncQuick and use it in tests (# 2045) bumping knative.dev/serving a4908c6...dae56e1: > dae56e1 Update net-kourier nightly (# 10913) > 03e15be Fix locking (# 10910) > 7b1c480 upgrade to latest dependencies (# 10909) > e50cc97 Revert Parallelise tests in activator/net (# 10880) (# 10904) > e718cd4 Use atomic.Value rather than unsafe.Pointer (# 10901) > a92d5ff Fix polling condition in KPA test (# 10899) Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
d44f25d350
commit
ead33446ce
10
go.mod
10
go.mod
|
|
@ -21,11 +21,11 @@ require (
|
|||
k8s.io/cli-runtime v0.19.7
|
||||
k8s.io/client-go v0.19.7
|
||||
k8s.io/code-generator v0.19.7
|
||||
knative.dev/eventing v0.21.1-0.20210305093520-554c1cc249d8
|
||||
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
|
||||
knative.dev/networking v0.0.0-20210304153916-f813b5904943
|
||||
knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b
|
||||
knative.dev/serving v0.21.1-0.20210305113720-a4908c6b0dea
|
||||
knative.dev/eventing v0.21.1-0.20210306204021-6136d09fb405
|
||||
knative.dev/hack v0.0.0-20210305150220-f99a25560134
|
||||
knative.dev/networking v0.0.0-20210308052021-1b3d24e5be44
|
||||
knative.dev/pkg v0.0.0-20210308052421-737401c38b22
|
||||
knative.dev/serving v0.21.1-0.20210308120721-dae56e128a23
|
||||
sigs.k8s.io/yaml v1.2.0
|
||||
)
|
||||
|
||||
|
|
|
|||
23
go.sum
23
go.sum
|
|
@ -1305,22 +1305,25 @@ k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K
|
|||
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
|
||||
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-20210303133615-4863ed60e656/go.mod h1:h4vk2Qu2/B/JRIpBYVvNhMDPsId1vu5ecgbK5pPeI5o=
|
||||
knative.dev/eventing v0.21.1-0.20210305093520-554c1cc249d8 h1:fvCfv/VL/llyhguLluJV/Z8J3Bt+8D969stVHGp+vQ0=
|
||||
knative.dev/eventing v0.21.1-0.20210305093520-554c1cc249d8/go.mod h1:xx42mnYqB+iEMYny6/M3vbe58BZAo+uLrWbOQF5Qrm0=
|
||||
knative.dev/caching v0.0.0-20210304145815-5ce2f83e58d0/go.mod h1:I1JrIg51Pj131i6TGEBCDWM4UYdIeQ42zus/KdNIK7g=
|
||||
knative.dev/eventing v0.21.1-0.20210306204021-6136d09fb405 h1:Wh0tpZR+dL4Y6Bz3JtEP13mk6uhw0UqussHLjQRH+0Q=
|
||||
knative.dev/eventing v0.21.1-0.20210306204021-6136d09fb405/go.mod h1:jDiF/tOmMPui6HjcYuPGYX7TWJ7HoBq7XcERIUgLXqg=
|
||||
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-20210303133715-c369ab087ca7/go.mod h1:fSsSPvppCNVy6wx6Zb/bEmQbV+1ZeuWGaV1JDuEaCP4=
|
||||
knative.dev/hack v0.0.0-20210305150220-f99a25560134 h1:lUllAp28TkevQIgWrsjow8ZLnXJy3AraRzGFm/ffD2c=
|
||||
knative.dev/hack v0.0.0-20210305150220-f99a25560134/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
|
||||
knative.dev/networking v0.0.0-20210304153916-f813b5904943 h1:EEAnCZzqVoTNNPMYyONXqOD3e/45OPVahA4jm8ET4/g=
|
||||
knative.dev/networking v0.0.0-20210304153916-f813b5904943/go.mod h1:G+KCelFuLocMrnfayHoxqsFG+IYX4t8To1celZes77k=
|
||||
knative.dev/pkg v0.0.0-20210226182947-9039dc189ced h1:OCtTbXsJhiR35qCDxFj9Xc8sU3i87ePbc7YlHCt0al4=
|
||||
knative.dev/pkg v0.0.0-20210226182947-9039dc189ced/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
|
||||
knative.dev/pkg v0.0.0-20210303111915-08fc6268bf96/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
|
||||
knative.dev/networking v0.0.0-20210308052021-1b3d24e5be44 h1:IN65shBMr4u3rLFrx69LD+NAJ+DAn38bqmDGmkyvF3s=
|
||||
knative.dev/networking v0.0.0-20210308052021-1b3d24e5be44/go.mod h1:ng//lolq2n4tUO/ysxgjPkE2gvZ4FbvXu7rqH9//tYM=
|
||||
knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b h1:AynUh7MBUe44E60vh0vIyF2Bes4AOoTT2ejy9xrF0FU=
|
||||
knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
|
||||
knative.dev/reconciler-test v0.0.0-20210302173618-5f01af2a17ac/go.mod h1:70MF1WzRT29YtTBujNmB58UUlRGLlfYElOTNmO7MxdA=
|
||||
knative.dev/serving v0.21.1-0.20210305113720-a4908c6b0dea h1:jDKGVhFFEtVIi+xIPTkYA5RmbyijKgfhZqBo+8iGRvY=
|
||||
knative.dev/serving v0.21.1-0.20210305113720-a4908c6b0dea/go.mod h1:D5VESvUqH7eFqeHkVWSFktRUNKqURmNdF4sy0y1fJew=
|
||||
knative.dev/pkg v0.0.0-20210305173320-7f753ea1276f/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
|
||||
knative.dev/pkg v0.0.0-20210308052421-737401c38b22 h1:f3IFaya7jysL+2oUJkPADTUhUn12R8AY3n6kWsgzp4w=
|
||||
knative.dev/pkg v0.0.0-20210308052421-737401c38b22/go.mod h1:fP690UCcs5x+qQVhjJxNcm97OWIiUdFC1dqbD3Gsp64=
|
||||
knative.dev/reconciler-test v0.0.0-20210304153715-4115949d94e6/go.mod h1:xwkxmi4f0GPlQoPrio6Q9REvg1oNx6apGARUSyJ/7jo=
|
||||
knative.dev/serving v0.21.1-0.20210308120721-dae56e128a23 h1:cUo1b9ZEGaAXnjRrjavXCzV8VSPeWHvdSJtBOfombSo=
|
||||
knative.dev/serving v0.21.1-0.20210308120721-dae56e128a23/go.mod h1:A8siwc+elFm7H1kWcW385KKLviykudQMVW9Sonv8gNE=
|
||||
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=
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
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 configs
|
||||
|
||||
const (
|
||||
GroupName = "configs.internal.knative.dev"
|
||||
)
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
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 (
|
||||
"context"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
func (cmp *ConfigMapPropagation) SetDefaults(ctx context.Context) {
|
||||
// If we haven't configured the selector,
|
||||
// then set the default selector to be an empty map
|
||||
if cmp != nil && cmp.Spec.Selector == nil {
|
||||
cmp.Spec.Selector = &metav1.LabelSelector{}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
/*
|
||||
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 (
|
||||
"knative.dev/pkg/apis"
|
||||
)
|
||||
|
||||
var configMapPropagationCondSet = apis.NewLivingConditionSet(ConfigMapPropagationConditionReady, ConfigMapPropagationConditionPropagated)
|
||||
|
||||
const (
|
||||
// ConfigMapPropagationConditionReady has status True when all subconditions below have been set to True.
|
||||
ConfigMapPropagationConditionReady = apis.ConditionReady
|
||||
// ConfigMapPropagationConditionPropagated has status True when the ConfigMaps in original namespace are all propagated to target namespace.
|
||||
ConfigMapPropagationConditionPropagated apis.ConditionType = "Propagated"
|
||||
)
|
||||
|
||||
// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
|
||||
func (*ConfigMapPropagation) GetConditionSet() apis.ConditionSet {
|
||||
return configMapPropagationCondSet
|
||||
}
|
||||
|
||||
// GetCondition returns the condition currently associated with the given type, or nil.
|
||||
func (cmps *ConfigMapPropagationStatus) GetCondition(t apis.ConditionType) *apis.Condition {
|
||||
return configMapPropagationCondSet.Manage(cmps).GetCondition(t)
|
||||
}
|
||||
|
||||
// IsReady returns true if the resource is ready overall.
|
||||
func (cmps *ConfigMapPropagationStatus) IsReady() bool {
|
||||
return configMapPropagationCondSet.Manage(cmps).IsHappy()
|
||||
}
|
||||
|
||||
// InitializeConditions sets relevant unset conditions to Unknown state.
|
||||
func (cmps *ConfigMapPropagationStatus) InitializeConditions() {
|
||||
configMapPropagationCondSet.Manage(cmps).InitializeConditions()
|
||||
}
|
||||
|
||||
func (cmps *ConfigMapPropagationStatus) MarkPropagated() {
|
||||
configMapPropagationCondSet.Manage(cmps).MarkTrue(ConfigMapPropagationConditionPropagated)
|
||||
}
|
||||
|
||||
func (cmps *ConfigMapPropagationStatus) MarkNotPropagated() {
|
||||
configMapPropagationCondSet.Manage(cmps).MarkFalse(ConfigMapPropagationConditionPropagated, "PropagationFailed",
|
||||
"ConfigMapPropagation could not fully propagate ConfigMaps from original namespace to current namespace")
|
||||
}
|
||||
|
||||
func (cmpsc *ConfigMapPropagationStatusCopyConfigMap) SetCopyConfigMapStatus(name, source, operation, ready, reason, resourceVersion string) {
|
||||
cmpsc.Name = name
|
||||
cmpsc.Source = source
|
||||
cmpsc.Operation = operation
|
||||
cmpsc.Ready = ready
|
||||
cmpsc.Reason = reason
|
||||
cmpsc.ResourceVersion = resourceVersion
|
||||
}
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
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"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
"knative.dev/pkg/apis"
|
||||
duckv1 "knative.dev/pkg/apis/duck/v1"
|
||||
"knative.dev/pkg/kmeta"
|
||||
)
|
||||
|
||||
// +genclient
|
||||
// +genreconciler
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ConfigMapPropagation is used to propagate configMaps from original namespace to current namespace
|
||||
type ConfigMapPropagation struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ObjectMeta `json:"metadata,omitempty"`
|
||||
|
||||
// Spec defines the desired state of the ConfigMapPropagation
|
||||
Spec ConfigMapPropagationSpec `json:"spec,omitempty"`
|
||||
|
||||
// Status represents the current state of the EventType.
|
||||
// This data may be out of date.
|
||||
// +optional
|
||||
Status ConfigMapPropagationStatus `json:"status,omitempty"`
|
||||
}
|
||||
|
||||
var (
|
||||
// Check that ConfigMapPropagation can be validated, can be defaulted, and has immutable fields.
|
||||
_ apis.Validatable = (*ConfigMapPropagation)(nil)
|
||||
_ apis.Defaultable = (*ConfigMapPropagation)(nil)
|
||||
|
||||
// Check that ConfigMapPropagation can return its spec untyped.
|
||||
_ apis.HasSpec = (*ConfigMapPropagation)(nil)
|
||||
|
||||
_ runtime.Object = (*ConfigMapPropagation)(nil)
|
||||
|
||||
// Check that we can create OwnerReferences to a ConfigMapPropagation.
|
||||
_ kmeta.OwnerRefable = (*ConfigMapPropagation)(nil)
|
||||
|
||||
// Check that the type conforms to the duck Knative Resource shape.
|
||||
_ duckv1.KRShaped = (*ConfigMapPropagation)(nil)
|
||||
)
|
||||
|
||||
type ConfigMapPropagationSpec struct {
|
||||
// OriginalNamespace is the namespace where the original configMaps are in
|
||||
OriginalNamespace string `json:"originalNamespace,omitempty"`
|
||||
// Selector only selects original configMaps with corresponding labels
|
||||
// +optional
|
||||
Selector *metav1.LabelSelector `json:"selector,omitempty"`
|
||||
}
|
||||
|
||||
// ConfigMapPropagationStatus represents the current state of a ConfigMapPropagation.
|
||||
type ConfigMapPropagationStatus struct {
|
||||
// inherits duck/v1 Status, which currently provides:
|
||||
// * ObservedGeneration - the 'Generation' of the Service that was last processed by the controller.
|
||||
// * Conditions - the latest available observations of a resource's current state.
|
||||
duckv1.Status `json:",inline"`
|
||||
|
||||
//CopyConfigMaps is the status for each copied configmap.
|
||||
// +optional
|
||||
// +patchMergeKey=name
|
||||
// +patchStrategy=merge
|
||||
CopyConfigMaps []ConfigMapPropagationStatusCopyConfigMap `json:"copyConfigmaps" patchStrategy:"merge" patchMergeKey:"name"`
|
||||
}
|
||||
|
||||
// ConfigMapPropagationStatusCopyConfigMap represents the status of a copied configmap
|
||||
type ConfigMapPropagationStatusCopyConfigMap struct {
|
||||
// Name is copy configmap's name
|
||||
// +required
|
||||
Name string `json:"name,omitempty"`
|
||||
|
||||
// Source is "originalNamespace/originalConfigMapName"
|
||||
Source string `json:"source,omitempty"`
|
||||
|
||||
// Operation represents the operation CMP takes for this configmap. The operations are copy|delete|stop
|
||||
Operation string `json:"operation,omitempty"`
|
||||
|
||||
// Ready represents the operation is ready or not
|
||||
Ready string `json:"ready,omitempty"`
|
||||
|
||||
// Reason indicates reasons if the operation is not ready
|
||||
Reason string `json:"reason,omitempty"`
|
||||
|
||||
// ResourceVersion is the resourceVersion of original configmap
|
||||
ResourceVersion string `json:"resourceVersionFromSource,omitempty" protobuf:"bytes,6,opt,name=resourceVersion"`
|
||||
}
|
||||
|
||||
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
||||
|
||||
// ConfigMapPropagationList is a collection of ConfigMapPropagation.
|
||||
type ConfigMapPropagationList struct {
|
||||
metav1.TypeMeta `json:",inline"`
|
||||
// +optional
|
||||
metav1.ListMeta `json:"metadata,omitempty"`
|
||||
Items []ConfigMapPropagation `json:"items"`
|
||||
}
|
||||
|
||||
// GetGroupVersionKind returns GroupVersionKind for ConfigMapPropagation
|
||||
func (cmp *ConfigMapPropagation) GetGroupVersionKind() schema.GroupVersionKind {
|
||||
return SchemeGroupVersion.WithKind("ConfigMapPropagation")
|
||||
}
|
||||
|
||||
// GetUntypedSpec returns the spec of the ConfigMapPropagation.
|
||||
func (cmp *ConfigMapPropagation) GetUntypedSpec() interface{} {
|
||||
return cmp.Spec
|
||||
}
|
||||
|
||||
// GetStatus retrieves the status of the ConfigMapPropagation. Implements the KRShaped interface.
|
||||
func (cmp *ConfigMapPropagation) GetStatus() *duckv1.Status {
|
||||
return &cmp.Status.Status
|
||||
}
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
/*
|
||||
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 (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/validation"
|
||||
|
||||
"knative.dev/pkg/apis"
|
||||
"knative.dev/pkg/kmp"
|
||||
)
|
||||
|
||||
// Validate the ConfigMapPropagation.
|
||||
func (cmp *ConfigMapPropagation) Validate(ctx context.Context) *apis.FieldError {
|
||||
return cmp.Spec.Validate(ctx).ViaField("spec")
|
||||
}
|
||||
|
||||
// Validate the ConfigMapPropagationSpec.
|
||||
func (cmps *ConfigMapPropagationSpec) Validate(ctx context.Context) *apis.FieldError {
|
||||
var errs *apis.FieldError
|
||||
if cmps.OriginalNamespace == "" {
|
||||
fe := apis.ErrMissingField("originalNamespace")
|
||||
errs = errs.Also(fe)
|
||||
}
|
||||
|
||||
if cmps.Selector != nil {
|
||||
for key, value := range cmps.Selector.MatchLabels {
|
||||
if err := validation.IsQualifiedName(key); len(err) != 0 {
|
||||
fe := &apis.FieldError{
|
||||
Message: fmt.Sprintf("Invalid selector matchLabels key: %v", key),
|
||||
Paths: []string{"selector"},
|
||||
Details: strings.Join(err, "; "),
|
||||
}
|
||||
errs = errs.Also(fe)
|
||||
}
|
||||
if err := validation.IsValidLabelValue(value); len(err) != 0 {
|
||||
fe := &apis.FieldError{
|
||||
Message: fmt.Sprintf("Invalid selector matchLabels value: %v", value),
|
||||
Paths: []string{"selector"},
|
||||
Details: strings.Join(err, "; "),
|
||||
}
|
||||
errs = errs.Also(fe)
|
||||
}
|
||||
}
|
||||
if cmps.Selector.MatchExpressions != nil {
|
||||
fe := &apis.FieldError{
|
||||
Message: "MatchExpressions isn't supported yet",
|
||||
Paths: []string{"selector"},
|
||||
}
|
||||
errs = errs.Also(fe)
|
||||
}
|
||||
}
|
||||
return errs
|
||||
}
|
||||
|
||||
// CheckImmutableFields checks that any immutable fields were not changed.
|
||||
func (cmp *ConfigMapPropagation) CheckImmutableFields(ctx context.Context, original *ConfigMapPropagation) *apis.FieldError {
|
||||
if original == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
if diff, err := kmp.ShortDiff(original.Spec, cmp.Spec); err != nil {
|
||||
return &apis.FieldError{
|
||||
Message: "Failed to diff ConfigMapPropagation",
|
||||
Paths: []string{"spec"},
|
||||
Details: err.Error(),
|
||||
}
|
||||
} else if diff != "" {
|
||||
return &apis.FieldError{
|
||||
Message: "Immutable fields changed (-old +new)",
|
||||
Paths: []string{"spec"},
|
||||
Details: diff,
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/*
|
||||
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 is the v1alpha1 version of the API.
|
||||
// +k8s:deepcopy-gen=package
|
||||
// +groupName=configs.internal.knative.dev
|
||||
package v1alpha1
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
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 (
|
||||
"knative.dev/eventing/pkg/apis/configs"
|
||||
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
)
|
||||
|
||||
// SchemeGroupVersion is group version used to register these objects
|
||||
var SchemeGroupVersion = schema.GroupVersion{Group: configs.GroupName, Version: "v1alpha1"}
|
||||
|
||||
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
|
||||
func Kind(kind string) schema.GroupKind {
|
||||
return SchemeGroupVersion.WithKind(kind).GroupKind()
|
||||
}
|
||||
|
||||
// Resource takes an unqualified resource and returns a Group qualified GroupResource
|
||||
func Resource(resource string) schema.GroupResource {
|
||||
return SchemeGroupVersion.WithResource(resource).GroupResource()
|
||||
}
|
||||
|
||||
var (
|
||||
SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
|
||||
AddToScheme = SchemeBuilder.AddToScheme
|
||||
)
|
||||
|
||||
// Adds the list of known types to Scheme.
|
||||
func addKnownTypes(scheme *runtime.Scheme) error {
|
||||
scheme.AddKnownTypes(SchemeGroupVersion,
|
||||
&ConfigMapPropagation{},
|
||||
&ConfigMapPropagationList{},
|
||||
)
|
||||
metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
// +build !ignore_autogenerated
|
||||
|
||||
/*
|
||||
Copyright 2021 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.
|
||||
*/
|
||||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ConfigMapPropagation) DeepCopyInto(out *ConfigMapPropagation) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
|
||||
in.Spec.DeepCopyInto(&out.Spec)
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapPropagation.
|
||||
func (in *ConfigMapPropagation) DeepCopy() *ConfigMapPropagation {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConfigMapPropagation)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ConfigMapPropagation) 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 *ConfigMapPropagationList) DeepCopyInto(out *ConfigMapPropagationList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ConfigMapPropagation, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapPropagationList.
|
||||
func (in *ConfigMapPropagationList) DeepCopy() *ConfigMapPropagationList {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConfigMapPropagationList)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
|
||||
func (in *ConfigMapPropagationList) 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 *ConfigMapPropagationSpec) DeepCopyInto(out *ConfigMapPropagationSpec) {
|
||||
*out = *in
|
||||
if in.Selector != nil {
|
||||
in, out := &in.Selector, &out.Selector
|
||||
*out = new(v1.LabelSelector)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapPropagationSpec.
|
||||
func (in *ConfigMapPropagationSpec) DeepCopy() *ConfigMapPropagationSpec {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConfigMapPropagationSpec)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ConfigMapPropagationStatus) DeepCopyInto(out *ConfigMapPropagationStatus) {
|
||||
*out = *in
|
||||
in.Status.DeepCopyInto(&out.Status)
|
||||
if in.CopyConfigMaps != nil {
|
||||
in, out := &in.CopyConfigMaps, &out.CopyConfigMaps
|
||||
*out = make([]ConfigMapPropagationStatusCopyConfigMap, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapPropagationStatus.
|
||||
func (in *ConfigMapPropagationStatus) DeepCopy() *ConfigMapPropagationStatus {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConfigMapPropagationStatus)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *ConfigMapPropagationStatusCopyConfigMap) DeepCopyInto(out *ConfigMapPropagationStatusCopyConfigMap) {
|
||||
*out = *in
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapPropagationStatusCopyConfigMap.
|
||||
func (in *ConfigMapPropagationStatusCopyConfigMap) DeepCopy() *ConfigMapPropagationStatusCopyConfigMap {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(ConfigMapPropagationStatusCopyConfigMap)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ const (
|
|||
// MTChannelBrokerClassValue is the value we use to specify the
|
||||
// Broker using channels, but the resources (ingress,filter) run
|
||||
// in the system namespace. As in Broker from this repository
|
||||
// pkg/reconciler/mtbroker
|
||||
// pkg/reconciler/broker
|
||||
MTChannelBrokerClassValue = "MTChannelBasedBroker"
|
||||
|
||||
// ScopeAnnotationKey is the annotation key to indicate
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import (
|
|||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
configsv1alpha1 "knative.dev/eventing/pkg/apis/configs/v1alpha1"
|
||||
eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"
|
||||
eventingv1beta1 "knative.dev/eventing/pkg/apis/eventing/v1beta1"
|
||||
flowsv1 "knative.dev/eventing/pkg/apis/flows/v1"
|
||||
|
|
@ -42,7 +41,6 @@ var Scheme = runtime.NewScheme()
|
|||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
configsv1alpha1.AddToScheme,
|
||||
eventingv1beta1.AddToScheme,
|
||||
eventingv1.AddToScheme,
|
||||
flowsv1beta1.AddToScheme,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# knative.dev/hack
|
||||
|
||||
`hack` is a collection of scripts used to bootstrap CI processes and other vital
|
||||
entrypoint functionallity.
|
||||
entrypoint functionality.
|
||||
|
||||
## Using the `presubmit-tests.sh` helper script
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/runtime"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
"k8s.io/client-go/tools/record"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
|
|
@ -692,13 +693,29 @@ func RunInformers(stopCh <-chan struct{}, informers ...Informer) (func(), error)
|
|||
}
|
||||
|
||||
for i, informer := range informers {
|
||||
if ok := cache.WaitForCacheSync(stopCh, informer.HasSynced); !ok {
|
||||
if ok := WaitForCacheSyncQuick(stopCh, informer.HasSynced); !ok {
|
||||
return wg.Wait, fmt.Errorf("failed to wait for cache at index %d to sync", i)
|
||||
}
|
||||
}
|
||||
return wg.Wait, nil
|
||||
}
|
||||
|
||||
// WaitForCacheSyncQuick is the same as cache.WaitForCacheSync but with a much reduced
|
||||
// check-rate for the sync period.
|
||||
func WaitForCacheSyncQuick(stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) bool {
|
||||
err := wait.PollImmediateUntil(time.Millisecond,
|
||||
func() (bool, error) {
|
||||
for _, syncFunc := range cacheSyncs {
|
||||
if !syncFunc() {
|
||||
return false, nil
|
||||
}
|
||||
}
|
||||
return true, nil
|
||||
},
|
||||
stopCh)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
// StartAll kicks off all of the passed controllers with DefaultThreadsPerController.
|
||||
func StartAll(ctx context.Context, controllers ...*Impl) {
|
||||
wg := sync.WaitGroup{}
|
||||
|
|
|
|||
|
|
@ -771,11 +771,9 @@ k8s.io/kube-openapi/pkg/util/sets
|
|||
k8s.io/utils/buffer
|
||||
k8s.io/utils/integer
|
||||
k8s.io/utils/trace
|
||||
# knative.dev/eventing v0.21.1-0.20210305093520-554c1cc249d8
|
||||
# knative.dev/eventing v0.21.1-0.20210306204021-6136d09fb405
|
||||
## explicit
|
||||
knative.dev/eventing/pkg/apis/config
|
||||
knative.dev/eventing/pkg/apis/configs
|
||||
knative.dev/eventing/pkg/apis/configs/v1alpha1
|
||||
knative.dev/eventing/pkg/apis/duck
|
||||
knative.dev/eventing/pkg/apis/duck/v1
|
||||
knative.dev/eventing/pkg/apis/duck/v1beta1
|
||||
|
|
@ -802,15 +800,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/sources/v1alpha2
|
||||
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1alpha2/fake
|
||||
# knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
|
||||
# knative.dev/hack v0.0.0-20210305150220-f99a25560134
|
||||
## explicit
|
||||
knative.dev/hack
|
||||
# knative.dev/networking v0.0.0-20210304153916-f813b5904943
|
||||
# knative.dev/networking v0.0.0-20210308052021-1b3d24e5be44
|
||||
## explicit
|
||||
knative.dev/networking/pkg
|
||||
knative.dev/networking/pkg/apis/networking
|
||||
knative.dev/networking/pkg/apis/networking/v1alpha1
|
||||
# knative.dev/pkg v0.0.0-20210303192215-8fbab7ebb77b
|
||||
# knative.dev/pkg v0.0.0-20210308052421-737401c38b22
|
||||
## explicit
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
@ -854,7 +852,7 @@ knative.dev/pkg/tracing/config
|
|||
knative.dev/pkg/tracing/propagation
|
||||
knative.dev/pkg/tracing/propagation/tracecontextb3
|
||||
knative.dev/pkg/tracker
|
||||
# knative.dev/serving v0.21.1-0.20210305113720-a4908c6b0dea
|
||||
# knative.dev/serving v0.21.1-0.20210308120721-dae56e128a23
|
||||
## explicit
|
||||
knative.dev/serving/pkg/apis/autoscaling
|
||||
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
|
||||
|
|
|
|||
Loading…
Reference in New Issue