Skip to content

Commit

Permalink
upgrade to latest dependencies (knative#1523)
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 517ef02...d016976:
  > d016976 Update community files (# 2353)
  > b35fcdd kmap changes (# 2355)
  > a99300d kmap (# 2354)
  > 5708c4c codegen - support multiple annotation keys (# 2350)
  > 22c0eba Update community files (# 2352)
  > 54071ad Add retry checker for DNS failure from Ingress (# 2351)
  > d82be48 Disable controllers using a command-line flag (# 2339)
bumping knative.dev/eventing 1241853...4e372e5:
  > 4e372e5 Update personas.md (# 5917)
  > a5081ac Update community files (# 5919)
  > 13e8c96 Retry on Webhook EOF in conformance tests (# 5916)
  > 11a40c6 upgrade to latest dependencies (# 5914)
  > e7452e6 upgrade to latest dependencies (# 5913)
  > 791034b Update community files (# 5912)
  > 694b91a Deduplicate retry Webhook EOF error functions (# 5911)
  > fc8e152 upgrade to latest dependencies (# 5910)
bumping knative.dev/serving dae92fc...a816f59:
  > a816f59 Update community files (# 12320)
  > f302760 upgrade to latest dependencies (# 12321)
  > 97c2b4d Refactor request log handler chain in queue proxy (# 12318)
  > fd5af33 Update net-kourier nightly (# 12317)
  > 697e8d2 upgrade to latest dependencies (# 12315)
  > 6fd79c6 Update net-kourier nightly (# 12310)
  > 18586ea Convert freezer request methods to pointer receivers (# 12312)
  > 218c102 Update net-contour nightly (# 12311)
  > dd6badb Update net-istio nightly (# 12309)
  > b4768b1 Add default cluster-side min-scale (# 12290)
  > 4e86ca1 upgrade to latest dependencies (# 12308)
  > 0761bf7 use annotation helpers (# 12307)
  > 0ed6619 drop kong and ambassador (# 12305)
  > fe1a7b8 Drop myself from the support roster (# 12306)
  > e16a157 Update net-certmanager nightly (# 12302)
  > deb8a0b upgrade to latest dependencies (# 12304)
  > b9c3893 handling retries within pause/resume functions (# 12279)
  > 6213ab2 Update community files (# 12303)
  > a902f25 Update net-contour nightly (# 12301)
  > e3e3231 Drop now-unneeded unix socket from queue proxy (# 12298)
  > 7e71496 Update comment referencing now-deleted exec probe (# 12297)
  > 9930f5b upgrade to latest dependencies (# 12293)
  > 83c5bd5 drop use of networking.DisableWildcardCertLabelKey (# 12292)
  > d46d51a use networking constants vs hardcoding (# 12291)
  > 3a20c13 Update net-kourier nightly (# 12285)
  > 76263de Update net-istio nightly (# 12284)
bumping knative.dev/hack 128cf01...69a2295:
  > 69a2295 Update community files (# 117)
bumping knative.dev/networking 3f45c8b...bab26a8:
  > bab26a8 Update community files (# 573)
  > ff0c3ce revert the case change for the wildcard cert domain label (# 572)
  > 7f3da83 Introduce kebab-case annotation variants  (# 562)
  > 23992f1 upgrade to latest dependencies (# 571)
  > 4d634ef Use Protocol instead of Option (# 570)
  > 6547bb6 include helpers to lookup annotations (# 567)
  > b96980e upgrade to latest dependencies (# 569)
  > a023f11 Update community files (# 568)
  > 66e4736 upgrade to latest dependencies (# 566)
  > 05b2283 remove networking.DisableWildcardCertLabelKey (# 565)
  > f0eb667 drop used stubs (# 564)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Nov 22, 2021
1 parent d0adde4 commit 89e2c3e
Show file tree
Hide file tree
Showing 24 changed files with 464 additions and 160 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ require (
k8s.io/cli-runtime v0.21.4
k8s.io/client-go v0.21.4
k8s.io/code-generator v0.21.4
knative.dev/eventing v0.27.1-0.20211116113552-12418535e186
knative.dev/hack v0.0.0-20211112192837-128cf0150a69
knative.dev/networking v0.0.0-20211116075352-3f45c8b29bc1
knative.dev/pkg v0.0.0-20211115071955-517ef0292b53
knative.dev/serving v0.27.1-0.20211116120552-dae92fcaf11a
knative.dev/eventing v0.27.1-0.20211119140523-4e372e5242a0
knative.dev/hack v0.0.0-20211117134436-69a2295d54ce
knative.dev/networking v0.0.0-20211119210323-bab26a807fa3
knative.dev/pkg v0.0.0-20211120133512-d016976f2567
knative.dev/serving v0.27.1-0.20211119192723-a816f59ed989
sigs.k8s.io/yaml v1.3.0
)
30 changes: 14 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1710,26 +1710,24 @@ k8s.io/legacy-cloud-providers v0.21.0/go.mod h1:bNxo7gDg+PGkBmT/MFZswLTWdSWK9kAl
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/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-20211111075937-0c3d96f98a71/go.mod h1:B1UvFZohVEmH+Fruuimvj5uJZcGde8F5ZhtYapFnyVg=
knative.dev/eventing v0.27.1-0.20211116113552-12418535e186 h1:Bcz4Wul/NOx+o1XdAhZecupkaUcHg781FBCrlfTjDbU=
knative.dev/eventing v0.27.1-0.20211116113552-12418535e186/go.mod h1:eJGGW9Rbrq585P2Ppc0a+nDLfJzGXe/R8eMXcNwUKlI=
knative.dev/caching v0.0.0-20211118070729-77b107b17fef/go.mod h1:X+9PhcWYdvl0pdZ/cJpiXIERNNCS2CLSk8r2bJAsle4=
knative.dev/eventing v0.27.1-0.20211119140523-4e372e5242a0 h1:uklBDn7Ihkd7w1wEYKtkhJDpbiXjjvNsp7IfhQgBz2o=
knative.dev/eventing v0.27.1-0.20211119140523-4e372e5242a0/go.mod h1:XPbYrmewuiYE3cHHDUJWRkAqvyNJcIMFJEg7iNs9ZFM=
knative.dev/hack v0.0.0-20211101195839-11d193bf617b/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211105231158-29f86c2653b5/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211108170701-96aac1c30be3/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211112192837-128cf0150a69 h1:/3NW6B9VeqAwpW0ZAS+8xLfwgVMIqH+CPmesDATovhk=
knative.dev/hack v0.0.0-20211112192837-128cf0150a69/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack/schema v0.0.0-20211112192837-128cf0150a69/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/networking v0.0.0-20211111131538-526348e63718/go.mod h1:XskFTw7FTMeGwD60lrTT+P3BNp59fJxLS0019WNHq9o=
knative.dev/networking v0.0.0-20211116075352-3f45c8b29bc1 h1:CSjr5XM8oMlftjSENHSB+sxdr1k36CWlJwq6ou8TQM8=
knative.dev/networking v0.0.0-20211116075352-3f45c8b29bc1/go.mod h1:+MZjHIMRatw4Nf2U9xDJBStXUDcdjAcbrZL7iGU6tjY=
knative.dev/hack v0.0.0-20211117134436-69a2295d54ce h1:dPARWsX/9nmWg9g09MtGnsn7nZUwjA0UWpKSUozgS6g=
knative.dev/hack v0.0.0-20211117134436-69a2295d54ce/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack/schema v0.0.0-20211117134436-69a2295d54ce/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/networking v0.0.0-20211119083222-ff0c3ce006d6/go.mod h1:z4CZcjF4UrkUL0ULxAbXpjNlfYJYADCOFaO6+pK4L/I=
knative.dev/networking v0.0.0-20211119210323-bab26a807fa3 h1:gSLMDkmk6qi3vdE/4hVHNAOld0B3YTglxjhvkqzZfmM=
knative.dev/networking v0.0.0-20211119210323-bab26a807fa3/go.mod h1:z4CZcjF4UrkUL0ULxAbXpjNlfYJYADCOFaO6+pK4L/I=
knative.dev/pkg v0.0.0-20211101212339-96c0204a70dc/go.mod h1:SkfDk9bWIiNZD7XtILGkG7AKVyF/M6M0bGxLgl0SYL8=
knative.dev/pkg v0.0.0-20211108064904-3cc697a3cb09/go.mod h1:YiSfFDMdYHZTuO5XS8UzxSeOEmocy+Kb2YOGik9C8lw=
knative.dev/pkg v0.0.0-20211111114938-0b0c3390a475/go.mod h1:plYIuKk6WNC9LyiG/9xBnOBYuxO0Ro6xN0z7iXWVUtk=
knative.dev/pkg v0.0.0-20211115071955-517ef0292b53 h1:rzKI45d30Gi6Wyg2FgPOSqVB1wYwHOjG4cB6sAFkyVk=
knative.dev/pkg v0.0.0-20211115071955-517ef0292b53/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw=
knative.dev/pkg v0.0.0-20211117215328-5708c4c44232/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw=
knative.dev/pkg v0.0.0-20211120133512-d016976f2567 h1:IPQ6QKOvMIRX9/UI1cAtSl36+CbGv8HErSvID03CRr4=
knative.dev/pkg v0.0.0-20211120133512-d016976f2567/go.mod h1:VqUp1KWJqpTDNoiSI/heaX3uMdubImslJE2tBkP+Bbw=
knative.dev/reconciler-test v0.0.0-20211112132636-ae9e2e21972f/go.mod h1:gTsbLk496j/M9xqMpx/liyCQ0X3bwDpRtcs2Zzws364=
knative.dev/serving v0.27.1-0.20211116120552-dae92fcaf11a h1:4HvaidDS83x+iu7bag7+JAAJ/rS6J4+5Nj5mWLYqVA8=
knative.dev/serving v0.27.1-0.20211116120552-dae92fcaf11a/go.mod h1:sldNhpKRW7/XlYR6hMwdUQfWCWOYNxHmgi5u1lBG3jM=
knative.dev/serving v0.27.1-0.20211119192723-a816f59ed989 h1:dhG9nPjTn/M3FrxT5dcE7uVrKs2GAMZkh94Ky6bR3OM=
knative.dev/serving v0.27.1-0.20211119192723-a816f59ed989/go.mod h1:28VFmU/8wz8fDLUmKRVCasS76x45WVhnJVLQ9p14tK8=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
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=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@ import (

var (
allowedAnnotations = sets.NewString(
DisableAutoTLSAnnotationKey,
IngressClassAnnotationKey,
CertificateClassAnnotationKey,
DisableAutoTLSAnnotationKey,
HTTPOptionAnnotationKey,

IngressClassAnnotationAltKey,
CertificateClassAnnotationAltKey,
DisableAutoTLSAnnotationAltKey,
HTTPProtocolAnnotationKey,
)
)

Expand Down
109 changes: 81 additions & 28 deletions vendor/knative.dev/networking/pkg/apis/networking/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,6 @@ const (
// GroupName is the name for the networking API group.
GroupName = "networking.internal.knative.dev"

// IngressClassAnnotationKey is the annotation for the
// explicit class of Ingress that a particular resource has
// opted into. For example,
//
// networking.knative.dev/ingress.class: some-network-impl
//
// This uses a different domain because unlike the resource, it is
// user-facing.
//
// The parent resource may use its own annotations to choose the
// annotation value for the Ingress it uses. Based on such
// value a different reconciliation logic may be used (for examples,
// Istio-based Ingress will reconcile into a VirtualService).
IngressClassAnnotationKey = "networking.knative.dev/ingress.class"

// DisableAutoTLSAnnotationKey is the annotation key attached to a Knative Service/DomainMapping
// to indicate that AutoTLS should not be enabled for it.
DisableAutoTLSAnnotationKey = "networking.knative.dev/disableAutoTLS"

// HTTPOptionAnnotationKey is the annotation key attached to a Knative Service/DomainMapping
// to indicate the HTTP option of it.
HTTPOptionAnnotationKey = "networking.knative.dev/httpOption"

// IngressLabelKey is the label key attached to underlying network programming
// resources to indicate which Ingress triggered their creation.
IngressLabelKey = GroupName + "/ingress"
Expand All @@ -58,6 +35,11 @@ const (
// RolloutAnnotationKey is the annotation key for storing
// the rollout state in the Annotations of the Kingress or Route.Status.
RolloutAnnotationKey = GroupName + "/rollout"
)

const (
// PublicGroupName is the name for hte public networking API group
PublicGroupName = "networking.knative.dev"

// CertificateClassAnnotationKey is the annotation for the
// explicit class of Certificate that a particular resource has
Expand All @@ -72,19 +54,90 @@ const (
// annotation value for the Certificate it uses. Based on such
// value a different reconciliation logic may be used (for examples,
// Cert-Manager-based Certificate will reconcile into a Cert-Manager Certificate).
CertificateClassAnnotationKey = "networking.knative.dev/certificate.class"
CertificateClassAnnotationKey = PublicGroupName + "/certificate.class"

// DisableWildcardCertLabelKey is the label key attached to a namespace to indicate that
// a wildcard certificate should be not created for it.
DisableWildcardCertLabelKey = "networking.knative.dev/disableWildcardCert"
// CertificateClassAnnotationAltKey is an alternative casing to CertificateClassAnnotationKey
//
// This annotation is meant to be applied to Knative Services or Routes. Serving
// will translate this to original casing for better compatibility with different
// certificate providers
CertificateClassAnnotationAltKey = PublicGroupName + "/certificate-class"

// DisableAutoTLSAnnotationKey is the annotation key attached to a Knative Service/DomainMapping
// to indicate that AutoTLS should not be enabled for it.
DisableAutoTLSAnnotationKey = PublicGroupName + "/disableAutoTLS"

// DisableAutoTLSAnnotationAltKey is an alternative casing to DisableAutoTLSAnnotationKey
DisableAutoTLSAnnotationAltKey = PublicGroupName + "/disable-auto-tls"

// HTTPOptionAnnotationKey is the annotation key attached to a Knative Service/DomainMapping
// to indicate the HTTP option of it.
HTTPOptionAnnotationKey = PublicGroupName + "/httpOption"

// HTTPProtocolAnnotationKey is an alternative to HTTPOptionAnnotationKey
HTTPProtocolAnnotationKey = PublicGroupName + "/http-protocol"

// IngressClassAnnotationKey is the annotation for the
// explicit class of Ingress that a particular resource has
// opted into. For example,
//
// networking.knative.dev/ingress.class: some-network-impl
//
// This uses a different domain because unlike the resource, it is
// user-facing.
//
// The parent resource may use its own annotations to choose the
// annotation value for the Ingress it uses. Based on such
// value a different reconciliation logic may be used (for examples,
// Istio-based Ingress will reconcile into a VirtualService).
IngressClassAnnotationKey = PublicGroupName + "/ingress.class"

// IngressClassAnnotationAltKey is an alternative casing to IngressClassAnnotationKey
//
// This annotation is meant to be applied to Knative Services or Routes. Serving
// will translate this to original casing for better compatibility with different
// ingress providers
IngressClassAnnotationAltKey = PublicGroupName + "/ingress-class"

// WildcardCertDomainLabelKey is the label key attached to a certificate to indicate the
// domain for which it was issued.
WildcardCertDomainLabelKey = "networking.knative.dev/wildcardDomain"
WildcardCertDomainLabelKey = PublicGroupName + "/wildcardDomain"
)

// Pseudo-constants
var (
// DefaultRetryCount will be set if Attempts not specified.
DefaultRetryCount = 3
)

func GetIngressClass(annotations map[string]string) (val string) {
val, ok := annotations[IngressClassAnnotationAltKey]
if ok {
return val
}
return annotations[IngressClassAnnotationKey]
}

func GetCertificateClass(annotations map[string]string) (val string) {
val, ok := annotations[CertificateClassAnnotationAltKey]
if ok {
return val
}
return annotations[CertificateClassAnnotationKey]
}

func GetHTTPProtocol(annotations map[string]string) (val string) {
val, ok := annotations[HTTPProtocolAnnotationKey]
if ok {
return val
}
return annotations[HTTPOptionAnnotationKey]
}

func GetDisableAutoTLS(annotations map[string]string) (val string) {
val, ok := annotations[DisableAutoTLSAnnotationAltKey]
if ok {
return val
}
return annotations[DisableAutoTLSAnnotationKey]
}
5 changes: 2 additions & 3 deletions vendor/knative.dev/pkg/apis/duck/v1/status_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (

"knative.dev/pkg/apis"
"knative.dev/pkg/apis/duck/ducktypes"
"knative.dev/pkg/kmeta"
"knative.dev/pkg/kmap"
)

// +genduck
Expand Down Expand Up @@ -92,8 +92,7 @@ func (s *Status) GetCondition(t apis.ConditionType) *apis.Condition {
func (s *Status) ConvertTo(ctx context.Context, sink *Status, predicates ...func(apis.ConditionType) bool) {
sink.ObservedGeneration = s.ObservedGeneration
if s.Annotations != nil {
// This will deep copy the map.
sink.Annotations = kmeta.UnionMaps(s.Annotations)
sink.Annotations = kmap.Union(s.Annotations)
}

conditions := make(apis.Conditions, 0, len(s.Conditions))
Expand Down
5 changes: 2 additions & 3 deletions vendor/knative.dev/pkg/apis/duck/v1beta1/status_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

"knative.dev/pkg/apis"
"knative.dev/pkg/apis/duck/ducktypes"
"knative.dev/pkg/kmeta"
"knative.dev/pkg/kmap"
)

// +genduck
Expand Down Expand Up @@ -109,8 +109,7 @@ func (s *Status) GetCondition(t apis.ConditionType) *apis.Condition {
func (s *Status) ConvertTo(ctx context.Context, sink *Status) {
sink.ObservedGeneration = s.ObservedGeneration
if s.Annotations != nil {
// This will deep copy the map.
sink.Annotations = kmeta.UnionMaps(s.Annotations)
sink.Annotations = kmap.Copy(s.Annotations)
}
for _, c := range s.Conditions {
switch c.Type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,74 @@ import "strings"

// Adapted from the k8s.io comment parser https://github.com/kubernetes/gengo/blob/master/types/comments.go

// CommentsTags maps marker prefixes to a set of tags containing keys and values
type CommentTags map[string]CommentTag

// CommentTags maps keys to a list of values
type CommentTag map[string][]string

// ExtractCommentTags parses comments for lines of the form:
//
// 'marker' + ':' "key=value,key2=value2".
// "marker" + "prefix" + ':' + "key=value,key2=value2".
//
// Values are optional; empty map is the default. A tag can be specified more than
// In the following example the marker is '+' and the prefix is 'foo':
// +foo:key=value1,key2=value2,key=value3
//
// Values are optional; empty map is the default. A tag can be specified more than
// one time and all values are returned. If the resulting map has an entry for
// a key, the value (a slice) is guaranteed to have at least 1 element.
//
// Example: if you pass "+" for 'marker', and the following lines are in
// the comments:
// +foo:key=value1,key2=value2
// +foo:key=value1,key2=value2,key=value3
// +bar
//
// Then this function will return:
// map[string]map[string]string{"foo":{"key":value1","key2":"value2"}, "bar": nil}
// map[string]map[string]string{
// "foo":{
// "key": []string{"value1", "value3"},
// "key2": []string{"value2"}
// },
// "bar": {},
// }
//
// Users are not expected to repeat values.
func ExtractCommentTags(marker string, lines []string) map[string]map[string]string {
out := map[string]map[string]string{}
func ExtractCommentTags(marker string, lines []string) CommentTags {
out := CommentTags{}

for _, line := range lines {
line = strings.TrimSpace(line)
if len(line) == 0 || !strings.HasPrefix(line, marker) {
continue
}

options := strings.SplitN(line[len(marker):], ":", 2)
prefix := options[0]

if len(options) == 2 {
vals := strings.Split(options[1], ",")

opts := out[options[0]]
opts := out[prefix]
if opts == nil {
opts = make(map[string]string, len(vals))
opts = make(CommentTag, len(vals))
out[prefix] = opts
}

for _, pair := range vals {
if kv := strings.SplitN(pair, "=", 2); len(kv) == 2 {
opts[kv[0]] = kv[1]
} else if kv[0] != "" {
opts[kv[0]] = ""
kv := strings.SplitN(pair, "=", 2)
if len(kv) == 1 && kv[0] == "" {
continue
}
if _, ok := opts[kv[0]]; !ok {
opts[kv[0]] = []string{}
}
if len(kv) == 2 {
opts[kv[0]] = append(opts[kv[0]], kv[1])
}
}
if len(opts) == 0 {
out[options[0]] = nil
} else {
out[options[0]] = opts
}
} else if len(options) == 1 && options[0] != "" {
if _, has := out[options[0]]; !has {
out[options[0]] = nil
if _, has := out[prefix]; !has {
out[prefix] = CommentTag{}
}
}
}
Expand Down
Loading

0 comments on commit 89e2c3e

Please sign in to comment.