Skip to content

Commit

Permalink
upgrade to latest dependencies (#205)
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 4857ab6...5ae4821:
  > 5ae4821 [release-0.26] Source validation fixes (# 2291)
  > a49a60e [release-0.26] Add IsNum to true when set `-0` to minimumVersion.Pre (# 2290)
bumping knative.dev/serving 76cb92b...4a26f1d:
  > 4a26f1d fix gc annotation prefix (# 12026)
  > bf6ef00 Allow users to set containers[*].securityContext.runAsGroup (# 12003)
  > 89f8a06 Update net-contour nightly (# 12022)
  > e445809 Update net-kourier nightly (# 12021)
  > 2c38be9 Update net-certmanager nightly (# 12020)
  > 1c335d7 Update net-istio nightly (# 12023)
  > b225e6e upgrade to latest dependencies (# 12018)
  > 2858ef6 Update net-istio nightly (# 12013)
  > 1812d3b Wire up MeshCompatibilityMode to ConfigMap property (# 11999)
  > de7b0e6 Remove TODO comment for # 1178 (# 12012)
  > 5792a5c Update net-contour nightly (# 12009)
  > c7aa8f7 Update net-certmanager nightly (# 12007)
  > f552122 Rework timeout handler tests with a fake clock (# 12002)
  > feebf71 drop deprecated imageDigest property (# 11994)
  > afd5297 Update net-kourier nightly (# 12008)
  > 1b945a0 Update community files (# 12004)
  > c1e4685 Update actions (# 12005)
  > 583b182 Add details when bad service account names are used (# 11883)
  > 610762a Adding Route GET and LIST Conformance test (# 11972)
  > 78d1afb Drop K8s 1.19 as it's no longer supported (# 11998)
  > 1085dbe Update net-kourier nightly (# 11991)
  > e359985 Update net-certmanager nightly (# 12001)
  > a4fa6f8 Update net-contour nightly (# 11989)
  > bdd45e2 Update net-istio nightly (# 12000)
  > 8f8b701 Copy healthyPods set to avoid concurrent map access (# 11993)
  > 0f57579 upgrade to latest dependencies (# 11996)
  > 7e6d9f3 Update community files (# 11995)
bumping knative.dev/eventing 602ea29...f031ba2:
  > f031ba2 upgrade to latest dependencies (# 5744)
  > dcb0aea Add record events to released images (# 5734)
  > 24d102d Ce overrides validation (# 5730)
  > 9e66fc9 Adding all resources for NOOP migrator (# 5694)
  > ef48133 KReference mapping experimental feature (# 5599)
  > 407f3cb Update community files (# 5739)
  > 7e80074 Update actions (# 5740)
  > 21155e9 Enhance DLQ CloudEvents with destination (# 5727)
  > deafb9b fixing error message (# 5735)
  > cf630ed 💫 Adding 1.22 k8s to GH Actions (# 5737)
  > 495814c upgrade to latest dependencies (# 5732)
  > 0260d8b Dropping k8s 1.19 as that is unsupported (# 5736)
  > f568fd9 Cleaning up v1b1 testing (# 5733)
  > 20ec9f7 Like serving use generatedName (# 5664)
  > 7c7bd9a Update community files (# 5731)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation authored Sep 22, 2021
1 parent b0f72c9 commit 799eeb8
Show file tree
Hide file tree
Showing 15 changed files with 92 additions and 140 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require (
k8s.io/api v0.21.4
k8s.io/apimachinery v0.21.4
k8s.io/client-go v0.21.4
knative.dev/eventing v0.25.1-0.20210914210007-602ea299ac4e
knative.dev/eventing v0.26.0
knative.dev/hack v0.0.0-20210806075220-815cd312d65c
knative.dev/pkg v0.0.0-20210914164111-4857ab6939e3
knative.dev/serving v0.25.1-0.20210914121411-76cb92b17e88
knative.dev/pkg v0.0.0-20210919202233-5ae482141474
knative.dev/serving v0.26.0
)

replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.2
114 changes: 10 additions & 104 deletions go.sum

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package feature

const (
KReferenceGroup = "kreference-group"
DeliveryTimeout = "delivery-timeout"
KReferenceGroup = "kreference-group"
DeliveryTimeout = "delivery-timeout"
KReferenceMapping = "kreference-mapping"
)
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ func (cs *ApiServerSourceSpec) Validate(ctx context.Context) *apis.FieldError {
errs = errs.Also(apis.ErrMissingField("kind").ViaField("owner"))
}
}

errs = errs.Also(cs.SourceSpec.Validate(ctx))
return errs
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func (cs *ContainerSourceSpec) Validate(ctx context.Context) *apis.FieldError {
}
}
}
errs = errs.Also(cs.SourceSpec.Validate(ctx))
return errs
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
}
}
}
errs = errs.Also(cs.SourceSpec.Validate(ctx))
return errs
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func (fb *SinkBinding) Validate(ctx context.Context) *apis.FieldError {

// Validate implements apis.Validatable
func (fbs *SinkBindingSpec) Validate(ctx context.Context) *apis.FieldError {
return fbs.Subject.Validate(ctx).ViaField("subject").Also(
err := fbs.Subject.Validate(ctx).ViaField("subject").Also(
fbs.Sink.Validate(ctx).ViaField("sink"))
err = err.Also(fbs.SourceSpec.Validate(ctx))
return err
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func (cs *PingSourceSpec) Validate(ctx context.Context) *apis.FieldError {
}
}
}
errs = errs.Also(cs.SourceSpec.Validate(ctx))
return errs
}

Expand Down
52 changes: 52 additions & 0 deletions vendor/knative.dev/networking/pkg/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ const (
// EnableMeshPodAddressabilityKey is the config for enabling pod addressability in mesh.
EnableMeshPodAddressabilityKey = "enable-mesh-pod-addressability"

// MeshCompatibilityModeKey is the config for selecting the mesh compatibility mode.
MeshCompatibilityModeKey = "mesh-compatibility-mode"

// DefaultExternalSchemeKey is the config for defining the scheme of external URLs.
DefaultExternalSchemeKey = "defaultExternalScheme"
)
Expand Down Expand Up @@ -263,6 +266,12 @@ type Config struct {
// accordingly, i.e. to drop fallback solutions for non-pod-addressable systems.
EnableMeshPodAddressability bool

// MeshCompatibilityMode specifies whether consumers, such as Knative Serving, should
// attempt to directly contact pods via their IP (most efficient), or should
// use the Cluster IP (less efficient, but needed if mesh is enabled unless
// the EnableMeshPodAddressability option is enabled).
MeshCompatibilityMode MeshCompatibilityMode

// DefaultExternalScheme defines the scheme used in external URLs if AutoTLS is
// not enabled. Defaults to "http".
DefaultExternalScheme string
Expand All @@ -283,6 +292,32 @@ const (
HTTPRedirected HTTPProtocol = "redirected"
)

// MeshCompatibilityMode is one of enabled (always use ClusterIP), disabled
// (always use Pod IP), or auto (try PodIP, and fall back to ClusterIP if mesh
// is detected).
type MeshCompatibilityMode string

const (
// MeshCompatibilityModeEnabled instructs consumers of network plugins, such as
// Knative Serving, to use ClusterIP when connecting to pods. This is
// required when mesh is enabled (unless EnableMeshPodAddressability is set),
// but is less efficient.
MeshCompatibilityModeEnabled MeshCompatibilityMode = "enabled"

// MeshCompatibilityModeDisabled instructs consumers of network plugins, such as
// Knative Serving, to connect to individual Pod IPs. This is most efficient,
// but will only work with mesh enabled when EnableMeshPodAddressability is
// used.
MeshCompatibilityModeDisabled MeshCompatibilityMode = "disabled"

// MeshCompatibilityModeAuto instructs consumers of network plugins, such as
// Knative Serving, to heuristically determine whether to connect using the
// Cluster IP, or to ocnnect to individual Pod IPs. This is most efficient,
// determine whether mesh is enabled, and fall back from Direct Pod IP
// communication to Cluster IP as needed.
MeshCompatibilityModeAuto MeshCompatibilityMode = "auto"
)

func defaultConfig() *Config {
return &Config{
DefaultIngressClass: IstioIngressClassName,
Expand All @@ -293,6 +328,7 @@ func defaultConfig() *Config {
HTTPProtocol: HTTPEnabled,
AutocreateClusterDomainClaims: false,
DefaultExternalScheme: "http",
MeshCompatibilityMode: MeshCompatibilityModeAuto,
}
}

Expand All @@ -315,6 +351,7 @@ func NewConfigFromMap(data map[string]string) (*Config, error) {
cm.AsBool(AutocreateClusterDomainClaimsKey, &nc.AutocreateClusterDomainClaims),
cm.AsBool(EnableMeshPodAddressabilityKey, &nc.EnableMeshPodAddressability),
cm.AsString(DefaultExternalSchemeKey, &nc.DefaultExternalScheme),
asMode(MeshCompatibilityModeKey, &nc.MeshCompatibilityMode),
); err != nil {
return nil, err
}
Expand Down Expand Up @@ -503,3 +540,18 @@ func PortNumberForName(sub corev1.EndpointSubset, portName string) (int32, error
func IsPotentialMeshErrorResponse(resp *http.Response) bool {
return resp.StatusCode == http.StatusServiceUnavailable || resp.StatusCode == http.StatusBadGateway
}

// asMode parses the value at key as a MeshCompatibilityMode into the target, if it exists.
func asMode(key string, target *MeshCompatibilityMode) cm.ParseFunc {
return func(data map[string]string) error {
if raw, ok := data[key]; ok {
for _, flag := range []MeshCompatibilityMode{MeshCompatibilityModeEnabled, MeshCompatibilityModeDisabled, MeshCompatibilityModeAuto} {
if strings.EqualFold(raw, string(flag)) {
*target = flag
return nil
}
}
}
return nil
}
}
3 changes: 3 additions & 0 deletions vendor/knative.dev/pkg/apis/duck/v1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ func (s *Source) Validate(ctx context.Context) *apis.FieldError {
}

func (s *SourceSpec) Validate(ctx context.Context) *apis.FieldError {
if s.CloudEventOverrides == nil {
return nil
}
return s.CloudEventOverrides.Validate(ctx).ViaField("ceOverrides")
}

Expand Down
3 changes: 2 additions & 1 deletion vendor/knative.dev/pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ func CheckMinimumVersion(versioner discovery.ServerVersionInterface) error {

// If no specific pre-release requirement is set, we default to "-0" to always allow
// pre-release versions of the same Major.Minor.Patch version.
// Set IsNum to true otherwise currentVersion.LT() below always returns true.
if len(minimumVersion.Pre) == 0 {
minimumVersion.Pre = []semver.PRVersion{{VersionNum: 0}}
minimumVersion.Pre = []semver.PRVersion{{VersionNum: 0, IsNum: true}}
}

// Return error if the current version is less than the minimum version required.
Expand Down
15 changes: 6 additions & 9 deletions vendor/knative.dev/serving/pkg/apis/serving/fieldmask.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,17 +609,14 @@ func SecurityContextMask(ctx context.Context, in *corev1.SecurityContext) *corev
out := new(corev1.SecurityContext)

// Allowed fields
out.RunAsUser = in.RunAsUser
if in.RunAsNonRoot != nil && *in.RunAsNonRoot {
out.RunAsNonRoot = in.RunAsNonRoot
}
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
out.Capabilities = in.Capabilities
out.ReadOnlyRootFilesystem = in.ReadOnlyRootFilesystem
out.RunAsUser = in.RunAsUser
out.RunAsGroup = in.RunAsGroup
// RunAsNonRoot when unset behaves the same way as false
// We do want the ability for folks to set this value to true
out.RunAsNonRoot = in.RunAsNonRoot

if config.FromContextOrDefaults(ctx).Features.PodSpecSecurityContext != config.Disabled {
out.RunAsGroup = in.RunAsGroup
out.RunAsNonRoot = in.RunAsNonRoot
}
// Disallowed
// This list is unnecessary, but added here for clarity
out.Privileged = nil
Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/serving/pkg/apis/serving/k8s_validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ func ValidatePodSpec(ctx context.Context, ps corev1.PodSpec) *apis.FieldError {
errs = errs.Also(validateContainers(ctx, ps.Containers, volumes))
}
if ps.ServiceAccountName != "" {
for range validation.IsDNS1123Subdomain(ps.ServiceAccountName) {
errs = errs.Also(apis.ErrInvalidValue(ps.ServiceAccountName, "serviceAccountName"))
for _, err := range validation.IsDNS1123Subdomain(ps.ServiceAccountName) {
errs = errs.Also(apis.ErrInvalidValue(ps.ServiceAccountName, "serviceAccountName", err))
}
}
return errs
Expand Down
13 changes: 0 additions & 13 deletions vendor/knative.dev/serving/pkg/apis/serving/v1/revision_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,6 @@ type RevisionStatus struct {
// +optional
LogURL string `json:"logUrl,omitempty"`

// DeprecatedImageDigest holds the resolved digest for the image specified
// within .Spec.Container.Image. The digest is resolved during the creation
// of Revision. This field holds the digest value regardless of whether
// a tag or digest was originally specified in the Container object. It
// may be empty if the image comes from a registry listed to skip resolution.
// If multiple containers specified then DeprecatedImageDigest holds the digest
// for serving container.
// DEPRECATED: Use ContainerStatuses instead.
// TODO(savitaashture) Remove deprecatedImageDigest.
// ref https://kubernetes.io/docs/reference/using-api/deprecation-policy for deprecation.
// +optional
DeprecatedImageDigest string `json:"imageDigest,omitempty"`

// ContainerStatuses is a slice of images present in .Spec.Container[*].Image
// to their respective digests and their container name.
// The digests are resolved during the creation of Revision.
Expand Down
8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.25.1-0.20210914210007-602ea299ac4e
# knative.dev/eventing v0.26.0
## explicit
knative.dev/eventing/pkg/adapter/v2
knative.dev/eventing/pkg/adapter/v2/test
Expand Down Expand Up @@ -983,11 +983,11 @@ knative.dev/eventing/test/test_images/recordevents
# knative.dev/hack v0.0.0-20210806075220-815cd312d65c
## explicit
knative.dev/hack
# knative.dev/networking v0.0.0-20210910120730-eb37d69eb87f
# knative.dev/networking v0.0.0-20210914225408-69ad45454096
knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking
knative.dev/networking/pkg/apis/networking/v1alpha1
# knative.dev/pkg v0.0.0-20210914164111-4857ab6939e3
# knative.dev/pkg v0.0.0-20210919202233-5ae482141474
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down Expand Up @@ -1067,7 +1067,7 @@ knative.dev/pkg/webhook/psbinding
knative.dev/pkg/webhook/resourcesemantics
knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
# knative.dev/serving v0.25.1-0.20210914121411-76cb92b17e88
# knative.dev/serving v0.26.0
## explicit
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down

0 comments on commit 799eeb8

Please sign in to comment.