mirror of https://github.com/knative/client.git
upgrade to latest dependencies (#1798)
bumping knative.dev/hack 3de51af...1421f12:%0A > 1421f12 Extract tools to knative.dev/toolbox (# 280)%0A > 3b8ef01 Update community files (# 279)%0A > 1eebfb3 Update community files (# 278)%0Abumping knative.dev/pkg b77a78c...ee73c93:%0A > ee73c93 upgrade to latest dependencies (# 2710)%0A > 4835a4c Eventing TLS: update destination and Kref types (# 2716)%0A > b7f2774 Made changes to addressable and address status. (# 2713)%0A > 696cac8 Expose queue proxy request metrics reporting period (# 2362)%0A > bd3cf51 Printf log message with the right type when showing port (# 2709)%0A > 4c84b1b Update actions (# 2707)%0A > 3290ddf Update community files (# 2706)%0A > 53fc6ab Update actions (# 2705)%0A > b769fef drop eventing natss from downstream tests (# 2703)%0A > 511b394 potential fix for flakey tlsBackoff (# 2702)%0A > 0902ea8 Parameterize WEBHOOK_NAME env key in error message (# 2701)%0A > c5dd1d1 Update community files (# 2700)%0Abumping knative.dev/eventing 1ff36e1...d991040:%0A > d991040 Add transport-encryption feature flag (# 6845)%0A > 642699b Sync retry option with spec (# 6834)%0A > 500ae1d [main] Upgrade to latest dependencies (# 6846)%0A > 4a78a6c Support running SinkBinding tests with inclusion selection behavior (# 6841)%0A > df3bd9e [main] Upgrade to latest dependencies (# 6839)%0A > 7ba0648 [main] Upgrade to latest dependencies (# 6832)%0A > 97a7b77 [main] Upgrade to latest dependencies (# 6830)%0A > e691b39 removed release label (# 6807)%0A > 69a3841 Removes the deprecated packages (# 6816)%0A > a959915 parallel rekt test cleanup (# 6828)%0A > 88c5dbb [main] Update actions (# 6827)%0A > d15774f Add sequence reconciler test (# 6817)%0A > f361a57 [main] Update community files (# 6822)%0A > 605306c [main] Update actions (# 6819)%0A > 3c8c86c Add documentation for MTChannelBasedBroker (# 6791)%0A > ea0b254 fix api docs generation with go1.20 (# 6810)%0A > 4d5278d Removes replace and ran `go vendor` (# 6795)%0A > 62eb85e Make autoscaler leader aware (# 6814)%0A > 5988c42 [main] Upgrade to latest dependencies (# 6812)%0A > f6ca59b Use released hearthbeats image for testing (# 6808)%0A > eabc874 updated broken link (# 6786)%0A > 6a732ff Add basic retry support for hearthbeats utility (# 6809)%0A > 05f6d84 Heartbeats: quit istio proxy when running in a job (# 6804)%0A > 472d325 Add rekt based broker conformance test to ensure `broker.spec.config` is immutable (# 6799)%0A > 5a0064b [main] Update community files (# 6805)%0A > 1258a4e Fix pod annotations in containersource template (# 6802)%0A > 38a00d8 Migrate to rekt cronjob package (# 6800)%0A > 0e2c389 [main] Upgrade to latest dependencies (# 6798)%0A > df2287d [main] Upgrade to latest dependencies (# 6794)%0Abumping knative.dev/serving 587f587...23f7e2b:%0A > 23f7e2b Update net-kourier nightly (# 13849)%0A > 32aacd6 Update net-certmanager nightly (# 13850)%0A > 5eed3c1 Update net-istio nightly (# 13851)%0A > 8a027b6 Update net-gateway-api nightly (# 13848)%0A > 0814d02 upgrade to latest dependencies (# 13846)%0A > dab78d1 upgrade to latest dependencies (# 13844)%0A > 9976a2c Update net-kourier nightly (# 13841)%0A > 0134c27 Update net-contour nightly (# 13840)%0A > e824c3f Update net-certmanager nightly (# 13842)%0A > ef53449 Update net-kourier nightly (# 13835)%0A > e4f3288 Update net-contour nightly (# 13834)%0A > 307a7e4 remove freezer code from queue proxy (# 13830)%0A > 92dba5b Update net-gateway-api nightly (# 13833)%0A > 5791aea Update net-certmanager nightly (# 13832)%0A > be65250 upgrade to latest dependencies (# 13831)%0A > bb18a82 upgrade to latest dependencies (# 13825)%0A > 66c28b6 Update net-contour nightly (# 13822)%0A > dce7a40 Update net-certmanager nightly (# 13821)%0A > 8d8c39e Update net-istio nightly (# 13803)%0A > 137c10f Update net-contour nightly (# 13818)%0A > fc86653 Fix queue proxy handler setup (# 13815)%0A > a5612ff Update net-kourier nightly (# 13817)%0A > bfca504 Update net-certmanager nightly (# 13814)%0A > dbb13ae upgrade to latest dependencies (# 13813)%0A > f9b752c Update net-gateway-api nightly (# 13811)%0A > e5556b4 Update net-contour nightly (# 13804)%0A > 8d60f19 Update net-certmanager nightly (# 13807)%0A > 023d909 Update actions (# 13799)%0A > 7788c57 Update actions (# 13794)%0A > 971dd38 Update community files (# 13795)%0A > f031fd4 Update net-certmanager nightly (# 13793)%0A > 1cfd960 Update net-gateway-api nightly (# 13788)%0A > dc65c40 Update net-contour nightly (# 13791)%0A > 5d43b7b Update net-istio nightly (# 13789)%0A > 65c6d92 Update net-kourier nightly (# 13787)%0A > 02685bc upgrade to latest dependencies (# 13785)%0A > d569144 Update net-istio nightly (# 13711)%0A > 71088a8 Update community files (# 13776)%0A > 711371c Update net-contour nightly (# 13779)%0A > 8859807 Update net-kourier nightly (# 13778)%0A > 9d28f57 Update net-certmanager nightly (# 13777)%0A > c0dea98 Update net-gateway-api nightly (# 13773)%0A > 90c61a4 Update net-certmanager nightly (# 13774)%0A > 677682f Update net-contour nightly (# 13772)%0A > 74fcd62 Update net-kourier nightly (# 13775)%0A > 6436af6 upgrade to latest dependencies (# 13769)%0A > 4d51212 Use `pkgtest.CheckEndpointState` in TestActivationScale instead of raw client (# 13770)%0Abumping knative.dev/networking c692e9e...0b998c1:%0A > 0b998c1 upgrade to latest dependencies (# 786)%0A > 8174d2b upgrade to latest dependencies (# 785)%0A > e18ca86 upgrade to latest dependencies (# 784)%0A > 2ca8dbc upgrade to latest dependencies (# 783)%0A > a2549e2 Update actions (# 782)%0A > 8139f0f Update actions (# 780)%0A > 5544973 Update community files (# 781)%0A > 74471b9 Update community files (# 779) Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
parent
3a8d646264
commit
146af00f56
10
go.mod
10
go.mod
|
|
@ -20,11 +20,11 @@ require (
|
|||
k8s.io/cli-runtime v0.25.2
|
||||
k8s.io/client-go v0.25.4
|
||||
k8s.io/code-generator v0.25.4
|
||||
knative.dev/eventing v0.36.1-0.20230306130433-1ff36e1b656d
|
||||
knative.dev/hack v0.0.0-20230228173453-3de51aff69a3
|
||||
knative.dev/networking v0.0.0-20230301131055-c692e9e6afe1
|
||||
knative.dev/pkg v0.0.0-20230306194819-b77a78c6c0ad
|
||||
knative.dev/serving v0.36.1-0.20230306232326-587f58791d1b
|
||||
knative.dev/eventing v0.36.1-0.20230405220638-d9910407d0f4
|
||||
knative.dev/hack v0.0.0-20230330174700-1421f120c36b
|
||||
knative.dev/networking v0.0.0-20230404133438-0b998c1bdcef
|
||||
knative.dev/pkg v0.0.0-20230404101938-ee73c9355c9d
|
||||
knative.dev/serving v0.36.1-0.20230405152938-23f7e2bc5ce4
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
||||
|
|
|
|||
20
go.sum
20
go.sum
|
|
@ -1087,16 +1087,16 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O
|
|||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
|
||||
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
|
||||
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
knative.dev/eventing v0.36.1-0.20230306130433-1ff36e1b656d h1:mYftXlassunWeX4gvnMZMheqjMnixe4x89guq5atJ48=
|
||||
knative.dev/eventing v0.36.1-0.20230306130433-1ff36e1b656d/go.mod h1:wvjeFSAkuYET+tHkS3EdKcPsLxgvHK6qEkdzxR4ffkw=
|
||||
knative.dev/hack v0.0.0-20230228173453-3de51aff69a3 h1:Jt3n+AZsZHZaFhk/A1NnboAvgjV+hvvyeyyuIX/hUx0=
|
||||
knative.dev/hack v0.0.0-20230228173453-3de51aff69a3/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
|
||||
knative.dev/networking v0.0.0-20230301131055-c692e9e6afe1 h1:ejM3dZpJSGWPXD4E/ZrL3baOU9fBD3neJkIGKs+DE8M=
|
||||
knative.dev/networking v0.0.0-20230301131055-c692e9e6afe1/go.mod h1:v3IQxqBhOuTMDFZhsvBFGiuF5vjlOGoSQM2Q6B7HSpU=
|
||||
knative.dev/pkg v0.0.0-20230306194819-b77a78c6c0ad h1:cYCDdgSMOKiCGm6v1vvR2v4l/naGorbwoJKE/e39BJI=
|
||||
knative.dev/pkg v0.0.0-20230306194819-b77a78c6c0ad/go.mod h1:S+KfTInuwEkZSTwvWqrWZV/TEw6ps51GUGaSC1Fnbe0=
|
||||
knative.dev/serving v0.36.1-0.20230306232326-587f58791d1b h1:tII98txShIZRsBIJeYbKi4QT6Pncd+1VCluZ2QCpMR4=
|
||||
knative.dev/serving v0.36.1-0.20230306232326-587f58791d1b/go.mod h1:fBbRIhI0BXjoMJECg0ac+ifIdyKKfu9ZGDsbB5isK4w=
|
||||
knative.dev/eventing v0.36.1-0.20230405220638-d9910407d0f4 h1:c8MyN4z5Fe7uaRxLnNJRM89v0apzOidrBgEoE3TRDoA=
|
||||
knative.dev/eventing v0.36.1-0.20230405220638-d9910407d0f4/go.mod h1:04GSGLHjBkgDEGRIg2wM7n5BB27BRIoMqb9emFp/YNU=
|
||||
knative.dev/hack v0.0.0-20230330174700-1421f120c36b h1:20HMZEfXRdMPObZcV2MiZmcoJ9ms98qeWx0aUoHUAnc=
|
||||
knative.dev/hack v0.0.0-20230330174700-1421f120c36b/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
|
||||
knative.dev/networking v0.0.0-20230404133438-0b998c1bdcef h1:S8gCH6+4tvqF8Ond1U9rBbthoRci59eOBqY8HI46uq0=
|
||||
knative.dev/networking v0.0.0-20230404133438-0b998c1bdcef/go.mod h1:V2ZPhM1LH+4J/rqoI6Dlt1qX6ac15uFZXkaLBlILeHU=
|
||||
knative.dev/pkg v0.0.0-20230404101938-ee73c9355c9d h1:mubqXUjYfnwNg3IGWYEj2YffXYIxg44Qn9GS5vPAjck=
|
||||
knative.dev/pkg v0.0.0-20230404101938-ee73c9355c9d/go.mod h1:EQk8+qkZ8fMtrDYOOb9e9xMQG29N+L54iXBCfNXRm90=
|
||||
knative.dev/serving v0.36.1-0.20230405152938-23f7e2bc5ce4 h1:YSxeITZVqmJhozdf6iyDxfj41/8LSiI6A9Kw+zRSKDs=
|
||||
knative.dev/serving v0.36.1-0.20230405152938-23f7e2bc5ce4/go.mod h1:aFgWXAGSn4ryeyLfXbvvn5iKDu1mU2yksiKhtt9yXc0=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
|
||||
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ func (in *BrokerConfig) DeepCopyInto(out *BrokerConfig) {
|
|||
if in.KReference != nil {
|
||||
in, out := &in.KReference, &out.KReference
|
||||
*out = new(v1.KReference)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Delivery != nil {
|
||||
in, out := &in.Delivery, &out.Delivery
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ func (in *BrokerSpec) DeepCopyInto(out *BrokerSpec) {
|
|||
if in.Config != nil {
|
||||
in, out := &in.Config, &out.Config
|
||||
*out = new(duckv1.KReference)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Delivery != nil {
|
||||
in, out := &in.Delivery, &out.Delivery
|
||||
|
|
|
|||
|
|
@ -34,6 +34,17 @@ const (
|
|||
// Allowed neither explicitly disables or enables a behavior.
|
||||
// eg. allow a client to control behavior with an annotation or allow a new value through validation.
|
||||
Allowed Flag = "Allowed"
|
||||
// Strict is only applicable to the TransportEncryption feature.
|
||||
// The following applies:
|
||||
// - Addressables must not accept events to non-HTTPS endpoints
|
||||
// - Addressables must only advertise HTTPS endpoints
|
||||
Strict Flag = "Strict"
|
||||
// Permissive is only applicable to the TransportEncryption feature.
|
||||
// The following applies:
|
||||
// - Addressables should accept events at both HTTP and HTTPS endpoints
|
||||
// - Addressables should advertise both HTTP and HTTPS endpoints
|
||||
// - Producers should prefer to send events to HTTPS endpoints, if available
|
||||
Permissive Flag = "Permissive"
|
||||
)
|
||||
|
||||
// Flags is a map containing all the enabled/disabled flags for the experimental features.
|
||||
|
|
@ -50,6 +61,16 @@ func (e Flags) IsAllowed(featureName string) bool {
|
|||
return e.IsEnabled(featureName) || (e != nil && e[featureName] == Allowed)
|
||||
}
|
||||
|
||||
// IsPermissiveTransportEncryption returns true if the TransportEncryption feature is in Permissive mode.
|
||||
func (e Flags) IsPermissiveTransportEncryption() bool {
|
||||
return e != nil && e[TransportEncryption] == Permissive
|
||||
}
|
||||
|
||||
// IsStrictTransportEncryption returns true if the TransportEncryption feature is in Strict mode.
|
||||
func (e Flags) IsStrictTransportEncryption() bool {
|
||||
return e != nil && e[TransportEncryption] == Strict
|
||||
}
|
||||
|
||||
// NewFlagsConfigFromMap creates a Flags from the supplied Map
|
||||
func NewFlagsConfigFromMap(data map[string]string) (Flags, error) {
|
||||
flags := Flags{}
|
||||
|
|
@ -66,6 +87,10 @@ func NewFlagsConfigFromMap(data map[string]string) (Flags, error) {
|
|||
flags[sanitizedKey] = Disabled
|
||||
} else if strings.EqualFold(v, string(Enabled)) {
|
||||
flags[sanitizedKey] = Enabled
|
||||
} else if strings.EqualFold(v, string(Permissive)) {
|
||||
flags[sanitizedKey] = Permissive
|
||||
} else if strings.EqualFold(v, string(Strict)) {
|
||||
flags[sanitizedKey] = Strict
|
||||
} else {
|
||||
return Flags{}, fmt.Errorf("cannot parse the boolean flag '%s' = '%s'. Allowed values: [true, false]", k, v)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,9 +17,10 @@ limitations under the License.
|
|||
package feature
|
||||
|
||||
const (
|
||||
KReferenceGroup = "kreference-group"
|
||||
DeliveryRetryAfter = "delivery-retryafter"
|
||||
DeliveryTimeout = "delivery-timeout"
|
||||
KReferenceMapping = "kreference-mapping"
|
||||
NewTriggerFilters = "new-trigger-filters"
|
||||
KReferenceGroup = "kreference-group"
|
||||
DeliveryRetryAfter = "delivery-retryafter"
|
||||
DeliveryTimeout = "delivery-timeout"
|
||||
KReferenceMapping = "kreference-mapping"
|
||||
NewTriggerFilters = "new-trigger-filters"
|
||||
TransportEncryption = "transport-encryption"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ func (in *ChannelStatus) DeepCopyInto(out *ChannelStatus) {
|
|||
if in.Channel != nil {
|
||||
in, out := &in.Channel, &out.Channel
|
||||
*out = new(duckv1.KReference)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
@ -322,7 +322,7 @@ func (in *SubscriptionList) DeepCopyObject() runtime.Object {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *SubscriptionSpec) DeepCopyInto(out *SubscriptionSpec) {
|
||||
*out = *in
|
||||
out.Channel = in.Channel
|
||||
in.Channel.DeepCopyInto(&out.Channel)
|
||||
if in.Subscriber != nil {
|
||||
in, out := &in.Subscriber, &out.Subscriber
|
||||
*out = new(duckv1.Destination)
|
||||
|
|
|
|||
|
|
@ -657,7 +657,7 @@ function foreach_go_module() {
|
|||
echo "Command '${cmd}' failed in module $gomod_dir: $failed" >&2
|
||||
return $failed
|
||||
fi
|
||||
done < <(go_run knative.dev/test-infra/tools/modscope@latest ls -p)
|
||||
done < <(go_run knative.dev/toolbox/modscope@latest ls -p)
|
||||
}
|
||||
|
||||
# Update go deps.
|
||||
|
|
@ -709,7 +709,7 @@ function __go_update_deps_for_module() {
|
|||
else
|
||||
group "Upgrading to release ${RELEASE}"
|
||||
fi
|
||||
FLOATING_DEPS+=( $(go_run knative.dev/test-infra/buoy@latest float ./go.mod "${buoyArgs[@]}") )
|
||||
FLOATING_DEPS+=( $(go_run knative.dev/toolbox/buoy@latest float ./go.mod "${buoyArgs[@]}") )
|
||||
if [[ ${#FLOATING_DEPS[@]} > 0 ]]; then
|
||||
echo "Floating deps to ${FLOATING_DEPS[@]}"
|
||||
go get -d ${FLOATING_DEPS[@]}
|
||||
|
|
@ -754,7 +754,7 @@ function __go_update_deps_for_module() {
|
|||
# Intended to be used like:
|
||||
# export MODULE_NAME=$(go_mod_module_name)
|
||||
function go_mod_module_name() {
|
||||
go_run knative.dev/test-infra/tools/modscope@latest current
|
||||
go_run knative.dev/toolbox/modscope@latest current
|
||||
}
|
||||
|
||||
# Return a GOPATH to a temp directory. Works around the out-of-GOPATH issues
|
||||
|
|
@ -778,7 +778,7 @@ function go_mod_gopath_hack() {
|
|||
# Run kntest tool
|
||||
# Parameters: $1..$n - parameters passed to the tool.
|
||||
function run_kntest() {
|
||||
go_run knative.dev/test-infra/tools/kntest/cmd/kntest@latest "$@"
|
||||
go_run knative.dev/toolbox/kntest/cmd/kntest@latest "$@"
|
||||
}
|
||||
|
||||
# Run go-licenses to update licenses.
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ function __build_test_runner_for_module() {
|
|||
# Don't merge these two lines, or return code will always be 0.
|
||||
# Get all build tags in go code (ignore /vendor, /hack and /third_party)
|
||||
local tags
|
||||
tags="$(go run knative.dev/test-infra/tools/go-ls-tags@latest --joiner=,)"
|
||||
tags="$(go run knative.dev/toolbox/go-ls-tags@latest --joiner=,)"
|
||||
local go_pkg_dirs
|
||||
go_pkg_dirs="$(go list -tags "${tags}" ./...)" || return $?
|
||||
if [[ -z "${go_pkg_dirs}" ]]; then
|
||||
|
|
|
|||
|
|
@ -38,7 +38,16 @@ import (
|
|||
// typically stored in the object's `status`, as this information may
|
||||
// be generated by the controller.
|
||||
type Addressable struct {
|
||||
// Name is the name of the address.
|
||||
// +optional
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
||||
URL *apis.URL `json:"url,omitempty"`
|
||||
|
||||
// CACerts is the Certification Authority (CA) certificates in PEM format
|
||||
// according to https://www.rfc-editor.org/rfc/rfc7468.
|
||||
// +optional
|
||||
CACerts *string `json:"CACerts,omitempty"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -62,7 +71,15 @@ type AddressableType struct {
|
|||
// AddressStatus shows how we expect folks to embed Addressable in
|
||||
// their Status field.
|
||||
type AddressStatus struct {
|
||||
// Address is a single Addressable address.
|
||||
// If Addresses is present, Address will be ignored by clients.
|
||||
// +optional
|
||||
Address *Addressable `json:"address,omitempty"`
|
||||
|
||||
// Addresses is a list of addresses for different protocols (HTTP and HTTPS)
|
||||
// If Addresses is present, Address must be ignored by clients.
|
||||
// +optional
|
||||
Addresses []Addressable `json:"addresses,omitempty"`
|
||||
}
|
||||
|
||||
// Verify AddressableType resources meet duck contracts.
|
||||
|
|
@ -89,9 +106,11 @@ func (a *Addressable) ConvertFrom(ctx context.Context, from apis.Convertible) er
|
|||
|
||||
// Populate implements duck.Populatable
|
||||
func (t *AddressableType) Populate() {
|
||||
name := "http"
|
||||
t.Status = AddressStatus{
|
||||
&Addressable{
|
||||
Address: &Addressable{
|
||||
// Populate ALL fields
|
||||
Name: &name,
|
||||
URL: &apis.URL{
|
||||
Scheme: "http",
|
||||
Host: "foo.com",
|
||||
|
|
|
|||
|
|
@ -31,6 +31,13 @@ type Destination struct {
|
|||
// URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
|
||||
// +optional
|
||||
URI *apis.URL `json:"uri,omitempty"`
|
||||
|
||||
// CACerts are Certification Authority (CA) certificates in PEM format
|
||||
// according to https://www.rfc-editor.org/rfc/rfc7468.
|
||||
// If set, these CAs are appended to the set of CAs provided
|
||||
// by the Addressable target, if any.
|
||||
// +optional
|
||||
CACerts *string `json:"CACerts,omitempty"`
|
||||
}
|
||||
|
||||
// Validate the Destination has all the necessary fields and check the
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ type KReference struct {
|
|||
// Note: This API is EXPERIMENTAL and might break anytime. For more details: https://github.com/knative/eventing/issues/5086
|
||||
// +optional
|
||||
Group string `json:"group,omitempty"`
|
||||
|
||||
// Address points to a specific Address Name.
|
||||
// +optional
|
||||
Address *string `json:"address,omitempty"`
|
||||
}
|
||||
|
||||
func (kr *KReference) Validate(ctx context.Context) *apis.FieldError {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,13 @@ func (in *AddressStatus) DeepCopyInto(out *AddressStatus) {
|
|||
*out = new(Addressable)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Addresses != nil {
|
||||
in, out := &in.Addresses, &out.Addresses
|
||||
*out = make([]Addressable, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -50,11 +57,21 @@ func (in *AddressStatus) DeepCopy() *AddressStatus {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Addressable) DeepCopyInto(out *Addressable) {
|
||||
*out = *in
|
||||
if in.Name != nil {
|
||||
in, out := &in.Name, &out.Name
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.URL != nil {
|
||||
in, out := &in.URL, &out.URL
|
||||
*out = new(apis.URL)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.CACerts != nil {
|
||||
in, out := &in.CACerts, &out.CACerts
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -332,13 +349,18 @@ func (in *Destination) DeepCopyInto(out *Destination) {
|
|||
if in.Ref != nil {
|
||||
in, out := &in.Ref, &out.Ref
|
||||
*out = new(KReference)
|
||||
**out = **in
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.URI != nil {
|
||||
in, out := &in.URI, &out.URI
|
||||
*out = new(apis.URL)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.CACerts != nil {
|
||||
in, out := &in.CACerts, &out.CACerts
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -355,6 +377,11 @@ func (in *Destination) DeepCopy() *Destination {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *KReference) DeepCopyInto(out *KReference) {
|
||||
*out = *in
|
||||
if in.Address != nil {
|
||||
in, out := &in.Address, &out.Address
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,16 @@ import (
|
|||
// typically stored in the object's `status`, as this information may
|
||||
// be generated by the controller.
|
||||
type Addressable struct {
|
||||
// Name is the name of the address.
|
||||
// +optional
|
||||
Name *string `json:"name,omitempty"`
|
||||
|
||||
URL *apis.URL `json:"url,omitempty"`
|
||||
|
||||
// CACerts is the Certification Authority (CA) certificates in PEM format
|
||||
// according to https://www.rfc-editor.org/rfc/rfc7468.
|
||||
// +optional
|
||||
CACerts *string `json:"CACerts,omitempty"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -64,7 +73,15 @@ type AddressableType struct {
|
|||
// AddressStatus shows how we expect folks to embed Addressable in
|
||||
// their Status field.
|
||||
type AddressStatus struct {
|
||||
// Address is a single Addressable address.
|
||||
// If Addresses is present, Address will be ignored by clients.
|
||||
// +optional
|
||||
Address *Addressable `json:"address,omitempty"`
|
||||
|
||||
// Addresses is a list of addresses for different protocols (HTTP and HTTPS)
|
||||
// If Addresses is present, Address must be ignored by clients.
|
||||
// +optional
|
||||
Addresses []Addressable `json:"addresses,omitempty"`
|
||||
}
|
||||
|
||||
// Verify AddressableType resources meet duck contracts.
|
||||
|
|
@ -102,9 +119,11 @@ func (a *Addressable) ConvertFrom(ctx context.Context, from apis.Convertible) er
|
|||
|
||||
// Populate implements duck.Populatable
|
||||
func (t *AddressableType) Populate() {
|
||||
name := "http"
|
||||
t.Status = AddressStatus{
|
||||
&Addressable{
|
||||
Address: &Addressable{
|
||||
// Populate ALL fields
|
||||
Name: &name,
|
||||
URL: &apis.URL{
|
||||
Scheme: "http",
|
||||
Host: "foo.com",
|
||||
|
|
|
|||
|
|
@ -44,6 +44,13 @@ type Destination struct {
|
|||
// URI can be an absolute URL(non-empty scheme and non-empty host) pointing to the target or a relative URI. Relative URIs will be resolved using the base URI retrieved from Ref.
|
||||
// +optional
|
||||
URI *apis.URL `json:"uri,omitempty"`
|
||||
|
||||
// CACerts are Certification Authority (CA) certificates in PEM format
|
||||
// according to https://www.rfc-editor.org/rfc/rfc7468.
|
||||
// If set, these CAs are appended to the set of CAs provided
|
||||
// by the Addressable target, if any.
|
||||
// +optional
|
||||
CACerts *string `json:"CACerts,omitempty"`
|
||||
}
|
||||
|
||||
func (dest *Destination) Validate(ctx context.Context) *apis.FieldError {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,13 @@ func (in *AddressStatus) DeepCopyInto(out *AddressStatus) {
|
|||
*out = new(Addressable)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.Addresses != nil {
|
||||
in, out := &in.Addresses, &out.Addresses
|
||||
*out = make([]Addressable, len(*in))
|
||||
for i := range *in {
|
||||
(*in)[i].DeepCopyInto(&(*out)[i])
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -51,11 +58,21 @@ func (in *AddressStatus) DeepCopy() *AddressStatus {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *Addressable) DeepCopyInto(out *Addressable) {
|
||||
*out = *in
|
||||
if in.Name != nil {
|
||||
in, out := &in.Name, &out.Name
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.URL != nil {
|
||||
in, out := &in.URL, &out.URL
|
||||
*out = new(apis.URL)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.CACerts != nil {
|
||||
in, out := &in.CACerts, &out.CACerts
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -264,6 +281,11 @@ func (in *Destination) DeepCopyInto(out *Destination) {
|
|||
*out = new(apis.URL)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.CACerts != nil {
|
||||
in, out := &in.CACerts, &out.CACerts
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ func ServeHealthProbes(ctx context.Context, port int) error {
|
|||
}()
|
||||
|
||||
// start the web server on port and accept requests
|
||||
logger.Infof("Probes server listening on port %s", port)
|
||||
logger.Infof("Probes server listening on port %d", port)
|
||||
if err := server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,19 +41,21 @@ const (
|
|||
DomainEnv = "METRICS_DOMAIN"
|
||||
|
||||
// The following keys are used to configure metrics reporting.
|
||||
// See https://github.com/knative/serving/blob/main/config/config-observability.yaml
|
||||
// See https://github.com/knative/serving/blob/main/config/core/configmaps/observability.yaml
|
||||
// for details.
|
||||
collectorAddressKey = "metrics.opencensus-address"
|
||||
collectorSecureKey = "metrics.opencensus-require-tls"
|
||||
reportingPeriodKey = "metrics.reporting-period-seconds"
|
||||
|
||||
defaultBackendEnvName = "DEFAULT_METRICS_BACKEND"
|
||||
defaultPrometheusPort = 9090
|
||||
maxPrometheusPort = 65535
|
||||
minPrometheusPort = 1024
|
||||
defaultPrometheusHost = "0.0.0.0"
|
||||
prometheusPortEnvName = "METRICS_PROMETHEUS_PORT"
|
||||
prometheusHostEnvName = "METRICS_PROMETHEUS_HOST"
|
||||
defaultBackendEnvName = "DEFAULT_METRICS_BACKEND"
|
||||
defaultPrometheusPort = 9090
|
||||
defaultPrometheusReportingPeriod = 5
|
||||
defaultOpenCensusReportingPeriod = 60
|
||||
maxPrometheusPort = 65535
|
||||
minPrometheusPort = 1024
|
||||
defaultPrometheusHost = "0.0.0.0"
|
||||
prometheusPortEnvName = "METRICS_PROMETHEUS_PORT"
|
||||
prometheusHostEnvName = "METRICS_PROMETHEUS_HOST"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -206,9 +208,9 @@ func createMetricsConfig(_ context.Context, ops ExporterOptions) (*metricsConfig
|
|||
} else {
|
||||
switch mc.backendDestination {
|
||||
case openCensus:
|
||||
mc.reportingPeriod = time.Minute
|
||||
mc.reportingPeriod = defaultOpenCensusReportingPeriod * time.Second
|
||||
case prometheus:
|
||||
mc.reportingPeriod = 5 * time.Second
|
||||
mc.reportingPeriod = defaultPrometheusReportingPeriod * time.Second
|
||||
}
|
||||
}
|
||||
return &mc, nil
|
||||
|
|
|
|||
|
|
@ -71,6 +71,10 @@ type ObservabilityConfig struct {
|
|||
// OpenCensus. "None" disables all backends.
|
||||
RequestMetricsBackend string
|
||||
|
||||
// RequestMetricsReportingPeriodSeconds specifies the request metrics reporting period in sec at queue proxy, eg 1.
|
||||
// If a zero or negative value is passed the default reporting period is used (10 secs).
|
||||
RequestMetricsReportingPeriodSeconds int
|
||||
|
||||
// EnableProfiling indicates whether it is allowed to retrieve runtime profiling data from
|
||||
// the pods via an HTTP server in the format expected by the pprof visualization tool.
|
||||
EnableProfiling bool
|
||||
|
|
@ -114,6 +118,12 @@ func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*Observab
|
|||
return oc, nil
|
||||
}
|
||||
|
||||
defaultRequestMetricsReportingPeriod, err := getDefaultRequestMetricsReportingPeriod(configMap.Data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
oc.RequestMetricsReportingPeriodSeconds = defaultRequestMetricsReportingPeriod
|
||||
|
||||
if err := cm.Parse(configMap.Data,
|
||||
cm.AsBool("logging.enable-var-log-collection", &oc.EnableVarLogCollection),
|
||||
cm.AsString("logging.revision-url-template", &oc.LoggingURLTemplate),
|
||||
|
|
@ -121,6 +131,7 @@ func NewObservabilityConfigFromConfigMap(configMap *corev1.ConfigMap) (*Observab
|
|||
cm.AsBool(EnableReqLogKey, &oc.EnableRequestLog),
|
||||
cm.AsBool(EnableProbeReqLogKey, &oc.EnableProbeRequestLog),
|
||||
cm.AsString("metrics.request-metrics-backend-destination", &oc.RequestMetricsBackend),
|
||||
cm.AsInt("metrics.request-metrics-reporting-period-seconds", &oc.RequestMetricsReportingPeriodSeconds),
|
||||
cm.AsBool("profiling.enable", &oc.EnableProfiling),
|
||||
cm.AsString("metrics.opencensus-address", &oc.MetricsCollectorAddress),
|
||||
); err != nil {
|
||||
|
|
@ -163,3 +174,27 @@ func ConfigMapName() string {
|
|||
}
|
||||
return "config-observability"
|
||||
}
|
||||
|
||||
// Use the same as `metrics.reporting-period-seconds` for the default
|
||||
// of `metrics.request-metrics-reporting-period-seconds`
|
||||
func getDefaultRequestMetricsReportingPeriod(data map[string]string) (int, error) {
|
||||
// Default backend is prometheus
|
||||
period := defaultPrometheusReportingPeriod
|
||||
if repStr := data[reportingPeriodKey]; repStr != "" {
|
||||
repInt, err := strconv.Atoi(repStr)
|
||||
if err != nil {
|
||||
return -1, fmt.Errorf("invalid %s value %q", reportingPeriodKey, repStr)
|
||||
}
|
||||
period = repInt
|
||||
} else {
|
||||
if raw, ok := data["metrics.request-metrics-backend-destination"]; ok {
|
||||
switch metricsBackend(raw) {
|
||||
case prometheus:
|
||||
period = defaultPrometheusReportingPeriod
|
||||
case openCensus:
|
||||
period = defaultOpenCensusReportingPeriod
|
||||
}
|
||||
}
|
||||
}
|
||||
return period, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ func (in *DomainMappingList) DeepCopyObject() runtime.Object {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DomainMappingSpec) DeepCopyInto(out *DomainMappingSpec) {
|
||||
*out = *in
|
||||
out.Ref = in.Ref
|
||||
in.Ref.DeepCopyInto(&out.Ref)
|
||||
if in.TLS != nil {
|
||||
in, out := &in.TLS, &out.TLS
|
||||
*out = new(SecretTLS)
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ func (in *DomainMappingList) DeepCopyObject() runtime.Object {
|
|||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *DomainMappingSpec) DeepCopyInto(out *DomainMappingSpec) {
|
||||
*out = *in
|
||||
out.Ref = in.Ref
|
||||
in.Ref.DeepCopyInto(&out.Ref)
|
||||
if in.TLS != nil {
|
||||
in, out := &in.TLS, &out.TLS
|
||||
*out = new(SecretTLS)
|
||||
|
|
|
|||
|
|
@ -919,7 +919,7 @@ k8s.io/utils/net
|
|||
k8s.io/utils/pointer
|
||||
k8s.io/utils/strings/slices
|
||||
k8s.io/utils/trace
|
||||
# knative.dev/eventing v0.36.1-0.20230306130433-1ff36e1b656d
|
||||
# knative.dev/eventing v0.36.1-0.20230405220638-d9910407d0f4
|
||||
## explicit; go 1.18
|
||||
knative.dev/eventing/pkg/apis/config
|
||||
knative.dev/eventing/pkg/apis/duck
|
||||
|
|
@ -947,10 +947,10 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1
|
|||
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake
|
||||
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2
|
||||
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake
|
||||
# knative.dev/hack v0.0.0-20230228173453-3de51aff69a3
|
||||
# knative.dev/hack v0.0.0-20230330174700-1421f120c36b
|
||||
## explicit; go 1.18
|
||||
knative.dev/hack
|
||||
# knative.dev/networking v0.0.0-20230301131055-c692e9e6afe1
|
||||
# knative.dev/networking v0.0.0-20230404133438-0b998c1bdcef
|
||||
## explicit; go 1.18
|
||||
knative.dev/networking/pkg
|
||||
knative.dev/networking/pkg/apis/networking
|
||||
|
|
@ -965,7 +965,7 @@ knative.dev/networking/pkg/http/probe
|
|||
knative.dev/networking/pkg/http/proxy
|
||||
knative.dev/networking/pkg/http/stats
|
||||
knative.dev/networking/pkg/k8s
|
||||
# knative.dev/pkg v0.0.0-20230306194819-b77a78c6c0ad
|
||||
# knative.dev/pkg v0.0.0-20230404101938-ee73c9355c9d
|
||||
## explicit; go 1.18
|
||||
knative.dev/pkg/apis
|
||||
knative.dev/pkg/apis/duck
|
||||
|
|
@ -1015,7 +1015,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.36.1-0.20230306232326-587f58791d1b
|
||||
# knative.dev/serving v0.36.1-0.20230405152938-23f7e2bc5ce4
|
||||
## explicit; go 1.18
|
||||
knative.dev/serving/pkg/apis/autoscaling
|
||||
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
|
||||
|
|
|
|||
Loading…
Reference in New Issue