Skip to content

Commit

Permalink
upgrade to latest dependencies (#210)
Browse files Browse the repository at this point in the history
bumping knative.dev/serving 2e5ca67...6ec4509:
  > 6ec4509 All Hops Encrypted: TLS between activator and queue-Proxy (# 12815)
  > 98bb924 Update net-contour nightly (# 12863)
  > e3e1ac3 Update net-gateway-api nightly (# 12864)
  > e867807 Update net-kourier nightly (# 12862)
  > 48d824d Update net-istio nightly (# 12861)
  > 2982b52 upgrade to latest dependencies (# 12847)
bumping knative.dev/client 7e8a672...ff097e9:
  > ff097e9 upgrade to latest dependencies (# 1659)
  > d8ab3d5 upgrade to latest dependencies (# 1658)
  > 9154f26 Fix build warning from go version upgrade (# 1657)
  > b858dab Added subpath functionality to --mount flag (# 1655)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation authored Apr 20, 2022
1 parent f6aa23a commit 43679bf
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 23 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ require (
k8s.io/api v0.23.5
k8s.io/apimachinery v0.23.5
k8s.io/client-go v0.23.5
knative.dev/client v0.30.2-0.20220418095413-7e8a6727fecb
knative.dev/client v0.31.0
knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c
knative.dev/networking v0.0.0-20220412163509-1145ec58c8be
knative.dev/serving v0.30.1-0.20220416140111-2e5ca679a71e
knative.dev/serving v0.31.0
)
19 changes: 8 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2498,34 +2498,31 @@ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20210215030244-1212288570f0/go.mod h1:rAPalJe9Lx3jHffJpackk5WjZYl3j2QvXUgw0GPllxQ=
knative.dev/caching v0.0.0-20220412015107-318083f279be/go.mod h1:FqsgCB99NLJq1c8ZtpHYAb/3Oalgko9i4nF45IiKPio=
knative.dev/caching v0.0.0-20220412163508-8b5c244b8182/go.mod h1:BFtnxIjI27VMV52u4vHhplij9j5PbQRXFlDMv7EMjbM=
knative.dev/client v0.21.0/go.mod h1:1En9uxMhk62EReWR1d66/d3tnpkot/D3vBRfmuidFNc=
knative.dev/client v0.30.2-0.20220418095413-7e8a6727fecb h1:SstrgJtmPrIg5QM8IilI9e57xVFEVfOdB1Ao57aE43Q=
knative.dev/client v0.30.2-0.20220418095413-7e8a6727fecb/go.mod h1:H1ksONPiJmjONoLzfviY/dFir0A+N2yBgN6Z8ssUFy0=
knative.dev/client v0.31.0 h1:TB5NELQ6f2PSp5h8IOdzrqMk9dV91ip/9YXqxNHoNWs=
knative.dev/client v0.31.0/go.mod h1:393rr9RYzIuy7LVyvfoCucSeg/XsXfLq64taSRnukmE=
knative.dev/eventing v0.21.0/go.mod h1:JjbVEOTJJHqo9CTxbTfrMn018hG8fOr3UfBoCJ7KWaA=
knative.dev/eventing v0.30.1-0.20220415141711-ff55a456c3f9 h1:Cf5i43bXtjFTvq12JtItR3dyhlhOgTVXQ31o2lFxViM=
knative.dev/eventing v0.30.1-0.20220415141711-ff55a456c3f9/go.mod h1:Ld/pcIDX2nr7MvBOruoFFonzzDdpGbKsWDOYvpRoofo=
knative.dev/eventing v0.31.0 h1:Bu1cBSwxAT1BsaexQ6PJPWc1mxx2LF/DeszvYEIytJ0=
knative.dev/eventing v0.31.0/go.mod h1:XgJY27IxyBjmu/mz53cVlz+oMPPzzRaVXlPmWKCqEd8=
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220328133751-f06773764ce3/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c h1:aXsFXeky/GccNQxwf72CS4NR3EoqTqsCVNKQnblfwr0=
knative.dev/hack v0.0.0-20220411131823-6ffd8417de7c/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack/schema v0.0.0-20220411131823-6ffd8417de7c/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/networking v0.0.0-20210215030235-088986a1c2a3/go.mod h1:pmAMQjMqQUxpK0UyjE71KljMs6rwDMVIAlvrZsU3I6Y=
knative.dev/networking v0.0.0-20210216014426-94bfc013982b/go.mod h1:Crdn87hxdFd3Jj6PIyrjzGnr8OGHX35k5xo9jlOrjjA=
knative.dev/networking v0.0.0-20220412073408-56c4a3e1329c/go.mod h1:W7P8RzTcmW/KQ9xAtiNicHaR30/aO6NpvRjFLyIbIeg=
knative.dev/networking v0.0.0-20220412163509-1145ec58c8be h1:MmwR4SfwlXgt/jnjronkTTOKBrwN1mP/VNhHH08pIoc=
knative.dev/networking v0.0.0-20220412163509-1145ec58c8be/go.mod h1:6OZIUimxPelIIudzHWRd+Lc7ippC5t+DC8CsZKCOjcI=
knative.dev/pkg v0.0.0-20210212203835-448ae657fb5f/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/pkg v0.0.0-20210215165523-84c98f3c3e7a/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/pkg v0.0.0-20210216013737-584933f8280b/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/pkg v0.0.0-20220411234407-00c122e376d0/go.mod h1:0A5D5tOLettuVoi5x+0SLGRfrvVemXXtLH247WupPJk=
knative.dev/pkg v0.0.0-20220412134708-e325df66cb51 h1:4AmaxeY7+r/PYYz3HS9pMY21Mw3ykO6STLFEk2FoJ2s=
knative.dev/pkg v0.0.0-20220412134708-e325df66cb51/go.mod h1:j2MeD8s+JoCu1vegX80GbRXV/xd20Jm1NznxBYtVXiM=
knative.dev/reconciler-test v0.0.0-20210216030508-77f50054d024/go.mod h1:RP/K5xJylB72Go6eAsXYEsQHp4zCCNMNjmsqhvq7wko=
knative.dev/reconciler-test v0.0.0-20220412141310-6da8e62f926f/go.mod h1:/25SELzYrVr+e+nARQh88d43BdHSP0JBfwUe3x/88OE=
knative.dev/reconciler-test v0.0.0-20220412165608-994f0c3fab62/go.mod h1:BZai3XTZ7+A3HSwgm5cSgwS/Oc/9mOZJrAk+TtESABA=
knative.dev/serving v0.21.0/go.mod h1:PU9k1Y6YMG27XQldEu5agNkcebvSafUXKXPircQYCsE=
knative.dev/serving v0.30.1-0.20220416140111-2e5ca679a71e h1:iYq+sfkyQDQ0rfkbWPNF5j29geGXSMW4u/NV19EDedY=
knative.dev/serving v0.30.1-0.20220416140111-2e5ca679a71e/go.mod h1:+U3xtXJ3iUt78ROr5CKc4OtTERCQtW2CizZ/fXFqp18=
knative.dev/serving v0.31.0 h1:pVrrmG6I8f0MYTG6wxCYrFFpOxQGwl4c3GfP8UGqm/o=
knative.dev/serving v0.31.0/go.mod h1:ObA3YEL77+M60xu4T3cUSpD+AX5eZN6Ww0pHg8iA6NE=
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=
Expand Down
2 changes: 2 additions & 0 deletions vendor/knative.dev/client/pkg/kn/flags/podspec.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ func (p *PodSpecFlags) AddFlags(flagset *pflag.FlagSet) []string {
"Mount a ConfigMap (prefix cm: or config-map:), a Secret (prefix secret: or sc:), or an existing Volume (without any prefix) on the specified directory. "+
"Example: --mount /mydir=cm:myconfigmap, --mount /mydir=secret:mysecret, or --mount /mydir=myvolume. "+
"When a configmap or a secret is specified, a corresponding volume is automatically generated. "+
"You can specify a volume subpath by following the volume name with slash separated path. "+
"Example: --mount /mydir=cm:myconfigmap/subpath/to/be/mounted. "+
"You can use this flag multiple times. "+
"For unmounting a directory, append \"-\", e.g. --mount /mydir-, which also removes any auto-generated volume.")
flagNames = append(flagNames, "mount")
Expand Down
43 changes: 36 additions & 7 deletions vendor/knative.dev/client/pkg/kn/flags/podspec_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ const (
PortFormatErr = "the port specification '%s' is not valid. Please provide in the format 'NAME:PORT', where 'NAME' is optional. Examples: '--port h2c:8080' , '--port 8080'."
)

type MountInfo struct {
VolumeName string
SubPath string
}

func (vt VolumeSourceType) String() string {
names := [...]string{"config-map", "secret"}
if vt < ConfigMapVolumeSourceType || vt > SecretVolumeSourceType {
Expand Down Expand Up @@ -473,26 +478,32 @@ func updateVolumeMountsFromMap(volumeMounts []corev1.VolumeMount, toUpdate *util

for i := range volumeMounts {
volumeMount := &volumeMounts[i]
name, present := toUpdate.GetString(volumeMount.MountPath)
mountInfo, present := toUpdate.Get(volumeMount.MountPath)

if present {
volumeMountInfo := mountInfo.(*MountInfo)
name := volumeMountInfo.VolumeName
if !existsVolumeNameInVolumes(name, volumes) {
return nil, fmt.Errorf("There is no volume matched with %q", name)
}

volumeMount.ReadOnly = true
volumeMount.Name = name
volumeMount.SubPath = volumeMountInfo.SubPath
set[volumeMount.MountPath] = true
}
}

it := toUpdate.Iterator()
for mountPath, name, ok := it.NextString(); ok; mountPath, name, ok = it.NextString() {
for mountPath, mountInfo, ok := it.Next(); ok; mountPath, mountInfo, ok = it.Next() {
volumeMountInfo := mountInfo.(*MountInfo)
name := volumeMountInfo.VolumeName
if !set[mountPath] {
volumeMounts = append(volumeMounts, corev1.VolumeMount{
Name: name,
ReadOnly: true,
MountPath: mountPath,
SubPath: volumeMountInfo.SubPath,
})
}
}
Expand Down Expand Up @@ -658,6 +669,19 @@ func existsVolumeNameInVolumeMounts(volumeName string, volumeMounts []corev1.Vol

// =======================================================================================

func getMountInfo(volume string) *MountInfo {
slices := strings.SplitN(volume, "/", 2)
if len(slices) == 1 || slices[1] == "" {
return &MountInfo{
VolumeName: slices[0],
}
}
return &MountInfo{
VolumeName: slices[0],
SubPath: slices[1],
}
}

func reviseVolumeInfoAndMountsToUpdate(mountsToUpdate *util.OrderedMap, volumesToUpdate *util.OrderedMap) (*util.OrderedMap, *util.OrderedMap, error) {
volumeSourceInfoByName := util.NewOrderedMap() //make(map[string]*volumeSourceInfo)
mountsToUpdateRevised := util.NewOrderedMap() //make(map[string]string)
Expand All @@ -668,23 +692,28 @@ func reviseVolumeInfoAndMountsToUpdate(mountsToUpdate *util.OrderedMap, volumesT
// slices[1] -> secret, config-map, or volume name
slices := strings.SplitN(value, ":", 2)
if len(slices) == 1 {
mountsToUpdateRevised.Set(path, slices[0])
mountInfo := getMountInfo(slices[0])
mountsToUpdateRevised.Set(path, mountInfo)
} else {
switch volumeType := slices[0]; volumeType {
case "config-map", "cm":
generatedName := util.GenerateVolumeName(path)
mountInfo := getMountInfo(slices[1])
volumeSourceInfoByName.Set(generatedName, &volumeSourceInfo{
volumeSourceType: ConfigMapVolumeSourceType,
volumeSourceName: slices[1],
volumeSourceName: mountInfo.VolumeName,
})
mountsToUpdateRevised.Set(path, generatedName)
mountInfo.VolumeName = generatedName
mountsToUpdateRevised.Set(path, mountInfo)
case "secret", "sc":
generatedName := util.GenerateVolumeName(path)
mountInfo := getMountInfo(slices[1])
volumeSourceInfoByName.Set(generatedName, &volumeSourceInfo{
volumeSourceType: SecretVolumeSourceType,
volumeSourceName: slices[1],
volumeSourceName: mountInfo.VolumeName,
})
mountsToUpdateRevised.Set(path, generatedName)
mountInfo.VolumeName = generatedName
mountsToUpdateRevised.Set(path, mountInfo)

default:
return nil, nil, fmt.Errorf("unsupported volume type \"%q\"; supported volume types are \"config-map or cm\", \"secret or sc\", and \"volume or vo\"", slices[0])
Expand Down
6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ k8s.io/utils/internal/third_party/forked/golang/net
k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/client v0.30.2-0.20220418095413-7e8a6727fecb
# knative.dev/client v0.31.0
## explicit
knative.dev/client/lib/test
knative.dev/client/pkg/apis/client
Expand All @@ -761,7 +761,7 @@ knative.dev/client/pkg/sources/v1beta2
knative.dev/client/pkg/util
knative.dev/client/pkg/util/mock
knative.dev/client/pkg/wait
# knative.dev/eventing v0.30.1-0.20220415141711-ff55a456c3f9
# knative.dev/eventing v0.31.0
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/duck
knative.dev/eventing/pkg/apis/duck/v1
Expand Down Expand Up @@ -839,7 +839,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.30.1-0.20220416140111-2e5ca679a71e
# knative.dev/serving v0.31.0
## explicit
knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1
Expand Down

0 comments on commit 43679bf

Please sign in to comment.