)
# bash focuses on the part after the =, so we need to remove
# the flag part from $cur
- if [[ "${cur}" == -*=* ]]; then
+ if [[ ${cur} == -*=* ]]; then
cur="${cur#*=}"
fi
@@ -87,7 +87,7 @@ __%[1]s_get_completion_results() {
directive=${out##*:}
# Remove the directive
out=${out%%:*}
- if [ "${directive}" = "${out}" ]; then
+ if [[ ${directive} == "${out}" ]]; then
# There is not directive specified
directive=0
fi
@@ -101,22 +101,36 @@ __%[1]s_process_completion_results() {
local shellCompDirectiveNoFileComp=%[5]d
local shellCompDirectiveFilterFileExt=%[6]d
local shellCompDirectiveFilterDirs=%[7]d
+ local shellCompDirectiveKeepOrder=%[8]d
- if [ $((directive & shellCompDirectiveError)) -ne 0 ]; then
+ if (((directive & shellCompDirectiveError) != 0)); then
# Error code. No completion.
__%[1]s_debug "Received error from custom completion go code"
return
else
- if [ $((directive & shellCompDirectiveNoSpace)) -ne 0 ]; then
- if [[ $(type -t compopt) = "builtin" ]]; then
+ if (((directive & shellCompDirectiveNoSpace) != 0)); then
+ if [[ $(type -t compopt) == builtin ]]; then
__%[1]s_debug "Activating no space"
compopt -o nospace
else
__%[1]s_debug "No space directive not supported in this version of bash"
fi
fi
- if [ $((directive & shellCompDirectiveNoFileComp)) -ne 0 ]; then
- if [[ $(type -t compopt) = "builtin" ]]; then
+ if (((directive & shellCompDirectiveKeepOrder) != 0)); then
+ if [[ $(type -t compopt) == builtin ]]; then
+ # no sort isn't supported for bash less than < 4.4
+ if [[ ${BASH_VERSINFO[0]} -lt 4 || ( ${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -lt 4 ) ]]; then
+ __%[1]s_debug "No sort directive not supported in this version of bash"
+ else
+ __%[1]s_debug "Activating keep order"
+ compopt -o nosort
+ fi
+ else
+ __%[1]s_debug "No sort directive not supported in this version of bash"
+ fi
+ fi
+ if (((directive & shellCompDirectiveNoFileComp) != 0)); then
+ if [[ $(type -t compopt) == builtin ]]; then
__%[1]s_debug "Activating no file completion"
compopt +o default
else
@@ -130,7 +144,7 @@ __%[1]s_process_completion_results() {
local activeHelp=()
__%[1]s_extract_activeHelp
- if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
+ if (((directive & shellCompDirectiveFilterFileExt) != 0)); then
# File extension filtering
local fullFilter filter filteringCmd
@@ -143,13 +157,12 @@ __%[1]s_process_completion_results() {
filteringCmd="_filedir $fullFilter"
__%[1]s_debug "File filtering command: $filteringCmd"
$filteringCmd
- elif [ $((directive & shellCompDirectiveFilterDirs)) -ne 0 ]; then
+ elif (((directive & shellCompDirectiveFilterDirs) != 0)); then
# File completion for directories only
- # Use printf to strip any trailing newline
local subdir
- subdir=$(printf "%%s" "${completions[0]}")
- if [ -n "$subdir" ]; then
+ subdir=${completions[0]}
+ if [[ -n $subdir ]]; then
__%[1]s_debug "Listing directories in $subdir"
pushd "$subdir" >/dev/null 2>&1 && _filedir -d && popd >/dev/null 2>&1 || return
else
@@ -164,7 +177,7 @@ __%[1]s_process_completion_results() {
__%[1]s_handle_special_char "$cur" =
# Print the activeHelp statements before we finish
- if [ ${#activeHelp[*]} -ne 0 ]; then
+ if ((${#activeHelp[*]} != 0)); then
printf "\n";
printf "%%s\n" "${activeHelp[@]}"
printf "\n"
@@ -184,21 +197,21 @@ __%[1]s_process_completion_results() {
# Separate activeHelp lines from real completions.
# Fills the $activeHelp and $completions arrays.
__%[1]s_extract_activeHelp() {
- local activeHelpMarker="%[8]s"
+ local activeHelpMarker="%[9]s"
local endIndex=${#activeHelpMarker}
while IFS='' read -r comp; do
- if [ "${comp:0:endIndex}" = "$activeHelpMarker" ]; then
+ if [[ ${comp:0:endIndex} == $activeHelpMarker ]]; then
comp=${comp:endIndex}
__%[1]s_debug "ActiveHelp found: $comp"
- if [ -n "$comp" ]; then
+ if [[ -n $comp ]]; then
activeHelp+=("$comp")
fi
else
# Not an activeHelp line but a normal completion
completions+=("$comp")
fi
- done < <(printf "%%s\n" "${out}")
+ done <<<"${out}"
}
__%[1]s_handle_completion_types() {
@@ -254,7 +267,7 @@ __%[1]s_handle_standard_completion_case() {
done < <(printf "%%s\n" "${completions[@]}")
# If there is a single completion left, remove the description text
- if [ ${#COMPREPLY[*]} -eq 1 ]; then
+ if ((${#COMPREPLY[*]} == 1)); then
__%[1]s_debug "COMPREPLY[0]: ${COMPREPLY[0]}"
comp="${COMPREPLY[0]%%%%$tab*}"
__%[1]s_debug "Removed description from single completion, which is now: ${comp}"
@@ -271,8 +284,8 @@ __%[1]s_handle_special_char()
if [[ "$comp" == *${char}* && "$COMP_WORDBREAKS" == *${char}* ]]; then
local word=${comp%%"${comp##*${char}}"}
local idx=${#COMPREPLY[*]}
- while [[ $((--idx)) -ge 0 ]]; do
- COMPREPLY[$idx]=${COMPREPLY[$idx]#"$word"}
+ while ((--idx >= 0)); do
+ COMPREPLY[idx]=${COMPREPLY[idx]#"$word"}
done
fi
}
@@ -298,7 +311,7 @@ __%[1]s_format_comp_descriptions()
# Make sure we can fit a description of at least 8 characters
# if we are to align the descriptions.
- if [[ $maxdesclength -gt 8 ]]; then
+ if ((maxdesclength > 8)); then
# Add the proper number of spaces to align the descriptions
for ((i = ${#comp} ; i < longest ; i++)); do
comp+=" "
@@ -310,8 +323,8 @@ __%[1]s_format_comp_descriptions()
# If there is enough space for any description text,
# truncate the descriptions that are too long for the shell width
- if [ $maxdesclength -gt 0 ]; then
- if [ ${#desc} -gt $maxdesclength ]; then
+ if ((maxdesclength > 0)); then
+ if ((${#desc} > maxdesclength)); then
desc=${desc:0:$(( maxdesclength - 1 ))}
desc+="…"
fi
@@ -332,9 +345,9 @@ __start_%[1]s()
# Call _init_completion from the bash-completion package
# to prepare the arguments properly
if declare -F _init_completion >/dev/null 2>&1; then
- _init_completion -n "=:" || return
+ _init_completion -n =: || return
else
- __%[1]s_init_completion -n "=:" || return
+ __%[1]s_init_completion -n =: || return
fi
__%[1]s_debug
@@ -361,7 +374,7 @@ fi
# ex: ts=4 sw=4 et filetype=sh
`, name, compCmd,
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
- ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs,
+ ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder,
activeHelpMarker))
}
diff --git a/vendor/github.com/spf13/cobra/cobra.go b/vendor/github.com/spf13/cobra/cobra.go
index fe44bc8a0..b07b44a0c 100644
--- a/vendor/github.com/spf13/cobra/cobra.go
+++ b/vendor/github.com/spf13/cobra/cobra.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -167,8 +167,8 @@ func appendIfNotPresent(s, stringToAppend string) string {
// rpad adds padding to the right of a string.
func rpad(s string, padding int) string {
- template := fmt.Sprintf("%%-%ds", padding)
- return fmt.Sprintf(template, s)
+ formattedString := fmt.Sprintf("%%-%ds", padding)
+ return fmt.Sprintf(formattedString, s)
}
// tmpl executes the given template text on data, writing the result to w.
diff --git a/vendor/github.com/spf13/cobra/command.go b/vendor/github.com/spf13/cobra/command.go
index 6ff47dd5c..01f7c6f1c 100644
--- a/vendor/github.com/spf13/cobra/command.go
+++ b/vendor/github.com/spf13/cobra/command.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ const FlagSetByCobraAnnotation = "cobra_annotation_flag_set_by_cobra"
// FParseErrWhitelist configures Flag parse errors to be ignored
type FParseErrWhitelist flag.ParseErrorsWhitelist
-// Structure to manage groups for commands
+// Group Structure to manage groups for commands
type Group struct {
ID string
Title string
@@ -47,7 +47,7 @@ type Group struct {
// definition to ensure usability.
type Command struct {
// Use is the one-line usage message.
- // Recommended syntax is as follow:
+ // Recommended syntax is as follows:
// [ ] identifies an optional argument. Arguments that are not enclosed in brackets are required.
// ... indicates that you can specify multiple values for the previous argument.
// | indicates mutually exclusive information. You can use the argument to the left of the separator or the
@@ -321,7 +321,7 @@ func (c *Command) SetHelpCommand(cmd *Command) {
c.helpCommand = cmd
}
-// SetHelpCommandGroup sets the group id of the help command.
+// SetHelpCommandGroupID sets the group id of the help command.
func (c *Command) SetHelpCommandGroupID(groupID string) {
if c.helpCommand != nil {
c.helpCommand.GroupID = groupID
@@ -330,7 +330,7 @@ func (c *Command) SetHelpCommandGroupID(groupID string) {
c.helpCommandGroupID = groupID
}
-// SetCompletionCommandGroup sets the group id of the completion command.
+// SetCompletionCommandGroupID sets the group id of the completion command.
func (c *Command) SetCompletionCommandGroupID(groupID string) {
// completionCommandGroupID is used if no completion command is defined by the user
c.Root().completionCommandGroupID = groupID
@@ -655,20 +655,44 @@ Loop:
// argsMinusFirstX removes only the first x from args. Otherwise, commands that look like
// openshift admin policy add-role-to-user admin my-user, lose the admin argument (arg[4]).
-func argsMinusFirstX(args []string, x string) []string {
- for i, y := range args {
- if x == y {
- ret := []string{}
- ret = append(ret, args[:i]...)
- ret = append(ret, args[i+1:]...)
- return ret
+// Special care needs to be taken not to remove a flag value.
+func (c *Command) argsMinusFirstX(args []string, x string) []string {
+ if len(args) == 0 {
+ return args
+ }
+ c.mergePersistentFlags()
+ flags := c.Flags()
+
+Loop:
+ for pos := 0; pos < len(args); pos++ {
+ s := args[pos]
+ switch {
+ case s == "--":
+ // -- means we have reached the end of the parseable args. Break out of the loop now.
+ break Loop
+ case strings.HasPrefix(s, "--") && !strings.Contains(s, "=") && !hasNoOptDefVal(s[2:], flags):
+ fallthrough
+ case strings.HasPrefix(s, "-") && !strings.Contains(s, "=") && len(s) == 2 && !shortHasNoOptDefVal(s[1:], flags):
+ // This is a flag without a default value, and an equal sign is not used. Increment pos in order to skip
+ // over the next arg, because that is the value of this flag.
+ pos++
+ continue
+ case !strings.HasPrefix(s, "-"):
+ // This is not a flag or a flag value. Check to see if it matches what we're looking for, and if so,
+ // return the args, excluding the one at this position.
+ if s == x {
+ ret := []string{}
+ ret = append(ret, args[:pos]...)
+ ret = append(ret, args[pos+1:]...)
+ return ret
+ }
}
}
return args
}
func isFlagArg(arg string) bool {
- return ((len(arg) >= 3 && arg[1] == '-') ||
+ return ((len(arg) >= 3 && arg[0:2] == "--") ||
(len(arg) >= 2 && arg[0] == '-' && arg[1] != '-'))
}
@@ -686,7 +710,7 @@ func (c *Command) Find(args []string) (*Command, []string, error) {
cmd := c.findNext(nextSubCmd)
if cmd != nil {
- return innerfind(cmd, argsMinusFirstX(innerArgs, nextSubCmd))
+ return innerfind(cmd, c.argsMinusFirstX(innerArgs, nextSubCmd))
}
return c, innerArgs
}
@@ -1272,7 +1296,7 @@ func (c *Command) AllChildCommandsHaveGroup() bool {
return true
}
-// ContainGroups return if groupID exists in the list of command groups.
+// ContainsGroup return if groupID exists in the list of command groups.
func (c *Command) ContainsGroup(groupID string) bool {
for _, x := range c.commandgroups {
if x.ID == groupID {
diff --git a/vendor/github.com/spf13/cobra/command_notwin.go b/vendor/github.com/spf13/cobra/command_notwin.go
index 2b77f8f01..307f0c127 100644
--- a/vendor/github.com/spf13/cobra/command_notwin.go
+++ b/vendor/github.com/spf13/cobra/command_notwin.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/spf13/cobra/command_win.go b/vendor/github.com/spf13/cobra/command_win.go
index 520f23abf..adbef395c 100644
--- a/vendor/github.com/spf13/cobra/command_win.go
+++ b/vendor/github.com/spf13/cobra/command_win.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/spf13/cobra/completions.go b/vendor/github.com/spf13/cobra/completions.go
index e8a0206db..ee38c4d0b 100644
--- a/vendor/github.com/spf13/cobra/completions.go
+++ b/vendor/github.com/spf13/cobra/completions.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -77,6 +77,10 @@ const (
// obtain the same behavior but only for flags.
ShellCompDirectiveFilterDirs
+ // ShellCompDirectiveKeepOrder indicates that the shell should preserve the order
+ // in which the completions are provided
+ ShellCompDirectiveKeepOrder
+
// ===========================================================================
// All directives using iota should be above this one.
@@ -159,6 +163,9 @@ func (d ShellCompDirective) string() string {
if d&ShellCompDirectiveFilterDirs != 0 {
directives = append(directives, "ShellCompDirectiveFilterDirs")
}
+ if d&ShellCompDirectiveKeepOrder != 0 {
+ directives = append(directives, "ShellCompDirectiveKeepOrder")
+ }
if len(directives) == 0 {
directives = append(directives, "ShellCompDirectiveDefault")
}
@@ -169,7 +176,7 @@ func (d ShellCompDirective) string() string {
return strings.Join(directives, ", ")
}
-// Adds a special hidden command that can be used to request custom completions.
+// initCompleteCmd adds a special hidden command that can be used to request custom completions.
func (c *Command) initCompleteCmd(args []string) {
completeCmd := &Command{
Use: fmt.Sprintf("%s [command-line]", ShellCompRequestCmd),
@@ -727,7 +734,7 @@ to enable it. You can execute the following once:
To load completions in your current shell session:
- source <(%[1]s completion zsh); compdef _%[1]s %[1]s
+ source <(%[1]s completion zsh)
To load completions for every new session, execute once:
diff --git a/vendor/github.com/spf13/cobra/fish_completions.go b/vendor/github.com/spf13/cobra/fish_completions.go
index 97112a17b..12ca0d2b1 100644
--- a/vendor/github.com/spf13/cobra/fish_completions.go
+++ b/vendor/github.com/spf13/cobra/fish_completions.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -53,7 +53,7 @@ function __%[1]s_perform_completion
__%[1]s_debug "last arg: $lastArg"
# Disable ActiveHelp which is not supported for fish shell
- set -l requestComp "%[9]s=0 $args[1] %[3]s $args[2..-1] $lastArg"
+ set -l requestComp "%[10]s=0 $args[1] %[3]s $args[2..-1] $lastArg"
__%[1]s_debug "Calling $requestComp"
set -l results (eval $requestComp 2> /dev/null)
@@ -89,6 +89,60 @@ function __%[1]s_perform_completion
printf "%%s\n" "$directiveLine"
end
+# this function limits calls to __%[1]s_perform_completion, by caching the result behind $__%[1]s_perform_completion_once_result
+function __%[1]s_perform_completion_once
+ __%[1]s_debug "Starting __%[1]s_perform_completion_once"
+
+ if test -n "$__%[1]s_perform_completion_once_result"
+ __%[1]s_debug "Seems like a valid result already exists, skipping __%[1]s_perform_completion"
+ return 0
+ end
+
+ set --global __%[1]s_perform_completion_once_result (__%[1]s_perform_completion)
+ if test -z "$__%[1]s_perform_completion_once_result"
+ __%[1]s_debug "No completions, probably due to a failure"
+ return 1
+ end
+
+ __%[1]s_debug "Performed completions and set __%[1]s_perform_completion_once_result"
+ return 0
+end
+
+# this function is used to clear the $__%[1]s_perform_completion_once_result variable after completions are run
+function __%[1]s_clear_perform_completion_once_result
+ __%[1]s_debug ""
+ __%[1]s_debug "========= clearing previously set __%[1]s_perform_completion_once_result variable =========="
+ set --erase __%[1]s_perform_completion_once_result
+ __%[1]s_debug "Succesfully erased the variable __%[1]s_perform_completion_once_result"
+end
+
+function __%[1]s_requires_order_preservation
+ __%[1]s_debug ""
+ __%[1]s_debug "========= checking if order preservation is required =========="
+
+ __%[1]s_perform_completion_once
+ if test -z "$__%[1]s_perform_completion_once_result"
+ __%[1]s_debug "Error determining if order preservation is required"
+ return 1
+ end
+
+ set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1])
+ __%[1]s_debug "Directive is: $directive"
+
+ set -l shellCompDirectiveKeepOrder %[9]d
+ set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) %% 2)
+ __%[1]s_debug "Keeporder is: $keeporder"
+
+ if test $keeporder -ne 0
+ __%[1]s_debug "This does require order preservation"
+ return 0
+ end
+
+ __%[1]s_debug "This doesn't require order preservation"
+ return 1
+end
+
+
# This function does two things:
# - Obtain the completions and store them in the global __%[1]s_comp_results
# - Return false if file completion should be performed
@@ -99,17 +153,17 @@ function __%[1]s_prepare_completions
# Start fresh
set --erase __%[1]s_comp_results
- set -l results (__%[1]s_perform_completion)
- __%[1]s_debug "Completion results: $results"
+ __%[1]s_perform_completion_once
+ __%[1]s_debug "Completion results: $__%[1]s_perform_completion_once_result"
- if test -z "$results"
+ if test -z "$__%[1]s_perform_completion_once_result"
__%[1]s_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
return 1
end
- set -l directive (string sub --start 2 $results[-1])
- set --global __%[1]s_comp_results $results[1..-2]
+ set -l directive (string sub --start 2 $__%[1]s_perform_completion_once_result[-1])
+ set --global __%[1]s_comp_results $__%[1]s_perform_completion_once_result[1..-2]
__%[1]s_debug "Completions are: $__%[1]s_comp_results"
__%[1]s_debug "Directive is: $directive"
@@ -205,13 +259,17 @@ end
# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c %[2]s -e
+# this will get called after the two calls below and clear the $__%[1]s_perform_completion_once_result global
+complete -c %[2]s -n '__%[1]s_clear_perform_completion_once_result'
# The call to __%[1]s_prepare_completions will setup __%[1]s_comp_results
# which provides the program's completion choices.
-complete -c %[2]s -n '__%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'
-
+# If this doesn't require order preservation, we don't use the -k flag
+complete -c %[2]s -n 'not __%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'
+# otherwise we use the -k flag
+complete -k -c %[2]s -n '__%[1]s_requires_order_preservation && __%[1]s_prepare_completions' -f -a '$__%[1]s_comp_results'
`, nameForVar, name, compCmd,
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
- ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name)))
+ ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name)))
}
// GenFishCompletion generates fish completion file and writes to the passed writer.
diff --git a/vendor/github.com/spf13/cobra/flag_groups.go b/vendor/github.com/spf13/cobra/flag_groups.go
index 9c377aaf9..b35fde155 100644
--- a/vendor/github.com/spf13/cobra/flag_groups.go
+++ b/vendor/github.com/spf13/cobra/flag_groups.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/spf13/cobra/powershell_completions.go b/vendor/github.com/spf13/cobra/powershell_completions.go
index 004de42e4..177d2755f 100644
--- a/vendor/github.com/spf13/cobra/powershell_completions.go
+++ b/vendor/github.com/spf13/cobra/powershell_completions.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -77,6 +77,7 @@ filter __%[1]s_escapeStringWithSpecialChars {
$ShellCompDirectiveNoFileComp=%[6]d
$ShellCompDirectiveFilterFileExt=%[7]d
$ShellCompDirectiveFilterDirs=%[8]d
+ $ShellCompDirectiveKeepOrder=%[9]d
# Prepare the command to request completions for the program.
# Split the command at the first space to separate the program and arguments.
@@ -106,13 +107,22 @@ filter __%[1]s_escapeStringWithSpecialChars {
# If the last parameter is complete (there is a space following it)
# We add an extra empty parameter so we can indicate this to the go method.
__%[1]s_debug "Adding extra empty parameter"
-`+" # We need to use `\"`\" to pass an empty argument a \"\" or '' does not work!!!"+`
-`+" $RequestComp=\"$RequestComp\" + ' `\"`\"'"+`
+ # PowerShell 7.2+ changed the way how the arguments are passed to executables,
+ # so for pre-7.2 or when Legacy argument passing is enabled we need to use
+`+" # `\"`\" to pass an empty argument, a \"\" or '' does not work!!!"+`
+ if ($PSVersionTable.PsVersion -lt [version]'7.2.0' -or
+ ($PSVersionTable.PsVersion -lt [version]'7.3.0' -and -not [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -or
+ (($PSVersionTable.PsVersion -ge [version]'7.3.0' -or [ExperimentalFeature]::IsEnabled("PSNativeCommandArgumentPassing")) -and
+ $PSNativeCommandArgumentPassing -eq 'Legacy')) {
+`+" $RequestComp=\"$RequestComp\" + ' `\"`\"'"+`
+ } else {
+ $RequestComp="$RequestComp" + ' ""'
+ }
}
__%[1]s_debug "Calling $RequestComp"
# First disable ActiveHelp which is not supported for Powershell
- $env:%[9]s=0
+ $env:%[10]s=0
#call the command store the output in $out and redirect stderr and stdout to null
# $Out is an array contains each line per element
@@ -137,7 +147,7 @@ filter __%[1]s_escapeStringWithSpecialChars {
}
$Longest = 0
- $Values = $Out | ForEach-Object {
+ [Array]$Values = $Out | ForEach-Object {
#Split the output in name and description
`+" $Name, $Description = $_.Split(\"`t\",2)"+`
__%[1]s_debug "Name: $Name Description: $Description"
@@ -182,6 +192,11 @@ filter __%[1]s_escapeStringWithSpecialChars {
}
}
+ # we sort the values in ascending order by name if keep order isn't passed
+ if (($Directive -band $ShellCompDirectiveKeepOrder) -eq 0 ) {
+ $Values = $Values | Sort-Object -Property Name
+ }
+
if (($Directive -band $ShellCompDirectiveNoFileComp) -ne 0 ) {
__%[1]s_debug "ShellCompDirectiveNoFileComp is called"
@@ -267,7 +282,7 @@ filter __%[1]s_escapeStringWithSpecialChars {
Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock $__%[2]sCompleterBlock
`, name, nameForVar, compCmd,
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
- ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name)))
+ ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder, activeHelpEnvVar(name)))
}
func (c *Command) genPowerShellCompletion(w io.Writer, includeDesc bool) error {
diff --git a/vendor/github.com/spf13/cobra/projects_using_cobra.md b/vendor/github.com/spf13/cobra/projects_using_cobra.md
index 6865f88e7..8a291eb20 100644
--- a/vendor/github.com/spf13/cobra/projects_using_cobra.md
+++ b/vendor/github.com/spf13/cobra/projects_using_cobra.md
@@ -1,11 +1,13 @@
## Projects using Cobra
- [Allero](https://github.com/allero-io/allero)
+- [Arewefastyet](https://benchmark.vitess.io)
- [Arduino CLI](https://github.com/arduino/arduino-cli)
- [Bleve](https://blevesearch.com/)
- [Cilium](https://cilium.io/)
- [CloudQuery](https://github.com/cloudquery/cloudquery)
- [CockroachDB](https://www.cockroachlabs.com/)
+- [Constellation](https://github.com/edgelesssys/constellation)
- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk)
- [Datree](https://github.com/datreeio/datree)
- [Delve](https://github.com/derekparker/delve)
@@ -25,7 +27,7 @@
- [Istio](https://istio.io)
- [Kool](https://github.com/kool-dev/kool)
- [Kubernetes](https://kubernetes.io/)
-- [Kubescape](https://github.com/armosec/kubescape)
+- [Kubescape](https://github.com/kubescape/kubescape)
- [KubeVirt](https://github.com/kubevirt/kubevirt)
- [Linkerd](https://linkerd.io/)
- [Mattermost-server](https://github.com/mattermost/mattermost-server)
@@ -51,10 +53,12 @@
- [Random](https://github.com/erdaltsksn/random)
- [Rclone](https://rclone.org/)
- [Scaleway CLI](https://github.com/scaleway/scaleway-cli)
+- [Sia](https://github.com/SiaFoundation/siad)
- [Skaffold](https://skaffold.dev/)
- [Tendermint](https://github.com/tendermint/tendermint)
- [Twitch CLI](https://github.com/twitchdev/twitch-cli)
- [UpCloud CLI (`upctl`)](https://github.com/UpCloudLtd/upcloud-cli)
+- [Vitess](https://vitess.io)
- VMware's [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) & [Tanzu Framework](https://github.com/vmware-tanzu/tanzu-framework)
- [Werf](https://werf.io/)
- [ZITADEL](https://github.com/zitadel/zitadel)
diff --git a/vendor/github.com/spf13/cobra/shell_completions.go b/vendor/github.com/spf13/cobra/shell_completions.go
index 126e83c30..b035742d3 100644
--- a/vendor/github.com/spf13/cobra/shell_completions.go
+++ b/vendor/github.com/spf13/cobra/shell_completions.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/vendor/github.com/spf13/cobra/shell_completions.md b/vendor/github.com/spf13/cobra/shell_completions.md
index 553ee5df8..065c0621d 100644
--- a/vendor/github.com/spf13/cobra/shell_completions.md
+++ b/vendor/github.com/spf13/cobra/shell_completions.md
@@ -71,7 +71,7 @@ PowerShell:
`,cmd.Root().Name()),
DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
- Args: cobra.ExactValidArgs(1),
+ Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Run: func(cmd *cobra.Command, args []string) {
switch args[0] {
case "bash":
@@ -162,16 +162,7 @@ cmd := &cobra.Command{
}
```
-The aliases are not shown to the user on tab completion, but they are accepted as valid nouns by
-the completion algorithm if entered manually, e.g. in:
-
-```bash
-$ kubectl get rc [tab][tab]
-backend frontend database
-```
-
-Note that without declaring `rc` as an alias, the completion algorithm would not know to show the list of
-replication controllers following `rc`.
+The aliases are shown to the user on tab completion only if no completions were found within sub-commands or `ValidArgs`.
### Dynamic completion of nouns
@@ -237,6 +228,10 @@ ShellCompDirectiveFilterFileExt
// return []string{"themes"}, ShellCompDirectiveFilterDirs
//
ShellCompDirectiveFilterDirs
+
+// ShellCompDirectiveKeepOrder indicates that the shell should preserve the order
+// in which the completions are provided
+ShellCompDirectiveKeepOrder
```
***Note***: When using the `ValidArgsFunction`, Cobra will call your registered function after having parsed all flags and arguments provided in the command-line. You therefore don't need to do this parsing yourself. For example, when a user calls `helm status --namespace my-rook-ns [tab][tab]`, Cobra will call your registered `ValidArgsFunction` after having parsed the `--namespace` flag, as it would have done when calling the `RunE` function.
@@ -385,6 +380,19 @@ or
```go
ValidArgs: []string{"bash\tCompletions for bash", "zsh\tCompletions for zsh"}
```
+
+If you don't want to show descriptions in the completions, you can add `--no-descriptions` to the default `completion` command to disable them, like:
+
+```bash
+$ source <(helm completion bash)
+$ helm completion [tab][tab]
+bash (generate autocompletion script for bash) powershell (generate autocompletion script for powershell)
+fish (generate autocompletion script for fish) zsh (generate autocompletion script for zsh)
+
+$ source <(helm completion bash --no-descriptions)
+$ helm completion [tab][tab]
+bash fish powershell zsh
+```
## Bash completions
### Dependencies
diff --git a/vendor/github.com/spf13/cobra/user_guide.md b/vendor/github.com/spf13/cobra/user_guide.md
index e55367e85..85201d840 100644
--- a/vendor/github.com/spf13/cobra/user_guide.md
+++ b/vendor/github.com/spf13/cobra/user_guide.md
@@ -188,6 +188,37 @@ var versionCmd = &cobra.Command{
}
```
+### Organizing subcommands
+
+A command may have subcommands which in turn may have other subcommands. This is achieved by using
+`AddCommand`. In some cases, especially in larger applications, each subcommand may be defined in
+its own go package.
+
+The suggested approach is for the parent command to use `AddCommand` to add its most immediate
+subcommands. For example, consider the following directory structure:
+
+```text
+├── cmd
+│ ├── root.go
+│ └── sub1
+│ ├── sub1.go
+│ └── sub2
+│ ├── leafA.go
+│ ├── leafB.go
+│ └── sub2.go
+└── main.go
+```
+
+In this case:
+
+* The `init` function of `root.go` adds the command defined in `sub1.go` to the root command.
+* The `init` function of `sub1.go` adds the command defined in `sub2.go` to the sub1 command.
+* The `init` function of `sub2.go` adds the commands defined in `leafA.go` and `leafB.go` to the
+ sub2 command.
+
+This approach ensures the subcommands are always included at compile time while avoiding cyclic
+references.
+
### Returning and handling errors
If you wish to return an error to the caller of a command, `RunE` can be used.
@@ -313,8 +344,8 @@ rootCmd.MarkFlagsRequiredTogether("username", "password")
You can also prevent different flags from being provided together if they represent mutually
exclusive options such as specifying an output format as either `--json` or `--yaml` but never both:
```go
-rootCmd.Flags().BoolVar(&u, "json", false, "Output in JSON")
-rootCmd.Flags().BoolVar(&pw, "yaml", false, "Output in YAML")
+rootCmd.Flags().BoolVar(&ofJson, "json", false, "Output in JSON")
+rootCmd.Flags().BoolVar(&ofYaml, "yaml", false, "Output in YAML")
rootCmd.MarkFlagsMutuallyExclusive("json", "yaml")
```
@@ -349,7 +380,7 @@ shown below:
```go
var cmd = &cobra.Command{
Short: "hello",
- Args: MatchAll(ExactArgs(2), OnlyValidArgs),
+ Args: cobra.MatchAll(cobra.ExactArgs(2), cobra.OnlyValidArgs),
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("Hello, World!")
},
diff --git a/vendor/github.com/spf13/cobra/zsh_completions.go b/vendor/github.com/spf13/cobra/zsh_completions.go
index 84cec76fd..1856e4c7f 100644
--- a/vendor/github.com/spf13/cobra/zsh_completions.go
+++ b/vendor/github.com/spf13/cobra/zsh_completions.go
@@ -1,4 +1,4 @@
-// Copyright 2013-2022 The Cobra Authors
+// Copyright 2013-2023 The Cobra Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -90,6 +90,7 @@ func genZshComp(buf io.StringWriter, name string, includeDesc bool) {
compCmd = ShellCompNoDescRequestCmd
}
WriteStringAndCheck(buf, fmt.Sprintf(`#compdef %[1]s
+compdef _%[1]s %[1]s
# zsh completion for %-36[1]s -*- shell-script -*-
@@ -108,8 +109,9 @@ _%[1]s()
local shellCompDirectiveNoFileComp=%[5]d
local shellCompDirectiveFilterFileExt=%[6]d
local shellCompDirectiveFilterDirs=%[7]d
+ local shellCompDirectiveKeepOrder=%[8]d
- local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace
+ local lastParam lastChar flagPrefix requestComp out directive comp lastComp noSpace keepOrder
local -a completions
__%[1]s_debug "\n========= starting completion logic =========="
@@ -177,7 +179,7 @@ _%[1]s()
return
fi
- local activeHelpMarker="%[8]s"
+ local activeHelpMarker="%[9]s"
local endIndex=${#activeHelpMarker}
local startIndex=$((${#activeHelpMarker}+1))
local hasActiveHelp=0
@@ -227,6 +229,11 @@ _%[1]s()
noSpace="-S ''"
fi
+ if [ $((directive & shellCompDirectiveKeepOrder)) -ne 0 ]; then
+ __%[1]s_debug "Activating keep order."
+ keepOrder="-V"
+ fi
+
if [ $((directive & shellCompDirectiveFilterFileExt)) -ne 0 ]; then
# File extension filtering
local filteringCmd
@@ -262,7 +269,7 @@ _%[1]s()
return $result
else
__%[1]s_debug "Calling _describe"
- if eval _describe "completions" completions $flagPrefix $noSpace; then
+ if eval _describe $keepOrder "completions" completions $flagPrefix $noSpace; then
__%[1]s_debug "_describe found some completions"
# Return the success of having called _describe
@@ -296,6 +303,6 @@ if [ "$funcstack[1]" = "_%[1]s" ]; then
fi
`, name, compCmd,
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
- ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs,
+ ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, ShellCompDirectiveKeepOrder,
activeHelpMarker))
}
diff --git a/vendor/github.com/stoewer/go-strcase/README.md b/vendor/github.com/stoewer/go-strcase/README.md
index 0e8635d80..84a640e71 100644
--- a/vendor/github.com/stoewer/go-strcase/README.md
+++ b/vendor/github.com/stoewer/go-strcase/README.md
@@ -1,5 +1,5 @@
-[![CircleCI](https://circleci.com/gh/stoewer/go-strcase/tree/master.svg?style=svg)](https://circleci.com/gh/stoewer/go-strcase/tree/master)
-[![codecov](https://codecov.io/gh/stoewer/go-strcase/branch/master/graph/badge.svg)](https://codecov.io/gh/stoewer/go-strcase)
+[![GH Actions](https://github.com/stoewer/go-strcase/actions/workflows/lint-test.yml/badge.svg?branch=master)](https://github.com/stoewer/go-strcase/actions)
+[![codecov](https://codecov.io/github/stoewer/go-strcase/branch/master/graph/badge.svg?token=c0UokYnop5)](https://codecov.io/github/stoewer/go-strcase)
[![GoDoc](https://godoc.org/github.com/stoewer/go-strcase?status.svg)](https://pkg.go.dev/github.com/stoewer/go-strcase)
---
diff --git a/vendor/github.com/stoewer/go-strcase/camel.go b/vendor/github.com/stoewer/go-strcase/camel.go
index 5c233cc8f..ff9e66e0c 100644
--- a/vendor/github.com/stoewer/go-strcase/camel.go
+++ b/vendor/github.com/stoewer/go-strcase/camel.go
@@ -27,6 +27,9 @@ func camelCase(s string, upper bool) string {
buffer = append(buffer, toUpper(curr))
} else if isLower(prev) {
buffer = append(buffer, curr)
+ } else if isUpper(prev) && isUpper(curr) && isLower(next) {
+ // Assume a case like "R" for "XRequestId"
+ buffer = append(buffer, curr)
} else {
buffer = append(buffer, toLower(curr))
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/config/feature_flags.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/config/feature_flags.go
index 305200b7f..699a65516 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/config/feature_flags.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/config/feature_flags.go
@@ -33,24 +33,19 @@ const (
AlphaAPIFields = "alpha"
// BetaAPIFields is the value used for "enable-api-fields" when beta APIs should be usable as well.
BetaAPIFields = "beta"
- // EnforceResourceVerificationMode is the value used for "resource-verification-mode" when verification is applied and fail the
- // TaskRun or PipelineRun when verification fails
- EnforceResourceVerificationMode = "enforce"
- // WarnResourceVerificationMode is the value used for "resource-verification-mode" when verification is applied but only log
- // the warning when verification fails
- WarnResourceVerificationMode = "warn"
- // SkipResourceVerificationMode is the value used for "resource-verification-mode" when verification is skipped
- SkipResourceVerificationMode = "skip"
+ // FailNoMatchPolicy is the value used for "trusted-resources-verification-no-match-policy" to fail TaskRun or PipelineRun
+ // when no matching policies are found
+ FailNoMatchPolicy = "fail"
+ // WarnNoMatchPolicy is the value used for "trusted-resources-verification-no-match-policy" to log warning and skip verification
+ // when no matching policies are found
+ WarnNoMatchPolicy = "warn"
+ // IgnoreNoMatchPolicy is the value used for "trusted-resources-verification-no-match-policy" to skip verification
+ // when no matching policies are found
+ IgnoreNoMatchPolicy = "ignore"
// ResultExtractionMethodTerminationMessage is the value used for "results-from" as a way to extract results from tasks using kubernetes termination message.
ResultExtractionMethodTerminationMessage = "termination-message"
// ResultExtractionMethodSidecarLogs is the value used for "results-from" as a way to extract results from tasks using sidecar logs.
ResultExtractionMethodSidecarLogs = "sidecar-logs"
- // CustomTaskVersionAlpha is the value used for "custom-task-version" when the PipelineRun reconciler should create
- // v1alpha1.Runs.
- CustomTaskVersionAlpha = "v1alpha1"
- // CustomTaskVersionBeta is the value used for "custom-task-version" when the PipelineRun reconciler should create
- // v1beta1.CustomRuns.
- CustomTaskVersionBeta = "v1beta1"
// DefaultDisableAffinityAssistant is the default value for "disable-affinity-assistant".
DefaultDisableAffinityAssistant = false
// DefaultDisableCredsInit is the default value for "disable-creds-init".
@@ -73,35 +68,34 @@ const (
EnforceNonfalsifiabilityNone = ""
// DefaultEnforceNonfalsifiability is the default value for "enforce-nonfalsifiability".
DefaultEnforceNonfalsifiability = EnforceNonfalsifiabilityNone
- // DefaultResourceVerificationMode is the default value for "resource-verification-mode".
- DefaultResourceVerificationMode = SkipResourceVerificationMode
+ // DefaultNoMatchPolicyConfig is the default value for "trusted-resources-verification-no-match-policy".
+ DefaultNoMatchPolicyConfig = IgnoreNoMatchPolicy
// DefaultEnableProvenanceInStatus is the default value for "enable-provenance-status".
DefaultEnableProvenanceInStatus = false
// DefaultResultExtractionMethod is the default value for ResultExtractionMethod
DefaultResultExtractionMethod = ResultExtractionMethodTerminationMessage
// DefaultMaxResultSize is the default value in bytes for the size of a result
DefaultMaxResultSize = 4096
- // DefaultCustomTaskVersion is the default value for "custom-task-version"
- DefaultCustomTaskVersion = CustomTaskVersionBeta
disableAffinityAssistantKey = "disable-affinity-assistant"
disableCredsInitKey = "disable-creds-init"
runningInEnvWithInjectedSidecarsKey = "running-in-environment-with-injected-sidecars"
awaitSidecarReadinessKey = "await-sidecar-readiness"
- requireGitSSHSecretKnownHostsKey = "require-git-ssh-secret-known-hosts" // nolint: gosec
+ requireGitSSHSecretKnownHostsKey = "require-git-ssh-secret-known-hosts" //nolint:gosec
enableTektonOCIBundles = "enable-tekton-oci-bundles"
enableAPIFields = "enable-api-fields"
sendCloudEventsForRuns = "send-cloudevents-for-runs"
enforceNonfalsifiability = "enforce-nonfalsifiability"
- verificationMode = "resource-verification-mode"
+ verificationNoMatchPolicy = "trusted-resources-verification-no-match-policy"
enableProvenanceInStatus = "enable-provenance-in-status"
resultExtractionMethod = "results-from"
maxResultSize = "max-result-size"
- customTaskVersion = "custom-task-version"
)
// FeatureFlags holds the features configurations
// +k8s:deepcopy-gen=true
+//
+//nolint:musttag
type FeatureFlags struct {
DisableAffinityAssistant bool
DisableCredsInit bool
@@ -113,11 +107,15 @@ type FeatureFlags struct {
SendCloudEventsForRuns bool
AwaitSidecarReadiness bool
EnforceNonfalsifiability string
- ResourceVerificationMode string
- EnableProvenanceInStatus bool
- ResultExtractionMethod string
- MaxResultSize int
- CustomTaskVersion string
+ // VerificationNoMatchPolicy is the feature flag for "trusted-resources-verification-no-match-policy"
+ // VerificationNoMatchPolicy can be set to "ignore", "warn" and "fail" values.
+ // ignore: skip trusted resources verification when no matching verification policies found
+ // warn: skip trusted resources verification when no matching verification policies found and log a warning
+ // fail: fail the taskrun or pipelines run if no matching verification policies found
+ VerificationNoMatchPolicy string
+ EnableProvenanceInStatus bool
+ ResultExtractionMethod string
+ MaxResultSize int
}
// GetFeatureFlagsConfigName returns the name of the configmap containing all
@@ -129,29 +127,13 @@ func GetFeatureFlagsConfigName() string {
return "feature-flags"
}
-func getEnforceNonfalsifiabilityFeature(cfgMap map[string]string) (string, error) {
- var mapValue struct{}
- var acceptedValues = map[string]struct{}{
- EnforceNonfalsifiabilityNone: mapValue,
- EnforceNonfalsifiabilityWithSpire: mapValue,
- }
- var value = DefaultEnforceNonfalsifiability
- if cfg, ok := cfgMap[enforceNonfalsifiability]; ok {
- value = strings.ToLower(cfg)
- }
- if _, ok := acceptedValues[value]; !ok {
- return DefaultEnforceNonfalsifiability, fmt.Errorf("invalid value for feature flag %q: %q", enforceNonfalsifiability, value)
- }
- return value, nil
-}
-
// NewFeatureFlagsFromMap returns a Config given a map corresponding to a ConfigMap
func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error) {
setFeature := func(key string, defaultValue bool, feature *bool) error {
if cfg, ok := cfgMap[key]; ok {
value, err := strconv.ParseBool(cfg)
if err != nil {
- return fmt.Errorf("failed parsing feature flags config %q: %v", cfg, err)
+ return fmt.Errorf("failed parsing feature flags config %q: %w", cfg, err)
}
*feature = value
return nil
@@ -182,7 +164,7 @@ func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error) {
if err := setFeature(sendCloudEventsForRuns, DefaultSendCloudEventsForRuns, &tc.SendCloudEventsForRuns); err != nil {
return nil, err
}
- if err := setResourceVerificationMode(cfgMap, DefaultResourceVerificationMode, &tc.ResourceVerificationMode); err != nil {
+ if err := setVerificationNoMatchPolicy(cfgMap, DefaultNoMatchPolicyConfig, &tc.VerificationNoMatchPolicy); err != nil {
return nil, err
}
if err := setFeature(enableProvenanceInStatus, DefaultEnableProvenanceInStatus, &tc.EnableProvenanceInStatus); err != nil {
@@ -194,7 +176,7 @@ func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error) {
if err := setMaxResultSize(cfgMap, DefaultMaxResultSize, &tc.MaxResultSize); err != nil {
return nil, err
}
- if err := setCustomTaskVersion(cfgMap, DefaultCustomTaskVersion, &tc.CustomTaskVersion); err != nil {
+ if err := setEnforceNonFalsifiability(cfgMap, tc.EnableAPIFields, &tc.EnforceNonfalsifiability); err != nil {
return nil, err
}
@@ -206,21 +188,10 @@ func NewFeatureFlagsFromMap(cfgMap map[string]string) (*FeatureFlags, error) {
// defeat the purpose of having a single shared gate for all alpha features.
if tc.EnableAPIFields == AlphaAPIFields {
tc.EnableTektonOCIBundles = true
- // Only consider SPIRE if alpha is on.
- enforceNonfalsifiabilityValue, err := getEnforceNonfalsifiabilityFeature(cfgMap)
- if err != nil {
- return nil, err
- }
- tc.EnforceNonfalsifiability = enforceNonfalsifiabilityValue
} else {
if err := setFeature(enableTektonOCIBundles, DefaultEnableTektonOciBundles, &tc.EnableTektonOCIBundles); err != nil {
return nil, err
}
- // Do not enable any form of non-falsifiability enforcement in non-alpha mode.
- tc.EnforceNonfalsifiability = EnforceNonfalsifiabilityNone
- if enforceNonfalsifiabilityValue, err := getEnforceNonfalsifiabilityFeature(cfgMap); err != nil || enforceNonfalsifiabilityValue != DefaultEnforceNonfalsifiability {
- return nil, fmt.Errorf("%q can be set to non-default values (%q) only in alpha", enforceNonfalsifiability, enforceNonfalsifiabilityValue)
- }
}
return &tc, nil
}
@@ -241,34 +212,47 @@ func setEnabledAPIFields(cfgMap map[string]string, defaultValue string, feature
return nil
}
-// setResultExtractionMethod sets the "results-from" flag based on the content of a given map.
-// If the feature gate is invalid or missing then an error is returned.
-func setResultExtractionMethod(cfgMap map[string]string, defaultValue string, feature *string) error {
- value := defaultValue
- if cfg, ok := cfgMap[resultExtractionMethod]; ok {
+// setEnforceNonFalsifiability sets the "enforce-nonfalsifiability" flag based on the content of a given map.
+// If the feature gate is invalid, then an error is returned.
+func setEnforceNonFalsifiability(cfgMap map[string]string, enableAPIFields string, feature *string) error {
+ var value = DefaultEnforceNonfalsifiability
+ if cfg, ok := cfgMap[enforceNonfalsifiability]; ok {
value = strings.ToLower(cfg)
}
+
+ // validate that "enforce-nonfalsifiability" is set to a valid value
switch value {
- case ResultExtractionMethodTerminationMessage, ResultExtractionMethodSidecarLogs:
+ case EnforceNonfalsifiabilityNone, EnforceNonfalsifiabilityWithSpire:
+ break
+ default:
+ return fmt.Errorf("invalid value for feature flag %q: %q", enforceNonfalsifiability, value)
+ }
+
+ // validate that "enforce-nonfalsifiability" is set to allowed values for stability level
+ switch enableAPIFields {
+ case AlphaAPIFields:
*feature = value
default:
- return fmt.Errorf("invalid value for feature flag %q: %q", resultExtractionMethod, value)
+ // Do not consider any form of non-falsifiability enforcement in non-alpha mode
+ if value != DefaultEnforceNonfalsifiability {
+ return fmt.Errorf("%q can be set to non-default values (%q) only in alpha", enforceNonfalsifiability, value)
+ }
}
return nil
}
-// setCustomTaskVersion sets the "custom-task-version" flag based on the content of a given map.
+// setResultExtractionMethod sets the "results-from" flag based on the content of a given map.
// If the feature gate is invalid or missing then an error is returned.
-func setCustomTaskVersion(cfgMap map[string]string, defaultValue string, feature *string) error {
+func setResultExtractionMethod(cfgMap map[string]string, defaultValue string, feature *string) error {
value := defaultValue
- if cfg, ok := cfgMap[customTaskVersion]; ok {
+ if cfg, ok := cfgMap[resultExtractionMethod]; ok {
value = strings.ToLower(cfg)
}
switch value {
- case CustomTaskVersionAlpha, CustomTaskVersionBeta:
+ case ResultExtractionMethodTerminationMessage, ResultExtractionMethodSidecarLogs:
*feature = value
default:
- return fmt.Errorf("invalid value for feature flag %q: %q", customTaskVersion, value)
+ return fmt.Errorf("invalid value for feature flag %q: %q", resultExtractionMethod, value)
}
return nil
}
@@ -286,24 +270,24 @@ func setMaxResultSize(cfgMap map[string]string, defaultValue int, feature *int)
}
// if max limit is > 1.5 MB (CRD limit).
if value >= 1572864 {
- return fmt.Errorf("invalid value for feature flag %q: %q. This is exceeding the CRD limit", resultExtractionMethod, value)
+ return fmt.Errorf("invalid value for feature flag %q: %q. This is exceeding the CRD limit", resultExtractionMethod, fmt.Sprint(value))
}
*feature = value
return nil
}
-// setResourceVerificationMode sets the "resource-verification-mode" flag based on the content of a given map.
+// setVerificationNoMatchPolicy sets the "trusted-resources-verification-no-match-policy" flag based on the content of a given map.
// If the value is invalid or missing then an error is returned.
-func setResourceVerificationMode(cfgMap map[string]string, defaultValue string, feature *string) error {
+func setVerificationNoMatchPolicy(cfgMap map[string]string, defaultValue string, feature *string) error {
value := defaultValue
- if cfg, ok := cfgMap[verificationMode]; ok {
+ if cfg, ok := cfgMap[verificationNoMatchPolicy]; ok {
value = strings.ToLower(cfg)
}
switch value {
- case EnforceResourceVerificationMode, WarnResourceVerificationMode, SkipResourceVerificationMode:
+ case FailNoMatchPolicy, WarnNoMatchPolicy, IgnoreNoMatchPolicy:
*feature = value
default:
- return fmt.Errorf("invalid value for feature flag %q: %q", verificationMode, value)
+ return fmt.Errorf("invalid value for feature flag %q: %q", verificationNoMatchPolicy, value)
}
return nil
}
@@ -328,18 +312,9 @@ func EnableStableAPIFields(ctx context.Context) context.Context {
return setEnableAPIFields(ctx, StableAPIFields)
}
-// CheckEnforceResourceVerificationMode returns true if the ResourceVerificationMode is EnforceResourceVerificationMode
-// else returns false
-func CheckEnforceResourceVerificationMode(ctx context.Context) bool {
- cfg := FromContextOrDefaults(ctx)
- return cfg.FeatureFlags.ResourceVerificationMode == EnforceResourceVerificationMode
-}
-
-// CheckWarnResourceVerificationMode returns true if the ResourceVerificationMode is WarnResourceVerificationMode
-// else returns false
-func CheckWarnResourceVerificationMode(ctx context.Context) bool {
- cfg := FromContextOrDefaults(ctx)
- return cfg.FeatureFlags.ResourceVerificationMode == WarnResourceVerificationMode
+// GetVerificationNoMatchPolicy returns the "trusted-resources-verification-no-match-policy" value
+func GetVerificationNoMatchPolicy(ctx context.Context) string {
+ return FromContextOrDefaults(ctx).FeatureFlags.VerificationNoMatchPolicy
}
// CheckAlphaOrBetaAPIFields return true if the enable-api-fields is either set to alpha or set to beta
@@ -348,6 +323,11 @@ func CheckAlphaOrBetaAPIFields(ctx context.Context) bool {
return cfg.FeatureFlags.EnableAPIFields == AlphaAPIFields || cfg.FeatureFlags.EnableAPIFields == BetaAPIFields
}
+// IsSpireEnabled checks if non-falsifiable provenance is enforced through SPIRE
+func IsSpireEnabled(ctx context.Context) bool {
+ return FromContextOrDefaults(ctx).FeatureFlags.EnforceNonfalsifiability == EnforceNonfalsifiabilityWithSpire
+}
+
func setEnableAPIFields(ctx context.Context, want string) context.Context {
featureFlags, _ := NewFeatureFlagsFromMap(map[string]string{
"enable-api-fields": want,
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/controller.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/controller.go
index dd5669174..5f1550070 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/controller.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/controller.go
@@ -18,11 +18,9 @@ package pipeline
const (
// PipelineRunControllerName holds the name of the PipelineRun controller
- // nolint: revive
PipelineRunControllerName = "PipelineRun"
// PipelineControllerName holds the name of the Pipeline controller
- // nolint: revive
PipelineControllerName = "Pipeline"
// TaskRunControllerName holds the name of the TaskRun controller
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/matrix_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/matrix_types.go
index 1c99567dc..67fb8a6b8 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/matrix_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/matrix_types.go
@@ -34,16 +34,17 @@ type Matrix struct {
// +listType=atomic
Params Params `json:"params,omitempty"`
- // Include is a list of MatrixInclude which allows passing in specific combinations of Parameters into the Matrix.
- // Note that Include is in preview mode and not yet supported.
+ // Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
// +optional
// +listType=atomic
- Include []MatrixInclude `json:"include,omitempty"`
+ Include IncludeParamsList `json:"include,omitempty"`
}
-// MatrixInclude allows passing in a specific combinations of Parameters into the Matrix.
-// Note this struct is in preview mode and not yet supported
-type MatrixInclude struct {
+// IncludeParamsList is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
+type IncludeParamsList []IncludeParams
+
+// IncludeParams allows passing in a specific combinations of Parameters into the Matrix.
+type IncludeParams struct {
// Name the specified combination
Name string `json:"name,omitempty"`
@@ -56,12 +57,88 @@ type MatrixInclude struct {
// Combination is a map, mainly defined to hold a single combination from a Matrix with key as param.Name and value as param.Value
type Combination map[string]string
-// Combinations is a list of combinations
+// Combinations is a Combination list
type Combinations []Combination
-// ToParams transforms Combinations from a slice of map[string]string to a slice of Params
+// FanOut returns an list of params that represent combinations
+func (m *Matrix) FanOut() []Params {
+ var combinations, includeCombinations Combinations
+ includeCombinations = m.getIncludeCombinations()
+ if m.HasInclude() && !m.HasParams() {
+ // If there are only Matrix Include Parameters return explicit combinations
+ return includeCombinations.toParams()
+ }
+ // Generate combinations from Matrix Parameters
+ for _, parameter := range m.Params {
+ combinations = combinations.fanOutMatrixParams(parameter)
+ }
+ combinations.overwriteCombinations(includeCombinations)
+ combinations = combinations.addNewCombinations(includeCombinations)
+ return combinations.toParams()
+}
+
+// overwriteCombinations replaces any missing include params in the initial
+// matrix params combinations by overwriting the initial combinations with the
+// include combinations
+func (cs Combinations) overwriteCombinations(ics Combinations) {
+ for _, paramCombination := range cs {
+ for _, includeCombination := range ics {
+ if paramCombination.contains(includeCombination) {
+ // overwrite the parameter name and value in existing combination
+ // with the include combination
+ for name, val := range includeCombination {
+ paramCombination[name] = val
+ }
+ }
+ }
+ }
+}
+
+// addNewCombinations creates a new combination for any include parameter
+// values that are missing entirely from the initial combinations and
+// returns all combinations
+func (cs Combinations) addNewCombinations(ics Combinations) Combinations {
+ for _, includeCombination := range ics {
+ if cs.shouldAddNewCombination(includeCombination) {
+ cs = append(cs, includeCombination)
+ }
+ }
+ return cs
+}
+
+// contains returns true if the include parameter name and value exists in combinations
+func (c Combination) contains(includeCombination Combination) bool {
+ for name, val := range includeCombination {
+ if _, exist := c[name]; exist {
+ if c[name] != val {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+// shouldAddNewCombination returns true if the include parameter name exists but the value is
+// missing from combinations
+func (cs Combinations) shouldAddNewCombination(includeCombination map[string]string) bool {
+ if len(includeCombination) == 0 {
+ return false
+ }
+ for _, paramCombination := range cs {
+ for name, val := range includeCombination {
+ if _, exist := paramCombination[name]; exist {
+ if paramCombination[name] == val {
+ return false
+ }
+ }
+ }
+ }
+ return true
+}
+
+// toParams transforms Combinations from a slice of map[string]string to a slice of Params
// such that, these combinations can be directly consumed in creating taskRun/run object
-func (cs Combinations) ToParams() []Params {
+func (cs Combinations) toParams() []Params {
listOfParams := make([]Params, len(cs))
for i := range cs {
var params Params
@@ -78,15 +155,29 @@ func (cs Combinations) ToParams() []Params {
return listOfParams
}
-// fanOut generates a new combination based on a given Parameter in the Matrix.
-func (cs Combinations) fanOut(param Param) Combinations {
+// fanOutMatrixParams generates new combinations based on Matrix Parameters.
+func (cs Combinations) fanOutMatrixParams(param Param) Combinations {
if len(cs) == 0 {
return initializeCombinations(param)
}
return cs.distribute(param)
}
-// distribute generates a new combination of Parameters by adding a new Parameter to an existing list of Combinations.
+// getIncludeCombinations generates combinations based on Matrix Include Parameters
+func (m *Matrix) getIncludeCombinations() Combinations {
+ var combinations Combinations
+ for i := range m.Include {
+ includeParams := m.Include[i].Params
+ newCombination := make(Combination)
+ for _, param := range includeParams {
+ newCombination[param.Name] = param.Value.StringVal
+ }
+ combinations = append(combinations, newCombination)
+ }
+ return combinations
+}
+
+// distribute generates a new Combination of Parameters by adding a new Parameter to an existing list of Combinations.
func (cs Combinations) distribute(param Param) Combinations {
var expandedCombinations Combinations
for _, value := range param.Value.ArrayVal {
@@ -101,7 +192,7 @@ func (cs Combinations) distribute(param Param) Combinations {
return expandedCombinations
}
-// initializeCombinations generates a new combination based on the first Parameter in the Matrix.
+// initializeCombinations generates a new Combination based on the first Parameter in the Matrix.
func initializeCombinations(param Param) Combinations {
var combinations Combinations
for _, value := range param.Value.ArrayVal {
@@ -110,7 +201,7 @@ func initializeCombinations(param Param) Combinations {
return combinations
}
-// sortCombination sorts the given Combination based on the param names to produce a deterministic ordering
+// sortCombination sorts the given Combination based on the Parameter names to produce a deterministic ordering
func (c Combination) sortCombination() ([]string, Combination) {
sortedCombination := make(Combination, len(c))
order := make([]string, 0, len(c))
@@ -126,30 +217,21 @@ func (c Combination) sortCombination() ([]string, Combination) {
return order, sortedCombination
}
-// FanOut produces combinations of Parameters of type String from a slice of Parameters of type Array.
-func (m *Matrix) FanOut() Combinations {
- var combinations Combinations
- for _, parameter := range m.Params {
- combinations = combinations.fanOut(parameter)
- }
- return combinations
-}
-
-// CountCombinations returns the count of combinations of Parameters generated from the Matrix in PipelineTask.
+// CountCombinations returns the count of Combinations of Parameters generated from the Matrix in PipelineTask.
func (m *Matrix) CountCombinations() int {
- // Iterate over matrix.params and compute count of all generated combinations
+ // Iterate over Matrix Parameters and compute count of all generated Combinations
count := m.countGeneratedCombinationsFromParams()
- // Add any additional combinations generated from matrix include params
+ // Add any additional Combinations generated from Matrix Include Parameters
count += m.countNewCombinationsFromInclude()
return count
}
-// countGeneratedCombinationsFromParams returns the count of combinations of Parameters generated from the matrix
-// parameters
+// countGeneratedCombinationsFromParams returns the count of Combinations of Parameters generated from the Matrix
+// Parameters
func (m *Matrix) countGeneratedCombinationsFromParams() int {
- if !m.hasParams() {
+ if !m.HasParams() {
return 0
}
count := 1
@@ -159,13 +241,13 @@ func (m *Matrix) countGeneratedCombinationsFromParams() int {
return count
}
-// countNewCombinationsFromInclude returns the count of combinations of Parameters generated from the matrix
-// include parameters
+// countNewCombinationsFromInclude returns the count of Combinations of Parameters generated from the Matrix
+// Include Parameters
func (m *Matrix) countNewCombinationsFromInclude() int {
- if !m.hasInclude() {
+ if !m.HasInclude() {
return 0
}
- if !m.hasParams() {
+ if !m.HasParams() {
return len(m.Include)
}
count := 0
@@ -173,7 +255,7 @@ func (m *Matrix) countNewCombinationsFromInclude() int {
for _, include := range m.Include {
for _, param := range include.Params {
if val, exist := matrixParamMap[param.Name]; exist {
- // If the matrix include param values does not exist, a new combination will be generated
+ // If the Matrix Include param values does not exist, a new Combination will be generated
if !slices.Contains(val, param.Value.StringVal) {
count++
} else {
@@ -185,25 +267,28 @@ func (m *Matrix) countNewCombinationsFromInclude() int {
return count
}
-func (m *Matrix) hasInclude() bool {
+// HasInclude returns true if the Matrix has Include Parameters
+func (m *Matrix) HasInclude() bool {
return m != nil && m.Include != nil && len(m.Include) > 0
}
-func (m *Matrix) hasParams() bool {
+// HasParams returns true if the Matrix has Parameters
+func (m *Matrix) HasParams() bool {
return m != nil && m.Params != nil && len(m.Params) > 0
}
-func (m *Matrix) getParamNames() []string {
- var names []string
- if m.hasParams() {
- names = m.Params.extractNames()
+// GetAllParams returns a list of all Matrix Parameters
+func (m *Matrix) GetAllParams() Params {
+ var params Params
+ if m.HasParams() {
+ params = append(params, m.Params...)
}
- if m.hasInclude() {
+ if m.HasInclude() {
for _, include := range m.Include {
- names = append(names, include.Params.extractNames()...)
+ params = append(params, include.Params...)
}
}
- return names
+ return params
}
func (m *Matrix) validateCombinationsCount(ctx context.Context) (errs *apis.FieldError) {
@@ -215,14 +300,13 @@ func (m *Matrix) validateCombinationsCount(ctx context.Context) (errs *apis.Fiel
return errs
}
-// validateParams validates the type of parameter
-// for Matrix.Params and Matrix.Include.Params
+// validateParams validates the type of Parameter for Matrix.Params and Matrix.Include.Params
// Matrix.Params must be of type array. Matrix.Include.Params must be of type string.
// validateParams also validates Matrix.Params for a unique list of params
// and a unique list of params in each Matrix.Include.Params specification
func (m *Matrix) validateParams() (errs *apis.FieldError) {
if m != nil {
- if m.hasInclude() {
+ if m.HasInclude() {
for i, include := range m.Include {
errs = errs.Also(include.Params.validateDuplicateParameters().ViaField(fmt.Sprintf("matrix.include[%d].params", i)))
for _, param := range include.Params {
@@ -232,7 +316,7 @@ func (m *Matrix) validateParams() (errs *apis.FieldError) {
}
}
}
- if m.hasParams() {
+ if m.HasParams() {
errs = errs.Also(m.Params.validateDuplicateParameters().ViaField("matrix.params"))
for _, param := range m.Params {
if param.Value.Type != ParamTypeArray {
@@ -244,10 +328,10 @@ func (m *Matrix) validateParams() (errs *apis.FieldError) {
return errs
}
-// validatePipelineParametersVariablesInMatrixParameters validates all pipeline paramater variables including Matrix.Params and Matrix.Include.Params
+// validatePipelineParametersVariablesInMatrixParameters validates all pipeline parameter variables including Matrix.Params and Matrix.Include.Params
// that may contain the reference(s) to other params to make sure those references are used appropriately.
func (m *Matrix) validatePipelineParametersVariablesInMatrixParameters(prefix string, paramNames sets.String, arrayParamNames sets.String, objectParamNameKeys map[string][]string) (errs *apis.FieldError) {
- if m.hasInclude() {
+ if m.HasInclude() {
for _, include := range m.Include {
for idx, param := range include.Params {
stringElement := param.Value.StringVal
@@ -256,7 +340,7 @@ func (m *Matrix) validatePipelineParametersVariablesInMatrixParameters(prefix st
}
}
}
- if m.hasParams() {
+ if m.HasParams() {
for _, param := range m.Params {
for idx, arrayElement := range param.Value.ArrayVal {
// Matrix Params must be of type array
@@ -268,7 +352,7 @@ func (m *Matrix) validatePipelineParametersVariablesInMatrixParameters(prefix st
}
func (m *Matrix) validateParameterInOneOfMatrixOrParams(params []Param) (errs *apis.FieldError) {
- matrixParamNames := sets.NewString(m.getParamNames()...)
+ matrixParamNames := m.GetAllParams().ExtractNames()
for _, param := range params {
if matrixParamNames.Has(param.Name) {
errs = errs.Also(apis.ErrMultipleOneOf("matrix["+param.Name+"]", "params["+param.Name+"]"))
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go
index 9585668c8..b500ef875 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/merge.go
@@ -20,6 +20,7 @@ import (
"encoding/json"
corev1 "k8s.io/api/core/v1"
+ v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/strategicpatch"
)
@@ -67,6 +68,65 @@ func MergeStepsWithStepTemplate(template *StepTemplate, steps []Step) ([]Step, e
return steps, nil
}
+// MergeStepsWithSpecs takes a possibly nil list of overrides and a
+// list of steps, merging each of the steps with the overrides' resource requirements, if
+// it's not nil, and returning the resulting list.
+func MergeStepsWithSpecs(steps []Step, overrides []TaskRunStepSpec) ([]Step, error) {
+ stepNameToOverride := make(map[string]TaskRunStepSpec, len(overrides))
+ for _, o := range overrides {
+ stepNameToOverride[o.Name] = o
+ }
+ for i, s := range steps {
+ o, found := stepNameToOverride[s.Name]
+ if !found {
+ continue
+ }
+ merged := v1.ResourceRequirements{}
+ err := mergeObjWithTemplate(&s.ComputeResources, &o.ComputeResources, &merged)
+ if err != nil {
+ return nil, err
+ }
+ steps[i].ComputeResources = merged
+ }
+ return steps, nil
+}
+
+// MergeSidecarsWithSpecs takes a possibly nil list of overrides and a
+// list of sidecars, merging each of the sidecars with the overrides' resource requirements, if
+// it's not nil, and returning the resulting list.
+func MergeSidecarsWithSpecs(sidecars []Sidecar, overrides []TaskRunSidecarSpec) ([]Sidecar, error) {
+ if len(overrides) == 0 {
+ return sidecars, nil
+ }
+ sidecarNameToOverride := make(map[string]TaskRunSidecarSpec, len(overrides))
+ for _, o := range overrides {
+ sidecarNameToOverride[o.Name] = o
+ }
+ for i, s := range sidecars {
+ o, found := sidecarNameToOverride[s.Name]
+ if !found {
+ continue
+ }
+ merged := v1.ResourceRequirements{}
+ err := mergeObjWithTemplate(&s.ComputeResources, &o.ComputeResources, &merged)
+ if err != nil {
+ return nil, err
+ }
+ sidecars[i].ComputeResources = merged
+ }
+ return sidecars, nil
+}
+
+// mergeObjWithTemplate merges obj with template and updates out to reflect the merged result.
+// template, obj, and out should point to the same type. out points to the zero value of that type.
+func mergeObjWithTemplate(template, obj, out interface{}) error {
+ md, err := getMergeData(template, out)
+ if err != nil {
+ return err
+ }
+ return mergeObjWithTemplateBytes(md, obj, out)
+}
+
// getMergeData serializes the template and empty object to get the intermediate results necessary for
// merging an object of the same type with this template.
// This function is provided to avoid repeatedly serializing an identical template.
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go
index ddbd49c2f..5915648f9 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/openapi_generated.go
@@ -33,10 +33,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.AffinityAssistantTemplate": schema_pkg_apis_pipeline_pod_AffinityAssistantTemplate(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.Template": schema_pkg_apis_pipeline_pod_Template(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ChildStatusReference": schema_pkg_apis_pipeline_v1_ChildStatusReference(ref),
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ConfigSource": schema_pkg_apis_pipeline_v1_ConfigSource(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.EmbeddedTask": schema_pkg_apis_pipeline_v1_EmbeddedTask(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.IncludeParams": schema_pkg_apis_pipeline_v1_IncludeParams(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Matrix": schema_pkg_apis_pipeline_v1_Matrix(ref),
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.MatrixInclude": schema_pkg_apis_pipeline_v1_MatrixInclude(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param": schema_pkg_apis_pipeline_v1_Param(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ParamSpec": schema_pkg_apis_pipeline_v1_ParamSpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ParamValue": schema_pkg_apis_pipeline_v1_ParamValue(ref),
@@ -62,6 +61,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.PipelineWorkspaceDeclaration": schema_pkg_apis_pipeline_v1_PipelineWorkspaceDeclaration(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.PropertySpec": schema_pkg_apis_pipeline_v1_PropertySpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Provenance": schema_pkg_apis_pipeline_v1_Provenance(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.RefSource": schema_pkg_apis_pipeline_v1_RefSource(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ResolverRef": schema_pkg_apis_pipeline_v1_ResolverRef(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ResultRef": schema_pkg_apis_pipeline_v1_ResultRef(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Sidecar": schema_pkg_apis_pipeline_v1_Sidecar(ref),
@@ -440,49 +440,6 @@ func schema_pkg_apis_pipeline_v1_ChildStatusReference(ref common.ReferenceCallba
}
}
-func schema_pkg_apis_pipeline_v1_ConfigSource(ref common.ReferenceCallback) common.OpenAPIDefinition {
- return common.OpenAPIDefinition{
- Schema: spec.Schema{
- SchemaProps: spec.SchemaProps{
- Description: "ConfigSource identifies the source where a resource came from. This can include Git repositories, Task Bundles, file checksums, or other information that allows users to identify where the resource came from and what version was used.",
- Type: []string{"object"},
- Properties: map[string]spec.Schema{
- "uri": {
- SchemaProps: spec.SchemaProps{
- Description: "URI indicates the identity of the source of the config. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.uri Example: \"https://github.com/tektoncd/catalog\"",
- Type: []string{"string"},
- Format: "",
- },
- },
- "digest": {
- SchemaProps: spec.SchemaProps{
- Description: "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.digest Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
- Type: []string{"object"},
- AdditionalProperties: &spec.SchemaOrBool{
- Allows: true,
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- "entryPoint": {
- SchemaProps: spec.SchemaProps{
- Description: "EntryPoint identifies the entry point into the build. This is often a path to a configuration file and/or a target label within that file. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.entryPoint Example: \"task/git-clone/0.8/git-clone.yaml\"",
- Type: []string{"string"},
- Format: "",
- },
- },
- },
- },
- },
- }
-}
-
func schema_pkg_apis_pipeline_v1_EmbeddedTask(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -534,6 +491,13 @@ func schema_pkg_apis_pipeline_v1_EmbeddedTask(ref common.ReferenceCallback) comm
},
},
},
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"description": {
SchemaProps: spec.SchemaProps{
Description: "Description is a user-facing description of the task that may be used to populate a UI.",
@@ -650,46 +614,34 @@ func schema_pkg_apis_pipeline_v1_EmbeddedTask(ref common.ReferenceCallback) comm
}
}
-func schema_pkg_apis_pipeline_v1_Matrix(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1_IncludeParams(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "Matrix is used to fan out Tasks in a Pipeline",
+ Description: "IncludeParams allows passing in a specific combinations of Parameters into the Matrix.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "params": {
- VendorExtensible: spec.VendorExtensible{
- Extensions: spec.Extensions{
- "x-kubernetes-list-type": "atomic",
- },
- },
+ "name": {
SchemaProps: spec.SchemaProps{
- Description: "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
- Type: []string{"array"},
- Items: &spec.SchemaOrArray{
- Schema: &spec.Schema{
- SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"),
- },
- },
- },
+ Description: "Name the specified combination",
+ Type: []string{"string"},
+ Format: "",
},
},
- "include": {
+ "params": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
- Description: "Include is a list of MatrixInclude which allows passing in specific combinations of Parameters into the Matrix. Note that Include is in preview mode and not yet supported.",
+ Description: "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.MatrixInclude"),
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"),
},
},
},
@@ -699,38 +651,50 @@ func schema_pkg_apis_pipeline_v1_Matrix(ref common.ReferenceCallback) common.Ope
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.MatrixInclude", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"},
}
}
-func schema_pkg_apis_pipeline_v1_MatrixInclude(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1_Matrix(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "MatrixInclude allows passing in a specific combinations of Parameters into the Matrix. Note this struct is in preview mode and not yet supported",
+ Description: "Matrix is used to fan out Tasks in a Pipeline",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "name": {
+ "params": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
SchemaProps: spec.SchemaProps{
- Description: "Name the specified combination",
- Type: []string{"string"},
- Format: "",
+ Description: "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"),
+ },
+ },
+ },
},
},
- "params": {
+ "include": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
- Description: "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
+ Description: "Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"),
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.IncludeParams"),
},
},
},
@@ -740,7 +704,7 @@ func schema_pkg_apis_pipeline_v1_MatrixInclude(ref common.ReferenceCallback) com
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.IncludeParams", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.Param"},
}
}
@@ -839,14 +803,14 @@ func schema_pkg_apis_pipeline_v1_ParamValue(ref common.ReferenceCallback) common
Description: "ResultValue is a type alias of ParamValue",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "type": {
+ "Type": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
- "stringVal": {
+ "StringVal": {
SchemaProps: spec.SchemaProps{
Description: "Represents the stored type of ParamValues.",
Default: "",
@@ -854,7 +818,7 @@ func schema_pkg_apis_pipeline_v1_ParamValue(ref common.ReferenceCallback) common
Format: "",
},
},
- "arrayVal": {
+ "ArrayVal": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
@@ -873,7 +837,7 @@ func schema_pkg_apis_pipeline_v1_ParamValue(ref common.ReferenceCallback) common
},
},
},
- "objectVal": {
+ "ObjectVal": {
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
AdditionalProperties: &spec.SchemaOrBool{
@@ -889,7 +853,7 @@ func schema_pkg_apis_pipeline_v1_ParamValue(ref common.ReferenceCallback) common
},
},
},
- Required: []string{"type", "stringVal", "arrayVal", "objectVal"},
+ Required: []string{"Type", "StringVal", "ArrayVal", "ObjectVal"},
},
},
}
@@ -1667,6 +1631,13 @@ func schema_pkg_apis_pipeline_v1_PipelineSpec(ref common.ReferenceCallback) comm
Description: "PipelineSpec defines the desired state of Pipeline.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is a user-facing name of the pipeline that may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"description": {
SchemaProps: spec.SchemaProps{
Description: "Description is a user-facing description of the pipeline that may be used to populate a UI.",
@@ -1791,6 +1762,20 @@ func schema_pkg_apis_pipeline_v1_PipelineTask(ref common.ReferenceCallback) comm
Format: "",
},
},
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is the display name of this task within the context of a Pipeline. This display name may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "description": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Description is the description of this task within the context of a Pipeline. This description may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"taskRef": {
SchemaProps: spec.SchemaProps{
Description: "TaskRef is a reference to a task definition.",
@@ -2156,13 +2141,13 @@ func schema_pkg_apis_pipeline_v1_Provenance(ref common.ReferenceCallback) common
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.). For now, it only contains the subfield `ConfigSource` that identifies the source where a build config file came from. In future, it can be expanded as needed to include more metadata about the build. This field aims to be used to carry minimum amount of the authenticated metadata in *Run status so that Tekton Chains can pick it up and record in the provenance it generates.",
+ Description: "Provenance contains metadata about resources used in the TaskRun/PipelineRun such as the source from where a remote build definition was fetched. This field aims to carry minimum amoumt of metadata in *Run status so that Tekton Chains can capture them in the provenance.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "configSource": {
+ "refSource": {
SchemaProps: spec.SchemaProps{
- Description: "ConfigSource identifies the source where a resource came from.",
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ConfigSource"),
+ Description: "RefSource identifies the source where a remote task/pipeline came from.",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.RefSource"),
},
},
"featureFlags": {
@@ -2175,7 +2160,50 @@ func schema_pkg_apis_pipeline_v1_Provenance(ref common.ReferenceCallback) common
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.ConfigSource"},
+ "github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1.RefSource"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1_RefSource(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "RefSource contains the information that can uniquely identify where a remote built definition came from i.e. Git repositories, Tekton Bundles in OCI registry and hub.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "uri": {
+ SchemaProps: spec.SchemaProps{
+ Description: "URI indicates the identity of the source of the build definition. Example: \"https://github.com/tektoncd/catalog\"",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "digest": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "entryPoint": {
+ SchemaProps: spec.SchemaProps{
+ Description: "EntryPoint identifies the entry point into the build. This is often a path to a build definition file and/or a target label within that file. Example: \"task/git-clone/0.8/git-clone.yaml\"",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
}
}
@@ -3234,14 +3262,14 @@ func schema_pkg_apis_pipeline_v1_TaskRef(ref common.ReferenceCallback) common.Op
},
"kind": {
SchemaProps: spec.SchemaProps{
- Description: "TaskKind indicates the kind of the task, namespaced or cluster scoped.",
+ Description: "TaskKind indicates the Kind of the Task: 1. Namespaced Task when Kind is set to \"Task\". If Kind is \"\", it defaults to \"Task\". 2. Custom Task when Kind is non-empty and APIVersion is non-empty",
Type: []string{"string"},
Format: "",
},
},
"apiVersion": {
SchemaProps: spec.SchemaProps{
- Description: "API version of the referent",
+ Description: "API version of the referent Note: A Task with non-empty APIVersion and Kind is considered a Custom Task",
Type: []string{"string"},
Format: "",
},
@@ -4067,6 +4095,13 @@ func schema_pkg_apis_pipeline_v1_TaskSpec(ref common.ReferenceCallback) common.O
},
},
},
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"description": {
SchemaProps: spec.SchemaProps{
Description: "Description is a user-facing description of the task that may be used to populate a UI.",
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/param_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/param_types.go
index c7c9b4b41..746cd3d4c 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/param_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/param_types.go
@@ -116,10 +116,11 @@ type Param struct {
Value ParamValue `json:"value"`
}
-func (ps Params) extractNames() []string {
- names := []string{}
+// ExtractNames returns a set of unique names
+func (ps Params) ExtractNames() sets.String {
+ names := sets.String{}
for _, p := range ps {
- names = append(names, p.Name)
+ names.Insert(p.Name)
}
return names
}
@@ -376,11 +377,11 @@ var AllParamTypes = []ParamType{ParamTypeString, ParamTypeArray, ParamTypeObject
// Used in JSON unmarshalling so that a single JSON field can accept
// either an individual string or an array of strings.
type ParamValue struct {
- Type ParamType `json:"type"` // Represents the stored type of ParamValues.
- StringVal string `json:"stringVal"`
+ Type ParamType // Represents the stored type of ParamValues.
+ StringVal string
// +listType=atomic
- ArrayVal []string `json:"arrayVal"`
- ObjectVal map[string]string `json:"objectVal"`
+ ArrayVal []string
+ ObjectVal map[string]string
}
// UnmarshalJSON implements the json.Unmarshaller interface.
@@ -453,6 +454,8 @@ func (paramValues *ParamValue) ApplyReplacements(stringReplacements map[string]s
newObjectVal[k] = substitution.ApplyReplacements(v, stringReplacements)
}
paramValues.ObjectVal = newObjectVal
+ case ParamTypeString:
+ fallthrough
default:
paramValues.applyOrCorrect(stringReplacements, arrayReplacements, objectReplacements)
}
@@ -542,6 +545,8 @@ func validatePipelineParametersVariablesInTaskParameters(params Params, prefix s
for key, val := range param.Value.ObjectVal {
errs = errs.Also(validateStringVariable(val, prefix, paramNames, arrayParamNames, objectParamNameKeys).ViaFieldKey("properties", key).ViaFieldKey("params", param.Name))
}
+ case ParamTypeString:
+ fallthrough
default:
errs = errs.Also(validateParamStringValue(param, prefix, paramNames, arrayParamNames, objectParamNameKeys))
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_defaults.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_defaults.go
index 1bea3f8ef..a6c7190e8 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_defaults.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_defaults.go
@@ -32,34 +32,32 @@ func (p *Pipeline) SetDefaults(ctx context.Context) {
// SetDefaults sets default values for the PipelineSpec's Params, Tasks, and Finally
func (ps *PipelineSpec) SetDefaults(ctx context.Context) {
- cfg := config.FromContextOrDefaults(ctx)
for i := range ps.Params {
ps.Params[i].SetDefaults(ctx)
}
for _, pt := range ps.Tasks {
- if pt.TaskRef != nil {
- if pt.TaskRef.Kind == "" {
- pt.TaskRef.Kind = NamespacedTaskKind
- }
- if pt.TaskRef.Name == "" && pt.TaskRef.Resolver == "" {
- pt.TaskRef.Resolver = ResolverName(cfg.Defaults.DefaultResolverType)
- }
- }
- if pt.TaskSpec != nil {
- pt.TaskSpec.SetDefaults(ctx)
- }
+ pt.SetDefaults(ctx)
}
for _, ft := range ps.Finally {
ctx := ctx // Ensure local scoping per Task
- if ft.TaskRef != nil {
- if ft.TaskRef.Kind == "" {
- ft.TaskRef.Kind = NamespacedTaskKind
- }
+ ft.SetDefaults(ctx)
+ }
+}
+
+// SetDefaults sets default values for a PipelineTask
+func (pt *PipelineTask) SetDefaults(ctx context.Context) {
+ cfg := config.FromContextOrDefaults(ctx)
+ if pt.TaskRef != nil {
+ if pt.TaskRef.Kind == "" {
+ pt.TaskRef.Kind = NamespacedTaskKind
}
- if ft.TaskSpec != nil {
- ft.TaskSpec.SetDefaults(ctx)
+ if pt.TaskRef.Name == "" && pt.TaskRef.Resolver == "" {
+ pt.TaskRef.Resolver = ResolverName(cfg.Defaults.DefaultResolverType)
}
}
+ if pt.TaskSpec != nil {
+ pt.TaskSpec.SetDefaults(ctx)
+ }
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_types.go
index 56f606b4c..d33894488 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_types.go
@@ -17,20 +17,12 @@ limitations under the License.
package v1
import (
- "context"
- "fmt"
- "strings"
-
- "github.com/tektoncd/pipeline/pkg/apis/config"
"github.com/tektoncd/pipeline/pkg/apis/pipeline"
- "github.com/tektoncd/pipeline/pkg/apis/version"
"github.com/tektoncd/pipeline/pkg/reconciler/pipeline/dag"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
- "k8s.io/apimachinery/pkg/util/validation"
- "knative.dev/pkg/apis"
"knative.dev/pkg/kmeta"
)
@@ -80,6 +72,10 @@ func (*Pipeline) GetGroupVersionKind() schema.GroupVersionKind {
// PipelineSpec defines the desired state of Pipeline.
type PipelineSpec struct {
+ // DisplayName is a user-facing name of the pipeline that may be
+ // used to populate a UI.
+ // +optional
+ DisplayName string `json:"displayName,omitempty"`
// Description is a user-facing description of the pipeline that may be
// used to populate a UI.
// +optional
@@ -159,6 +155,16 @@ type PipelineTask struct {
// the execution order of tasks relative to one another.
Name string `json:"name,omitempty"`
+ // DisplayName is the display name of this task within the context of a Pipeline.
+ // This display name may be used to populate a UI.
+ // +optional
+ DisplayName string `json:"displayName,omitempty"`
+
+ // Description is the description of this task within the context of a Pipeline.
+ // This description may be used to populate a UI.
+ // +optional
+ Description string `json:"description,omitempty"`
+
// TaskRef is a reference to a task definition.
// +optional
TaskRef *TaskRef `json:"taskRef,omitempty"`
@@ -203,229 +209,16 @@ type PipelineTask struct {
Timeout *metav1.Duration `json:"timeout,omitempty"`
}
-// validateRefOrSpec validates at least one of taskRef or taskSpec is specified
-func (pt PipelineTask) validateRefOrSpec() (errs *apis.FieldError) {
- // can't have both taskRef and taskSpec at the same time
- if pt.TaskRef != nil && pt.TaskSpec != nil {
- errs = errs.Also(apis.ErrMultipleOneOf("taskRef", "taskSpec"))
- }
- // Check that one of TaskRef and TaskSpec is present
- if pt.TaskRef == nil && pt.TaskSpec == nil {
- errs = errs.Also(apis.ErrMissingOneOf("taskRef", "taskSpec"))
- }
- return errs
-}
-
-// validateCustomTask validates custom task specifications - checking kind and fail if not yet supported features specified
-func (pt PipelineTask) validateCustomTask() (errs *apis.FieldError) {
- if pt.TaskRef != nil && pt.TaskRef.Kind == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify kind", "taskRef.kind"))
- }
- if pt.TaskSpec != nil && pt.TaskSpec.Kind == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify kind", "taskSpec.kind"))
- }
- if pt.TaskRef != nil && pt.TaskRef.APIVersion == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify apiVersion", "taskRef.apiVersion"))
- }
- if pt.TaskSpec != nil && pt.TaskSpec.APIVersion == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify apiVersion", "taskSpec.apiVersion"))
- }
- return errs
-}
-
-// validateTask validates a pipeline task or a final task for taskRef and taskSpec
-func (pt PipelineTask) validateTask(ctx context.Context) (errs *apis.FieldError) {
- cfg := config.FromContextOrDefaults(ctx)
- // Validate TaskSpec if it's present
- if pt.TaskSpec != nil {
- errs = errs.Also(pt.TaskSpec.Validate(ctx).ViaField("taskSpec"))
- }
- if pt.TaskRef != nil {
- if pt.TaskRef.Name != "" {
- // TaskRef name must be a valid k8s name
- if errSlice := validation.IsQualifiedName(pt.TaskRef.Name); len(errSlice) != 0 {
- errs = errs.Also(apis.ErrInvalidValue(strings.Join(errSlice, ","), "name"))
- }
- } else if pt.TaskRef.Resolver == "" {
- errs = errs.Also(apis.ErrInvalidValue("taskRef must specify name", "taskRef.name"))
- }
- if cfg.FeatureFlags.EnableAPIFields != config.BetaAPIFields && cfg.FeatureFlags.EnableAPIFields != config.AlphaAPIFields {
- // fail if resolver or resource are present when enable-api-fields is false.
- if pt.TaskRef.Resolver != "" {
- errs = errs.Also(apis.ErrDisallowedFields("taskref.resolver"))
- }
- if len(pt.TaskRef.Params) > 0 {
- errs = errs.Also(apis.ErrDisallowedFields("taskref.params"))
- }
- }
- }
- return errs
+// IsCustomTask checks whether an embedded TaskSpec is a Custom Task
+func (et *EmbeddedTask) IsCustomTask() bool {
+ // Note that if `apiVersion` is set to `"tekton.dev/v1beta1"` and `kind` is set to `"Task"`,
+ // the reference will be considered a Custom Task - https://github.com/tektoncd/pipeline/issues/6457
+ return et != nil && et.APIVersion != "" && et.Kind != ""
}
// IsMatrixed return whether pipeline task is matrixed
func (pt *PipelineTask) IsMatrixed() bool {
- return pt.Matrix != nil && (pt.Matrix.hasParams() || pt.Matrix.hasInclude())
-}
-
-// extractAllParams extracts all the parameters in a PipelineTask:
-// - pt.Params
-// - pt.Matrix.Params
-// - pt.Matrix.Include.Params
-func (pt *PipelineTask) extractAllParams() Params {
- allParams := pt.Params
- if pt.Matrix.hasParams() {
- allParams = append(allParams, pt.Matrix.Params...)
- }
- if pt.Matrix.hasInclude() {
- for _, include := range pt.Matrix.Include {
- allParams = append(allParams, include.Params...)
- }
- }
- return allParams
-}
-
-func (pt *PipelineTask) validateMatrix(ctx context.Context) (errs *apis.FieldError) {
- if pt.IsMatrixed() {
- // This is an alpha feature and will fail validation if it's used in a pipeline spec
- // when the enable-api-fields feature gate is anything but "alpha".
- errs = errs.Also(version.ValidateEnabledAPIFields(ctx, "matrix", config.AlphaAPIFields))
- errs = errs.Also(pt.Matrix.validateCombinationsCount(ctx))
- }
- errs = errs.Also(pt.Matrix.validateParameterInOneOfMatrixOrParams(pt.Params))
- errs = errs.Also(pt.Matrix.validateParams())
- return errs
-}
-
-func (pt PipelineTask) validateEmbeddedOrType() (errs *apis.FieldError) {
- // Reject cases where APIVersion and/or Kind are specified alongside an embedded Task.
- // We determine if this is an embedded Task by checking of TaskSpec.TaskSpec.Steps has items.
- if pt.TaskSpec != nil && len(pt.TaskSpec.TaskSpec.Steps) > 0 {
- if pt.TaskSpec.APIVersion != "" {
- errs = errs.Also(&apis.FieldError{
- Message: "taskSpec.apiVersion cannot be specified when using taskSpec.steps",
- Paths: []string{"taskSpec.apiVersion"},
- })
- }
- if pt.TaskSpec.Kind != "" {
- errs = errs.Also(&apis.FieldError{
- Message: "taskSpec.kind cannot be specified when using taskSpec.steps",
- Paths: []string{"taskSpec.kind"},
- })
- }
- }
- return
-}
-
-func (pt *PipelineTask) validateResultsFromMatrixedPipelineTasksNotConsumed(matrixedPipelineTasks sets.String) (errs *apis.FieldError) {
- for _, ref := range PipelineTaskResultRefs(pt) {
- if matrixedPipelineTasks.Has(ref.PipelineTask) {
- errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("consuming results from matrixed task %s is not allowed", ref.PipelineTask), ""))
- }
- }
- return errs
-}
-
-func (pt *PipelineTask) validateExecutionStatusVariablesDisallowed() (errs *apis.FieldError) {
- for _, param := range pt.Params {
- if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
- errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "value").
- ViaFieldKey("params", param.Name))
- }
- }
- for i, we := range pt.When {
- if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
- errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "").
- ViaFieldIndex("when", i))
- }
- }
- return errs
-}
-
-func (pt *PipelineTask) validateExecutionStatusVariablesAllowed(ptNames sets.String) (errs *apis.FieldError) {
- for _, param := range pt.Params {
- if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
- errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "value").
- ViaFieldKey("params", param.Name))
- }
- }
- for i, we := range pt.When {
- if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
- errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "").
- ViaFieldIndex("when", i))
- }
- }
- return errs
-}
-
-func validateContainsExecutionStatusVariablesDisallowed(expressions []string, path string) (errs *apis.FieldError) {
- if containsExecutionStatusReferences(expressions) {
- errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline tasks can not refer to execution status"+
- " of any other pipeline task or aggregate status of tasks"), path))
- }
- return errs
-}
-
-func containsExecutionStatusReferences(expressions []string) bool {
- // validate tasks.pipelineTask.status/tasks.status if this expression is not a result reference
- if !LooksLikeContainsResultRefs(expressions) {
- for _, e := range expressions {
- // check if it contains context variable accessing execution status - $(tasks.taskname.status)
- // or an aggregate status - $(tasks.status)
- if containsExecutionStatusRef(e) {
- return true
- }
- }
- }
- return false
-}
-
-func validateExecutionStatusVariablesExpressions(expressions []string, ptNames sets.String, fieldPath string) (errs *apis.FieldError) {
- // validate tasks.pipelineTask.status if this expression is not a result reference
- if !LooksLikeContainsResultRefs(expressions) {
- for _, expression := range expressions {
- // its a reference to aggregate status of dag tasks - $(tasks.status)
- if expression == PipelineTasksAggregateStatus {
- continue
- }
- // check if it contains context variable accessing execution status - $(tasks.taskname.status)
- if containsExecutionStatusRef(expression) {
- // strip tasks. and .status from tasks.taskname.status to further verify task name
- pt := strings.TrimSuffix(strings.TrimPrefix(expression, "tasks."), ".status")
- // report an error if the task name does not exist in the list of dag tasks
- if !ptNames.Has(pt) {
- errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline task %s is not defined in the pipeline", pt), fieldPath))
- }
- }
- }
- }
- return errs
-}
-
-func (pt *PipelineTask) validateWorkspaces(workspaceNames sets.String) (errs *apis.FieldError) {
- workspaceBindingNames := sets.NewString()
- for i, ws := range pt.Workspaces {
- if workspaceBindingNames.Has(ws.Name) {
- errs = errs.Also(apis.ErrGeneric(
- fmt.Sprintf("workspace name %q must be unique", ws.Name), "").ViaFieldIndex("workspaces", i))
- }
-
- if ws.Workspace == "" {
- if !workspaceNames.Has(ws.Name) {
- errs = errs.Also(apis.ErrInvalidValue(
- fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Name),
- "",
- ).ViaFieldIndex("workspaces", i))
- }
- } else if !workspaceNames.Has(ws.Workspace) {
- errs = errs.Also(apis.ErrInvalidValue(
- fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Workspace),
- "",
- ).ViaFieldIndex("workspaces", i))
- }
-
- workspaceBindingNames.Insert(ws.Name)
- }
- return errs
+ return pt.Matrix.HasParams() || pt.Matrix.HasInclude()
}
// TaskSpecMetadata returns the metadata of the PipelineTask's EmbeddedTask spec.
@@ -438,38 +231,6 @@ func (pt PipelineTask) HashKey() string {
return pt.Name
}
-// ValidateName checks whether the PipelineTask's name is a valid DNS label
-func (pt PipelineTask) ValidateName() *apis.FieldError {
- if err := validation.IsDNS1123Label(pt.Name); len(err) > 0 {
- return &apis.FieldError{
- Message: fmt.Sprintf("invalid value %q", pt.Name),
- Paths: []string{"name"},
- Details: "Pipeline Task name must be a valid DNS Label." +
- "For more info refer to https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
- }
- }
- return nil
-}
-
-// Validate classifies whether a task is a custom task or a regular task(dag/final)
-// calls the validation routine based on the type of the task
-func (pt PipelineTask) Validate(ctx context.Context) (errs *apis.FieldError) {
- errs = errs.Also(pt.validateRefOrSpec())
-
- errs = errs.Also(pt.validateEmbeddedOrType())
-
- // Pipeline task having taskRef/taskSpec with APIVersion is classified as custom task
- switch {
- case pt.TaskRef != nil && pt.TaskRef.APIVersion != "":
- errs = errs.Also(pt.validateCustomTask())
- case pt.TaskSpec != nil && pt.TaskSpec.APIVersion != "":
- errs = errs.Also(pt.validateCustomTask())
- default:
- errs = errs.Also(pt.validateTask(ctx))
- }
- return
-}
-
// Deps returns all other PipelineTask dependencies of this PipelineTask, based on resource usage or ordering
func (pt PipelineTask) Deps() []string {
// hold the list of dependencies in a set to avoid duplicates
@@ -523,22 +284,6 @@ func (l PipelineTaskList) Names() sets.String {
return names
}
-// Validate a list of pipeline tasks including custom task
-func (l PipelineTaskList) Validate(ctx context.Context, taskNames sets.String, path string) (errs *apis.FieldError) {
- for i, t := range l {
- // validate pipeline task name
- errs = errs.Also(t.ValidateName().ViaFieldIndex(path, i))
- // names cannot be duplicated - checking that pipelineTask names are unique
- if _, ok := taskNames[t.Name]; ok {
- errs = errs.Also(apis.ErrMultipleOneOf("name").ViaFieldIndex(path, i))
- }
- taskNames.Insert(t.Name)
- // validate custom task, dag, or final task
- errs = errs.Also(t.Validate(ctx).ViaFieldIndex(path, i))
- }
- return errs
-}
-
// PipelineTaskParam is used to provide arbitrary string parameters to a Task.
type PipelineTaskParam struct {
Name string `json:"name"`
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go
index 91cf4f395..0c60fae33 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipeline_validation.go
@@ -23,11 +23,13 @@ import (
"github.com/tektoncd/pipeline/pkg/apis/config"
"github.com/tektoncd/pipeline/pkg/apis/validate"
+ "github.com/tektoncd/pipeline/pkg/apis/version"
"github.com/tektoncd/pipeline/pkg/reconciler/pipeline/dag"
"github.com/tektoncd/pipeline/pkg/substitution"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
"k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/validation"
"knative.dev/pkg/apis"
"knative.dev/pkg/webhook/resourcesemantics"
)
@@ -89,6 +91,181 @@ func ValidatePipelineTasks(ctx context.Context, tasks []PipelineTask, finalTasks
return errs
}
+// Validate a list of pipeline tasks including custom task
+func (l PipelineTaskList) Validate(ctx context.Context, taskNames sets.String, path string) (errs *apis.FieldError) {
+ for i, t := range l {
+ // validate pipeline task name
+ errs = errs.Also(t.ValidateName().ViaFieldIndex(path, i))
+ // names cannot be duplicated - checking that pipelineTask names are unique
+ if _, ok := taskNames[t.Name]; ok {
+ errs = errs.Also(apis.ErrMultipleOneOf("name").ViaFieldIndex(path, i))
+ }
+ taskNames.Insert(t.Name)
+ // validate custom task, dag, or final task
+ errs = errs.Also(t.Validate(ctx).ViaFieldIndex(path, i))
+ }
+ return errs
+}
+
+// ValidateName checks whether the PipelineTask's name is a valid DNS label
+func (pt PipelineTask) ValidateName() *apis.FieldError {
+ if err := validation.IsDNS1123Label(pt.Name); len(err) > 0 {
+ return &apis.FieldError{
+ Message: fmt.Sprintf("invalid value %q", pt.Name),
+ Paths: []string{"name"},
+ Details: "Pipeline Task name must be a valid DNS Label." +
+ "For more info refer to https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+ }
+ }
+ return nil
+}
+
+// Validate classifies whether a task is a custom task or a regular task(dag/final)
+// calls the validation routine based on the type of the task
+func (pt PipelineTask) Validate(ctx context.Context) (errs *apis.FieldError) {
+ errs = errs.Also(pt.validateRefOrSpec())
+
+ errs = errs.Also(pt.validateEmbeddedOrType())
+
+ // Pipeline task having taskRef/taskSpec with APIVersion is classified as custom task
+ switch {
+ case pt.TaskRef != nil && pt.TaskRef.APIVersion != "":
+ errs = errs.Also(pt.validateCustomTask())
+ case pt.TaskSpec != nil && pt.TaskSpec.APIVersion != "":
+ errs = errs.Also(pt.validateCustomTask())
+ default:
+ errs = errs.Also(pt.validateTask(ctx))
+ }
+ return
+}
+
+func (pt *PipelineTask) validateMatrix(ctx context.Context) (errs *apis.FieldError) {
+ if pt.IsMatrixed() {
+ // This is an alpha feature and will fail validation if it's used in a pipeline spec
+ // when the enable-api-fields feature gate is anything but "alpha".
+ errs = errs.Also(version.ValidateEnabledAPIFields(ctx, "matrix", config.AlphaAPIFields))
+ errs = errs.Also(pt.Matrix.validateCombinationsCount(ctx))
+ }
+ errs = errs.Also(pt.Matrix.validateParameterInOneOfMatrixOrParams(pt.Params))
+ errs = errs.Also(pt.Matrix.validateParams())
+ return errs
+}
+
+func (pt PipelineTask) validateEmbeddedOrType() (errs *apis.FieldError) {
+ // Reject cases where APIVersion and/or Kind are specified alongside an embedded Task.
+ // We determine if this is an embedded Task by checking of TaskSpec.TaskSpec.Steps has items.
+ if pt.TaskSpec != nil && len(pt.TaskSpec.TaskSpec.Steps) > 0 {
+ if pt.TaskSpec.APIVersion != "" {
+ errs = errs.Also(&apis.FieldError{
+ Message: "taskSpec.apiVersion cannot be specified when using taskSpec.steps",
+ Paths: []string{"taskSpec.apiVersion"},
+ })
+ }
+ if pt.TaskSpec.Kind != "" {
+ errs = errs.Also(&apis.FieldError{
+ Message: "taskSpec.kind cannot be specified when using taskSpec.steps",
+ Paths: []string{"taskSpec.kind"},
+ })
+ }
+ }
+ return
+}
+
+func (pt *PipelineTask) validateResultsFromMatrixedPipelineTasksNotConsumed(matrixedPipelineTasks sets.String) (errs *apis.FieldError) {
+ for _, ref := range PipelineTaskResultRefs(pt) {
+ if matrixedPipelineTasks.Has(ref.PipelineTask) {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("consuming results from matrixed task %s is not allowed", ref.PipelineTask), ""))
+ }
+ }
+ return errs
+}
+
+func (pt *PipelineTask) validateWorkspaces(workspaceNames sets.String) (errs *apis.FieldError) {
+ workspaceBindingNames := sets.NewString()
+ for i, ws := range pt.Workspaces {
+ if workspaceBindingNames.Has(ws.Name) {
+ errs = errs.Also(apis.ErrGeneric(
+ fmt.Sprintf("workspace name %q must be unique", ws.Name), "").ViaFieldIndex("workspaces", i))
+ }
+
+ if ws.Workspace == "" {
+ if !workspaceNames.Has(ws.Name) {
+ errs = errs.Also(apis.ErrInvalidValue(
+ fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Name),
+ "",
+ ).ViaFieldIndex("workspaces", i))
+ }
+ } else if !workspaceNames.Has(ws.Workspace) {
+ errs = errs.Also(apis.ErrInvalidValue(
+ fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Workspace),
+ "",
+ ).ViaFieldIndex("workspaces", i))
+ }
+
+ workspaceBindingNames.Insert(ws.Name)
+ }
+ return errs
+}
+
+// validateRefOrSpec validates at least one of taskRef or taskSpec is specified
+func (pt PipelineTask) validateRefOrSpec() (errs *apis.FieldError) {
+ // can't have both taskRef and taskSpec at the same time
+ if pt.TaskRef != nil && pt.TaskSpec != nil {
+ errs = errs.Also(apis.ErrMultipleOneOf("taskRef", "taskSpec"))
+ }
+ // Check that one of TaskRef and TaskSpec is present
+ if pt.TaskRef == nil && pt.TaskSpec == nil {
+ errs = errs.Also(apis.ErrMissingOneOf("taskRef", "taskSpec"))
+ }
+ return errs
+}
+
+// validateCustomTask validates custom task specifications - checking kind and fail if not yet supported features specified
+func (pt PipelineTask) validateCustomTask() (errs *apis.FieldError) {
+ if pt.TaskRef != nil && pt.TaskRef.Kind == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify kind", "taskRef.kind"))
+ }
+ if pt.TaskSpec != nil && pt.TaskSpec.Kind == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify kind", "taskSpec.kind"))
+ }
+ if pt.TaskRef != nil && pt.TaskRef.APIVersion == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify apiVersion", "taskRef.apiVersion"))
+ }
+ if pt.TaskSpec != nil && pt.TaskSpec.APIVersion == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify apiVersion", "taskSpec.apiVersion"))
+ }
+ return errs
+}
+
+// validateTask validates a pipeline task or a final task for taskRef and taskSpec
+func (pt PipelineTask) validateTask(ctx context.Context) (errs *apis.FieldError) {
+ cfg := config.FromContextOrDefaults(ctx)
+ // Validate TaskSpec if it's present
+ if pt.TaskSpec != nil {
+ errs = errs.Also(pt.TaskSpec.Validate(ctx).ViaField("taskSpec"))
+ }
+ if pt.TaskRef != nil {
+ if pt.TaskRef.Name != "" {
+ // TaskRef name must be a valid k8s name
+ if errSlice := validation.IsQualifiedName(pt.TaskRef.Name); len(errSlice) != 0 {
+ errs = errs.Also(apis.ErrInvalidValue(strings.Join(errSlice, ","), "name"))
+ }
+ } else if pt.TaskRef.Resolver == "" {
+ errs = errs.Also(apis.ErrInvalidValue("taskRef must specify name", "taskRef.name"))
+ }
+ if cfg.FeatureFlags.EnableAPIFields != config.BetaAPIFields && cfg.FeatureFlags.EnableAPIFields != config.AlphaAPIFields {
+ // fail if resolver or resource are present when enable-api-fields is false.
+ if pt.TaskRef.Resolver != "" {
+ errs = errs.Also(apis.ErrDisallowedFields("taskref.resolver"))
+ }
+ if len(pt.TaskRef.Params) > 0 {
+ errs = errs.Also(apis.ErrDisallowedFields("taskref.params"))
+ }
+ }
+ }
+ return errs
+}
+
// validatePipelineWorkspacesDeclarations validates the specified workspaces, ensuring having unique name without any
// empty string,
func validatePipelineWorkspacesDeclarations(wss []PipelineWorkspaceDeclaration) (errs *apis.FieldError) {
@@ -191,6 +368,23 @@ func validatePipelineContextVariables(tasks []PipelineTask) *apis.FieldError {
return errs
}
+// extractAllParams extracts all the parameters in a PipelineTask:
+// - pt.Params
+// - pt.Matrix.Params
+// - pt.Matrix.Include.Params
+func (pt *PipelineTask) extractAllParams() Params {
+ allParams := pt.Params
+ if pt.Matrix.HasParams() {
+ allParams = append(allParams, pt.Matrix.Params...)
+ }
+ if pt.Matrix.HasInclude() {
+ for _, include := range pt.Matrix.Include {
+ allParams = append(allParams, include.Params...)
+ }
+ }
+ return allParams
+}
+
func containsExecutionStatusRef(p string) bool {
if strings.HasPrefix(p, "tasks.") && strings.HasSuffix(p, ".status") {
return true
@@ -198,6 +392,12 @@ func containsExecutionStatusRef(p string) bool {
return false
}
+func validateExecutionStatusVariables(tasks []PipelineTask, finallyTasks []PipelineTask) (errs *apis.FieldError) {
+ errs = errs.Also(validateExecutionStatusVariablesInTasks(tasks).ViaField("tasks"))
+ errs = errs.Also(validateExecutionStatusVariablesInFinally(PipelineTaskList(tasks).Names(), finallyTasks).ViaField("finally"))
+ return errs
+}
+
// validate dag pipeline tasks, task params can not access execution status of any other task
// dag tasks cannot have param value as $(tasks.pipelineTask.status)
func validateExecutionStatusVariablesInTasks(tasks []PipelineTask) (errs *apis.FieldError) {
@@ -216,12 +416,81 @@ func validateExecutionStatusVariablesInFinally(tasksNames sets.String, finally [
return errs
}
-func validateExecutionStatusVariables(tasks []PipelineTask, finallyTasks []PipelineTask) (errs *apis.FieldError) {
- errs = errs.Also(validateExecutionStatusVariablesInTasks(tasks).ViaField("tasks"))
- errs = errs.Also(validateExecutionStatusVariablesInFinally(PipelineTaskList(tasks).Names(), finallyTasks).ViaField("finally"))
+func (pt *PipelineTask) validateExecutionStatusVariablesDisallowed() (errs *apis.FieldError) {
+ for _, param := range pt.Params {
+ if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
+ errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "value").
+ ViaFieldKey("params", param.Name))
+ }
+ }
+ for i, we := range pt.When {
+ if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
+ errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "").
+ ViaFieldIndex("when", i))
+ }
+ }
+ return errs
+}
+
+func (pt *PipelineTask) validateExecutionStatusVariablesAllowed(ptNames sets.String) (errs *apis.FieldError) {
+ for _, param := range pt.Params {
+ if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
+ errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "value").
+ ViaFieldKey("params", param.Name))
+ }
+ }
+ for i, we := range pt.When {
+ if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
+ errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "").
+ ViaFieldIndex("when", i))
+ }
+ }
+ return errs
+}
+
+func validateContainsExecutionStatusVariablesDisallowed(expressions []string, path string) (errs *apis.FieldError) {
+ if containsExecutionStatusReferences(expressions) {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline tasks can not refer to execution status"+
+ " of any other pipeline task or aggregate status of tasks"), path))
+ }
return errs
}
+func containsExecutionStatusReferences(expressions []string) bool {
+ // validate tasks.pipelineTask.status/tasks.status if this expression is not a result reference
+ if !LooksLikeContainsResultRefs(expressions) {
+ for _, e := range expressions {
+ // check if it contains context variable accessing execution status - $(tasks.taskname.status)
+ // or an aggregate status - $(tasks.status)
+ if containsExecutionStatusRef(e) {
+ return true
+ }
+ }
+ }
+ return false
+}
+
+func validateExecutionStatusVariablesExpressions(expressions []string, ptNames sets.String, fieldPath string) (errs *apis.FieldError) {
+ // validate tasks.pipelineTask.status if this expression is not a result reference
+ if !LooksLikeContainsResultRefs(expressions) {
+ for _, expression := range expressions {
+ // its a reference to aggregate status of dag tasks - $(tasks.status)
+ if expression == PipelineTasksAggregateStatus {
+ continue
+ }
+ // check if it contains context variable accessing execution status - $(tasks.taskname.status)
+ if containsExecutionStatusRef(expression) {
+ // strip tasks. and .status from tasks.taskname.status to further verify task name
+ pt := strings.TrimSuffix(strings.TrimPrefix(expression, "tasks."), ".status")
+ // report an error if the task name does not exist in the list of dag tasks
+ if !ptNames.Has(pt) {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline task %s is not defined in the pipeline", pt), fieldPath))
+ }
+ }
+ }
+ }
+ return errs
+}
func validatePipelineContextVariablesInParamValues(paramValues []string, prefix string, contextNames sets.String) (errs *apis.FieldError) {
for _, paramValue := range paramValues {
errs = errs.Also(substitution.ValidateVariableP(paramValue, prefix, contextNames).ViaField("value"))
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_defaults.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_defaults.go
index fdfdfeed8..e53efe5e5 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_defaults.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_defaults.go
@@ -40,10 +40,12 @@ func (prs *PipelineRunSpec) SetDefaults(ctx context.Context) {
prs.PipelineRef.Resolver = ResolverName(cfg.Defaults.DefaultResolverType)
}
- if prs.Timeouts == nil || prs.Timeouts.Pipeline == nil {
- prs.Timeouts = &TimeoutFields{
- Pipeline: &metav1.Duration{Duration: time.Duration(cfg.Defaults.DefaultTimeoutMinutes) * time.Minute},
- }
+ if prs.Timeouts == nil {
+ prs.Timeouts = &TimeoutFields{}
+ }
+
+ if prs.Timeouts.Pipeline == nil {
+ prs.Timeouts.Pipeline = &metav1.Duration{Duration: time.Duration(cfg.Defaults.DefaultTimeoutMinutes) * time.Minute}
}
defaultSA := cfg.Defaults.DefaultServiceAccount
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_types.go
index 29db23021..4f4e33b3a 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_types.go
@@ -223,7 +223,7 @@ type PipelineRunSpec struct {
PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"`
// Params is a list of parameter names and values.
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
// Used for cancelling a pipelinerun (and maybe more later on)
// +optional
@@ -469,6 +469,8 @@ const (
TasksTimedOutSkip SkippingReason = "PipelineRun Tasks timeout has been reached"
// FinallyTimedOutSkip means the task was skipped because the PipelineRun has passed its Timeouts.Finally.
FinallyTimedOutSkip SkippingReason = "PipelineRun Finally timeout has been reached"
+ // EmptyArrayInMatrixParams means the task was skipped because Matrix parameters contain empty array.
+ EmptyArrayInMatrixParams SkippingReason = "Matrix Parameters have an empty array"
// None means the task was not skipped
None SkippingReason = "None"
)
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_validation.go
index 76d3417cc..d5e8361f8 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/pipelinerun_validation.go
@@ -190,7 +190,7 @@ func appendParamSpec(paramSpec []ParamSpec, params []ParamSpec) []ParamSpec {
return paramSpec
}
-func appendParam(paramSpec []ParamSpec, params []Param) []ParamSpec {
+func appendParam(paramSpec []ParamSpec, params Params) []ParamSpec {
for _, p := range params {
skip := false
for _, ps := range paramSpec {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/provenance.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/provenance.go
index 2539f97bd..de9f2a5c5 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/provenance.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/provenance.go
@@ -15,37 +15,32 @@ package v1
import "github.com/tektoncd/pipeline/pkg/apis/config"
-// Provenance contains some key authenticated metadata about how a software artifact was
-// built (what sources, what inputs/outputs, etc.). For now, it only contains the subfield
-// `ConfigSource` that identifies the source where a build config file came from.
-// In future, it can be expanded as needed to include more metadata about the build.
-// This field aims to be used to carry minimum amount of the authenticated metadata in *Run status
-// so that Tekton Chains can pick it up and record in the provenance it generates.
+// Provenance contains metadata about resources used in the TaskRun/PipelineRun
+// such as the source from where a remote build definition was fetched.
+// This field aims to carry minimum amoumt of metadata in *Run status so that
+// Tekton Chains can capture them in the provenance.
type Provenance struct {
- // ConfigSource identifies the source where a resource came from.
- ConfigSource *ConfigSource `json:"configSource,omitempty"`
+ // RefSource identifies the source where a remote task/pipeline came from.
+ RefSource *RefSource `json:"refSource,omitempty"`
// FeatureFlags identifies the feature flags that were used during the task/pipeline run
FeatureFlags *config.FeatureFlags `json:"featureFlags,omitempty"`
}
-// ConfigSource identifies the source where a resource came from.
-// This can include Git repositories, Task Bundles, file checksums, or other information
-// that allows users to identify where the resource came from and what version was used.
-type ConfigSource struct {
- // URI indicates the identity of the source of the config.
- // Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.uri
+// RefSource contains the information that can uniquely identify where a remote
+// built definition came from i.e. Git repositories, Tekton Bundles in OCI registry
+// and hub.
+type RefSource struct {
+ // URI indicates the identity of the source of the build definition.
// Example: "https://github.com/tektoncd/catalog"
URI string `json:"uri,omitempty"`
// Digest is a collection of cryptographic digests for the contents of the artifact specified by URI.
- // Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.digest
// Example: {"sha1": "f99d13e554ffcb696dee719fa85b695cb5b0f428"}
Digest map[string]string `json:"digest,omitempty"`
// EntryPoint identifies the entry point into the build. This is often a path to a
- // configuration file and/or a target label within that file.
- // Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.entryPoint
+ // build definition file and/or a target label within that file.
// Example: "task/git-clone/0.8/git-clone.yaml"
EntryPoint string `json:"entryPoint,omitempty"`
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/resolver_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/resolver_types.go
index c27b0decf..095a9d00a 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/resolver_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/resolver_types.go
@@ -34,5 +34,5 @@ type ResolverRef struct {
// the chosen resolver.
// +optional
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/result_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/result_types.go
index a64c867f2..3a5b97d91 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/result_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/result_types.go
@@ -54,7 +54,7 @@ type ResultValue = ParamValue
// ResultsType indicates the type of a result;
// Used to distinguish between a single string and an array of strings.
// Note that there is ResultType used to find out whether a
-// PipelineResourceResult is from a task result or not, which is different from
+// RunResult is from a task result or not, which is different from
// this ResultsType.
type ResultsType string
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json
index bdd3c65f6..f7b05c14f 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/swagger.json
@@ -180,28 +180,6 @@
}
}
},
- "v1.ConfigSource": {
- "description": "ConfigSource identifies the source where a resource came from. This can include Git repositories, Task Bundles, file checksums, or other information that allows users to identify where the resource came from and what version was used.",
- "type": "object",
- "properties": {
- "digest": {
- "description": "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.digest Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
- "type": "object",
- "additionalProperties": {
- "type": "string",
- "default": ""
- }
- },
- "entryPoint": {
- "description": "EntryPoint identifies the entry point into the build. This is often a path to a configuration file and/or a target label within that file. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.entryPoint Example: \"task/git-clone/0.8/git-clone.yaml\"",
- "type": "string"
- },
- "uri": {
- "description": "URI indicates the identity of the source of the config. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.uri Example: \"https://github.com/tektoncd/catalog\"",
- "type": "string"
- }
- }
- },
"v1.EmbeddedTask": {
"description": "EmbeddedTask is used to define a Task inline within a Pipeline's PipelineTasks.",
"type": "object",
@@ -213,6 +191,10 @@
"description": "Description is a user-facing description of the task that may be used to populate a UI.",
"type": "string"
},
+ "displayName": {
+ "description": "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ "type": "string"
+ },
"kind": {
"type": "string"
},
@@ -285,21 +267,16 @@
}
}
},
- "v1.Matrix": {
- "description": "Matrix is used to fan out Tasks in a Pipeline",
+ "v1.IncludeParams": {
+ "description": "IncludeParams allows passing in a specific combinations of Parameters into the Matrix.",
"type": "object",
"properties": {
- "include": {
- "description": "Include is a list of MatrixInclude which allows passing in specific combinations of Parameters into the Matrix. Note that Include is in preview mode and not yet supported.",
- "type": "array",
- "items": {
- "default": {},
- "$ref": "#/definitions/v1.MatrixInclude"
- },
- "x-kubernetes-list-type": "atomic"
+ "name": {
+ "description": "Name the specified combination",
+ "type": "string"
},
"params": {
- "description": "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
+ "description": "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
"type": "array",
"items": {
"default": {},
@@ -309,16 +286,21 @@
}
}
},
- "v1.MatrixInclude": {
- "description": "MatrixInclude allows passing in a specific combinations of Parameters into the Matrix. Note this struct is in preview mode and not yet supported",
+ "v1.Matrix": {
+ "description": "Matrix is used to fan out Tasks in a Pipeline",
"type": "object",
"properties": {
- "name": {
- "description": "Name the specified combination",
- "type": "string"
+ "include": {
+ "description": "Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1.IncludeParams"
+ },
+ "x-kubernetes-list-type": "atomic"
},
"params": {
- "description": "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
+ "description": "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
"type": "array",
"items": {
"default": {},
@@ -384,13 +366,13 @@
"description": "ResultValue is a type alias of ParamValue",
"type": "object",
"required": [
- "type",
- "stringVal",
- "arrayVal",
- "objectVal"
+ "Type",
+ "StringVal",
+ "ArrayVal",
+ "ObjectVal"
],
"properties": {
- "arrayVal": {
+ "ArrayVal": {
"type": "array",
"items": {
"type": "string",
@@ -398,19 +380,19 @@
},
"x-kubernetes-list-type": "atomic"
},
- "objectVal": {
+ "ObjectVal": {
"type": "object",
"additionalProperties": {
"type": "string",
"default": ""
}
},
- "stringVal": {
+ "StringVal": {
"description": "Represents the stored type of ParamValues.",
"type": "string",
"default": ""
},
- "type": {
+ "Type": {
"type": "string",
"default": ""
}
@@ -832,6 +814,10 @@
"description": "Description is a user-facing description of the pipeline that may be used to populate a UI.",
"type": "string"
},
+ "displayName": {
+ "description": "DisplayName is a user-facing name of the pipeline that may be used to populate a UI.",
+ "type": "string"
+ },
"finally": {
"description": "Finally declares the list of Tasks that execute just before leaving the Pipeline i.e. either after all Tasks are finished executing successfully or after a failure which would result in ending the Pipeline",
"type": "array",
@@ -883,6 +869,14 @@
"description": "PipelineTask defines a task in a Pipeline, passing inputs from both Params and from the output of previous tasks.",
"type": "object",
"properties": {
+ "description": {
+ "description": "Description is the description of this task within the context of a Pipeline. This description may be used to populate a UI.",
+ "type": "string"
+ },
+ "displayName": {
+ "description": "DisplayName is the display name of this task within the context of a Pipeline. This display name may be used to populate a UI.",
+ "type": "string"
+ },
"matrix": {
"description": "Matrix declares parameters used to fan out this task.",
"$ref": "#/definitions/v1.Matrix"
@@ -1074,16 +1068,38 @@
}
},
"v1.Provenance": {
- "description": "Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.). For now, it only contains the subfield `ConfigSource` that identifies the source where a build config file came from. In future, it can be expanded as needed to include more metadata about the build. This field aims to be used to carry minimum amount of the authenticated metadata in *Run status so that Tekton Chains can pick it up and record in the provenance it generates.",
+ "description": "Provenance contains metadata about resources used in the TaskRun/PipelineRun such as the source from where a remote build definition was fetched. This field aims to carry minimum amoumt of metadata in *Run status so that Tekton Chains can capture them in the provenance.",
"type": "object",
"properties": {
- "configSource": {
- "description": "ConfigSource identifies the source where a resource came from.",
- "$ref": "#/definitions/v1.ConfigSource"
- },
"featureFlags": {
"description": "FeatureFlags identifies the feature flags that were used during the task/pipeline run",
"$ref": "#/definitions/github.aaakk.us.kg.tektoncd.pipeline.pkg.apis.config.FeatureFlags"
+ },
+ "refSource": {
+ "description": "RefSource identifies the source where a remote task/pipeline came from.",
+ "$ref": "#/definitions/v1.RefSource"
+ }
+ }
+ },
+ "v1.RefSource": {
+ "description": "RefSource contains the information that can uniquely identify where a remote built definition came from i.e. Git repositories, Tekton Bundles in OCI registry and hub.",
+ "type": "object",
+ "properties": {
+ "digest": {
+ "description": "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string",
+ "default": ""
+ }
+ },
+ "entryPoint": {
+ "description": "EntryPoint identifies the entry point into the build. This is often a path to a build definition file and/or a target label within that file. Example: \"task/git-clone/0.8/git-clone.yaml\"",
+ "type": "string"
+ },
+ "uri": {
+ "description": "URI indicates the identity of the source of the build definition. Example: \"https://github.com/tektoncd/catalog\"",
+ "type": "string"
}
}
},
@@ -1654,11 +1670,11 @@
"type": "object",
"properties": {
"apiVersion": {
- "description": "API version of the referent",
+ "description": "API version of the referent Note: A Task with non-empty APIVersion and Kind is considered a Custom Task",
"type": "string"
},
"kind": {
- "description": "TaskKind indicates the kind of the task, namespaced or cluster scoped.",
+ "description": "TaskKind indicates the Kind of the Task: 1. Namespaced Task when Kind is set to \"Task\". If Kind is \"\", it defaults to \"Task\". 2. Custom Task when Kind is non-empty and APIVersion is non-empty",
"type": "string"
},
"name": {
@@ -2102,6 +2118,10 @@
"description": "Description is a user-facing description of the task that may be used to populate a UI.",
"type": "string"
},
+ "displayName": {
+ "description": "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ "type": "string"
+ },
"params": {
"description": "Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value.",
"type": "array",
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_types.go
index 03184ac7f..9a46de41b 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_types.go
@@ -61,6 +61,11 @@ type TaskSpec struct {
// +listType=atomic
Params ParamSpecs `json:"params,omitempty"`
+ // DisplayName is a user-facing name of the task that may be
+ // used to populate a UI.
+ // +optional
+ DisplayName string `json:"displayName,omitempty"`
+
// Description is a user-facing description of the task that may be
// used to populate a UI.
// +optional
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_validation.go
index 87f8b8272..5848053bf 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/task_validation.go
@@ -381,6 +381,8 @@ func ValidateParameterVariables(ctx context.Context, steps []Step, params []Para
arrayParameterNames.Insert(p.Name)
case ParamTypeObject:
objectParamSpecs = append(objectParamSpecs, p)
+ case ParamTypeString:
+ fallthrough
default:
stringParameterNames.Insert(p.Name)
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskref_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskref_types.go
index 74a319dd7..2bb395dac 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskref_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskref_types.go
@@ -20,9 +20,12 @@ package v1
type TaskRef struct {
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
Name string `json:"name,omitempty"`
- // TaskKind indicates the kind of the task, namespaced or cluster scoped.
+ // TaskKind indicates the Kind of the Task:
+ // 1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
+ // 2. Custom Task when Kind is non-empty and APIVersion is non-empty
Kind TaskKind `json:"kind,omitempty"`
// API version of the referent
+ // Note: A Task with non-empty APIVersion and Kind is considered a Custom Task
// +optional
APIVersion string `json:"apiVersion,omitempty"`
@@ -40,3 +43,10 @@ const (
// NamespacedTaskKind indicates that the task type has a namespaced scope.
NamespacedTaskKind TaskKind = "Task"
)
+
+// IsCustomTask checks whether the reference is to a Custom Task
+func (tr *TaskRef) IsCustomTask() bool {
+ // Note that if `apiVersion` is set to `"tekton.dev/v1beta1"` and `kind` is set to `"Task"`,
+ // the reference will be considered a Custom Task - https://github.com/tektoncd/pipeline/issues/6457
+ return tr != nil && tr.APIVersion != "" && tr.Kind != ""
+}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go
index 69660ee65..7375c01ff 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_types.go
@@ -37,7 +37,7 @@ type TaskRunSpec struct {
Debug *TaskRunDebug `json:"debug,omitempty"`
// +optional
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
// +optional
ServiceAccountName string `json:"serviceAccountName"`
// no more than one of the TaskRef and TaskSpec may be specified.
@@ -114,7 +114,7 @@ type TaskRunDebug struct {
type TaskRunInputs struct {
// +optional
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
}
var taskRunCondSet = apis.NewBatchConditionSet()
@@ -415,7 +415,7 @@ func (tr *TaskRun) GetTimeout(ctx context.Context) time.Duration {
// Use the platform default is no timeout is set
if tr.Spec.Timeout == nil {
defaultTimeout := time.Duration(config.FromContextOrDefaults(ctx).Defaults.DefaultTimeoutMinutes)
- return defaultTimeout * time.Minute
+ return defaultTimeout * time.Minute //nolint:durationcheck
}
return tr.Spec.Timeout.Duration
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_validation.go
index 9a23ac0a3..055094bb6 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/taskrun_validation.go
@@ -238,7 +238,7 @@ func ValidateWorkspaceBindings(ctx context.Context, wb []WorkspaceBinding) (errs
}
// ValidateParameters makes sure the params for the Task are valid.
-func ValidateParameters(ctx context.Context, params []Param) (errs *apis.FieldError) {
+func ValidateParameters(ctx context.Context, params Params) (errs *apis.FieldError) {
var names []string
for _, p := range params {
if p.Value.Type == ParamTypeObject {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go
index f08cf5370..bd2f039f6 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1/zz_generated.deepcopy.go
@@ -104,29 +104,6 @@ func (in Combinations) DeepCopy() Combinations {
return *out
}
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *ConfigSource) DeepCopyInto(out *ConfigSource) {
- *out = *in
- if in.Digest != nil {
- in, out := &in.Digest, &out.Digest
- *out = make(map[string]string, len(*in))
- for key, val := range *in {
- (*out)[key] = val
- }
- }
- return
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSource.
-func (in *ConfigSource) DeepCopy() *ConfigSource {
- if in == nil {
- return nil
- }
- out := new(ConfigSource)
- in.DeepCopyInto(out)
- return out
-}
-
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EmbeddedTask) DeepCopyInto(out *EmbeddedTask) {
*out = *in
@@ -148,7 +125,7 @@ func (in *EmbeddedTask) DeepCopy() *EmbeddedTask {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Matrix) DeepCopyInto(out *Matrix) {
+func (in *IncludeParams) DeepCopyInto(out *IncludeParams) {
*out = *in
if in.Params != nil {
in, out := &in.Params, &out.Params
@@ -157,28 +134,43 @@ func (in *Matrix) DeepCopyInto(out *Matrix) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
- if in.Include != nil {
- in, out := &in.Include, &out.Include
- *out = make([]MatrixInclude, len(*in))
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncludeParams.
+func (in *IncludeParams) DeepCopy() *IncludeParams {
+ if in == nil {
+ return nil
+ }
+ out := new(IncludeParams)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in IncludeParamsList) DeepCopyInto(out *IncludeParamsList) {
+ {
+ in := &in
+ *out = make(IncludeParamsList, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
+ return
}
- return
}
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matrix.
-func (in *Matrix) DeepCopy() *Matrix {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncludeParamsList.
+func (in IncludeParamsList) DeepCopy() IncludeParamsList {
if in == nil {
return nil
}
- out := new(Matrix)
+ out := new(IncludeParamsList)
in.DeepCopyInto(out)
- return out
+ return *out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MatrixInclude) DeepCopyInto(out *MatrixInclude) {
+func (in *Matrix) DeepCopyInto(out *Matrix) {
*out = *in
if in.Params != nil {
in, out := &in.Params, &out.Params
@@ -187,15 +179,22 @@ func (in *MatrixInclude) DeepCopyInto(out *MatrixInclude) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.Include != nil {
+ in, out := &in.Include, &out.Include
+ *out = make(IncludeParamsList, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
return
}
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatrixInclude.
-func (in *MatrixInclude) DeepCopy() *MatrixInclude {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matrix.
+func (in *Matrix) DeepCopy() *Matrix {
if in == nil {
return nil
}
- out := new(MatrixInclude)
+ out := new(Matrix)
in.DeepCopyInto(out)
return out
}
@@ -532,7 +531,7 @@ func (in *PipelineRunSpec) DeepCopyInto(out *PipelineRunSpec) {
}
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -976,9 +975,9 @@ func (in *PropertySpec) DeepCopy() *PropertySpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Provenance) DeepCopyInto(out *Provenance) {
*out = *in
- if in.ConfigSource != nil {
- in, out := &in.ConfigSource, &out.ConfigSource
- *out = new(ConfigSource)
+ if in.RefSource != nil {
+ in, out := &in.RefSource, &out.RefSource
+ *out = new(RefSource)
(*in).DeepCopyInto(*out)
}
if in.FeatureFlags != nil {
@@ -999,12 +998,35 @@ func (in *Provenance) DeepCopy() *Provenance {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RefSource) DeepCopyInto(out *RefSource) {
+ *out = *in
+ if in.Digest != nil {
+ in, out := &in.Digest, &out.Digest
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RefSource.
+func (in *RefSource) DeepCopy() *RefSource {
+ if in == nil {
+ return nil
+ }
+ out := new(RefSource)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResolverRef) DeepCopyInto(out *ResolverRef) {
*out = *in
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -1489,7 +1511,7 @@ func (in *TaskRunInputs) DeepCopyInto(out *TaskRunInputs) {
*out = *in
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -1584,7 +1606,7 @@ func (in *TaskRunSpec) DeepCopyInto(out *TaskRunSpec) {
}
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/run_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/run_types.go
index 0806ef6cb..68198cf44 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/run_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/run_types.go
@@ -55,7 +55,7 @@ type RunSpec struct {
Spec *EmbeddedRunSpec `json:"spec,omitempty"`
// +optional
- Params []v1beta1.Param `json:"params,omitempty"`
+ Params v1beta1.Params `json:"params,omitempty"`
// Used for cancelling a run (and maybe more later on)
// +optional
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_types.go
index c920004c1..c16483cb8 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_types.go
@@ -62,6 +62,11 @@ type VerificationPolicySpec struct {
Resources []ResourcePattern `json:"resources"`
// Authorities defines the rules for validating signatures.
Authorities []Authority `json:"authorities"`
+ // Mode controls whether a failing policy will fail the taskrun/pipelinerun, or only log the warnings
+ // enforce - fail the taskrun/pipelinerun if verification fails (default)
+ // warn - don't fail the taskrun/pipelinerun if verification fails but log warnings
+ // +optional
+ Mode ModeType `json:"mode,omitempty"`
}
// ResourcePattern defines the pattern of the resource source
@@ -82,6 +87,15 @@ type Authority struct {
Key *KeyRef `json:"key,omitempty"`
}
+// ModeType indicates the type of a mode for VerificationPolicy
+type ModeType string
+
+// Valid ModeType:
+const (
+ ModeWarn ModeType = "warn"
+ ModeEnforce ModeType = "enforce"
+)
+
// KeyRef defines the reference to a public key
type KeyRef struct {
// SecretRef sets a reference to a secret with the key.
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_validation.go
index ce3d1a78b..316ba55da 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/verificationpolicy_validation.go
@@ -55,6 +55,9 @@ func (vs *VerificationPolicySpec) Validate(ctx context.Context) (errs *apis.Fiel
errs = errs.Also(a.Key.Validate(ctx).ViaFieldIndex("key", i))
}
}
+ if vs.Mode != "" && vs.Mode != ModeEnforce && vs.Mode != ModeWarn {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("available values are: %s, %s, but got: %s", ModeEnforce, ModeWarn, vs.Mode), "mode"))
+ }
return errs
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go
index 9c0c52545..2da3fac46 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1/zz_generated.deepcopy.go
@@ -182,7 +182,7 @@ func (in *RunSpec) DeepCopyInto(out *RunSpec) {
}
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]v1beta1.Param, len(*in))
+ *out = make(v1beta1.Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_conversion.go
index 746831bfd..816e4e991 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_conversion.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_types.go
index ceec052a8..980ad392c 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/container_types.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/customrun_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/customrun_types.go
index 960602003..233270037 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/customrun_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/customrun_types.go
@@ -54,7 +54,7 @@ type CustomRunSpec struct {
// +optional
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
// Used for cancelling a customrun (and maybe more later on)
// +optional
@@ -194,7 +194,7 @@ func (r *CustomRun) GetStatusCondition() apis.ConditionAccessor {
// GetGroupVersionKind implements kmeta.OwnerRefable.
func (*CustomRun) GetGroupVersionKind() schema.GroupVersionKind {
- return SchemeGroupVersion.WithKind(pipeline.RunControllerName)
+ return SchemeGroupVersion.WithKind(pipeline.CustomRunControllerName)
}
// HasPipelineRunOwnerReference returns true of CustomRun has
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/matrix_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/matrix_types.go
index 89797c707..f1c86d4e0 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/matrix_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/matrix_types.go
@@ -34,16 +34,17 @@ type Matrix struct {
// +listType=atomic
Params Params `json:"params,omitempty"`
- // Include is a list of MatrixInclude which allows passing in specific combinations of Parameters into the Matrix.
- // Note that Include is in preview mode and not yet supported.
+ // Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
// +optional
// +listType=atomic
- Include []MatrixInclude `json:"include,omitempty"`
+ Include IncludeParamsList `json:"include,omitempty"`
}
-// MatrixInclude allows passing in a specific combinations of Parameters into the Matrix.
-// Note this struct is in preview mode and not yet supported
-type MatrixInclude struct {
+// IncludeParamsList is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.
+type IncludeParamsList []IncludeParams
+
+// IncludeParams allows passing in a specific combinations of Parameters into the Matrix.
+type IncludeParams struct {
// Name the specified combination
Name string `json:"name,omitempty"`
@@ -56,21 +57,97 @@ type MatrixInclude struct {
// Combination is a map, mainly defined to hold a single combination from a Matrix with key as param.Name and value as param.Value
type Combination map[string]string
-// Combinations is a list of combination
+// Combinations is a Combination list
type Combinations []Combination
-// ToParams transforms Combinations from a slice of map[string]string to a slice of Params
-// such that, the combinations can be directly consumed in creating taskRun/run object
-func (cs Combinations) ToParams() []Params {
+// FanOut returns an list of params that represent combinations
+func (m *Matrix) FanOut() []Params {
+ var combinations, includeCombinations Combinations
+ includeCombinations = m.getIncludeCombinations()
+ if m.HasInclude() && !m.HasParams() {
+ // If there are only Matrix Include Parameters return explicit combinations
+ return includeCombinations.toParams()
+ }
+ // Generate combinations from Matrix Parameters
+ for _, parameter := range m.Params {
+ combinations = combinations.fanOutMatrixParams(parameter)
+ }
+ combinations.overwriteCombinations(includeCombinations)
+ combinations = combinations.addNewCombinations(includeCombinations)
+ return combinations.toParams()
+}
+
+// overwriteCombinations replaces any missing include params in the initial
+// matrix params combinations by overwriting the initial combinations with the
+// include combinations
+func (cs Combinations) overwriteCombinations(ics Combinations) {
+ for _, paramCombination := range cs {
+ for _, includeCombination := range ics {
+ if paramCombination.contains(includeCombination) {
+ // overwrite the parameter name and value in existing combination
+ // with the include combination
+ for name, val := range includeCombination {
+ paramCombination[name] = val
+ }
+ }
+ }
+ }
+}
+
+// addNewCombinations creates a new combination for any include parameter
+// values that are missing entirely from the initial combinations and
+// returns all combinations
+func (cs Combinations) addNewCombinations(ics Combinations) Combinations {
+ for _, includeCombination := range ics {
+ if cs.shouldAddNewCombination(includeCombination) {
+ cs = append(cs, includeCombination)
+ }
+ }
+ return cs
+}
+
+// contains returns true if the include parameter name and value exists in combinations
+func (c Combination) contains(includeCombination Combination) bool {
+ for name, val := range includeCombination {
+ if _, exist := c[name]; exist {
+ if c[name] != val {
+ return false
+ }
+ }
+ }
+ return true
+}
+
+// shouldAddNewCombination returns true if the include parameter name exists but the value is
+// missing from combinations
+func (cs Combinations) shouldAddNewCombination(includeCombination map[string]string) bool {
+ if len(includeCombination) == 0 {
+ return false
+ }
+ for _, paramCombination := range cs {
+ for name, val := range includeCombination {
+ if _, exist := paramCombination[name]; exist {
+ if paramCombination[name] == val {
+ return false
+ }
+ }
+ }
+ }
+ return true
+}
+
+// toParams transforms Combinations from a slice of map[string]string to a slice of Params
+// such that, these combinations can be directly consumed in creating taskRun/run object
+func (cs Combinations) toParams() []Params {
listOfParams := make([]Params, len(cs))
for i := range cs {
var params Params
combination := cs[i]
- order, sortedCombination := combination.sortCombination()
+ order, _ := combination.sortCombination()
for _, key := range order {
params = append(params, Param{
Name: key,
- Value: ParamValue{Type: ParamTypeString, StringVal: sortedCombination[key]},
+ Value: ParamValue{Type: ParamTypeString, StringVal: combination[key]},
})
}
listOfParams[i] = params
@@ -78,15 +155,29 @@ func (cs Combinations) ToParams() []Params {
return listOfParams
}
-// fanOut generates a new combination based on a given Parameter in the Matrix.
-func (cs Combinations) fanOut(param Param) Combinations {
+// fanOutMatrixParams generates new combinations based on Matrix Parameters.
+func (cs Combinations) fanOutMatrixParams(param Param) Combinations {
if len(cs) == 0 {
return initializeCombinations(param)
}
return cs.distribute(param)
}
-// distribute generates a new combination of Parameters by adding a new Parameter to an existing list of Combinations.
+// getIncludeCombinations generates combinations based on Matrix Include Parameters
+func (m *Matrix) getIncludeCombinations() Combinations {
+ var combinations Combinations
+ for i := range m.Include {
+ includeParams := m.Include[i].Params
+ newCombination := make(Combination)
+ for _, param := range includeParams {
+ newCombination[param.Name] = param.Value.StringVal
+ }
+ combinations = append(combinations, newCombination)
+ }
+ return combinations
+}
+
+// distribute generates a new Combination of Parameters by adding a new Parameter to an existing list of Combinations.
func (cs Combinations) distribute(param Param) Combinations {
var expandedCombinations Combinations
for _, value := range param.Value.ArrayVal {
@@ -101,7 +192,7 @@ func (cs Combinations) distribute(param Param) Combinations {
return expandedCombinations
}
-// initializeCombinations generates a new combination based on the first Parameter in the Matrix.
+// initializeCombinations generates a new Combination based on the first Parameter in the Matrix.
func initializeCombinations(param Param) Combinations {
var combinations Combinations
for _, value := range param.Value.ArrayVal {
@@ -110,7 +201,7 @@ func initializeCombinations(param Param) Combinations {
return combinations
}
-// sortCombination sorts the given Combination based on the param names to produce a deterministic ordering
+// sortCombination sorts the given Combination based on the Parameter names to produce a deterministic ordering
func (c Combination) sortCombination() ([]string, Combination) {
sortedCombination := make(Combination, len(c))
order := make([]string, 0, len(c))
@@ -126,30 +217,21 @@ func (c Combination) sortCombination() ([]string, Combination) {
return order, sortedCombination
}
-// FanOut produces combinations of Parameters of type String from a slice of Parameters of type Array.
-func (m *Matrix) FanOut() Combinations {
- var combinations Combinations
- for _, parameter := range m.Params {
- combinations = combinations.fanOut(parameter)
- }
- return combinations
-}
-
-// CountCombinations returns the count of combinations of Parameters generated from the Matrix in PipelineTask.
+// CountCombinations returns the count of Combinations of Parameters generated from the Matrix in PipelineTask.
func (m *Matrix) CountCombinations() int {
- // Iterate over matrix.params and compute count of all generated combinations
+ // Iterate over Matrix Parameters and compute count of all generated Combinations
count := m.countGeneratedCombinationsFromParams()
- // Add any additional combinations generated from matrix include params
+ // Add any additional Combinations generated from Matrix Include Parameters
count += m.countNewCombinationsFromInclude()
return count
}
-// countGeneratedCombinationsFromParams returns the count of combinations of Parameters generated from the matrix
-// parameters
+// countGeneratedCombinationsFromParams returns the count of Combinations of Parameters generated from the Matrix
+// Parameters
func (m *Matrix) countGeneratedCombinationsFromParams() int {
- if !m.hasParams() {
+ if !m.HasParams() {
return 0
}
count := 1
@@ -159,13 +241,13 @@ func (m *Matrix) countGeneratedCombinationsFromParams() int {
return count
}
-// countNewCombinationsFromInclude returns the count of combinations of Parameters generated from the matrix
-// include parameters
+// countNewCombinationsFromInclude returns the count of Combinations of Parameters generated from the Matrix
+// Include Parameters
func (m *Matrix) countNewCombinationsFromInclude() int {
- if !m.hasInclude() {
+ if !m.HasInclude() {
return 0
}
- if !m.hasParams() {
+ if !m.HasParams() {
return len(m.Include)
}
count := 0
@@ -173,7 +255,7 @@ func (m *Matrix) countNewCombinationsFromInclude() int {
for _, include := range m.Include {
for _, param := range include.Params {
if val, exist := matrixParamMap[param.Name]; exist {
- // If the matrix include param values does not exist, a new combination will be generated
+ // If the Matrix Include param values does not exist, a new Combination will be generated
if !slices.Contains(val, param.Value.StringVal) {
count++
} else {
@@ -185,25 +267,28 @@ func (m *Matrix) countNewCombinationsFromInclude() int {
return count
}
-func (m *Matrix) hasInclude() bool {
+// HasInclude returns true if the Matrix has Include Parameters
+func (m *Matrix) HasInclude() bool {
return m != nil && m.Include != nil && len(m.Include) > 0
}
-func (m *Matrix) hasParams() bool {
+// HasParams returns true if the Matrix has Parameters
+func (m *Matrix) HasParams() bool {
return m != nil && m.Params != nil && len(m.Params) > 0
}
-func (m *Matrix) getParamNames() []string {
- var names []string
- if m.hasParams() {
- names = m.Params.extractNames()
+// GetAllParams returns a list of all Matrix Parameters
+func (m *Matrix) GetAllParams() Params {
+ var params Params
+ if m.HasParams() {
+ params = append(params, m.Params...)
}
- if m.hasInclude() {
+ if m.HasInclude() {
for _, include := range m.Include {
- names = append(names, include.Params.extractNames()...)
+ params = append(params, include.Params...)
}
}
- return names
+ return params
}
func (m *Matrix) validateCombinationsCount(ctx context.Context) (errs *apis.FieldError) {
@@ -215,14 +300,13 @@ func (m *Matrix) validateCombinationsCount(ctx context.Context) (errs *apis.Fiel
return errs
}
-// validateParams validates the type of parameter
-// for Matrix.Params and Matrix.Include.Params
+// validateParams validates the type of Parameter for Matrix.Params and Matrix.Include.Params
// Matrix.Params must be of type array. Matrix.Include.Params must be of type string.
// validateParams also validates Matrix.Params for a unique list of params
// and a unique list of params in each Matrix.Include.Params specification
func (m *Matrix) validateParams() (errs *apis.FieldError) {
if m != nil {
- if m.hasInclude() {
+ if m.HasInclude() {
for i, include := range m.Include {
errs = errs.Also(include.Params.validateDuplicateParameters().ViaField(fmt.Sprintf("matrix.include[%d].params", i)))
for _, param := range include.Params {
@@ -232,7 +316,7 @@ func (m *Matrix) validateParams() (errs *apis.FieldError) {
}
}
}
- if m.hasParams() {
+ if m.HasParams() {
errs = errs.Also(m.Params.validateDuplicateParameters().ViaField("matrix.params"))
for _, param := range m.Params {
if param.Value.Type != ParamTypeArray {
@@ -244,10 +328,10 @@ func (m *Matrix) validateParams() (errs *apis.FieldError) {
return errs
}
-// validatePipelineParametersVariablesInMatrixParameters validates all pipeline paramater variables including Matrix.Params and Matrix.Include.Params
+// validatePipelineParametersVariablesInMatrixParameters validates all pipeline parameter variables including Matrix.Params and Matrix.Include.Params
// that may contain the reference(s) to other params to make sure those references are used appropriately.
func (m *Matrix) validatePipelineParametersVariablesInMatrixParameters(prefix string, paramNames sets.String, arrayParamNames sets.String, objectParamNameKeys map[string][]string) (errs *apis.FieldError) {
- if m.hasInclude() {
+ if m.HasInclude() {
for _, include := range m.Include {
for idx, param := range include.Params {
stringElement := param.Value.StringVal
@@ -256,7 +340,7 @@ func (m *Matrix) validatePipelineParametersVariablesInMatrixParameters(prefix st
}
}
}
- if m.hasParams() {
+ if m.HasParams() {
for _, param := range m.Params {
for idx, arrayElement := range param.Value.ArrayVal {
// Matrix Params must be of type array
@@ -267,8 +351,8 @@ func (m *Matrix) validatePipelineParametersVariablesInMatrixParameters(prefix st
return errs
}
-func (m *Matrix) validateParameterInOneOfMatrixOrParams(params []Param) (errs *apis.FieldError) {
- matrixParamNames := sets.NewString(m.getParamNames()...)
+func (m *Matrix) validateParameterInOneOfMatrixOrParams(params Params) (errs *apis.FieldError) {
+ matrixParamNames := m.GetAllParams().ExtractNames()
for _, param := range params {
if matrixParamNames.Has(param.Name) {
errs = errs.Also(apis.ErrMultipleOneOf("matrix["+param.Name+"]", "params["+param.Name+"]"))
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/openapi_generated.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/openapi_generated.go
index c668bd6c1..df879cd58 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/openapi_generated.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/openapi_generated.go
@@ -43,15 +43,18 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CustomRunSpec": schema_pkg_apis_pipeline_v1beta1_CustomRunSpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.EmbeddedCustomRunSpec": schema_pkg_apis_pipeline_v1beta1_EmbeddedCustomRunSpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.EmbeddedTask": schema_pkg_apis_pipeline_v1beta1_EmbeddedTask(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.IncludeParams": schema_pkg_apis_pipeline_v1beta1_IncludeParams(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.InternalTaskModifier": schema_pkg_apis_pipeline_v1beta1_InternalTaskModifier(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Matrix": schema_pkg_apis_pipeline_v1beta1_Matrix(ref),
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.MatrixInclude": schema_pkg_apis_pipeline_v1beta1_MatrixInclude(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param": schema_pkg_apis_pipeline_v1beta1_Param(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec": schema_pkg_apis_pipeline_v1beta1_ParamSpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamValue": schema_pkg_apis_pipeline_v1beta1_ParamValue(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Pipeline": schema_pkg_apis_pipeline_v1beta1_Pipeline(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineDeclaredResource": schema_pkg_apis_pipeline_v1beta1_PipelineDeclaredResource(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineList": schema_pkg_apis_pipeline_v1beta1_PipelineList(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRef": schema_pkg_apis_pipeline_v1beta1_PipelineRef(ref),
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceResult": schema_pkg_apis_pipeline_v1beta1_PipelineResourceResult(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceBinding": schema_pkg_apis_pipeline_v1beta1_PipelineResourceBinding(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceRef": schema_pkg_apis_pipeline_v1beta1_PipelineResourceRef(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResult": schema_pkg_apis_pipeline_v1beta1_PipelineResult(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRun": schema_pkg_apis_pipeline_v1beta1_PipelineRun(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunList": schema_pkg_apis_pipeline_v1beta1_PipelineRunList(ref),
@@ -63,13 +66,17 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRunTaskRunStatus": schema_pkg_apis_pipeline_v1beta1_PipelineRunTaskRunStatus(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec": schema_pkg_apis_pipeline_v1beta1_PipelineSpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTask": schema_pkg_apis_pipeline_v1beta1_PipelineTask(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskInputResource": schema_pkg_apis_pipeline_v1beta1_PipelineTaskInputResource(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskMetadata": schema_pkg_apis_pipeline_v1beta1_PipelineTaskMetadata(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskOutputResource": schema_pkg_apis_pipeline_v1beta1_PipelineTaskOutputResource(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskParam": schema_pkg_apis_pipeline_v1beta1_PipelineTaskParam(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskResources": schema_pkg_apis_pipeline_v1beta1_PipelineTaskResources(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRun": schema_pkg_apis_pipeline_v1beta1_PipelineTaskRun(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRunSpec": schema_pkg_apis_pipeline_v1beta1_PipelineTaskRunSpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineWorkspaceDeclaration": schema_pkg_apis_pipeline_v1beta1_PipelineWorkspaceDeclaration(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PropertySpec": schema_pkg_apis_pipeline_v1beta1_PropertySpec(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Provenance": schema_pkg_apis_pipeline_v1beta1_Provenance(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.RefSource": schema_pkg_apis_pipeline_v1beta1_RefSource(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResolverRef": schema_pkg_apis_pipeline_v1beta1_ResolverRef(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ResultRef": schema_pkg_apis_pipeline_v1beta1_ResultRef(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Sidecar": schema_pkg_apis_pipeline_v1beta1_Sidecar(ref),
@@ -82,10 +89,16 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Task": schema_pkg_apis_pipeline_v1beta1_Task(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskList": schema_pkg_apis_pipeline_v1beta1_TaskList(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRef": schema_pkg_apis_pipeline_v1beta1_TaskRef(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResource": schema_pkg_apis_pipeline_v1beta1_TaskResource(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding": schema_pkg_apis_pipeline_v1beta1_TaskResourceBinding(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResources": schema_pkg_apis_pipeline_v1beta1_TaskResources(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResult": schema_pkg_apis_pipeline_v1beta1_TaskResult(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRun": schema_pkg_apis_pipeline_v1beta1_TaskRun(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunDebug": schema_pkg_apis_pipeline_v1beta1_TaskRunDebug(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunInputs": schema_pkg_apis_pipeline_v1beta1_TaskRunInputs(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunList": schema_pkg_apis_pipeline_v1beta1_TaskRunList(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunOutputs": schema_pkg_apis_pipeline_v1beta1_TaskRunOutputs(ref),
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResources": schema_pkg_apis_pipeline_v1beta1_TaskRunResources(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResult": schema_pkg_apis_pipeline_v1beta1_TaskRunResult(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSidecarOverride": schema_pkg_apis_pipeline_v1beta1_TaskRunSidecarOverride(ref),
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSpec": schema_pkg_apis_pipeline_v1beta1_TaskRunSpec(ref),
@@ -620,19 +633,19 @@ func schema_pkg_apis_pipeline_v1beta1_ConfigSource(ref common.ReferenceCallback)
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "ConfigSource identifies the source where a resource came from. This can include Git repositories, Task Bundles, file checksums, or other information that allows users to identify where the resource came from and what version was used.",
+ Description: "ConfigSource contains the information that can uniquely identify where a remote built definition came from i.e. Git repositories, Tekton Bundles in OCI registry and hub.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"uri": {
SchemaProps: spec.SchemaProps{
- Description: "URI indicates the identity of the source of the config. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.uri Example: \"https://github.com/tektoncd/catalog\"",
+ Description: "URI indicates the identity of the source of the build definition. Example: \"https://github.com/tektoncd/catalog\"",
Type: []string{"string"},
Format: "",
},
},
"digest": {
SchemaProps: spec.SchemaProps{
- Description: "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.digest Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
+ Description: "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
Type: []string{"object"},
AdditionalProperties: &spec.SchemaOrBool{
Allows: true,
@@ -648,7 +661,7 @@ func schema_pkg_apis_pipeline_v1beta1_ConfigSource(ref common.ReferenceCallback)
},
"entryPoint": {
SchemaProps: spec.SchemaProps{
- Description: "EntryPoint identifies the entry point into the build. This is often a path to a configuration file and/or a target label within that file. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.entryPoint Example: \"task/git-clone/0.8/git-clone.yaml\"",
+ Description: "EntryPoint identifies the entry point into the build. This is often a path to a build definition file and/or a target label within that file. Example: \"task/git-clone/0.8/git-clone.yaml\"",
Type: []string{"string"},
Format: "",
},
@@ -924,6 +937,12 @@ func schema_pkg_apis_pipeline_v1beta1_EmbeddedTask(ref common.ReferenceCallback)
Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskMetadata"),
},
},
+ "resources": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Resources is a list input and output resource to run the task Resources are represented in TaskRuns as bindings to instances of PipelineResources.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResources"),
+ },
+ },
"params": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -943,6 +962,13 @@ func schema_pkg_apis_pipeline_v1beta1_EmbeddedTask(ref common.ReferenceCallback)
},
},
},
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"description": {
SchemaProps: spec.SchemaProps{
Description: "Description is a user-facing description of the task that may be used to populate a UI.",
@@ -1055,17 +1081,24 @@ func schema_pkg_apis_pipeline_v1beta1_EmbeddedTask(ref common.ReferenceCallback)
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskMetadata", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Sidecar", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepTemplate", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceDeclaration", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskMetadata", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Sidecar", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepTemplate", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResources", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceDeclaration", "k8s.io/api/core/v1.Volume", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
}
}
-func schema_pkg_apis_pipeline_v1beta1_Matrix(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1beta1_IncludeParams(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "Matrix is used to fan out Tasks in a Pipeline",
+ Description: "IncludeParams allows passing in a specific combinations of Parameters into the Matrix.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Name the specified combination",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"params": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -1073,7 +1106,7 @@ func schema_pkg_apis_pipeline_v1beta1_Matrix(ref common.ReferenceCallback) commo
},
},
SchemaProps: spec.SchemaProps{
- Description: "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
+ Description: "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
@@ -1085,61 +1118,124 @@ func schema_pkg_apis_pipeline_v1beta1_Matrix(ref common.ReferenceCallback) commo
},
},
},
- "include": {
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_InternalTaskModifier(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "InternalTaskModifier implements TaskModifier for resources that are built-in to Tekton Pipelines.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "stepsToPrepend": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
- Description: "Include is a list of MatrixInclude which allows passing in specific combinations of Parameters into the Matrix. Note that Include is in preview mode and not yet supported.",
- Type: []string{"array"},
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step"),
+ },
+ },
+ },
+ },
+ },
+ "stepsToAppend": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step"),
+ },
+ },
+ },
+ },
+ },
+ "volumes": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.MatrixInclude"),
+ Ref: ref("k8s.io/api/core/v1.Volume"),
},
},
},
},
},
},
+ Required: []string{"stepsToPrepend", "stepsToAppend", "volumes"},
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.MatrixInclude", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step", "k8s.io/api/core/v1.Volume"},
}
}
-func schema_pkg_apis_pipeline_v1beta1_MatrixInclude(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1beta1_Matrix(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "MatrixInclude allows passing in a specific combinations of Parameters into the Matrix. Note this struct is in preview mode and not yet supported",
+ Description: "Matrix is used to fan out Tasks in a Pipeline",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "name": {
+ "params": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
SchemaProps: spec.SchemaProps{
- Description: "Name the specified combination",
- Type: []string{"string"},
- Format: "",
+ Description: "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param"),
+ },
+ },
+ },
},
},
- "params": {
+ "include": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
},
},
SchemaProps: spec.SchemaProps{
- Description: "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
+ Description: "Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param"),
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.IncludeParams"),
},
},
},
@@ -1149,7 +1245,7 @@ func schema_pkg_apis_pipeline_v1beta1_MatrixInclude(ref common.ReferenceCallback
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.IncludeParams", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param"},
}
}
@@ -1248,14 +1344,14 @@ func schema_pkg_apis_pipeline_v1beta1_ParamValue(ref common.ReferenceCallback) c
Description: "ResultValue is a type alias of ParamValue",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "type": {
+ "Type": {
SchemaProps: spec.SchemaProps{
Default: "",
Type: []string{"string"},
Format: "",
},
},
- "stringVal": {
+ "StringVal": {
SchemaProps: spec.SchemaProps{
Description: "Represents the stored type of ParamValues.",
Default: "",
@@ -1263,7 +1359,7 @@ func schema_pkg_apis_pipeline_v1beta1_ParamValue(ref common.ReferenceCallback) c
Format: "",
},
},
- "arrayVal": {
+ "ArrayVal": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
"x-kubernetes-list-type": "atomic",
@@ -1282,7 +1378,7 @@ func schema_pkg_apis_pipeline_v1beta1_ParamValue(ref common.ReferenceCallback) c
},
},
},
- "objectVal": {
+ "ObjectVal": {
SchemaProps: spec.SchemaProps{
Type: []string{"object"},
AdditionalProperties: &spec.SchemaOrBool{
@@ -1298,7 +1394,7 @@ func schema_pkg_apis_pipeline_v1beta1_ParamValue(ref common.ReferenceCallback) c
},
},
},
- Required: []string{"type", "stringVal", "arrayVal", "objectVal"},
+ Required: []string{"Type", "StringVal", "ArrayVal", "ObjectVal"},
},
},
}
@@ -1346,6 +1442,43 @@ func schema_pkg_apis_pipeline_v1beta1_Pipeline(ref common.ReferenceCallback) com
}
}
+func schema_pkg_apis_pipeline_v1beta1_PipelineDeclaredResource(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PipelineDeclaredResource is used by a Pipeline to declare the types of the PipelineResources that it will required to run and names which can be used to refer to these PipelineResources in PipelineTaskResourceBindings.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Name is the name that will be used by the Pipeline to refer to this resource. It does not directly correspond to the name of any PipelineResources Task inputs or outputs, and it does not correspond to the actual names of the PipelineResources that will be bound in the PipelineRun.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "type": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Type is the type of the PipelineResource.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "optional": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Optional declares the resource as optional. optional: true - the resource is considered optional optional: false - the resource is considered required (default/equivalent of not specifying it)",
+ Type: []string{"boolean"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"name", "type"},
+ },
+ },
+ }
+}
+
func schema_pkg_apis_pipeline_v1beta1_PipelineList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -1429,42 +1562,62 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRef(ref common.ReferenceCallback)
}
}
-func schema_pkg_apis_pipeline_v1beta1_PipelineResourceResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1beta1_PipelineResourceBinding(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "PipelineResourceResult is used to write key/value pairs to TaskRun pod termination messages. The key/value pairs may come from the entrypoint binary, or represent a TaskRunResult. If they represent a TaskRunResult, the key is the name of the result and the value is the JSON-serialized value of the result.",
+ Description: "PipelineResourceBinding connects a reference to an instance of a PipelineResource with a PipelineResource dependency that the Pipeline has declared\n\nDeprecated: Unused, preserved only for backwards compatibility",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "key": {
+ "name": {
SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
+ Description: "Name is the name of the PipelineResource in the Pipeline's declaration",
+ Type: []string{"string"},
+ Format: "",
},
},
- "value": {
+ "resourceRef": {
SchemaProps: spec.SchemaProps{
- Default: "",
- Type: []string{"string"},
- Format: "",
+ Description: "ResourceRef is a reference to the instance of the actual PipelineResource that should be used",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceRef"),
+ },
+ },
+ "resourceSpec": {
+ SchemaProps: spec.SchemaProps{
+ Description: "ResourceSpec is specification of a resource that should be created and consumed by the task",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceSpec"),
},
},
- "resourceName": {
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceRef", "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceSpec"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_PipelineResourceRef(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PipelineResourceRef can be used to refer to a specific instance of a Resource\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
SchemaProps: spec.SchemaProps{
- Description: "ResourceName may be used in tests, but it is not populated in termination messages. It is preserved here for backwards compatibility and will not be ported to v1.",
+ Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
Type: []string{"string"},
Format: "",
},
},
- "type": {
+ "apiVersion": {
SchemaProps: spec.SchemaProps{
- Type: []string{"integer"},
- Format: "int32",
+ Description: "API version of the referent",
+ Type: []string{"string"},
+ Format: "",
},
},
},
- Required: []string{"key", "value"},
},
},
}
@@ -1706,6 +1859,25 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunSpec(ref common.ReferenceCallba
Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec"),
},
},
+ "resources": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "Resources is a list of bindings specifying which actual instances of PipelineResources to use for the resources the Pipeline has declared it needs.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceBinding"),
+ },
+ },
+ },
+ },
+ },
"params": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -1798,7 +1970,7 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineRunSpec(ref common.ReferenceCallba
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.Template", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRef", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRunSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TimeoutFields", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.Template", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineRef", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceBinding", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskRunSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TimeoutFields", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
}
}
@@ -2191,6 +2363,13 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineSpec(ref common.ReferenceCallback)
Description: "PipelineSpec defines the desired state of Pipeline.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is a user-facing name of the pipeline that may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"description": {
SchemaProps: spec.SchemaProps{
Description: "Description is a user-facing description of the pipeline that may be used to populate a UI.",
@@ -2198,6 +2377,25 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineSpec(ref common.ReferenceCallback)
Format: "",
},
},
+ "resources": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "Deprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineDeclaredResource"),
+ },
+ },
+ },
+ },
+ },
"tasks": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -2297,7 +2495,7 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineSpec(ref common.ReferenceCallback)
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTask", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineWorkspaceDeclaration"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineDeclaredResource", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTask", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineWorkspaceDeclaration"},
}
}
@@ -2315,6 +2513,20 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineTask(ref common.ReferenceCallback)
Format: "",
},
},
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is the display name of this task within the context of a Pipeline. This display name may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "description": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Description is the description of this task within the context of a Pipeline. This description may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"taskRef": {
SchemaProps: spec.SchemaProps{
Description: "TaskRef is a reference to a task definition.",
@@ -2368,6 +2580,12 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineTask(ref common.ReferenceCallback)
},
},
},
+ "resources": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Deprecated: Unused, preserved only for backwards compatibility",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskResources"),
+ },
+ },
"params": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -2422,7 +2640,57 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineTask(ref common.ReferenceCallback)
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.EmbeddedTask", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Matrix", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRef", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WhenExpression", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspacePipelineTaskBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.EmbeddedTask", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Matrix", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskResources", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRef", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WhenExpression", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspacePipelineTaskBinding", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_PipelineTaskInputResource(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PipelineTaskInputResource maps the name of a declared PipelineResource input dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used. This input may come from a previous task.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Name is the name of the PipelineResource as declared by the Task.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "resource": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Resource is the name of the DeclaredPipelineResource to use.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "from": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "From is the list of PipelineTask names that the resource has to come from. (Implies an ordering in the execution graph.)",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"name", "resource"},
+ },
+ },
}
}
@@ -2469,6 +2737,36 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineTaskMetadata(ref common.ReferenceC
}
}
+func schema_pkg_apis_pipeline_v1beta1_PipelineTaskOutputResource(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PipelineTaskOutputResource maps the name of a declared PipelineResource output dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Name is the name of the PipelineResource as declared by the Task.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "resource": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Resource is the name of the DeclaredPipelineResource to use.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"name", "resource"},
+ },
+ },
+ }
+}
+
func schema_pkg_apis_pipeline_v1beta1_PipelineTaskParam(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -2497,6 +2795,59 @@ func schema_pkg_apis_pipeline_v1beta1_PipelineTaskParam(ref common.ReferenceCall
}
}
+func schema_pkg_apis_pipeline_v1beta1_PipelineTaskResources(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PipelineTaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "inputs": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskInputResource"),
+ },
+ },
+ },
+ },
+ },
+ "outputs": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskOutputResource"),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskInputResource", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineTaskOutputResource"},
+ }
+}
+
func schema_pkg_apis_pipeline_v1beta1_PipelineTaskRun(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -2654,15 +3005,21 @@ func schema_pkg_apis_pipeline_v1beta1_Provenance(ref common.ReferenceCallback) c
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.). For now, it only contains the subfield `ConfigSource` that identifies the source where a build config file came from. In future, it can be expanded as needed to include more metadata about the build. This field aims to be used to carry minimum amount of the authenticated metadata in *Run status so that Tekton Chains can pick it up and record in the provenance it generates.",
+ Description: "Provenance contains metadata about resources used in the TaskRun/PipelineRun such as the source from where a remote build definition was fetched. This field aims to carry minimum amoumt of metadata in *Run status so that Tekton Chains can capture them in the provenance.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
"configSource": {
SchemaProps: spec.SchemaProps{
- Description: "ConfigSource identifies the source where a resource came from.",
+ Description: "Deprecated: Use RefSource instead",
Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource"),
},
},
+ "refSource": {
+ SchemaProps: spec.SchemaProps{
+ Description: "RefSource identifies the source where a remote task/pipeline came from.",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.RefSource"),
+ },
+ },
"featureFlags": {
SchemaProps: spec.SchemaProps{
Description: "FeatureFlags identifies the feature flags that were used during the task/pipeline run",
@@ -2673,7 +3030,50 @@ func schema_pkg_apis_pipeline_v1beta1_Provenance(ref common.ReferenceCallback) c
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource"},
+ "github.com/tektoncd/pipeline/pkg/apis/config.FeatureFlags", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.RefSource"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_RefSource(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "RefSource contains the information that can uniquely identify where a remote built definition came from i.e. Git repositories, Tekton Bundles in OCI registry and hub.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "uri": {
+ SchemaProps: spec.SchemaProps{
+ Description: "URI indicates the identity of the source of the build definition. Example: \"https://github.com/tektoncd/catalog\"",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "digest": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
+ Type: []string{"object"},
+ AdditionalProperties: &spec.SchemaOrBool{
+ Allows: true,
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ "entryPoint": {
+ SchemaProps: spec.SchemaProps{
+ Description: "EntryPoint identifies the entry point into the build. This is often a path to a build definition file and/or a target label within that file. Example: \"task/git-clone/0.8/git-clone.yaml\"",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
}
}
@@ -3779,158 +4179,316 @@ func schema_pkg_apis_pipeline_v1beta1_StepTemplate(ref common.ReferenceCallback)
Format: "",
},
},
- "stdinOnce": {
+ "stdinOnce": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false\n\nDeprecated: This field will be removed in a future release.",
+ Type: []string{"boolean"},
+ Format: "",
+ },
+ },
+ "tty": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Whether this Step should allocate a DeprecatedTTY for itself, also requires 'stdin' to be true. Default is false.\n\nDeprecated: This field will be removed in a future release.",
+ Type: []string{"boolean"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"name"},
+ },
+ },
+ Dependencies: []string{
+ "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_Task(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "Task represents a collection of sequential steps that are run as part of a Pipeline using a set of inputs and producing a set of outputs. Tasks execute when TaskRuns are created that provide the input parameters and resources and output resources the Task requires.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "kind": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "apiVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "metadata": {
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
+ },
+ },
+ "spec": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Spec holds the desired state of the Task from the client",
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_TaskList(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "TaskList contains a list of Task",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "kind": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "apiVersion": {
+ SchemaProps: spec.SchemaProps{
+ Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "metadata": {
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
+ },
+ },
+ "items": {
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Task"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"items"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Task", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_TaskRef(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "TaskRef can be used to refer to a specific instance of a task.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "kind": {
+ SchemaProps: spec.SchemaProps{
+ Description: "TaskKind indicates the Kind of the Task: 1. Namespaced Task when Kind is set to \"Task\". If Kind is \"\", it defaults to \"Task\". 2. Cluster-Scoped Task when Kind is set to \"ClusterTask\" 3. Custom Task when Kind is non-empty and APIVersion is non-empty",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "apiVersion": {
SchemaProps: spec.SchemaProps{
- Description: "Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false\n\nDeprecated: This field will be removed in a future release.",
- Type: []string{"boolean"},
+ Description: "API version of the referent Note: A Task with non-empty APIVersion and Kind is considered a Custom Task",
+ Type: []string{"string"},
Format: "",
},
},
- "tty": {
+ "bundle": {
SchemaProps: spec.SchemaProps{
- Description: "Whether this Step should allocate a DeprecatedTTY for itself, also requires 'stdin' to be true. Default is false.\n\nDeprecated: This field will be removed in a future release.",
- Type: []string{"boolean"},
+ Description: "Bundle url reference to a Tekton Bundle.\n\nDeprecated: Please use ResolverRef with the bundles resolver instead.",
+ Type: []string{"string"},
Format: "",
},
},
},
- Required: []string{"name"},
},
},
- Dependencies: []string{
- "k8s.io/api/core/v1.ContainerPort", "k8s.io/api/core/v1.EnvFromSource", "k8s.io/api/core/v1.EnvVar", "k8s.io/api/core/v1.Lifecycle", "k8s.io/api/core/v1.Probe", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/api/core/v1.SecurityContext", "k8s.io/api/core/v1.VolumeDevice", "k8s.io/api/core/v1.VolumeMount"},
}
}
-func schema_pkg_apis_pipeline_v1beta1_Task(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1beta1_TaskResource(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "Task represents a collection of sequential steps that are run as part of a Pipeline using a set of inputs and producing a set of outputs. Tasks execute when TaskRuns are created that provide the input parameters and resources and output resources the Task requires.",
+ Description: "TaskResource defines an input or output Resource declared as a requirement by a Task. The Name field will be used to refer to these Resources within the Task definition, and when provided as an Input, the Name will be the path to the volume mounted containing this Resource as an input (e.g. an input Resource named `workspace` will be mounted at `/workspace`).\n\nDeprecated: Unused, preserved only for backwards compatibility",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "kind": {
+ "name": {
SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
+ Description: "Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps.",
+ Default: "",
Type: []string{"string"},
Format: "",
},
},
- "apiVersion": {
+ "type": {
SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
+ Description: "Type is the type of this resource;",
+ Default: "",
Type: []string{"string"},
Format: "",
},
},
- "metadata": {
+ "description": {
SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"),
+ Description: "Description is a user-facing description of the declared resource that may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
},
},
- "spec": {
+ "targetPath": {
SchemaProps: spec.SchemaProps{
- Description: "Spec holds the desired state of the Task from the client",
- Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec"),
+ Description: "TargetPath is the path in workspace directory where the resource will be copied.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "optional": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it)",
+ Type: []string{"boolean"},
+ Format: "",
},
},
},
+ Required: []string{"name", "type"},
},
},
- Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
}
}
-func schema_pkg_apis_pipeline_v1beta1_TaskList(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1beta1_TaskResourceBinding(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "TaskList contains a list of Task",
+ Description: "TaskResourceBinding points to the PipelineResource that will be used for the Task input or output called Name.\n\nDeprecated: Unused, preserved only for backwards compatibility",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "kind": {
+ "name": {
SchemaProps: spec.SchemaProps{
- Description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
+ Description: "Name is the name of the PipelineResource in the Pipeline's declaration",
Type: []string{"string"},
Format: "",
},
},
- "apiVersion": {
+ "resourceRef": {
SchemaProps: spec.SchemaProps{
- Description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
- Type: []string{"string"},
- Format: "",
+ Description: "ResourceRef is a reference to the instance of the actual PipelineResource that should be used",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceRef"),
},
},
- "metadata": {
+ "resourceSpec": {
SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"),
+ Description: "ResourceSpec is specification of a resource that should be created and consumed by the task",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceSpec"),
},
},
- "items": {
+ "paths": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
SchemaProps: spec.SchemaProps{
- Type: []string{"array"},
+ Description: "Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. The optional Path field corresponds to a path on disk at which the Resource can be found (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource).",
+ Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
- Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Task"),
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
},
},
},
},
},
},
- Required: []string{"items"},
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Task", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceRef", "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1.PipelineResourceSpec"},
}
}
-func schema_pkg_apis_pipeline_v1beta1_TaskRef(ref common.ReferenceCallback) common.OpenAPIDefinition {
+func schema_pkg_apis_pipeline_v1beta1_TaskResources(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
SchemaProps: spec.SchemaProps{
- Description: "TaskRef can be used to refer to a specific instance of a task.",
+ Description: "TaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs.\n\nDeprecated: Unused, preserved only for backwards compatibility",
Type: []string{"object"},
Properties: map[string]spec.Schema{
- "name": {
- SchemaProps: spec.SchemaProps{
- Description: "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
- Type: []string{"string"},
- Format: "",
+ "inputs": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
},
- },
- "kind": {
SchemaProps: spec.SchemaProps{
- Description: "TaskKind indicates the kind of the task, namespaced or cluster scoped.",
- Type: []string{"string"},
- Format: "",
+ Description: "Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResource"),
+ },
+ },
+ },
},
},
- "apiVersion": {
- SchemaProps: spec.SchemaProps{
- Description: "API version of the referent",
- Type: []string{"string"},
- Format: "",
+ "outputs": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
},
- },
- "bundle": {
SchemaProps: spec.SchemaProps{
- Description: "Bundle url reference to a Tekton Bundle.\n\nDeprecated: Please use ResolverRef with the bundles resolver instead.",
- Type: []string{"string"},
- Format: "",
+ Description: "Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResource"),
+ },
+ },
+ },
},
},
},
},
},
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResource"},
}
}
@@ -4066,6 +4624,57 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunDebug(ref common.ReferenceCallback)
}
}
+func schema_pkg_apis_pipeline_v1beta1_TaskRunInputs(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "TaskRunInputs holds the input values that this task was invoked with.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "resources": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding"),
+ },
+ },
+ },
+ },
+ },
+ "params": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param"),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding"},
+ }
+}
+
func schema_pkg_apis_pipeline_v1beta1_TaskRunList(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -4115,6 +4724,92 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunList(ref common.ReferenceCallback)
}
}
+func schema_pkg_apis_pipeline_v1beta1_TaskRunOutputs(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "TaskRunOutputs holds the output values that this task was invoked with.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "resources": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding"),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding"},
+ }
+}
+
+func schema_pkg_apis_pipeline_v1beta1_TaskRunResources(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "TaskRunResources allows a TaskRun to declare inputs and outputs TaskResourceBinding\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "inputs": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "Inputs holds the inputs resources this task was invoked with",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding"),
+ },
+ },
+ },
+ },
+ },
+ "outputs": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "Outputs holds the inputs resources this task was invoked with",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding"),
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResourceBinding"},
+ }
+}
+
func schema_pkg_apis_pipeline_v1beta1_TaskRunResult(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -4214,6 +4909,12 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunSpec(ref common.ReferenceCallback)
},
},
},
+ "resources": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Deprecated: Unused, preserved only for backwards compatibility",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResources"),
+ },
+ },
"serviceAccountName": {
SchemaProps: spec.SchemaProps{
Default: "",
@@ -4332,7 +5033,7 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunSpec(ref common.ReferenceCallback)
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.Template", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRef", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunDebug", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSidecarOverride", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStepOverride", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceBinding", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod.Template", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Param", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRef", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunDebug", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResources", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunSidecarOverride", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStepOverride", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceBinding", "k8s.io/api/core/v1.ResourceRequirements", "k8s.io/apimachinery/pkg/apis/meta/v1.Duration"},
}
}
@@ -4470,13 +5171,13 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunStatus(ref common.ReferenceCallback
},
},
SchemaProps: spec.SchemaProps{
- Description: "Results from Resources built during the TaskRun. currently includes the digest of build container images",
+ Description: "Results from Resources built during the TaskRun. This is tomb-stoned along with the removal of pipelineResources Deprecated: this field is not populated and is preserved only for backwards compatibility",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceResult"),
+ Ref: ref("github.com/tektoncd/pipeline/pkg/result.RunResult"),
},
},
},
@@ -4553,7 +5254,7 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunStatus(ref common.ReferenceCallback
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDelivery", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Provenance", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SidecarState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "knative.dev/pkg/apis.Condition"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDelivery", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Provenance", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SidecarState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "github.com/tektoncd/pipeline/pkg/result.RunResult", "k8s.io/apimachinery/pkg/apis/meta/v1.Time", "knative.dev/pkg/apis.Condition"},
}
}
@@ -4648,13 +5349,13 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunStatusFields(ref common.ReferenceCa
},
},
SchemaProps: spec.SchemaProps{
- Description: "Results from Resources built during the TaskRun. currently includes the digest of build container images",
+ Description: "Results from Resources built during the TaskRun. This is tomb-stoned along with the removal of pipelineResources Deprecated: this field is not populated and is preserved only for backwards compatibility",
Type: []string{"array"},
Items: &spec.SchemaOrArray{
Schema: &spec.Schema{
SchemaProps: spec.SchemaProps{
Default: map[string]interface{}{},
- Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceResult"),
+ Ref: ref("github.com/tektoncd/pipeline/pkg/result.RunResult"),
},
},
},
@@ -4731,7 +5432,7 @@ func schema_pkg_apis_pipeline_v1beta1_TaskRunStatusFields(ref common.ReferenceCa
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDelivery", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.PipelineResourceResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Provenance", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SidecarState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.CloudEventDelivery", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Provenance", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.SidecarState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepState", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskRunStatus", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskSpec", "github.com/tektoncd/pipeline/pkg/result.RunResult", "k8s.io/apimachinery/pkg/apis/meta/v1.Time"},
}
}
@@ -4773,6 +5474,12 @@ func schema_pkg_apis_pipeline_v1beta1_TaskSpec(ref common.ReferenceCallback) com
Description: "TaskSpec defines the desired state of Task.",
Type: []string{"object"},
Properties: map[string]spec.Schema{
+ "resources": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Resources is a list input and output resource to run the task Resources are represented in TaskRuns as bindings to instances of PipelineResources.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResources"),
+ },
+ },
"params": {
VendorExtensible: spec.VendorExtensible{
Extensions: spec.Extensions{
@@ -4792,6 +5499,13 @@ func schema_pkg_apis_pipeline_v1beta1_TaskSpec(ref common.ReferenceCallback) com
},
},
},
+ "displayName": {
+ SchemaProps: spec.SchemaProps{
+ Description: "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
"description": {
SchemaProps: spec.SchemaProps{
Description: "Description is a user-facing description of the task that may be used to populate a UI.",
@@ -4904,7 +5618,7 @@ func schema_pkg_apis_pipeline_v1beta1_TaskSpec(ref common.ReferenceCallback) com
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Sidecar", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepTemplate", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceDeclaration", "k8s.io/api/core/v1.Volume"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ParamSpec", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Sidecar", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.Step", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.StepTemplate", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResources", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.TaskResult", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.WorkspaceDeclaration", "k8s.io/api/core/v1.Volume"},
}
}
@@ -5372,16 +6086,22 @@ func schema_pkg_apis_resolution_v1beta1_ResolutionRequestStatus(ref common.Refer
},
"source": {
SchemaProps: spec.SchemaProps{
- Description: "Source is the source reference of the remote data that records the url, digest and the entrypoint.",
+ Description: "Deprecated: Use RefSource instead",
Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource"),
},
},
+ "refSource": {
+ SchemaProps: spec.SchemaProps{
+ Description: "RefSource is the source reference of the remote data that records the url, digest and the entrypoint.",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.RefSource"),
+ },
+ },
},
- Required: []string{"data", "source"},
+ Required: []string{"data", "source", "refSource"},
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource", "knative.dev/pkg/apis.Condition"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.RefSource", "knative.dev/pkg/apis.Condition"},
}
}
@@ -5402,15 +6122,21 @@ func schema_pkg_apis_resolution_v1beta1_ResolutionRequestStatusFields(ref common
},
"source": {
SchemaProps: spec.SchemaProps{
- Description: "Source is the source reference of the remote data that records the url, digest and the entrypoint.",
+ Description: "Deprecated: Use RefSource instead",
Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource"),
},
},
+ "refSource": {
+ SchemaProps: spec.SchemaProps{
+ Description: "RefSource is the source reference of the remote data that records the url, digest and the entrypoint.",
+ Ref: ref("github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.RefSource"),
+ },
+ },
},
- Required: []string{"data", "source"},
+ Required: []string{"data", "source", "refSource"},
},
},
Dependencies: []string{
- "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource"},
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.ConfigSource", "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1.RefSource"},
}
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_conversion.go
index 443c94ddd..18de6bd71 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_conversion.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_types.go
index e15c36199..a2d7e78f3 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/param_types.go
@@ -112,10 +112,11 @@ type Param struct {
// Params is a list of Param
type Params []Param
-func (ps Params) extractNames() []string {
- names := []string{}
+// ExtractNames returns a set of unique names
+func (ps Params) ExtractNames() sets.String {
+ names := sets.String{}
for _, p := range ps {
- names = append(names, p.Name)
+ names.Insert(p.Name)
}
return names
}
@@ -369,11 +370,11 @@ var AllParamTypes = []ParamType{ParamTypeString, ParamTypeArray, ParamTypeObject
// Used in JSON unmarshalling so that a single JSON field can accept
// either an individual string or an array of strings.
type ParamValue struct {
- Type ParamType `json:"type"` // Represents the stored type of ParamValues.
- StringVal string `json:"stringVal"`
+ Type ParamType // Represents the stored type of ParamValues.
+ StringVal string
// +listType=atomic
- ArrayVal []string `json:"arrayVal"`
- ObjectVal map[string]string `json:"objectVal"`
+ ArrayVal []string
+ ObjectVal map[string]string
}
// ArrayOrString is deprecated, this is to keep backward compatibility
@@ -451,6 +452,8 @@ func (paramValues *ParamValue) ApplyReplacements(stringReplacements map[string]s
newObjectVal[k] = substitution.ApplyReplacements(v, stringReplacements)
}
paramValues.ObjectVal = newObjectVal
+ case ParamTypeString:
+ fallthrough
default:
paramValues.applyOrCorrect(stringReplacements, arrayReplacements, objectReplacements)
}
@@ -538,6 +541,8 @@ func validatePipelineParametersVariablesInTaskParameters(params Params, prefix s
for key, val := range param.Value.ObjectVal {
errs = errs.Also(validateStringVariable(val, prefix, paramNames, arrayParamNames, objectParamNameKeys).ViaFieldKey("properties", key).ViaFieldKey("params", param.Name))
}
+ case ParamTypeString:
+ fallthrough
default:
errs = errs.Also(validateParamStringValue(param, prefix, paramNames, arrayParamNames, objectParamNameKeys))
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_conversion.go
index aa4eb5250..0c66a3bd1 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_conversion.go
@@ -42,6 +42,7 @@ func (p *Pipeline) ConvertTo(ctx context.Context, to apis.Convertible) error {
// ConvertTo implements apis.Convertible
func (ps *PipelineSpec) ConvertTo(ctx context.Context, sink *v1.PipelineSpec) error {
+ sink.DisplayName = ps.DisplayName
sink.Description = ps.Description
sink.Tasks = nil
for _, t := range ps.Tasks {
@@ -95,6 +96,7 @@ func (p *Pipeline) ConvertFrom(ctx context.Context, from apis.Convertible) error
// ConvertFrom implements apis.Convertible
func (ps *PipelineSpec) ConvertFrom(ctx context.Context, source *v1.PipelineSpec) error {
+ ps.DisplayName = source.DisplayName
ps.Description = source.Description
ps.Tasks = nil
for _, t := range source.Tasks {
@@ -137,6 +139,8 @@ func (ps *PipelineSpec) ConvertFrom(ctx context.Context, source *v1.PipelineSpec
func (pt PipelineTask) convertTo(ctx context.Context, sink *v1.PipelineTask) error {
sink.Name = pt.Name
+ sink.DisplayName = pt.DisplayName
+ sink.Description = pt.Description
if pt.TaskRef != nil {
sink.TaskRef = &v1.TaskRef{}
pt.TaskRef.convertTo(ctx, sink.TaskRef)
@@ -181,6 +185,8 @@ func (pt PipelineTask) convertTo(ctx context.Context, sink *v1.PipelineTask) err
func (pt *PipelineTask) convertFrom(ctx context.Context, source v1.PipelineTask) error {
pt.Name = source.Name
+ pt.DisplayName = source.DisplayName
+ pt.Description = source.Description
if source.TaskRef != nil {
newTaskRef := TaskRef{}
newTaskRef.convertFrom(ctx, *source.TaskRef)
@@ -260,7 +266,7 @@ func (m *Matrix) convertTo(ctx context.Context, sink *v1.Matrix) {
sink.Params = append(sink.Params, new)
}
for i, include := range m.Include {
- sink.Include = append(sink.Include, v1.MatrixInclude{Name: include.Name})
+ sink.Include = append(sink.Include, v1.IncludeParams{Name: include.Name})
for _, param := range include.Params {
newIncludeParam := v1.Param{}
param.convertTo(ctx, &newIncludeParam)
@@ -277,7 +283,7 @@ func (m *Matrix) convertFrom(ctx context.Context, source v1.Matrix) {
}
for i, include := range source.Include {
- m.Include = append(m.Include, MatrixInclude{Name: include.Name})
+ m.Include = append(m.Include, IncludeParams{Name: include.Name})
for _, p := range include.Params {
new := Param{}
new.convertFrom(ctx, p)
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_defaults.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_defaults.go
index 716ef8015..ec28f038e 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_defaults.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_defaults.go
@@ -32,34 +32,32 @@ func (p *Pipeline) SetDefaults(ctx context.Context) {
// SetDefaults sets default values for the PipelineSpec's Params, Tasks, and Finally
func (ps *PipelineSpec) SetDefaults(ctx context.Context) {
- cfg := config.FromContextOrDefaults(ctx)
for i := range ps.Params {
ps.Params[i].SetDefaults(ctx)
}
for _, pt := range ps.Tasks {
- if pt.TaskRef != nil {
- if pt.TaskRef.Kind == "" {
- pt.TaskRef.Kind = NamespacedTaskKind
- }
- if pt.TaskRef.Name == "" && pt.TaskRef.Resolver == "" {
- pt.TaskRef.Resolver = ResolverName(cfg.Defaults.DefaultResolverType)
- }
- }
- if pt.TaskSpec != nil {
- pt.TaskSpec.SetDefaults(ctx)
- }
+ pt.SetDefaults(ctx)
}
for _, ft := range ps.Finally {
ctx := ctx // Ensure local scoping per Task
- if ft.TaskRef != nil {
- if ft.TaskRef.Kind == "" {
- ft.TaskRef.Kind = NamespacedTaskKind
- }
+ ft.SetDefaults(ctx)
+ }
+}
+
+// SetDefaults sets default values for a PipelineTask
+func (pt *PipelineTask) SetDefaults(ctx context.Context) {
+ cfg := config.FromContextOrDefaults(ctx)
+ if pt.TaskRef != nil {
+ if pt.TaskRef.Kind == "" {
+ pt.TaskRef.Kind = NamespacedTaskKind
}
- if ft.TaskSpec != nil {
- ft.TaskSpec.SetDefaults(ctx)
+ if pt.TaskRef.Name == "" && pt.TaskRef.Resolver == "" {
+ pt.TaskRef.Resolver = ResolverName(cfg.Defaults.DefaultResolverType)
}
}
+ if pt.TaskSpec != nil {
+ pt.TaskSpec.SetDefaults(ctx)
+ }
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_interface.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_interface.go
index fb21e16da..58768ceea 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_interface.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_interface.go
@@ -21,7 +21,7 @@ import (
"knative.dev/pkg/apis"
)
-// PipelineObject is implemented by Pipeline and ClusterPipeline
+// PipelineObject is implemented by Pipeline
type PipelineObject interface {
apis.Defaultable
PipelineMetadata() metav1.ObjectMeta
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_types.go
index e35d7781f..efb6607df 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_types.go
@@ -17,21 +17,12 @@ limitations under the License.
package v1beta1
import (
- "context"
- "fmt"
- "strings"
-
- "github.com/google/go-containerregistry/pkg/name"
- "github.com/tektoncd/pipeline/pkg/apis/config"
"github.com/tektoncd/pipeline/pkg/apis/pipeline"
- "github.com/tektoncd/pipeline/pkg/apis/version"
"github.com/tektoncd/pipeline/pkg/reconciler/pipeline/dag"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/util/sets"
- "k8s.io/apimachinery/pkg/util/validation"
- "knative.dev/pkg/apis"
"knative.dev/pkg/kmeta"
)
@@ -86,10 +77,17 @@ func (*Pipeline) GetGroupVersionKind() schema.GroupVersionKind {
// PipelineSpec defines the desired state of Pipeline.
type PipelineSpec struct {
+ // DisplayName is a user-facing name of the pipeline that may be
+ // used to populate a UI.
+ // +optional
+ DisplayName string `json:"displayName,omitempty"`
// Description is a user-facing description of the pipeline that may be
// used to populate a UI.
// +optional
Description string `json:"description,omitempty"`
+ // Deprecated: Unused, preserved only for backwards compatibility
+ // +listType=atomic
+ Resources []PipelineDeclaredResource `json:"resources,omitempty"`
// Tasks declares the graph of Tasks that execute when this Pipeline is run.
// +listType=atomic
Tasks []PipelineTask `json:"tasks,omitempty"`
@@ -165,6 +163,16 @@ type PipelineTask struct {
// the execution order of tasks relative to one another.
Name string `json:"name,omitempty"`
+ // DisplayName is the display name of this task within the context of a Pipeline.
+ // This display name may be used to populate a UI.
+ // +optional
+ DisplayName string `json:"displayName,omitempty"`
+
+ // Description is the description of this task within the context of a Pipeline.
+ // This description may be used to populate a UI.
+ // +optional
+ Description string `json:"description,omitempty"`
+
// TaskRef is a reference to a task definition.
// +optional
TaskRef *TaskRef `json:"taskRef,omitempty"`
@@ -187,6 +195,10 @@ type PipelineTask struct {
// +listType=atomic
RunAfter []string `json:"runAfter,omitempty"`
+ // Deprecated: Unused, preserved only for backwards compatibility
+ // +optional
+ Resources *PipelineTaskResources `json:"resources,omitempty"`
+
// Parameters declares parameters passed to this task.
// +optional
// +listType=atomic
@@ -209,195 +221,16 @@ type PipelineTask struct {
Timeout *metav1.Duration `json:"timeout,omitempty"`
}
-// validateRefOrSpec validates at least one of taskRef or taskSpec is specified
-func (pt PipelineTask) validateRefOrSpec() (errs *apis.FieldError) {
- // can't have both taskRef and taskSpec at the same time
- if pt.TaskRef != nil && pt.TaskSpec != nil {
- errs = errs.Also(apis.ErrMultipleOneOf("taskRef", "taskSpec"))
- }
- // Check that one of TaskRef and TaskSpec is present
- if pt.TaskRef == nil && pt.TaskSpec == nil {
- errs = errs.Also(apis.ErrMissingOneOf("taskRef", "taskSpec"))
- }
- return errs
-}
-
-// validateCustomTask validates custom task specifications - checking kind and fail if not yet supported features specified
-func (pt PipelineTask) validateCustomTask() (errs *apis.FieldError) {
- if pt.TaskRef != nil && pt.TaskRef.Kind == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify kind", "taskRef.kind"))
- }
- if pt.TaskSpec != nil && pt.TaskSpec.Kind == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify kind", "taskSpec.kind"))
- }
- if pt.TaskRef != nil && pt.TaskRef.APIVersion == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify apiVersion", "taskRef.apiVersion"))
- }
- if pt.TaskSpec != nil && pt.TaskSpec.APIVersion == "" {
- errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify apiVersion", "taskSpec.apiVersion"))
- }
- return errs
-}
-
-// validateBundle validates bundle specifications - checking name and bundle
-func (pt PipelineTask) validateBundle() (errs *apis.FieldError) {
- // bundle requires a TaskRef to be specified
- if (pt.TaskRef != nil && pt.TaskRef.Bundle != "") && pt.TaskRef.Name == "" {
- errs = errs.Also(apis.ErrMissingField("taskRef.name"))
- }
- // If a bundle url is specified, ensure it is parsable
- if pt.TaskRef != nil && pt.TaskRef.Bundle != "" {
- if _, err := name.ParseReference(pt.TaskRef.Bundle); err != nil {
- errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("invalid bundle reference (%s)", err.Error()), "taskRef.bundle"))
- }
- }
- return errs
-}
-
-// validateTask validates a pipeline task or a final task for taskRef and taskSpec
-func (pt PipelineTask) validateTask(ctx context.Context) (errs *apis.FieldError) {
- cfg := config.FromContextOrDefaults(ctx)
- // Validate TaskSpec if it's present
- if pt.TaskSpec != nil {
- errs = errs.Also(pt.TaskSpec.Validate(ctx).ViaField("taskSpec"))
- }
- if pt.TaskRef != nil {
- if pt.TaskRef.Name != "" {
- // TaskRef name must be a valid k8s name
- if errSlice := validation.IsQualifiedName(pt.TaskRef.Name); len(errSlice) != 0 {
- errs = errs.Also(apis.ErrInvalidValue(strings.Join(errSlice, ","), "taskRef.name"))
- }
- } else if pt.TaskRef.Resolver == "" {
- errs = errs.Also(apis.ErrInvalidValue("taskRef must specify name", "taskRef.name"))
- }
- // fail if bundle is present when EnableTektonOCIBundles feature flag is off (as it won't be allowed nor used)
- if !cfg.FeatureFlags.EnableTektonOCIBundles && pt.TaskRef.Bundle != "" {
- errs = errs.Also(apis.ErrDisallowedFields("taskRef.bundle"))
- }
- }
- return errs
+// IsCustomTask checks whether an embedded TaskSpec is a Custom Task
+func (et *EmbeddedTask) IsCustomTask() bool {
+ // Note that if `apiVersion` is set to `"tekton.dev/v1beta1"` and `kind` is set to `"Task"`,
+ // the reference will be considered a Custom Task - https://github.com/tektoncd/pipeline/issues/6457
+ return et != nil && et.APIVersion != "" && et.Kind != ""
}
// IsMatrixed return whether pipeline task is matrixed
func (pt *PipelineTask) IsMatrixed() bool {
- return pt.Matrix != nil && (pt.Matrix.hasParams() || pt.Matrix.hasInclude())
-}
-
-// extractAllParams extracts all the parameters in a PipelineTask:
-// - pt.Params
-// - pt.Matrix.Params
-// - pt.Matrix.Include.Params
-func (pt *PipelineTask) extractAllParams() Params {
- allParams := pt.Params
- if pt.Matrix.hasParams() {
- allParams = append(allParams, pt.Matrix.Params...)
- }
- if pt.Matrix.hasInclude() {
- for _, include := range pt.Matrix.Include {
- allParams = append(allParams, include.Params...)
- }
- }
- return allParams
-}
-
-func (pt *PipelineTask) validateMatrix(ctx context.Context) (errs *apis.FieldError) {
- if pt.IsMatrixed() {
- // This is an alpha feature and will fail validation if it's used in a pipeline spec
- // when the enable-api-fields feature gate is anything but "alpha".
- errs = errs.Also(version.ValidateEnabledAPIFields(ctx, "matrix", config.AlphaAPIFields))
- errs = errs.Also(pt.Matrix.validateCombinationsCount(ctx))
- }
- errs = errs.Also(pt.Matrix.validateParameterInOneOfMatrixOrParams(pt.Params))
- errs = errs.Also(pt.Matrix.validateParams())
- return errs
-}
-
-func (pt PipelineTask) validateEmbeddedOrType() (errs *apis.FieldError) {
- // Reject cases where APIVersion and/or Kind are specified alongside an embedded Task.
- // We determine if this is an embedded Task by checking of TaskSpec.TaskSpec.Steps has items.
- if pt.TaskSpec != nil && len(pt.TaskSpec.TaskSpec.Steps) > 0 {
- if pt.TaskSpec.APIVersion != "" {
- errs = errs.Also(&apis.FieldError{
- Message: "taskSpec.apiVersion cannot be specified when using taskSpec.steps",
- Paths: []string{"taskSpec.apiVersion"},
- })
- }
- if pt.TaskSpec.Kind != "" {
- errs = errs.Also(&apis.FieldError{
- Message: "taskSpec.kind cannot be specified when using taskSpec.steps",
- Paths: []string{"taskSpec.kind"},
- })
- }
- }
- return
-}
-
-func (pt *PipelineTask) validateResultsFromMatrixedPipelineTasksNotConsumed(matrixedPipelineTasks sets.String) (errs *apis.FieldError) {
- for _, ref := range PipelineTaskResultRefs(pt) {
- if matrixedPipelineTasks.Has(ref.PipelineTask) {
- errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("consuming results from matrixed task %s is not allowed", ref.PipelineTask), ""))
- }
- }
- return errs
-}
-
-func (pt *PipelineTask) validateExecutionStatusVariablesDisallowed() (errs *apis.FieldError) {
- for _, param := range pt.Params {
- if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
- errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "value").
- ViaFieldKey("params", param.Name))
- }
- }
- for i, we := range pt.WhenExpressions {
- if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
- errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "").
- ViaFieldIndex("when", i))
- }
- }
- return errs
-}
-
-func (pt *PipelineTask) validateExecutionStatusVariablesAllowed(ptNames sets.String) (errs *apis.FieldError) {
- for _, param := range pt.Params {
- if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
- errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "value").
- ViaFieldKey("params", param.Name))
- }
- }
- for i, we := range pt.WhenExpressions {
- if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
- errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "").
- ViaFieldIndex("when", i))
- }
- }
- return errs
-}
-
-func (pt *PipelineTask) validateWorkspaces(workspaceNames sets.String) (errs *apis.FieldError) {
- workspaceBindingNames := sets.NewString()
- for i, ws := range pt.Workspaces {
- if workspaceBindingNames.Has(ws.Name) {
- errs = errs.Also(apis.ErrGeneric(
- fmt.Sprintf("workspace name %q must be unique", ws.Name), "").ViaFieldIndex("workspaces", i))
- }
-
- if ws.Workspace == "" {
- if !workspaceNames.Has(ws.Name) {
- errs = errs.Also(apis.ErrInvalidValue(
- fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Name),
- "",
- ).ViaFieldIndex("workspaces", i))
- }
- } else if !workspaceNames.Has(ws.Workspace) {
- errs = errs.Also(apis.ErrInvalidValue(
- fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Workspace),
- "",
- ).ViaFieldIndex("workspaces", i))
- }
-
- workspaceBindingNames.Insert(ws.Name)
- }
- return errs
+ return pt.Matrix.HasParams() || pt.Matrix.HasInclude()
}
// TaskSpecMetadata returns the metadata of the PipelineTask's EmbeddedTask spec.
@@ -410,42 +243,6 @@ func (pt PipelineTask) HashKey() string {
return pt.Name
}
-// ValidateName checks whether the PipelineTask's name is a valid DNS label
-func (pt PipelineTask) ValidateName() *apis.FieldError {
- if err := validation.IsDNS1123Label(pt.Name); len(err) > 0 {
- return &apis.FieldError{
- Message: fmt.Sprintf("invalid value %q", pt.Name),
- Paths: []string{"name"},
- Details: "Pipeline Task name must be a valid DNS Label." +
- "For more info refer to https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
- }
- }
- return nil
-}
-
-// Validate classifies whether a task is a custom task, bundle, or a regular task(dag/final)
-// calls the validation routine based on the type of the task
-func (pt PipelineTask) Validate(ctx context.Context) (errs *apis.FieldError) {
- errs = errs.Also(pt.validateRefOrSpec())
-
- errs = errs.Also(pt.validateEmbeddedOrType())
-
- cfg := config.FromContextOrDefaults(ctx)
- // Pipeline task having taskRef/taskSpec with APIVersion is classified as custom task
- switch {
- case pt.TaskRef != nil && pt.TaskRef.APIVersion != "":
- errs = errs.Also(pt.validateCustomTask())
- case pt.TaskSpec != nil && pt.TaskSpec.APIVersion != "":
- errs = errs.Also(pt.validateCustomTask())
- // If EnableTektonOCIBundles feature flag is on, validate bundle specifications
- case cfg.FeatureFlags.EnableTektonOCIBundles && pt.TaskRef != nil && pt.TaskRef.Bundle != "":
- errs = errs.Also(pt.validateBundle())
- default:
- errs = errs.Also(pt.validateTask(ctx))
- }
- return
-}
-
// Deps returns all other PipelineTask dependencies of this PipelineTask, based on resource usage or ordering
func (pt PipelineTask) Deps() []string {
// hold the list of dependencies in a set to avoid duplicates
@@ -499,22 +296,6 @@ func (l PipelineTaskList) Names() sets.String {
return names
}
-// Validate a list of pipeline tasks including custom task and bundles
-func (l PipelineTaskList) Validate(ctx context.Context, taskNames sets.String, path string) (errs *apis.FieldError) {
- for i, t := range l {
- // validate pipeline task name
- errs = errs.Also(t.ValidateName().ViaFieldIndex(path, i))
- // names cannot be duplicated - checking that pipelineTask names are unique
- if _, ok := taskNames[t.Name]; ok {
- errs = errs.Also(apis.ErrMultipleOneOf("name").ViaFieldIndex(path, i))
- }
- taskNames.Insert(t.Name)
- // validate custom task, bundle, dag, or final task
- errs = errs.Also(t.Validate(ctx).ViaFieldIndex(path, i))
- }
- return errs
-}
-
// PipelineTaskParam is used to provide arbitrary string parameters to a Task.
type PipelineTaskParam struct {
Name string `json:"name"`
@@ -530,47 +311,3 @@ type PipelineList struct {
metav1.ListMeta `json:"metadata,omitempty"`
Items []Pipeline `json:"items"`
}
-
-func validateContainsExecutionStatusVariablesDisallowed(expressions []string, path string) (errs *apis.FieldError) {
- if containsExecutionStatusReferences(expressions) {
- errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline tasks can not refer to execution status"+
- " of any other pipeline task or aggregate status of tasks"), path))
- }
- return errs
-}
-
-func containsExecutionStatusReferences(expressions []string) bool {
- // validate tasks.pipelineTask.status/tasks.status if this expression is not a result reference
- if !LooksLikeContainsResultRefs(expressions) {
- for _, e := range expressions {
- // check if it contains context variable accessing execution status - $(tasks.taskname.status)
- // or an aggregate status - $(tasks.status)
- if containsExecutionStatusRef(e) {
- return true
- }
- }
- }
- return false
-}
-
-func validateExecutionStatusVariablesExpressions(expressions []string, ptNames sets.String, fieldPath string) (errs *apis.FieldError) {
- // validate tasks.pipelineTask.status if this expression is not a result reference
- if !LooksLikeContainsResultRefs(expressions) {
- for _, expression := range expressions {
- // its a reference to aggregate status of dag tasks - $(tasks.status)
- if expression == PipelineTasksAggregateStatus {
- continue
- }
- // check if it contains context variable accessing execution status - $(tasks.taskname.status)
- if containsExecutionStatusRef(expression) {
- // strip tasks. and .status from tasks.taskname.status to further verify task name
- pt := strings.TrimSuffix(strings.TrimPrefix(expression, "tasks."), ".status")
- // report an error if the task name does not exist in the list of dag tasks
- if !ptNames.Has(pt) {
- errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline task %s is not defined in the pipeline", pt), fieldPath))
- }
- }
- }
- }
- return errs
-}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_validation.go
index 63554e355..c170e85a3 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipeline_validation.go
@@ -21,13 +21,16 @@ import (
"fmt"
"strings"
+ "github.com/google/go-containerregistry/pkg/name"
"github.com/tektoncd/pipeline/pkg/apis/config"
"github.com/tektoncd/pipeline/pkg/apis/validate"
+ "github.com/tektoncd/pipeline/pkg/apis/version"
"github.com/tektoncd/pipeline/pkg/reconciler/pipeline/dag"
"github.com/tektoncd/pipeline/pkg/substitution"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
"k8s.io/apimachinery/pkg/api/equality"
"k8s.io/apimachinery/pkg/util/sets"
+ "k8s.io/apimachinery/pkg/util/validation"
"knative.dev/pkg/apis"
"knative.dev/pkg/webhook/resourcesemantics"
)
@@ -56,6 +59,9 @@ func (ps *PipelineSpec) Validate(ctx context.Context) (errs *apis.FieldError) {
}
// PipelineTask must have a valid unique label and at least one of taskRef or taskSpec should be specified
errs = errs.Also(ValidatePipelineTasks(ctx, ps.Tasks, ps.Finally))
+ if len(ps.Resources) > 0 {
+ errs = errs.Also(apis.ErrDisallowedFields("resources"))
+ }
// Validate the pipeline task graph
errs = errs.Also(validateGraph(ps.Tasks))
// The parameter variables should be valid
@@ -89,6 +95,199 @@ func ValidatePipelineTasks(ctx context.Context, tasks []PipelineTask, finalTasks
return errs
}
+// Validate a list of pipeline tasks including custom task and bundles
+func (l PipelineTaskList) Validate(ctx context.Context, taskNames sets.String, path string) (errs *apis.FieldError) {
+ for i, t := range l {
+ // validate pipeline task name
+ errs = errs.Also(t.ValidateName().ViaFieldIndex(path, i))
+ // names cannot be duplicated - checking that pipelineTask names are unique
+ if _, ok := taskNames[t.Name]; ok {
+ errs = errs.Also(apis.ErrMultipleOneOf("name").ViaFieldIndex(path, i))
+ }
+ taskNames.Insert(t.Name)
+ // validate custom task, bundle, dag, or final task
+ errs = errs.Also(t.Validate(ctx).ViaFieldIndex(path, i))
+ }
+ return errs
+}
+
+// ValidateName checks whether the PipelineTask's name is a valid DNS label
+func (pt PipelineTask) ValidateName() *apis.FieldError {
+ if err := validation.IsDNS1123Label(pt.Name); len(err) > 0 {
+ return &apis.FieldError{
+ Message: fmt.Sprintf("invalid value %q", pt.Name),
+ Paths: []string{"name"},
+ Details: "Pipeline Task name must be a valid DNS Label." +
+ "For more info refer to https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
+ }
+ }
+ return nil
+}
+
+// Validate classifies whether a task is a custom task, bundle, or a regular task(dag/final)
+// calls the validation routine based on the type of the task
+func (pt PipelineTask) Validate(ctx context.Context) (errs *apis.FieldError) {
+ errs = errs.Also(pt.validateRefOrSpec())
+
+ errs = errs.Also(pt.validateEmbeddedOrType())
+
+ if pt.Resources != nil {
+ errs = errs.Also(apis.ErrDisallowedFields("resources"))
+ }
+
+ cfg := config.FromContextOrDefaults(ctx)
+ // Pipeline task having taskRef/taskSpec with APIVersion is classified as custom task
+ switch {
+ case pt.TaskRef != nil && pt.TaskRef.APIVersion != "":
+ errs = errs.Also(pt.validateCustomTask())
+ case pt.TaskSpec != nil && pt.TaskSpec.APIVersion != "":
+ errs = errs.Also(pt.validateCustomTask())
+ // If EnableTektonOCIBundles feature flag is on, validate bundle specifications
+ case cfg.FeatureFlags.EnableTektonOCIBundles && pt.TaskRef != nil && pt.TaskRef.Bundle != "":
+ errs = errs.Also(pt.validateBundle())
+ default:
+ errs = errs.Also(pt.validateTask(ctx))
+ }
+ return
+}
+
+func (pt *PipelineTask) validateMatrix(ctx context.Context) (errs *apis.FieldError) {
+ if pt.IsMatrixed() {
+ // This is an alpha feature and will fail validation if it's used in a pipeline spec
+ // when the enable-api-fields feature gate is anything but "alpha".
+ errs = errs.Also(version.ValidateEnabledAPIFields(ctx, "matrix", config.AlphaAPIFields))
+ errs = errs.Also(pt.Matrix.validateCombinationsCount(ctx))
+ }
+ errs = errs.Also(pt.Matrix.validateParameterInOneOfMatrixOrParams(pt.Params))
+ errs = errs.Also(pt.Matrix.validateParams())
+ return errs
+}
+
+func (pt PipelineTask) validateEmbeddedOrType() (errs *apis.FieldError) {
+ // Reject cases where APIVersion and/or Kind are specified alongside an embedded Task.
+ // We determine if this is an embedded Task by checking of TaskSpec.TaskSpec.Steps has items.
+ if pt.TaskSpec != nil && len(pt.TaskSpec.TaskSpec.Steps) > 0 {
+ if pt.TaskSpec.APIVersion != "" {
+ errs = errs.Also(&apis.FieldError{
+ Message: "taskSpec.apiVersion cannot be specified when using taskSpec.steps",
+ Paths: []string{"taskSpec.apiVersion"},
+ })
+ }
+ if pt.TaskSpec.Kind != "" {
+ errs = errs.Also(&apis.FieldError{
+ Message: "taskSpec.kind cannot be specified when using taskSpec.steps",
+ Paths: []string{"taskSpec.kind"},
+ })
+ }
+ }
+ return
+}
+
+func (pt *PipelineTask) validateResultsFromMatrixedPipelineTasksNotConsumed(matrixedPipelineTasks sets.String) (errs *apis.FieldError) {
+ for _, ref := range PipelineTaskResultRefs(pt) {
+ if matrixedPipelineTasks.Has(ref.PipelineTask) {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("consuming results from matrixed task %s is not allowed", ref.PipelineTask), ""))
+ }
+ }
+ return errs
+}
+
+func (pt *PipelineTask) validateWorkspaces(workspaceNames sets.String) (errs *apis.FieldError) {
+ workspaceBindingNames := sets.NewString()
+ for i, ws := range pt.Workspaces {
+ if workspaceBindingNames.Has(ws.Name) {
+ errs = errs.Also(apis.ErrGeneric(
+ fmt.Sprintf("workspace name %q must be unique", ws.Name), "").ViaFieldIndex("workspaces", i))
+ }
+
+ if ws.Workspace == "" {
+ if !workspaceNames.Has(ws.Name) {
+ errs = errs.Also(apis.ErrInvalidValue(
+ fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Name),
+ "",
+ ).ViaFieldIndex("workspaces", i))
+ }
+ } else if !workspaceNames.Has(ws.Workspace) {
+ errs = errs.Also(apis.ErrInvalidValue(
+ fmt.Sprintf("pipeline task %q expects workspace with name %q but none exists in pipeline spec", pt.Name, ws.Workspace),
+ "",
+ ).ViaFieldIndex("workspaces", i))
+ }
+
+ workspaceBindingNames.Insert(ws.Name)
+ }
+ return errs
+}
+
+// validateRefOrSpec validates at least one of taskRef or taskSpec is specified
+func (pt PipelineTask) validateRefOrSpec() (errs *apis.FieldError) {
+ // can't have both taskRef and taskSpec at the same time
+ if pt.TaskRef != nil && pt.TaskSpec != nil {
+ errs = errs.Also(apis.ErrMultipleOneOf("taskRef", "taskSpec"))
+ }
+ // Check that one of TaskRef and TaskSpec is present
+ if pt.TaskRef == nil && pt.TaskSpec == nil {
+ errs = errs.Also(apis.ErrMissingOneOf("taskRef", "taskSpec"))
+ }
+ return errs
+}
+
+// validateCustomTask validates custom task specifications - checking kind and fail if not yet supported features specified
+func (pt PipelineTask) validateCustomTask() (errs *apis.FieldError) {
+ if pt.TaskRef != nil && pt.TaskRef.Kind == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify kind", "taskRef.kind"))
+ }
+ if pt.TaskSpec != nil && pt.TaskSpec.Kind == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify kind", "taskSpec.kind"))
+ }
+ if pt.TaskRef != nil && pt.TaskRef.APIVersion == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task ref must specify apiVersion", "taskRef.apiVersion"))
+ }
+ if pt.TaskSpec != nil && pt.TaskSpec.APIVersion == "" {
+ errs = errs.Also(apis.ErrInvalidValue("custom task spec must specify apiVersion", "taskSpec.apiVersion"))
+ }
+ return errs
+}
+
+// validateBundle validates bundle specifications - checking name and bundle
+func (pt PipelineTask) validateBundle() (errs *apis.FieldError) {
+ // bundle requires a TaskRef to be specified
+ if (pt.TaskRef != nil && pt.TaskRef.Bundle != "") && pt.TaskRef.Name == "" {
+ errs = errs.Also(apis.ErrMissingField("taskRef.name"))
+ }
+ // If a bundle url is specified, ensure it is parsable
+ if pt.TaskRef != nil && pt.TaskRef.Bundle != "" {
+ if _, err := name.ParseReference(pt.TaskRef.Bundle); err != nil {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("invalid bundle reference (%s)", err.Error()), "taskRef.bundle"))
+ }
+ }
+ return errs
+}
+
+// validateTask validates a pipeline task or a final task for taskRef and taskSpec
+func (pt PipelineTask) validateTask(ctx context.Context) (errs *apis.FieldError) {
+ cfg := config.FromContextOrDefaults(ctx)
+ // Validate TaskSpec if it's present
+ if pt.TaskSpec != nil {
+ errs = errs.Also(pt.TaskSpec.Validate(ctx).ViaField("taskSpec"))
+ }
+ if pt.TaskRef != nil {
+ if pt.TaskRef.Name != "" {
+ // TaskRef name must be a valid k8s name
+ if errSlice := validation.IsQualifiedName(pt.TaskRef.Name); len(errSlice) != 0 {
+ errs = errs.Also(apis.ErrInvalidValue(strings.Join(errSlice, ","), "taskRef.name"))
+ }
+ } else if pt.TaskRef.Resolver == "" {
+ errs = errs.Also(apis.ErrInvalidValue("taskRef must specify name", "taskRef.name"))
+ }
+ // fail if bundle is present when EnableTektonOCIBundles feature flag is off (as it won't be allowed nor used)
+ if !cfg.FeatureFlags.EnableTektonOCIBundles && pt.TaskRef.Bundle != "" {
+ errs = errs.Also(apis.ErrDisallowedFields("taskRef.bundle"))
+ }
+ }
+ return errs
+}
+
// validatePipelineWorkspacesDeclarations validates the specified workspaces, ensuring having unique name without any
// empty string,
func validatePipelineWorkspacesDeclarations(wss []PipelineWorkspaceDeclaration) (errs *apis.FieldError) {
@@ -191,6 +390,23 @@ func validatePipelineContextVariables(tasks []PipelineTask) *apis.FieldError {
return errs
}
+// extractAllParams extracts all the parameters in a PipelineTask:
+// - pt.Params
+// - pt.Matrix.Params
+// - pt.Matrix.Include.Params
+func (pt *PipelineTask) extractAllParams() Params {
+ allParams := pt.Params
+ if pt.Matrix.HasParams() {
+ allParams = append(allParams, pt.Matrix.Params...)
+ }
+ if pt.Matrix.HasInclude() {
+ for _, include := range pt.Matrix.Include {
+ allParams = append(allParams, include.Params...)
+ }
+ }
+ return allParams
+}
+
func containsExecutionStatusRef(p string) bool {
if strings.HasPrefix(p, "tasks.") && strings.HasSuffix(p, ".status") {
return true
@@ -198,6 +414,12 @@ func containsExecutionStatusRef(p string) bool {
return false
}
+func validateExecutionStatusVariables(tasks []PipelineTask, finallyTasks []PipelineTask) (errs *apis.FieldError) {
+ errs = errs.Also(validateExecutionStatusVariablesInTasks(tasks).ViaField("tasks"))
+ errs = errs.Also(validateExecutionStatusVariablesInFinally(PipelineTaskList(tasks).Names(), finallyTasks).ViaField("finally"))
+ return errs
+}
+
// validate dag pipeline tasks, task params can not access execution status of any other task
// dag tasks cannot have param value as $(tasks.pipelineTask.status)
func validateExecutionStatusVariablesInTasks(tasks []PipelineTask) (errs *apis.FieldError) {
@@ -216,9 +438,79 @@ func validateExecutionStatusVariablesInFinally(tasksNames sets.String, finally [
return errs
}
-func validateExecutionStatusVariables(tasks []PipelineTask, finallyTasks []PipelineTask) (errs *apis.FieldError) {
- errs = errs.Also(validateExecutionStatusVariablesInTasks(tasks).ViaField("tasks"))
- errs = errs.Also(validateExecutionStatusVariablesInFinally(PipelineTaskList(tasks).Names(), finallyTasks).ViaField("finally"))
+func (pt *PipelineTask) validateExecutionStatusVariablesDisallowed() (errs *apis.FieldError) {
+ for _, param := range pt.Params {
+ if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
+ errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "value").
+ ViaFieldKey("params", param.Name))
+ }
+ }
+ for i, we := range pt.WhenExpressions {
+ if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
+ errs = errs.Also(validateContainsExecutionStatusVariablesDisallowed(expressions, "").
+ ViaFieldIndex("when", i))
+ }
+ }
+ return errs
+}
+
+func validateContainsExecutionStatusVariablesDisallowed(expressions []string, path string) (errs *apis.FieldError) {
+ if containsExecutionStatusReferences(expressions) {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline tasks can not refer to execution status"+
+ " of any other pipeline task or aggregate status of tasks"), path))
+ }
+ return errs
+}
+
+func containsExecutionStatusReferences(expressions []string) bool {
+ // validate tasks.pipelineTask.status/tasks.status if this expression is not a result reference
+ if !LooksLikeContainsResultRefs(expressions) {
+ for _, e := range expressions {
+ // check if it contains context variable accessing execution status - $(tasks.taskname.status)
+ // or an aggregate status - $(tasks.status)
+ if containsExecutionStatusRef(e) {
+ return true
+ }
+ }
+ }
+ return false
+}
+
+func (pt *PipelineTask) validateExecutionStatusVariablesAllowed(ptNames sets.String) (errs *apis.FieldError) {
+ for _, param := range pt.Params {
+ if expressions, ok := GetVarSubstitutionExpressionsForParam(param); ok {
+ errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "value").
+ ViaFieldKey("params", param.Name))
+ }
+ }
+ for i, we := range pt.WhenExpressions {
+ if expressions, ok := we.GetVarSubstitutionExpressions(); ok {
+ errs = errs.Also(validateExecutionStatusVariablesExpressions(expressions, ptNames, "").
+ ViaFieldIndex("when", i))
+ }
+ }
+ return errs
+}
+
+func validateExecutionStatusVariablesExpressions(expressions []string, ptNames sets.String, fieldPath string) (errs *apis.FieldError) {
+ // validate tasks.pipelineTask.status if this expression is not a result reference
+ if !LooksLikeContainsResultRefs(expressions) {
+ for _, expression := range expressions {
+ // its a reference to aggregate status of dag tasks - $(tasks.status)
+ if expression == PipelineTasksAggregateStatus {
+ continue
+ }
+ // check if it contains context variable accessing execution status - $(tasks.taskname.status)
+ if containsExecutionStatusRef(expression) {
+ // strip tasks. and .status from tasks.taskname.status to further verify task name
+ pt := strings.TrimSuffix(strings.TrimPrefix(expression, "tasks."), ".status")
+ // report an error if the task name does not exist in the list of dag tasks
+ if !ptNames.Has(pt) {
+ errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("pipeline task %s is not defined in the pipeline", pt), fieldPath))
+ }
+ }
+ }
+ }
return errs
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_conversion.go
index d2c7d4bda..88fed430c 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_conversion.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
@@ -32,7 +48,7 @@ func (pr PipelineRef) convertBundleToResolver(sink *v1.PipelineRef) {
if pr.Bundle != "" {
sink.ResolverRef = v1.ResolverRef{
Resolver: "bundles",
- Params: []v1.Param{{
+ Params: v1.Params{{
Name: "bundle",
Value: v1.ParamValue{StringVal: pr.Bundle, Type: v1.ParamTypeString},
}, {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_validation.go
index c52e2d1de..6186c177a 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelineref_validation.go
@@ -64,7 +64,7 @@ func (ref *PipelineRef) Validate(ctx context.Context) (errs *apis.FieldError) {
}
}
}
- return
+ return //nolint:nakedret
}
func validateBundleFeatureFlag(ctx context.Context, featureName string, wantValue bool) *apis.FieldError {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_types.go
index 491374f9c..83bf2c22e 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_types.go
@@ -18,6 +18,7 @@ package v1beta1
import (
"context"
+ "fmt"
"time"
"github.com/tektoncd/pipeline/pkg/apis/config"
@@ -155,6 +156,22 @@ func (pr *PipelineRun) GetNamespacedName() types.NamespacedName {
return types.NamespacedName{Namespace: pr.Namespace, Name: pr.Name}
}
+// IsTimeoutConditionSet returns true when the pipelinerun has the pipelinerun timed out reason
+func (pr *PipelineRun) IsTimeoutConditionSet() bool {
+ condition := pr.Status.GetCondition(apis.ConditionSucceeded)
+ return condition.IsFalse() && condition.Reason == PipelineRunReasonTimedOut.String()
+}
+
+// SetTimeoutCondition sets the status of the PipelineRun to timed out.
+func (pr *PipelineRun) SetTimeoutCondition(ctx context.Context) {
+ pr.Status.SetCondition(&apis.Condition{
+ Type: apis.ConditionSucceeded,
+ Status: corev1.ConditionFalse,
+ Reason: PipelineRunReasonTimedOut.String(),
+ Message: fmt.Sprintf("PipelineRun %q failed to finish within %q", pr.Name, pr.PipelineTimeout(ctx).String()),
+ })
+}
+
// HasTimedOut returns true if a pipelinerun has exceeded its spec.Timeout based on its status.Timeout
func (pr *PipelineRun) HasTimedOut(ctx context.Context, c clock.PassiveClock) bool {
timeout := pr.PipelineTimeout(ctx)
@@ -172,6 +189,19 @@ func (pr *PipelineRun) HasTimedOut(ctx context.Context, c clock.PassiveClock) bo
return false
}
+// HasTimedOutForALongTime returns true if a pipelinerun has exceeed its spec.Timeout based its status.StartTime
+// by a large margin
+func (pr *PipelineRun) HasTimedOutForALongTime(ctx context.Context, c clock.PassiveClock) bool {
+ if !pr.HasTimedOut(ctx, c) {
+ return false
+ }
+ timeout := pr.PipelineTimeout(ctx)
+ startTime := pr.Status.StartTime
+ runtime := c.Since(startTime.Time)
+ // We are arbitrarily defining large margin as doubling the spec.timeout
+ return runtime >= 2*timeout
+}
+
// HaveTasksTimedOut returns true if a pipelinerun has exceeded its spec.Timeouts.Tasks
func (pr *PipelineRun) HaveTasksTimedOut(ctx context.Context, c clock.PassiveClock) bool {
timeout := pr.TasksTimeout()
@@ -223,9 +253,16 @@ type PipelineRunSpec struct {
PipelineRef *PipelineRef `json:"pipelineRef,omitempty"`
// +optional
PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"`
+ // Resources is a list of bindings specifying which actual instances of
+ // PipelineResources to use for the resources the Pipeline has declared
+ // it needs.
+ //
+ // Deprecated: Unused, preserved only for backwards compatibility
+ // +listType=atomic
+ Resources []PipelineResourceBinding `json:"resources,omitempty"`
// Params is a list of parameter names and values.
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
// +optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
@@ -495,6 +532,8 @@ const (
TasksTimedOutSkip SkippingReason = "PipelineRun Tasks timeout has been reached"
// FinallyTimedOutSkip means the task was skipped because the PipelineRun has passed its Timeouts.Finally.
FinallyTimedOutSkip SkippingReason = "PipelineRun Finally timeout has been reached"
+ // EmptyArrayInMatrixParams means the task was skipped because Matrix parameters contain empty array.
+ EmptyArrayInMatrixParams SkippingReason = "Matrix Parameters have an empty array"
// None means the task was not skipped
None SkippingReason = "None"
)
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_validation.go
index 4469f902a..ed7ac5cce 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/pipelinerun_validation.go
@@ -131,6 +131,9 @@ func (ps *PipelineRunSpec) Validate(ctx context.Context) (errs *apis.FieldError)
if ps.PodTemplate != nil {
errs = errs.Also(validatePodTemplateEnv(ctx, *ps.PodTemplate))
}
+ if ps.Resources != nil {
+ errs = errs.Also(apis.ErrDisallowedFields("resources"))
+ }
return errs
}
@@ -239,7 +242,7 @@ func (ps *PipelineRunSpec) validateInlineParameters(ctx context.Context) (errs *
return errs
}
-func appendPipelineTaskParams(paramSpecForValidation map[string]ParamSpec, params []Param) map[string]ParamSpec {
+func appendPipelineTaskParams(paramSpecForValidation map[string]ParamSpec, params Params) map[string]ParamSpec {
for _, p := range params {
if pSpec, ok := paramSpecForValidation[p.Name]; ok {
if p.Value.ObjectVal != nil {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance.go
index 1cb8fca72..3ae27eb55 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance.go
@@ -15,37 +15,53 @@ package v1beta1
import "github.com/tektoncd/pipeline/pkg/apis/config"
-// Provenance contains some key authenticated metadata about how a software artifact was
-// built (what sources, what inputs/outputs, etc.). For now, it only contains the subfield
-// `ConfigSource` that identifies the source where a build config file came from.
-// In future, it can be expanded as needed to include more metadata about the build.
-// This field aims to be used to carry minimum amount of the authenticated metadata in *Run status
-// so that Tekton Chains can pick it up and record in the provenance it generates.
+// Provenance contains metadata about resources used in the TaskRun/PipelineRun
+// such as the source from where a remote build definition was fetched.
+// This field aims to carry minimum amoumt of metadata in *Run status so that
+// Tekton Chains can capture them in the provenance.
type Provenance struct {
- // ConfigSource identifies the source where a resource came from.
+ // Deprecated: Use RefSource instead
ConfigSource *ConfigSource `json:"configSource,omitempty"`
+ // RefSource identifies the source where a remote task/pipeline came from.
+ RefSource *RefSource `json:"refSource,omitempty"`
+
// FeatureFlags identifies the feature flags that were used during the task/pipeline run
FeatureFlags *config.FeatureFlags `json:"featureFlags,omitempty"`
}
-// ConfigSource identifies the source where a resource came from.
-// This can include Git repositories, Task Bundles, file checksums, or other information
-// that allows users to identify where the resource came from and what version was used.
+// RefSource contains the information that can uniquely identify where a remote
+// built definition came from i.e. Git repositories, Tekton Bundles in OCI registry
+// and hub.
+type RefSource struct {
+ // URI indicates the identity of the source of the build definition.
+ // Example: "https://github.com/tektoncd/catalog"
+ URI string `json:"uri,omitempty"`
+
+ // Digest is a collection of cryptographic digests for the contents of the artifact specified by URI.
+ // Example: {"sha1": "f99d13e554ffcb696dee719fa85b695cb5b0f428"}
+ Digest map[string]string `json:"digest,omitempty"`
+
+ // EntryPoint identifies the entry point into the build. This is often a path to a
+ // build definition file and/or a target label within that file.
+ // Example: "task/git-clone/0.8/git-clone.yaml"
+ EntryPoint string `json:"entryPoint,omitempty"`
+}
+
+// ConfigSource contains the information that can uniquely identify where a remote
+// built definition came from i.e. Git repositories, Tekton Bundles in OCI registry
+// and hub.
type ConfigSource struct {
- // URI indicates the identity of the source of the config.
- // Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.uri
+ // URI indicates the identity of the source of the build definition.
// Example: "https://github.com/tektoncd/catalog"
URI string `json:"uri,omitempty"`
// Digest is a collection of cryptographic digests for the contents of the artifact specified by URI.
- // Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.digest
// Example: {"sha1": "f99d13e554ffcb696dee719fa85b695cb5b0f428"}
Digest map[string]string `json:"digest,omitempty"`
// EntryPoint identifies the entry point into the build. This is often a path to a
- // configuration file and/or a target label within that file.
- // Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.entryPoint
+ // build definition file and/or a target label within that file.
// Example: "task/git-clone/0.8/git-clone.yaml"
EntryPoint string `json:"entryPoint,omitempty"`
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance_conversion.go
index 4f68e9dac..4e4afe25b 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/provenance_conversion.go
@@ -20,10 +20,10 @@ import (
)
func (p Provenance) convertTo(ctx context.Context, sink *v1.Provenance) {
- if p.ConfigSource != nil {
- new := v1.ConfigSource{}
- p.ConfigSource.convertTo(ctx, &new)
- sink.ConfigSource = &new
+ if p.RefSource != nil {
+ new := v1.RefSource{}
+ p.RefSource.convertTo(ctx, &new)
+ sink.RefSource = &new
}
if p.FeatureFlags != nil {
sink.FeatureFlags = p.FeatureFlags
@@ -31,23 +31,23 @@ func (p Provenance) convertTo(ctx context.Context, sink *v1.Provenance) {
}
func (p *Provenance) convertFrom(ctx context.Context, source v1.Provenance) {
- if source.ConfigSource != nil {
- new := ConfigSource{}
- new.convertFrom(ctx, *source.ConfigSource)
- p.ConfigSource = &new
+ if source.RefSource != nil {
+ new := RefSource{}
+ new.convertFrom(ctx, *source.RefSource)
+ p.RefSource = &new
}
if source.FeatureFlags != nil {
p.FeatureFlags = source.FeatureFlags
}
}
-func (cs ConfigSource) convertTo(ctx context.Context, sink *v1.ConfigSource) {
+func (cs RefSource) convertTo(ctx context.Context, sink *v1.RefSource) {
sink.URI = cs.URI
sink.Digest = cs.Digest
sink.EntryPoint = cs.EntryPoint
}
-func (cs *ConfigSource) convertFrom(ctx context.Context, source v1.ConfigSource) {
+func (cs *RefSource) convertFrom(ctx context.Context, source v1.RefSource) {
cs.URI = source.URI
cs.Digest = source.Digest
cs.EntryPoint = source.EntryPoint
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_conversion.go
index 18d3c07bb..3bbed8503 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_conversion.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_types.go
index 1cb0c85fe..70b1c7886 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resolver_types.go
@@ -33,5 +33,5 @@ type ResolverRef struct {
// the chosen resolver.
// +optional
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resource_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resource_types.go
index 567019f55..0e5ec62de 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resource_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/resource_types.go
@@ -17,63 +17,246 @@ limitations under the License.
package v1beta1
import (
- "encoding/json"
- "fmt"
-
- "github.com/hashicorp/go-multierror"
+ resource "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1"
+ "github.com/tektoncd/pipeline/pkg/result"
+ v1 "k8s.io/api/core/v1"
)
-// PipelineResourceResult is used to write key/value pairs to TaskRun pod termination messages.
-// The key/value pairs may come from the entrypoint binary, or represent a TaskRunResult.
-// If they represent a TaskRunResult, the key is the name of the result and the value is the
-// JSON-serialized value of the result.
-// TODO(#6197): Rename this struct
-type PipelineResourceResult struct {
- Key string `json:"key"`
- Value string `json:"value"`
- // ResourceName may be used in tests, but it is not populated in termination messages.
- // It is preserved here for backwards compatibility and will not be ported to v1.
- ResourceName string `json:"resourceName,omitempty"`
- ResultType ResultType `json:"type,omitempty"`
+// RunResult is used to write key/value pairs to TaskRun pod termination messages.
+// It has been migrated to the result package and kept for backward compatibility
+type RunResult = result.RunResult
+
+// PipelineResourceResult has been deprecated with the migration of PipelineResources
+// Deprecated: Use RunResult instead
+type PipelineResourceResult = result.RunResult
+
+// ResultType of PipelineResourceResult has been deprecated with the migration of PipelineResources
+// Deprecated: v1beta1.ResultType is only kept for backward compatibility
+type ResultType = result.ResultType
+
+// ResourceParam declares a string value to use for the parameter called Name, and is used in
+// the specific context of PipelineResources.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type ResourceParam = resource.ResourceParam
+
+// PipelineResourceType represents the type of endpoint the pipelineResource is, so that the
+// controller will know this pipelineResource should be fetched and optionally what
+// additional metatdata should be provided for it.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceType = resource.PipelineResourceType
+
+// PipelineDeclaredResource is used by a Pipeline to declare the types of the
+// PipelineResources that it will required to run and names which can be used to
+// refer to these PipelineResources in PipelineTaskResourceBindings.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineDeclaredResource struct {
+ // Name is the name that will be used by the Pipeline to refer to this resource.
+ // It does not directly correspond to the name of any PipelineResources Task
+ // inputs or outputs, and it does not correspond to the actual names of the
+ // PipelineResources that will be bound in the PipelineRun.
+ Name string `json:"name"`
+ // Type is the type of the PipelineResource.
+ Type PipelineResourceType `json:"type"`
+ // Optional declares the resource as optional.
+ // optional: true - the resource is considered optional
+ // optional: false - the resource is considered required (default/equivalent of not specifying it)
+ Optional bool `json:"optional,omitempty"`
+}
+
+// TaskResources allows a Pipeline to declare how its DeclaredPipelineResources
+// should be provided to a Task as its inputs and outputs.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type TaskResources struct {
+ // Inputs holds the mapping from the PipelineResources declared in
+ // DeclaredPipelineResources to the input PipelineResources required by the Task.
+ // +listType=atomic
+ Inputs []TaskResource `json:"inputs,omitempty"`
+ // Outputs holds the mapping from the PipelineResources declared in
+ // DeclaredPipelineResources to the input PipelineResources required by the Task.
+ // +listType=atomic
+ Outputs []TaskResource `json:"outputs,omitempty"`
+}
+
+// TaskResource defines an input or output Resource declared as a requirement
+// by a Task. The Name field will be used to refer to these Resources within
+// the Task definition, and when provided as an Input, the Name will be the
+// path to the volume mounted containing this Resource as an input (e.g.
+// an input Resource named `workspace` will be mounted at `/workspace`).
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type TaskResource struct {
+ ResourceDeclaration `json:",inline"`
+}
+
+// TaskRunResources allows a TaskRun to declare inputs and outputs TaskResourceBinding
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type TaskRunResources struct {
+ // Inputs holds the inputs resources this task was invoked with
+ // +listType=atomic
+ Inputs []TaskResourceBinding `json:"inputs,omitempty"`
+ // Outputs holds the inputs resources this task was invoked with
+ // +listType=atomic
+ Outputs []TaskResourceBinding `json:"outputs,omitempty"`
+}
+
+// TaskResourceBinding points to the PipelineResource that
+// will be used for the Task input or output called Name.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type TaskResourceBinding struct {
+ PipelineResourceBinding `json:",inline"`
+ // Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead.
+ // The optional Path field corresponds to a path on disk at which the Resource can be found
+ // (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource).
+ // +optional
+ // +listType=atomic
+ Paths []string `json:"paths,omitempty"`
+}
+
+// ResourceDeclaration defines an input or output PipelineResource declared as a requirement
+// by another type such as a Task or Condition. The Name field will be used to refer to these
+// PipelineResources within the type's definition, and when provided as an Input, the Name will be the
+// path to the volume mounted containing this PipelineResource as an input (e.g.
+// an input Resource named `workspace` will be mounted at `/workspace`).
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type ResourceDeclaration = resource.ResourceDeclaration
+
+// PipelineResourceBinding connects a reference to an instance of a PipelineResource
+// with a PipelineResource dependency that the Pipeline has declared
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceBinding struct {
+ // Name is the name of the PipelineResource in the Pipeline's declaration
+ Name string `json:"name,omitempty"`
+ // ResourceRef is a reference to the instance of the actual PipelineResource
+ // that should be used
+ // +optional
+ ResourceRef *PipelineResourceRef `json:"resourceRef,omitempty"`
+
+ // ResourceSpec is specification of a resource that should be created and
+ // consumed by the task
+ // +optional
+ ResourceSpec *resource.PipelineResourceSpec `json:"resourceSpec,omitempty"`
+}
+
+// PipelineTaskResources allows a Pipeline to declare how its DeclaredPipelineResources
+// should be provided to a Task as its inputs and outputs.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineTaskResources struct {
+ // Inputs holds the mapping from the PipelineResources declared in
+ // DeclaredPipelineResources to the input PipelineResources required by the Task.
+ // +listType=atomic
+ Inputs []PipelineTaskInputResource `json:"inputs,omitempty"`
+ // Outputs holds the mapping from the PipelineResources declared in
+ // DeclaredPipelineResources to the input PipelineResources required by the Task.
+ // +listType=atomic
+ Outputs []PipelineTaskOutputResource `json:"outputs,omitempty"`
+}
+
+// PipelineTaskInputResource maps the name of a declared PipelineResource input
+// dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources
+// that should be used. This input may come from a previous task.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineTaskInputResource struct {
+ // Name is the name of the PipelineResource as declared by the Task.
+ Name string `json:"name"`
+ // Resource is the name of the DeclaredPipelineResource to use.
+ Resource string `json:"resource"`
+ // From is the list of PipelineTask names that the resource has to come from.
+ // (Implies an ordering in the execution graph.)
+ // +optional
+ // +listType=atomic
+ From []string `json:"from,omitempty"`
+}
+
+// PipelineTaskOutputResource maps the name of a declared PipelineResource output
+// dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources
+// that should be used.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineTaskOutputResource struct {
+ // Name is the name of the PipelineResource as declared by the Task.
+ Name string `json:"name"`
+ // Resource is the name of the DeclaredPipelineResource to use.
+ Resource string `json:"resource"`
+}
+
+// TaskRunInputs holds the input values that this task was invoked with.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type TaskRunInputs struct {
+ // +optional
+ // +listType=atomic
+ Resources []TaskResourceBinding `json:"resources,omitempty"`
+ // +optional
+ // +listType=atomic
+ Params []Param `json:"params,omitempty"`
+}
+
+// TaskRunOutputs holds the output values that this task was invoked with.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type TaskRunOutputs struct {
+ // +optional
+ // +listType=atomic
+ Resources []TaskResourceBinding `json:"resources,omitempty"`
+}
+
+// PipelineResourceRef can be used to refer to a specific instance of a Resource
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceRef struct {
+ // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ Name string `json:"name,omitempty"`
+ // API version of the referent
+ // +optional
+ APIVersion string `json:"apiVersion,omitempty"`
+}
+
+// PipelineResourceInterface interface to be implemented by different PipelineResource types
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceInterface interface {
+ // GetName returns the name of this PipelineResource instance.
+ GetName() string
+ // GetType returns the type of this PipelineResource (often a super type, e.g. in the case of storage).
+ GetType() PipelineResourceType
+ // Replacements returns all the attributes that this PipelineResource has that
+ // can be used for variable replacement.
+ Replacements() map[string]string
+ // GetOutputTaskModifier returns the TaskModifier instance that should be used on a Task
+ // in order to add this kind of resource when it is being used as an output.
+ GetOutputTaskModifier(ts *TaskSpec, path string) (TaskModifier, error)
+ // GetInputTaskModifier returns the TaskModifier instance that should be used on a Task
+ // in order to add this kind of resource when it is being used as an input.
+ GetInputTaskModifier(ts *TaskSpec, path string) (TaskModifier, error)
+}
+
+// TaskModifier is an interface to be implemented by different PipelineResources
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type TaskModifier interface {
+ GetStepsToPrepend() []Step
+ GetStepsToAppend() []Step
+ GetVolumes() []v1.Volume
}
-// ResultType used to find out whether a PipelineResourceResult is from a task result or not
-// Note that ResultsType is another type which is used to define the data type
-// (e.g. string, array, etc) we used for Results
-type ResultType int
-
-// UnmarshalJSON unmarshals either an int or a string into a ResultType. String
-// ResultTypes were removed because they made JSON messages bigger, which in
-// turn limited the amount of space in termination messages for task results. String
-// support is maintained for backwards compatibility - the Pipelines controller could
-// be stopped midway through TaskRun execution, updated with support for int in place
-// of string, and then fail the running TaskRun because it doesn't know how to interpret
-// the string value that the TaskRun's entrypoint will emit when it completes.
-func (r *ResultType) UnmarshalJSON(data []byte) error {
- var asInt int
- var intErr error
-
- if err := json.Unmarshal(data, &asInt); err != nil {
- intErr = err
- } else {
- *r = ResultType(asInt)
- return nil
- }
-
- var asString string
-
- if err := json.Unmarshal(data, &asString); err != nil {
- return fmt.Errorf("unsupported value type, neither int nor string: %v", multierror.Append(intErr, err).ErrorOrNil())
- }
-
- switch asString {
- case "TaskRunResult":
- *r = TaskRunResultType
- case "InternalTektonResult":
- *r = InternalTektonResultType
- default:
- *r = UnknownResultType
- }
-
- return nil
+// InternalTaskModifier implements TaskModifier for resources that are built-in to Tekton Pipelines.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type InternalTaskModifier struct {
+ // +listType=atomic
+ StepsToPrepend []Step `json:"stepsToPrepend"`
+ // +listType=atomic
+ StepsToAppend []Step `json:"stepsToAppend"`
+ // +listType=atomic
+ Volumes []v1.Volume `json:"volumes"`
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_conversion.go
index 70197bed1..5e0facad2 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_conversion.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_types.go
index d71f513c4..b4e3764c8 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/result_types.go
@@ -54,7 +54,7 @@ type ResultValue = ParamValue
// ResultsType indicates the type of a result;
// Used to distinguish between a single string and an array of strings.
// Note that there is ResultType used to find out whether a
-// PipelineResourceResult is from a task result or not, which is different from
+// RunResult is from a task result or not, which is different from
// this ResultsType.
type ResultsType string
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/swagger.json b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/swagger.json
index ec56b8982..c0b8e2770 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/swagger.json
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/swagger.json
@@ -275,11 +275,11 @@
}
},
"v1beta1.ConfigSource": {
- "description": "ConfigSource identifies the source where a resource came from. This can include Git repositories, Task Bundles, file checksums, or other information that allows users to identify where the resource came from and what version was used.",
+ "description": "ConfigSource contains the information that can uniquely identify where a remote built definition came from i.e. Git repositories, Tekton Bundles in OCI registry and hub.",
"type": "object",
"properties": {
"digest": {
- "description": "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.digest Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
+ "description": "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
"type": "object",
"additionalProperties": {
"type": "string",
@@ -287,11 +287,11 @@
}
},
"entryPoint": {
- "description": "EntryPoint identifies the entry point into the build. This is often a path to a configuration file and/or a target label within that file. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.entryPoint Example: \"task/git-clone/0.8/git-clone.yaml\"",
+ "description": "EntryPoint identifies the entry point into the build. This is often a path to a build definition file and/or a target label within that file. Example: \"task/git-clone/0.8/git-clone.yaml\"",
"type": "string"
},
"uri": {
- "description": "URI indicates the identity of the source of the config. Definition: https://slsa.dev/provenance/v0.2#invocation.configSource.uri Example: \"https://github.com/tektoncd/catalog\"",
+ "description": "URI indicates the identity of the source of the build definition. Example: \"https://github.com/tektoncd/catalog\"",
"type": "string"
}
}
@@ -433,6 +433,10 @@
"description": "Description is a user-facing description of the task that may be used to populate a UI.",
"type": "string"
},
+ "displayName": {
+ "description": "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ "type": "string"
+ },
"kind": {
"type": "string"
},
@@ -449,6 +453,10 @@
},
"x-kubernetes-list-type": "atomic"
},
+ "resources": {
+ "description": "Resources is a list input and output resource to run the task Resources are represented in TaskRuns as bindings to instances of PipelineResources.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "$ref": "#/definitions/v1beta1.TaskResources"
+ },
"results": {
"description": "Results are values that this Task can output",
"type": "array",
@@ -505,40 +513,75 @@
}
}
},
- "v1beta1.Matrix": {
- "description": "Matrix is used to fan out Tasks in a Pipeline",
+ "v1beta1.IncludeParams": {
+ "description": "IncludeParams allows passing in a specific combinations of Parameters into the Matrix.",
"type": "object",
"properties": {
- "include": {
- "description": "Include is a list of MatrixInclude which allows passing in specific combinations of Parameters into the Matrix. Note that Include is in preview mode and not yet supported.",
+ "name": {
+ "description": "Name the specified combination",
+ "type": "string"
+ },
+ "params": {
+ "description": "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.Param"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
+ "v1beta1.InternalTaskModifier": {
+ "description": "InternalTaskModifier implements TaskModifier for resources that are built-in to Tekton Pipelines.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "required": [
+ "stepsToPrepend",
+ "stepsToAppend",
+ "volumes"
+ ],
+ "properties": {
+ "stepsToAppend": {
"type": "array",
"items": {
"default": {},
- "$ref": "#/definitions/v1beta1.MatrixInclude"
+ "$ref": "#/definitions/v1beta1.Step"
},
"x-kubernetes-list-type": "atomic"
},
- "params": {
- "description": "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
+ "stepsToPrepend": {
"type": "array",
"items": {
"default": {},
- "$ref": "#/definitions/v1beta1.Param"
+ "$ref": "#/definitions/v1beta1.Step"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "volumes": {
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1.Volume"
},
"x-kubernetes-list-type": "atomic"
}
}
},
- "v1beta1.MatrixInclude": {
- "description": "MatrixInclude allows passing in a specific combinations of Parameters into the Matrix. Note this struct is in preview mode and not yet supported",
+ "v1beta1.Matrix": {
+ "description": "Matrix is used to fan out Tasks in a Pipeline",
"type": "object",
"properties": {
- "name": {
- "description": "Name the specified combination",
- "type": "string"
+ "include": {
+ "description": "Include is a list of IncludeParams which allows passing in specific combinations of Parameters into the Matrix.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.IncludeParams"
+ },
+ "x-kubernetes-list-type": "atomic"
},
"params": {
- "description": "Params takes only `Parameters` of type `\"string\"` The names of the `params` must match the names of the `params` in the underlying `Task`",
+ "description": "Params is a list of parameters used to fan out the pipelineTask Params takes only `Parameters` of type `\"array\"` Each array element is supplied to the `PipelineTask` by substituting `params` of type `\"string\"` in the underlying `Task`. The names of the `params` in the `Matrix` must match the names of the `params` in the underlying `Task` that they will be substituting.",
"type": "array",
"items": {
"default": {},
@@ -604,13 +647,13 @@
"description": "ResultValue is a type alias of ParamValue",
"type": "object",
"required": [
- "type",
- "stringVal",
- "arrayVal",
- "objectVal"
+ "Type",
+ "StringVal",
+ "ArrayVal",
+ "ObjectVal"
],
"properties": {
- "arrayVal": {
+ "ArrayVal": {
"type": "array",
"items": {
"type": "string",
@@ -618,19 +661,19 @@
},
"x-kubernetes-list-type": "atomic"
},
- "objectVal": {
+ "ObjectVal": {
"type": "object",
"additionalProperties": {
"type": "string",
"default": ""
}
},
- "stringVal": {
+ "StringVal": {
"description": "Represents the stored type of ParamValues.",
"type": "string",
"default": ""
},
- "type": {
+ "Type": {
"type": "string",
"default": ""
}
@@ -659,6 +702,30 @@
}
}
},
+ "v1beta1.PipelineDeclaredResource": {
+ "description": "PipelineDeclaredResource is used by a Pipeline to declare the types of the PipelineResources that it will required to run and names which can be used to refer to these PipelineResources in PipelineTaskResourceBindings.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "required": [
+ "name",
+ "type"
+ ],
+ "properties": {
+ "name": {
+ "description": "Name is the name that will be used by the Pipeline to refer to this resource. It does not directly correspond to the name of any PipelineResources Task inputs or outputs, and it does not correspond to the actual names of the PipelineResources that will be bound in the PipelineRun.",
+ "type": "string",
+ "default": ""
+ },
+ "optional": {
+ "description": "Optional declares the resource as optional. optional: true - the resource is considered optional optional: false - the resource is considered required (default/equivalent of not specifying it)",
+ "type": "boolean"
+ },
+ "type": {
+ "description": "Type is the type of the PipelineResource.",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
"v1beta1.PipelineList": {
"description": "PipelineList contains a list of Pipeline",
"type": "object",
@@ -705,29 +772,35 @@
}
}
},
- "v1beta1.PipelineResourceResult": {
- "description": "PipelineResourceResult is used to write key/value pairs to TaskRun pod termination messages. The key/value pairs may come from the entrypoint binary, or represent a TaskRunResult. If they represent a TaskRunResult, the key is the name of the result and the value is the JSON-serialized value of the result.",
+ "v1beta1.PipelineResourceBinding": {
+ "description": "PipelineResourceBinding connects a reference to an instance of a PipelineResource with a PipelineResource dependency that the Pipeline has declared\n\nDeprecated: Unused, preserved only for backwards compatibility",
"type": "object",
- "required": [
- "key",
- "value"
- ],
"properties": {
- "key": {
- "type": "string",
- "default": ""
- },
- "resourceName": {
- "description": "ResourceName may be used in tests, but it is not populated in termination messages. It is preserved here for backwards compatibility and will not be ported to v1.",
+ "name": {
+ "description": "Name is the name of the PipelineResource in the Pipeline's declaration",
"type": "string"
},
- "type": {
- "type": "integer",
- "format": "int32"
+ "resourceRef": {
+ "description": "ResourceRef is a reference to the instance of the actual PipelineResource that should be used",
+ "$ref": "#/definitions/v1beta1.PipelineResourceRef"
},
- "value": {
- "type": "string",
- "default": ""
+ "resourceSpec": {
+ "description": "ResourceSpec is specification of a resource that should be created and consumed by the task",
+ "$ref": "#/definitions/v1alpha1.PipelineResourceSpec"
+ }
+ }
+ },
+ "v1beta1.PipelineResourceRef": {
+ "description": "PipelineResourceRef can be used to refer to a specific instance of a Resource\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "properties": {
+ "apiVersion": {
+ "description": "API version of the referent",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "type": "string"
}
}
},
@@ -877,6 +950,15 @@
"description": "PodTemplate holds pod specific configuration",
"$ref": "#/definitions/pod.Template"
},
+ "resources": {
+ "description": "Resources is a list of bindings specifying which actual instances of PipelineResources to use for the resources the Pipeline has declared it needs.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.PipelineResourceBinding"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
"serviceAccountName": {
"type": "string"
},
@@ -1116,6 +1198,10 @@
"description": "Description is a user-facing description of the pipeline that may be used to populate a UI.",
"type": "string"
},
+ "displayName": {
+ "description": "DisplayName is a user-facing name of the pipeline that may be used to populate a UI.",
+ "type": "string"
+ },
"finally": {
"description": "Finally declares the list of Tasks that execute just before leaving the Pipeline i.e. either after all Tasks are finished executing successfully or after a failure which would result in ending the Pipeline",
"type": "array",
@@ -1134,6 +1220,15 @@
},
"x-kubernetes-list-type": "atomic"
},
+ "resources": {
+ "description": "Deprecated: Unused, preserved only for backwards compatibility",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.PipelineDeclaredResource"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
"results": {
"description": "Results are values that this pipeline can output once run",
"type": "array",
@@ -1167,6 +1262,14 @@
"description": "PipelineTask defines a task in a Pipeline, passing inputs from both Params and from the output of previous tasks.",
"type": "object",
"properties": {
+ "description": {
+ "description": "Description is the description of this task within the context of a Pipeline. This description may be used to populate a UI.",
+ "type": "string"
+ },
+ "displayName": {
+ "description": "DisplayName is the display name of this task within the context of a Pipeline. This display name may be used to populate a UI.",
+ "type": "string"
+ },
"matrix": {
"description": "Matrix declares parameters used to fan out this task.",
"$ref": "#/definitions/v1beta1.Matrix"
@@ -1184,6 +1287,10 @@
},
"x-kubernetes-list-type": "atomic"
},
+ "resources": {
+ "description": "Deprecated: Unused, preserved only for backwards compatibility",
+ "$ref": "#/definitions/v1beta1.PipelineTaskResources"
+ },
"retries": {
"description": "Retries represents how many times this task should be retried in case of task failure: ConditionSucceeded set to False",
"type": "integer",
@@ -1229,6 +1336,35 @@
}
}
},
+ "v1beta1.PipelineTaskInputResource": {
+ "description": "PipelineTaskInputResource maps the name of a declared PipelineResource input dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used. This input may come from a previous task.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "required": [
+ "name",
+ "resource"
+ ],
+ "properties": {
+ "from": {
+ "description": "From is the list of PipelineTask names that the resource has to come from. (Implies an ordering in the execution graph.)",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "default": ""
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "name": {
+ "description": "Name is the name of the PipelineResource as declared by the Task.",
+ "type": "string",
+ "default": ""
+ },
+ "resource": {
+ "description": "Resource is the name of the DeclaredPipelineResource to use.",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
"v1beta1.PipelineTaskMetadata": {
"description": "PipelineTaskMetadata contains the labels or annotations for an EmbeddedTask",
"type": "object",
@@ -1249,6 +1385,26 @@
}
}
},
+ "v1beta1.PipelineTaskOutputResource": {
+ "description": "PipelineTaskOutputResource maps the name of a declared PipelineResource output dependency in a Task to the resource in the Pipeline's DeclaredPipelineResources that should be used.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "required": [
+ "name",
+ "resource"
+ ],
+ "properties": {
+ "name": {
+ "description": "Name is the name of the PipelineResource as declared by the Task.",
+ "type": "string",
+ "default": ""
+ },
+ "resource": {
+ "description": "Resource is the name of the DeclaredPipelineResource to use.",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
"v1beta1.PipelineTaskParam": {
"description": "PipelineTaskParam is used to provide arbitrary string parameters to a Task.",
"type": "object",
@@ -1267,6 +1423,30 @@
}
}
},
+ "v1beta1.PipelineTaskResources": {
+ "description": "PipelineTaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "properties": {
+ "inputs": {
+ "description": "Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.PipelineTaskInputResource"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "outputs": {
+ "description": "Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.PipelineTaskOutputResource"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
"v1beta1.PipelineTaskRun": {
"description": "PipelineTaskRun reports the results of running a step in the Task. Each task has the potential to succeed or fail (based on the exit code) and produces logs.",
"type": "object",
@@ -1346,16 +1526,42 @@
}
},
"v1beta1.Provenance": {
- "description": "Provenance contains some key authenticated metadata about how a software artifact was built (what sources, what inputs/outputs, etc.). For now, it only contains the subfield `ConfigSource` that identifies the source where a build config file came from. In future, it can be expanded as needed to include more metadata about the build. This field aims to be used to carry minimum amount of the authenticated metadata in *Run status so that Tekton Chains can pick it up and record in the provenance it generates.",
+ "description": "Provenance contains metadata about resources used in the TaskRun/PipelineRun such as the source from where a remote build definition was fetched. This field aims to carry minimum amoumt of metadata in *Run status so that Tekton Chains can capture them in the provenance.",
"type": "object",
"properties": {
"configSource": {
- "description": "ConfigSource identifies the source where a resource came from.",
+ "description": "Deprecated: Use RefSource instead",
"$ref": "#/definitions/v1beta1.ConfigSource"
},
"featureFlags": {
"description": "FeatureFlags identifies the feature flags that were used during the task/pipeline run",
"$ref": "#/definitions/github.aaakk.us.kg.tektoncd.pipeline.pkg.apis.config.FeatureFlags"
+ },
+ "refSource": {
+ "description": "RefSource identifies the source where a remote task/pipeline came from.",
+ "$ref": "#/definitions/v1beta1.RefSource"
+ }
+ }
+ },
+ "v1beta1.RefSource": {
+ "description": "RefSource contains the information that can uniquely identify where a remote built definition came from i.e. Git repositories, Tekton Bundles in OCI registry and hub.",
+ "type": "object",
+ "properties": {
+ "digest": {
+ "description": "Digest is a collection of cryptographic digests for the contents of the artifact specified by URI. Example: {\"sha1\": \"f99d13e554ffcb696dee719fa85b695cb5b0f428\"}",
+ "type": "object",
+ "additionalProperties": {
+ "type": "string",
+ "default": ""
+ }
+ },
+ "entryPoint": {
+ "description": "EntryPoint identifies the entry point into the build. This is often a path to a build definition file and/or a target label within that file. Example: \"task/git-clone/0.8/git-clone.yaml\"",
+ "type": "string"
+ },
+ "uri": {
+ "description": "URI indicates the identity of the source of the build definition. Example: \"https://github.com/tektoncd/catalog\"",
+ "type": "string"
}
}
},
@@ -1435,7 +1641,8 @@
"type": "object",
"required": [
"data",
- "source"
+ "source",
+ "refSource"
],
"properties": {
"annotations": {
@@ -1466,8 +1673,12 @@
"type": "integer",
"format": "int64"
},
+ "refSource": {
+ "description": "RefSource is the source reference of the remote data that records the url, digest and the entrypoint.",
+ "$ref": "#/definitions/v1beta1.RefSource"
+ },
"source": {
- "description": "Source is the source reference of the remote data that records the url, digest and the entrypoint.",
+ "description": "Deprecated: Use RefSource instead",
"$ref": "#/definitions/v1beta1.ConfigSource"
}
}
@@ -1477,7 +1688,8 @@
"type": "object",
"required": [
"data",
- "source"
+ "source",
+ "refSource"
],
"properties": {
"data": {
@@ -1485,8 +1697,12 @@
"type": "string",
"default": ""
},
+ "refSource": {
+ "description": "RefSource is the source reference of the remote data that records the url, digest and the entrypoint.",
+ "$ref": "#/definitions/v1beta1.RefSource"
+ },
"source": {
- "description": "Source is the source reference of the remote data that records the url, digest and the entrypoint.",
+ "description": "Deprecated: Use RefSource instead",
"$ref": "#/definitions/v1beta1.ConfigSource"
}
}
@@ -2168,7 +2384,7 @@
"type": "object",
"properties": {
"apiVersion": {
- "description": "API version of the referent",
+ "description": "API version of the referent Note: A Task with non-empty APIVersion and Kind is considered a Custom Task",
"type": "string"
},
"bundle": {
@@ -2176,7 +2392,7 @@
"type": "string"
},
"kind": {
- "description": "TaskKind indicates the kind of the task, namespaced or cluster scoped.",
+ "description": "TaskKind indicates the Kind of the Task: 1. Namespaced Task when Kind is set to \"Task\". If Kind is \"\", it defaults to \"Task\". 2. Cluster-Scoped Task when Kind is set to \"ClusterTask\" 3. Custom Task when Kind is non-empty and APIVersion is non-empty",
"type": "string"
},
"name": {
@@ -2185,6 +2401,89 @@
}
}
},
+ "v1beta1.TaskResource": {
+ "description": "TaskResource defines an input or output Resource declared as a requirement by a Task. The Name field will be used to refer to these Resources within the Task definition, and when provided as an Input, the Name will be the path to the volume mounted containing this Resource as an input (e.g. an input Resource named `workspace` will be mounted at `/workspace`).\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "required": [
+ "name",
+ "type"
+ ],
+ "properties": {
+ "description": {
+ "description": "Description is a user-facing description of the declared resource that may be used to populate a UI.",
+ "type": "string"
+ },
+ "name": {
+ "description": "Name declares the name by which a resource is referenced in the definition. Resources may be referenced by name in the definition of a Task's steps.",
+ "type": "string",
+ "default": ""
+ },
+ "optional": {
+ "description": "Optional declares the resource as optional. By default optional is set to false which makes a resource required. optional: true - the resource is considered optional optional: false - the resource is considered required (equivalent of not specifying it)",
+ "type": "boolean"
+ },
+ "targetPath": {
+ "description": "TargetPath is the path in workspace directory where the resource will be copied.",
+ "type": "string"
+ },
+ "type": {
+ "description": "Type is the type of this resource;",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
+ "v1beta1.TaskResourceBinding": {
+ "description": "TaskResourceBinding points to the PipelineResource that will be used for the Task input or output called Name.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "Name is the name of the PipelineResource in the Pipeline's declaration",
+ "type": "string"
+ },
+ "paths": {
+ "description": "Paths will probably be removed in #1284, and then PipelineResourceBinding can be used instead. The optional Path field corresponds to a path on disk at which the Resource can be found (used when providing the resource via mounted volume, overriding the default logic to fetch the Resource).",
+ "type": "array",
+ "items": {
+ "type": "string",
+ "default": ""
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "resourceRef": {
+ "description": "ResourceRef is a reference to the instance of the actual PipelineResource that should be used",
+ "$ref": "#/definitions/v1beta1.PipelineResourceRef"
+ },
+ "resourceSpec": {
+ "description": "ResourceSpec is specification of a resource that should be created and consumed by the task",
+ "$ref": "#/definitions/v1alpha1.PipelineResourceSpec"
+ }
+ }
+ },
+ "v1beta1.TaskResources": {
+ "description": "TaskResources allows a Pipeline to declare how its DeclaredPipelineResources should be provided to a Task as its inputs and outputs.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "properties": {
+ "inputs": {
+ "description": "Inputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.TaskResource"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "outputs": {
+ "description": "Outputs holds the mapping from the PipelineResources declared in DeclaredPipelineResources to the input PipelineResources required by the Task.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.TaskResource"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
"v1beta1.TaskResult": {
"description": "TaskResult used to describe the results of a task",
"type": "object",
@@ -2255,6 +2554,28 @@
}
}
},
+ "v1beta1.TaskRunInputs": {
+ "description": "TaskRunInputs holds the input values that this task was invoked with.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "properties": {
+ "params": {
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.Param"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "resources": {
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.TaskResourceBinding"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
"v1beta1.TaskRunList": {
"description": "TaskRunList contains a list of TaskRun",
"type": "object",
@@ -2283,6 +2604,44 @@
}
}
},
+ "v1beta1.TaskRunOutputs": {
+ "description": "TaskRunOutputs holds the output values that this task was invoked with.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "properties": {
+ "resources": {
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.TaskResourceBinding"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
+ "v1beta1.TaskRunResources": {
+ "description": "TaskRunResources allows a TaskRun to declare inputs and outputs TaskResourceBinding\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "type": "object",
+ "properties": {
+ "inputs": {
+ "description": "Inputs holds the inputs resources this task was invoked with",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.TaskResourceBinding"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "outputs": {
+ "description": "Outputs holds the inputs resources this task was invoked with",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/v1beta1.TaskResourceBinding"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
"v1beta1.TaskRunResult": {
"description": "TaskRunResult used to describe the results of a task",
"type": "object",
@@ -2350,6 +2709,10 @@
"description": "PodTemplate holds pod specific configuration",
"$ref": "#/definitions/pod.Template"
},
+ "resources": {
+ "description": "Deprecated: Unused, preserved only for backwards compatibility",
+ "$ref": "#/definitions/v1beta1.TaskRunResources"
+ },
"retries": {
"description": "Retries represents how many times this TaskRun should be retried in the event of Task failure.",
"type": "integer",
@@ -2460,11 +2823,11 @@
"$ref": "#/definitions/v1beta1.Provenance"
},
"resourcesResult": {
- "description": "Results from Resources built during the TaskRun. currently includes the digest of build container images",
+ "description": "Results from Resources built during the TaskRun. This is tomb-stoned along with the removal of pipelineResources Deprecated: this field is not populated and is preserved only for backwards compatibility",
"type": "array",
"items": {
"default": {},
- "$ref": "#/definitions/v1beta1.PipelineResourceResult"
+ "$ref": "#/definitions/github.aaakk.us.kg.tektoncd.pipeline.pkg.result.RunResult"
},
"x-kubernetes-list-type": "atomic"
},
@@ -2552,11 +2915,11 @@
"$ref": "#/definitions/v1beta1.Provenance"
},
"resourcesResult": {
- "description": "Results from Resources built during the TaskRun. currently includes the digest of build container images",
+ "description": "Results from Resources built during the TaskRun. This is tomb-stoned along with the removal of pipelineResources Deprecated: this field is not populated and is preserved only for backwards compatibility",
"type": "array",
"items": {
"default": {},
- "$ref": "#/definitions/v1beta1.PipelineResourceResult"
+ "$ref": "#/definitions/github.aaakk.us.kg.tektoncd.pipeline.pkg.result.RunResult"
},
"x-kubernetes-list-type": "atomic"
},
@@ -2642,6 +3005,10 @@
"description": "Description is a user-facing description of the task that may be used to populate a UI.",
"type": "string"
},
+ "displayName": {
+ "description": "DisplayName is a user-facing name of the task that may be used to populate a UI.",
+ "type": "string"
+ },
"params": {
"description": "Params is a list of input parameters required to run the task. Params must be supplied as inputs in TaskRuns unless they declare a default value.",
"type": "array",
@@ -2651,6 +3018,10 @@
},
"x-kubernetes-list-type": "atomic"
},
+ "resources": {
+ "description": "Resources is a list input and output resource to run the task Resources are represented in TaskRuns as bindings to instances of PipelineResources.\n\nDeprecated: Unused, preserved only for backwards compatibility",
+ "$ref": "#/definitions/v1beta1.TaskResources"
+ },
"results": {
"description": "Results are values that this Task can output",
"type": "array",
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_conversion.go
index 3fefd5cbf..19bbec3fd 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_conversion.go
@@ -78,6 +78,7 @@ func (ts *TaskSpec) ConvertTo(ctx context.Context, sink *v1.TaskSpec) error {
p.convertTo(ctx, &new)
sink.Params = append(sink.Params, new)
}
+ sink.DisplayName = ts.DisplayName
sink.Description = ts.Description
return nil
}
@@ -134,6 +135,7 @@ func (ts *TaskSpec) ConvertFrom(ctx context.Context, source *v1.TaskSpec) error
new.convertFrom(ctx, p)
ts.Params = append(ts.Params, new)
}
+ ts.DisplayName = source.DisplayName
ts.Description = source.Description
return nil
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_types.go
index 5d901c902..850929d01 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_types.go
@@ -24,18 +24,6 @@ import (
"knative.dev/pkg/kmeta"
)
-const (
- // TaskRunResultType default task run result value
- TaskRunResultType ResultType = 1
- // reserved: 2
- // was PipelineResourceResultType
-
- // InternalTektonResultType default internal tekton result value
- InternalTektonResultType = 3
- // UnknownResultType default unknown result type value
- UnknownResultType = 10
-)
-
// +genclient
// +genclient:noStatus
// +genreconciler:krshapedlogic=false
@@ -81,6 +69,14 @@ func (*Task) GetGroupVersionKind() schema.GroupVersionKind {
// TaskSpec defines the desired state of Task.
type TaskSpec struct {
+ // Resources is a list input and output resource to run the task
+ // Resources are represented in TaskRuns as bindings to instances of
+ // PipelineResources.
+ //
+ // Deprecated: Unused, preserved only for backwards compatibility
+ // +optional
+ Resources *TaskResources `json:"resources,omitempty"`
+
// Params is a list of input parameters required to run the task. Params
// must be supplied as inputs in TaskRuns unless they declare a default
// value.
@@ -88,6 +84,11 @@ type TaskSpec struct {
// +listType=atomic
Params ParamSpecs `json:"params,omitempty"`
+ // DisplayName is a user-facing name of the task that may be
+ // used to populate a UI.
+ // +optional
+ DisplayName string `json:"displayName,omitempty"`
+
// Description is a user-facing description of the task that may be
// used to populate a UI.
// +optional
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_validation.go
index 9a40ed05c..e76f34212 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/task_validation.go
@@ -99,6 +99,9 @@ func (ts *TaskSpec) Validate(ctx context.Context) (errs *apis.FieldError) {
errs = errs.Also(validateTaskContextVariables(ctx, ts.Steps))
errs = errs.Also(validateTaskResultsVariables(ctx, ts.Steps, ts.Results))
errs = errs.Also(validateResults(ctx, ts.Results).ViaField("results"))
+ if ts.Resources != nil {
+ errs = errs.Also(apis.ErrDisallowedFields("resources"))
+ }
return errs
}
@@ -381,6 +384,8 @@ func ValidateParameterVariables(ctx context.Context, steps []Step, params []Para
arrayParameterNames.Insert(p.Name)
case ParamTypeObject:
objectParamSpecs = append(objectParamSpecs, p)
+ case ParamTypeString:
+ fallthrough
default:
stringParameterNames.Insert(p.Name)
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_conversion.go
index 2816dc243..e8e695194 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_conversion.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
@@ -34,7 +50,7 @@ func (tr TaskRef) convertBundleToResolver(sink *v1.TaskRef) {
if tr.Bundle != "" {
sink.ResolverRef = v1.ResolverRef{
Resolver: "bundles",
- Params: []v1.Param{{
+ Params: v1.Params{{
Name: "bundle",
Value: v1.ParamValue{StringVal: tr.Bundle, Type: v1.ParamTypeString},
}, {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_types.go
index 54521a64a..f8f231cd9 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_types.go
@@ -20,9 +20,13 @@ package v1beta1
type TaskRef struct {
// Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
Name string `json:"name,omitempty"`
- // TaskKind indicates the kind of the task, namespaced or cluster scoped.
+ // TaskKind indicates the Kind of the Task:
+ // 1. Namespaced Task when Kind is set to "Task". If Kind is "", it defaults to "Task".
+ // 2. Cluster-Scoped Task when Kind is set to "ClusterTask"
+ // 3. Custom Task when Kind is non-empty and APIVersion is non-empty
Kind TaskKind `json:"kind,omitempty"`
// API version of the referent
+ // Note: A Task with non-empty APIVersion and Kind is considered a Custom Task
// +optional
APIVersion string `json:"apiVersion,omitempty"`
// Bundle url reference to a Tekton Bundle.
@@ -49,3 +53,10 @@ const (
// ClusterTaskKind indicates that task type has a cluster scope.
ClusterTaskKind TaskKind = "ClusterTask"
)
+
+// IsCustomTask checks whether the reference is to a Custom Task
+func (tr *TaskRef) IsCustomTask() bool {
+ // Note that if `apiVersion` is set to `"tekton.dev/v1beta1"` and `kind` is set to `"Task"`,
+ // the reference will be considered a Custom Task - https://github.com/tektoncd/pipeline/issues/6457
+ return tr != nil && tr.APIVersion != "" && tr.Kind != ""
+}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_validation.go
index 971a78498..029713992 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskref_validation.go
@@ -62,5 +62,5 @@ func (ref *TaskRef) Validate(ctx context.Context) (errs *apis.FieldError) {
}
}
}
- return
+ return //nolint:nakedret
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_conversion.go
index 726448ab1..b2745ec5c 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_conversion.go
@@ -44,9 +44,6 @@ func (tr *TaskRun) ConvertTo(ctx context.Context, to apis.Convertible) error {
if err := serializeTaskRunCloudEvents(&sink.ObjectMeta, &tr.Status); err != nil {
return err
}
- if err := serializeTaskRunResourcesResult(&sink.ObjectMeta, &tr.Status); err != nil {
- return err
- }
if err := tr.Status.ConvertTo(ctx, &sink.Status); err != nil {
return err
}
@@ -118,9 +115,6 @@ func (tr *TaskRun) ConvertFrom(ctx context.Context, from apis.Convertible) error
if err := deserializeTaskRunCloudEvents(&tr.ObjectMeta, &tr.Status); err != nil {
return err
}
- if err := deserializeTaskRunResourcesResult(&tr.ObjectMeta, &tr.Status); err != nil {
- return err
- }
if err := tr.Status.ConvertFrom(ctx, source.Status); err != nil {
return err
}
@@ -372,22 +366,3 @@ func deserializeTaskRunCloudEvents(meta *metav1.ObjectMeta, status *TaskRunStatu
}
return nil
}
-
-func serializeTaskRunResourcesResult(meta *metav1.ObjectMeta, status *TaskRunStatus) error {
- if status.ResourcesResult == nil {
- return nil
- }
- return version.SerializeToMetadata(meta, status.ResourcesResult, resourcesResultAnnotationKey)
-}
-
-func deserializeTaskRunResourcesResult(meta *metav1.ObjectMeta, status *TaskRunStatus) error {
- resourcesResult := []PipelineResourceResult{}
- err := version.DeserializeFromMetadata(meta, &resourcesResult, resourcesResultAnnotationKey)
- if err != nil {
- return err
- }
- if len(resourcesResult) != 0 {
- status.ResourcesResult = resourcesResult
- }
- return nil
-}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_types.go
index d7a7e1fef..27bb51432 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_types.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_types.go
@@ -40,7 +40,10 @@ type TaskRunSpec struct {
Debug *TaskRunDebug `json:"debug,omitempty"`
// +optional
// +listType=atomic
- Params []Param `json:"params,omitempty"`
+ Params Params `json:"params,omitempty"`
+ // Deprecated: Unused, preserved only for backwards compatibility
+ // +optional
+ Resources *TaskRunResources `json:"resources,omitempty"`
// +optional
ServiceAccountName string `json:"serviceAccountName"`
// no more than one of the TaskRef and TaskSpec may be specified.
@@ -247,8 +250,9 @@ type TaskRunStatusFields struct {
// +listType=atomic
RetriesStatus []TaskRunStatus `json:"retriesStatus,omitempty"`
- // Results from Resources built during the TaskRun. currently includes
- // the digest of build container images
+ // Results from Resources built during the TaskRun.
+ // This is tomb-stoned along with the removal of pipelineResources
+ // Deprecated: this field is not populated and is preserved only for backwards compatibility
// +optional
// +listType=atomic
ResourcesResult []PipelineResourceResult `json:"resourcesResult,omitempty"`
@@ -490,7 +494,7 @@ func (tr *TaskRun) GetTimeout(ctx context.Context) time.Duration {
// Use the platform default is no timeout is set
if tr.Spec.Timeout == nil {
defaultTimeout := time.Duration(config.FromContextOrDefaults(ctx).Defaults.DefaultTimeoutMinutes)
- return defaultTimeout * time.Minute
+ return defaultTimeout * time.Minute //nolint:durationcheck
}
return tr.Spec.Timeout.Duration
}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_validation.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_validation.go
index ee4d9d2fa..ef414612b 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_validation.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/taskrun_validation.go
@@ -109,6 +109,9 @@ func (ts *TaskRunSpec) Validate(ctx context.Context) (errs *apis.FieldError) {
if ts.PodTemplate != nil {
errs = errs.Also(validatePodTemplateEnv(ctx, *ts.PodTemplate))
}
+ if ts.Resources != nil {
+ errs = errs.Also(apis.ErrDisallowedFields("resources"))
+ }
return errs
}
@@ -237,7 +240,7 @@ func ValidateWorkspaceBindings(ctx context.Context, wb []WorkspaceBinding) (errs
}
// ValidateParameters makes sure the params for the Task are valid.
-func ValidateParameters(ctx context.Context, params []Param) (errs *apis.FieldError) {
+func ValidateParameters(ctx context.Context, params Params) (errs *apis.FieldError) {
var names []string
for _, p := range params {
if p.Value.Type == ParamTypeObject {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/workspace_conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/workspace_conversion.go
index 727e8e6f3..f7daa5cfb 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/workspace_conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/workspace_conversion.go
@@ -1,3 +1,19 @@
+/*
+Copyright 2023 The Tekton 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 v1beta1
import (
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go
index 8551c6749..fdd028257 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1/zz_generated.deepcopy.go
@@ -24,7 +24,9 @@ package v1beta1
import (
config "github.com/tektoncd/pipeline/pkg/apis/config"
pod "github.com/tektoncd/pipeline/pkg/apis/pipeline/pod"
+ v1alpha1 "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1"
runv1beta1 "github.com/tektoncd/pipeline/pkg/apis/run/v1beta1"
+ result "github.com/tektoncd/pipeline/pkg/result"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
@@ -300,7 +302,7 @@ func (in *CustomRunSpec) DeepCopyInto(out *CustomRunSpec) {
}
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -370,7 +372,7 @@ func (in *EmbeddedTask) DeepCopy() *EmbeddedTask {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *Matrix) DeepCopyInto(out *Matrix) {
+func (in *IncludeParams) DeepCopyInto(out *IncludeParams) {
*out = *in
if in.Params != nil {
in, out := &in.Params, &out.Params
@@ -379,9 +381,61 @@ func (in *Matrix) DeepCopyInto(out *Matrix) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
- if in.Include != nil {
- in, out := &in.Include, &out.Include
- *out = make([]MatrixInclude, len(*in))
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncludeParams.
+func (in *IncludeParams) DeepCopy() *IncludeParams {
+ if in == nil {
+ return nil
+ }
+ out := new(IncludeParams)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in IncludeParamsList) DeepCopyInto(out *IncludeParamsList) {
+ {
+ in := &in
+ *out = make(IncludeParamsList, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ return
+ }
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IncludeParamsList.
+func (in IncludeParamsList) DeepCopy() IncludeParamsList {
+ if in == nil {
+ return nil
+ }
+ out := new(IncludeParamsList)
+ in.DeepCopyInto(out)
+ return *out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *InternalTaskModifier) DeepCopyInto(out *InternalTaskModifier) {
+ *out = *in
+ if in.StepsToPrepend != nil {
+ in, out := &in.StepsToPrepend, &out.StepsToPrepend
+ *out = make([]Step, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.StepsToAppend != nil {
+ in, out := &in.StepsToAppend, &out.StepsToAppend
+ *out = make([]Step, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Volumes != nil {
+ in, out := &in.Volumes, &out.Volumes
+ *out = make([]corev1.Volume, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -389,18 +443,18 @@ func (in *Matrix) DeepCopyInto(out *Matrix) {
return
}
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matrix.
-func (in *Matrix) DeepCopy() *Matrix {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalTaskModifier.
+func (in *InternalTaskModifier) DeepCopy() *InternalTaskModifier {
if in == nil {
return nil
}
- out := new(Matrix)
+ out := new(InternalTaskModifier)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *MatrixInclude) DeepCopyInto(out *MatrixInclude) {
+func (in *Matrix) DeepCopyInto(out *Matrix) {
*out = *in
if in.Params != nil {
in, out := &in.Params, &out.Params
@@ -409,15 +463,22 @@ func (in *MatrixInclude) DeepCopyInto(out *MatrixInclude) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.Include != nil {
+ in, out := &in.Include, &out.Include
+ *out = make(IncludeParamsList, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
return
}
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatrixInclude.
-func (in *MatrixInclude) DeepCopy() *MatrixInclude {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matrix.
+func (in *Matrix) DeepCopy() *Matrix {
if in == nil {
return nil
}
- out := new(MatrixInclude)
+ out := new(Matrix)
in.DeepCopyInto(out)
return out
}
@@ -566,6 +627,22 @@ func (in *Pipeline) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PipelineDeclaredResource) DeepCopyInto(out *PipelineDeclaredResource) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineDeclaredResource.
+func (in *PipelineDeclaredResource) DeepCopy() *PipelineDeclaredResource {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineDeclaredResource)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PipelineList) DeepCopyInto(out *PipelineList) {
*out = *in
@@ -617,17 +694,43 @@ func (in *PipelineRef) DeepCopy() *PipelineRef {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *PipelineResourceResult) DeepCopyInto(out *PipelineResourceResult) {
+func (in *PipelineResourceBinding) DeepCopyInto(out *PipelineResourceBinding) {
+ *out = *in
+ if in.ResourceRef != nil {
+ in, out := &in.ResourceRef, &out.ResourceRef
+ *out = new(PipelineResourceRef)
+ **out = **in
+ }
+ if in.ResourceSpec != nil {
+ in, out := &in.ResourceSpec, &out.ResourceSpec
+ *out = new(v1alpha1.PipelineResourceSpec)
+ (*in).DeepCopyInto(*out)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceBinding.
+func (in *PipelineResourceBinding) DeepCopy() *PipelineResourceBinding {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineResourceBinding)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PipelineResourceRef) DeepCopyInto(out *PipelineResourceRef) {
*out = *in
return
}
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceResult.
-func (in *PipelineResourceResult) DeepCopy() *PipelineResourceResult {
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceRef.
+func (in *PipelineResourceRef) DeepCopy() *PipelineResourceRef {
if in == nil {
return nil
}
- out := new(PipelineResourceResult)
+ out := new(PipelineResourceRef)
in.DeepCopyInto(out)
return out
}
@@ -768,9 +871,16 @@ func (in *PipelineRunSpec) DeepCopyInto(out *PipelineRunSpec) {
*out = new(PipelineSpec)
(*in).DeepCopyInto(*out)
}
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]PipelineResourceBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -962,6 +1072,11 @@ func (in *PipelineRunTaskRunStatus) DeepCopy() *PipelineRunTaskRunStatus {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PipelineSpec) DeepCopyInto(out *PipelineSpec) {
*out = *in
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]PipelineDeclaredResource, len(*in))
+ copy(*out, *in)
+ }
if in.Tasks != nil {
in, out := &in.Tasks, &out.Tasks
*out = make([]PipelineTask, len(*in))
@@ -1033,6 +1148,11 @@ func (in *PipelineTask) DeepCopyInto(out *PipelineTask) {
*out = make([]string, len(*in))
copy(*out, *in)
}
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = new(PipelineTaskResources)
+ (*in).DeepCopyInto(*out)
+ }
if in.Params != nil {
in, out := &in.Params, &out.Params
*out = make(Params, len(*in))
@@ -1068,6 +1188,27 @@ func (in *PipelineTask) DeepCopy() *PipelineTask {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PipelineTaskInputResource) DeepCopyInto(out *PipelineTaskInputResource) {
+ *out = *in
+ if in.From != nil {
+ in, out := &in.From, &out.From
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskInputResource.
+func (in *PipelineTaskInputResource) DeepCopy() *PipelineTaskInputResource {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineTaskInputResource)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in PipelineTaskList) DeepCopyInto(out *PipelineTaskList) {
{
@@ -1120,6 +1261,22 @@ func (in *PipelineTaskMetadata) DeepCopy() *PipelineTaskMetadata {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PipelineTaskOutputResource) DeepCopyInto(out *PipelineTaskOutputResource) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskOutputResource.
+func (in *PipelineTaskOutputResource) DeepCopy() *PipelineTaskOutputResource {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineTaskOutputResource)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PipelineTaskParam) DeepCopyInto(out *PipelineTaskParam) {
*out = *in
@@ -1136,6 +1293,34 @@ func (in *PipelineTaskParam) DeepCopy() *PipelineTaskParam {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PipelineTaskResources) DeepCopyInto(out *PipelineTaskResources) {
+ *out = *in
+ if in.Inputs != nil {
+ in, out := &in.Inputs, &out.Inputs
+ *out = make([]PipelineTaskInputResource, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Outputs != nil {
+ in, out := &in.Outputs, &out.Outputs
+ *out = make([]PipelineTaskOutputResource, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineTaskResources.
+func (in *PipelineTaskResources) DeepCopy() *PipelineTaskResources {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineTaskResources)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PipelineTaskRun) DeepCopyInto(out *PipelineTaskRun) {
*out = *in
@@ -1237,6 +1422,11 @@ func (in *Provenance) DeepCopyInto(out *Provenance) {
*out = new(ConfigSource)
(*in).DeepCopyInto(*out)
}
+ if in.RefSource != nil {
+ in, out := &in.RefSource, &out.RefSource
+ *out = new(RefSource)
+ (*in).DeepCopyInto(*out)
+ }
if in.FeatureFlags != nil {
in, out := &in.FeatureFlags, &out.FeatureFlags
*out = new(config.FeatureFlags)
@@ -1255,12 +1445,35 @@ func (in *Provenance) DeepCopy() *Provenance {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RefSource) DeepCopyInto(out *RefSource) {
+ *out = *in
+ if in.Digest != nil {
+ in, out := &in.Digest, &out.Digest
+ *out = make(map[string]string, len(*in))
+ for key, val := range *in {
+ (*out)[key] = val
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RefSource.
+func (in *RefSource) DeepCopy() *RefSource {
+ if in == nil {
+ return nil
+ }
+ out := new(RefSource)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResolverRef) DeepCopyInto(out *ResolverRef) {
*out = *in
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
@@ -1718,6 +1931,71 @@ func (in *TaskRef) DeepCopy() *TaskRef {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TaskResource) DeepCopyInto(out *TaskResource) {
+ *out = *in
+ out.ResourceDeclaration = in.ResourceDeclaration
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResource.
+func (in *TaskResource) DeepCopy() *TaskResource {
+ if in == nil {
+ return nil
+ }
+ out := new(TaskResource)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TaskResourceBinding) DeepCopyInto(out *TaskResourceBinding) {
+ *out = *in
+ in.PipelineResourceBinding.DeepCopyInto(&out.PipelineResourceBinding)
+ if in.Paths != nil {
+ in, out := &in.Paths, &out.Paths
+ *out = make([]string, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResourceBinding.
+func (in *TaskResourceBinding) DeepCopy() *TaskResourceBinding {
+ if in == nil {
+ return nil
+ }
+ out := new(TaskResourceBinding)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TaskResources) DeepCopyInto(out *TaskResources) {
+ *out = *in
+ if in.Inputs != nil {
+ in, out := &in.Inputs, &out.Inputs
+ *out = make([]TaskResource, len(*in))
+ copy(*out, *in)
+ }
+ if in.Outputs != nil {
+ in, out := &in.Outputs, &out.Outputs
+ *out = make([]TaskResource, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskResources.
+func (in *TaskResources) DeepCopy() *TaskResources {
+ if in == nil {
+ return nil
+ }
+ out := new(TaskResources)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TaskResult) DeepCopyInto(out *TaskResult) {
*out = *in
@@ -1790,6 +2068,36 @@ func (in *TaskRunDebug) DeepCopy() *TaskRunDebug {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TaskRunInputs) DeepCopyInto(out *TaskRunInputs) {
+ *out = *in
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]TaskResourceBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Params != nil {
+ in, out := &in.Params, &out.Params
+ *out = make([]Param, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunInputs.
+func (in *TaskRunInputs) DeepCopy() *TaskRunInputs {
+ if in == nil {
+ return nil
+ }
+ out := new(TaskRunInputs)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TaskRunList) DeepCopyInto(out *TaskRunList) {
*out = *in
@@ -1823,6 +2131,59 @@ func (in *TaskRunList) DeepCopyObject() runtime.Object {
return nil
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TaskRunOutputs) DeepCopyInto(out *TaskRunOutputs) {
+ *out = *in
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = make([]TaskResourceBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunOutputs.
+func (in *TaskRunOutputs) DeepCopy() *TaskRunOutputs {
+ if in == nil {
+ return nil
+ }
+ out := new(TaskRunOutputs)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *TaskRunResources) DeepCopyInto(out *TaskRunResources) {
+ *out = *in
+ if in.Inputs != nil {
+ in, out := &in.Inputs, &out.Inputs
+ *out = make([]TaskResourceBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Outputs != nil {
+ in, out := &in.Outputs, &out.Outputs
+ *out = make([]TaskResourceBinding, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRunResources.
+func (in *TaskRunResources) DeepCopy() *TaskRunResources {
+ if in == nil {
+ return nil
+ }
+ out := new(TaskRunResources)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TaskRunResult) DeepCopyInto(out *TaskRunResult) {
*out = *in
@@ -1867,11 +2228,16 @@ func (in *TaskRunSpec) DeepCopyInto(out *TaskRunSpec) {
}
if in.Params != nil {
in, out := &in.Params, &out.Params
- *out = make([]Param, len(*in))
+ *out = make(Params, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = new(TaskRunResources)
+ (*in).DeepCopyInto(*out)
+ }
if in.TaskRef != nil {
in, out := &in.TaskRef, &out.TaskRef
*out = new(TaskRef)
@@ -1983,7 +2349,7 @@ func (in *TaskRunStatusFields) DeepCopyInto(out *TaskRunStatusFields) {
}
if in.ResourcesResult != nil {
in, out := &in.ResourcesResult, &out.ResourcesResult
- *out = make([]PipelineResourceResult, len(*in))
+ *out = make([]result.RunResult, len(*in))
copy(*out, *in)
}
if in.TaskRunResults != nil {
@@ -2050,6 +2416,11 @@ func (in *TaskRunStepOverride) DeepCopy() *TaskRunStepOverride {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TaskSpec) DeepCopyInto(out *TaskSpec) {
*out = *in
+ if in.Resources != nil {
+ in, out := &in.Resources, &out.Resources
+ *out = new(TaskResources)
+ (*in).DeepCopyInto(*out)
+ }
if in.Params != nil {
in, out := &in.Params, &out.Params
*out = make(ParamSpecs, len(*in))
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/doc.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/doc.go
new file mode 100644
index 000000000..65c3fe6b9
--- /dev/null
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/doc.go
@@ -0,0 +1,19 @@
+/*
+Copyright 2019 The Tekton 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 contains API Schema definitions for the pipeline v1alpha1 API group
+// +k8s:deepcopy-gen=package,register
+// +k8s:conversion-gen=github.com/tektoncd/pipeline/pkg/apis/resource
+// +k8s:defaulter-gen=TypeMeta
+// +groupName=tekton.dev
+package v1alpha1
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/pipeline_resource_types.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/pipeline_resource_types.go
new file mode 100644
index 000000000..6cde87cb8
--- /dev/null
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/pipeline_resource_types.go
@@ -0,0 +1,134 @@
+/*
+// Deprecated: Unused, preserved only for backwards compatibility
+Copyright 2019 The Tekton 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.
+*/
+
+// The contents of this package are deprecated and unused. Preserved for backwards compatibility.
+package v1alpha1
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+// PipelineResourceType represents the type of endpoint the pipelineResource is, so that the
+// controller will know this pipelineResource shouldx be fetched and optionally what
+// additional metatdata should be provided for it.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceType = string
+
+// +genclient
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+// +genclient:noStatus
+
+// PipelineResource describes a resource that is an input to or output from a
+// Task.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+// +k8s:openapi-gen=true
+type PipelineResource struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ObjectMeta `json:"metadata,omitempty"`
+
+ // Spec holds the desired state of the PipelineResource from the client
+ Spec PipelineResourceSpec `json:"spec,omitempty"`
+
+ // Status is used to communicate the observed state of the PipelineResource from
+ // the controller, but was unused as there is no controller for PipelineResource.
+ //
+ // +optional
+ Status *PipelineResourceStatus `json:"status,omitempty"`
+}
+
+// PipelineResourceStatus does not contain anything because PipelineResources on their own
+// do not have a status
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceStatus struct {
+}
+
+// PipelineResourceSpec defines an individual resources used in the pipeline.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceSpec struct {
+ // Description is a user-facing description of the resource that may be
+ // used to populate a UI.
+ // +optional
+ Description string `json:"description,omitempty"`
+ Type PipelineResourceType `json:"type"`
+ // +listType=atomic
+ Params []ResourceParam `json:"params"`
+ // Secrets to fetch to populate some of resource fields
+ // +optional
+ // +listType=atomic
+ SecretParams []SecretParam `json:"secrets,omitempty"`
+}
+
+// SecretParam indicates which secret can be used to populate a field of the resource
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type SecretParam struct {
+ FieldName string `json:"fieldName"`
+ SecretKey string `json:"secretKey"`
+ SecretName string `json:"secretName"`
+}
+
+// ResourceParam declares a string value to use for the parameter called Name, and is used in
+// the specific context of PipelineResources.
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type ResourceParam struct {
+ Name string `json:"name"`
+ Value string `json:"value"`
+}
+
+// ResourceDeclaration defines an input or output PipelineResource declared as a requirement
+// by another type such as a Task or Condition. The Name field will be used to refer to these
+// PipelineResources within the type's definition, and when provided as an Input, the Name will be the
+// path to the volume mounted containing this PipelineResource as an input (e.g.
+// an input Resource named `workspace` will be mounted at `/workspace`).
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type ResourceDeclaration struct {
+ // Name declares the name by which a resource is referenced in the
+ // definition. Resources may be referenced by name in the definition of a
+ // Task's steps.
+ Name string `json:"name"`
+ // Type is the type of this resource;
+ Type PipelineResourceType `json:"type"`
+ // Description is a user-facing description of the declared resource that may be
+ // used to populate a UI.
+ // +optional
+ Description string `json:"description,omitempty"`
+ // TargetPath is the path in workspace directory where the resource
+ // will be copied.
+ // +optional
+ TargetPath string `json:"targetPath,omitempty"`
+ // Optional declares the resource as optional.
+ // By default optional is set to false which makes a resource required.
+ // optional: true - the resource is considered optional
+ // optional: false - the resource is considered required (equivalent of not specifying it)
+ Optional bool `json:"optional,omitempty"`
+}
+
+// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
+
+// PipelineResourceList contains a list of PipelineResources
+//
+// Deprecated: Unused, preserved only for backwards compatibility
+type PipelineResourceList struct {
+ metav1.TypeMeta `json:",inline"`
+ // +optional
+ metav1.ListMeta `json:"metadata,omitempty"`
+ Items []PipelineResource `json:"items"`
+}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/register.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/register.go
new file mode 100644
index 000000000..67ccbd27b
--- /dev/null
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/register.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2019 The Tekton 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 (
+ "github.com/tektoncd/pipeline/pkg/apis/pipeline"
+ 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: pipeline.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 adds Build types to the scheme.
+ AddToScheme = schemeBuilder.AddToScheme
+)
+
+// Adds the list of known types to Scheme.
+func addKnownTypes(scheme *runtime.Scheme) error {
+ scheme.AddKnownTypes(SchemeGroupVersion,
+ &PipelineResource{},
+ &PipelineResourceList{},
+ )
+ metav1.AddToGroupVersion(scheme, SchemeGroupVersion)
+ return nil
+}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/zz_generated.deepcopy.go
new file mode 100644
index 000000000..5f6ff368b
--- /dev/null
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1/zz_generated.deepcopy.go
@@ -0,0 +1,181 @@
+//go:build !ignore_autogenerated
+// +build !ignore_autogenerated
+
+/*
+Copyright 2020 The Tekton 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 (
+ 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 *PipelineResource) DeepCopyInto(out *PipelineResource) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
+ in.Spec.DeepCopyInto(&out.Spec)
+ if in.Status != nil {
+ in, out := &in.Status, &out.Status
+ *out = new(PipelineResourceStatus)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResource.
+func (in *PipelineResource) DeepCopy() *PipelineResource {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineResource)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *PipelineResource) 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 *PipelineResourceList) DeepCopyInto(out *PipelineResourceList) {
+ *out = *in
+ out.TypeMeta = in.TypeMeta
+ in.ListMeta.DeepCopyInto(&out.ListMeta)
+ if in.Items != nil {
+ in, out := &in.Items, &out.Items
+ *out = make([]PipelineResource, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceList.
+func (in *PipelineResourceList) DeepCopy() *PipelineResourceList {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineResourceList)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
+func (in *PipelineResourceList) 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 *PipelineResourceSpec) DeepCopyInto(out *PipelineResourceSpec) {
+ *out = *in
+ if in.Params != nil {
+ in, out := &in.Params, &out.Params
+ *out = make([]ResourceParam, len(*in))
+ copy(*out, *in)
+ }
+ if in.SecretParams != nil {
+ in, out := &in.SecretParams, &out.SecretParams
+ *out = make([]SecretParam, len(*in))
+ copy(*out, *in)
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceSpec.
+func (in *PipelineResourceSpec) DeepCopy() *PipelineResourceSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineResourceSpec)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PipelineResourceStatus) DeepCopyInto(out *PipelineResourceStatus) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PipelineResourceStatus.
+func (in *PipelineResourceStatus) DeepCopy() *PipelineResourceStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(PipelineResourceStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceDeclaration) DeepCopyInto(out *ResourceDeclaration) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceDeclaration.
+func (in *ResourceDeclaration) DeepCopy() *ResourceDeclaration {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceDeclaration)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ResourceParam) DeepCopyInto(out *ResourceParam) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceParam.
+func (in *ResourceParam) DeepCopy() *ResourceParam {
+ if in == nil {
+ return nil
+ }
+ out := new(ResourceParam)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *SecretParam) DeepCopyInto(out *SecretParam) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretParam.
+func (in *SecretParam) DeepCopy() *SecretParam {
+ if in == nil {
+ return nil
+ }
+ out := new(SecretParam)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/apis/version/conversion.go b/vendor/github.com/tektoncd/pipeline/pkg/apis/version/conversion.go
index f32ca9a94..1d509cead 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/apis/version/conversion.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/apis/version/conversion.go
@@ -28,7 +28,7 @@ import (
func SerializeToMetadata(meta *metav1.ObjectMeta, field interface{}, key string) error {
bytes, err := json.Marshal(field)
if err != nil {
- return fmt.Errorf("error serializing field: %s", err)
+ return fmt.Errorf("error serializing field: %w", err)
}
if meta.Annotations == nil {
meta.Annotations = make(map[string]string)
@@ -46,7 +46,7 @@ func DeserializeFromMetadata(meta *metav1.ObjectMeta, to interface{}, key string
}
if str, ok := meta.Annotations[key]; ok {
if err := json.Unmarshal([]byte(str), to); err != nil {
- return fmt.Errorf("error deserializing key %s from metadata: %s", key, err)
+ return fmt.Errorf("error deserializing key %s from metadata: %w", key, err)
}
delete(meta.Annotations, key)
if len(meta.Annotations) == 0 {
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/result/result.go b/vendor/github.com/tektoncd/pipeline/pkg/result/result.go
new file mode 100644
index 000000000..cfcbc3e90
--- /dev/null
+++ b/vendor/github.com/tektoncd/pipeline/pkg/result/result.go
@@ -0,0 +1,92 @@
+/*
+Copyright 2023 The Tekton 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 result
+
+import (
+ "encoding/json"
+ "fmt"
+
+ "github.com/hashicorp/go-multierror"
+)
+
+const (
+ // TaskRunResultType default task run result value
+ TaskRunResultType ResultType = 1
+ // reserved: 2
+ // was RunResultType
+
+ // InternalTektonResultType default internal tekton result value
+ InternalTektonResultType = 3
+ // UnknownResultType default unknown result type value
+ UnknownResultType = 10
+)
+
+// RunResult is used to write key/value pairs to TaskRun pod termination messages.
+// The key/value pairs may come from the entrypoint binary, or represent a TaskRunResult.
+// If they represent a TaskRunResult, the key is the name of the result and the value is the
+// JSON-serialized value of the result.
+type RunResult struct {
+ Key string `json:"key"`
+ Value string `json:"value"`
+ // ResourceName may be used in tests, but it is not populated in termination messages.
+ // It is preserved here for backwards compatibility and will not be ported to v1.
+ ResourceName string `json:"resourceName,omitempty"`
+ ResultType ResultType `json:"type,omitempty"`
+}
+
+// ResultType used to find out whether a RunResult is from a task result or not
+// Note that ResultsType is another type which is used to define the data type
+// (e.g. string, array, etc) we used for Results
+//
+//nolint:revive // revive complains about stutter of `result.ResultType`.
+type ResultType int
+
+// UnmarshalJSON unmarshals either an int or a string into a ResultType. String
+// ResultTypes were removed because they made JSON messages bigger, which in
+// turn limited the amount of space in termination messages for task results. String
+// support is maintained for backwards compatibility - the Pipelines controller could
+// be stopped midway through TaskRun execution, updated with support for int in place
+// of string, and then fail the running TaskRun because it doesn't know how to interpret
+// the string value that the TaskRun's entrypoint will emit when it completes.
+func (r *ResultType) UnmarshalJSON(data []byte) error {
+ var asInt int
+ var intErr error
+
+ if err := json.Unmarshal(data, &asInt); err != nil {
+ intErr = err
+ } else {
+ *r = ResultType(asInt)
+ return nil
+ }
+
+ var asString string
+
+ if err := json.Unmarshal(data, &asString); err != nil {
+ return fmt.Errorf("unsupported value type, neither int nor string: %w", multierror.Append(intErr, err).ErrorOrNil())
+ }
+
+ switch asString {
+ case "TaskRunResult":
+ *r = TaskRunResultType
+ case "InternalTektonResult":
+ *r = InternalTektonResultType
+ default:
+ *r = UnknownResultType
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/tektoncd/pipeline/pkg/substitution/substitution.go b/vendor/github.com/tektoncd/pipeline/pkg/substitution/substitution.go
index a2611061c..cb93bc8e7 100644
--- a/vendor/github.com/tektoncd/pipeline/pkg/substitution/substitution.go
+++ b/vendor/github.com/tektoncd/pipeline/pkg/substitution/substitution.go
@@ -276,7 +276,7 @@ func extractEntireVariablesFromString(s, prefix string) ([]string, error) {
pattern := fmt.Sprintf(braceMatchingRegex, prefix, parameterSubstitution, parameterSubstitution, parameterSubstitution)
re, err := regexp.Compile(pattern)
if err != nil {
- return nil, fmt.Errorf("Fail to parse regex pattern: %v", err)
+ return nil, fmt.Errorf("Fail to parse regex pattern: %w", err)
}
matches := re.FindAllStringSubmatch(s, -1)
diff --git a/vendor/github.com/xanzy/go-gitlab/.gitignore b/vendor/github.com/xanzy/go-gitlab/.gitignore
index 78af853b3..76a9f4df7 100644
--- a/vendor/github.com/xanzy/go-gitlab/.gitignore
+++ b/vendor/github.com/xanzy/go-gitlab/.gitignore
@@ -28,3 +28,6 @@ _testmain.go
*.iml
*.swp
*.swo
+
+# vendor
+vendor
diff --git a/vendor/github.com/xanzy/go-gitlab/epics.go b/vendor/github.com/xanzy/go-gitlab/epics.go
index 27744b0c1..cff3354b1 100644
--- a/vendor/github.com/xanzy/go-gitlab/epics.go
+++ b/vendor/github.com/xanzy/go-gitlab/epics.go
@@ -51,6 +51,7 @@ type Epic struct {
Title string `json:"title"`
Description string `json:"description"`
State string `json:"state"`
+ Confidential bool `json:"confidential"`
WebURL string `json:"web_url"`
Author *EpicAuthor `json:"author"`
StartDate *ISOTime `json:"start_date"`
diff --git a/vendor/github.com/xanzy/go-gitlab/event_parsing.go b/vendor/github.com/xanzy/go-gitlab/event_parsing.go
index 3a6868aeb..3943abadb 100644
--- a/vendor/github.com/xanzy/go-gitlab/event_parsing.go
+++ b/vendor/github.com/xanzy/go-gitlab/event_parsing.go
@@ -31,6 +31,7 @@ const (
EventConfidentialNote EventType = "Confidential Note Hook"
EventTypeBuild EventType = "Build Hook"
EventTypeDeployment EventType = "Deployment Hook"
+ EventTypeFeatureFlag EventType = "Feature Flag Hook"
EventTypeIssue EventType = "Issue Hook"
EventTypeJob EventType = "Job Hook"
EventTypeMember EventType = "Member Hook"
@@ -212,6 +213,8 @@ func ParseWebhook(eventType EventType, payload []byte) (event interface{}, err e
event = &BuildEvent{}
case EventTypeDeployment:
event = &DeploymentEvent{}
+ case EventTypeFeatureFlag:
+ event = &FeatureFlagEvent{}
case EventTypeIssue, EventConfidentialIssue:
event = &IssueEvent{}
case EventTypeJob:
diff --git a/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go b/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go
index 8d6827997..b3eebf944 100644
--- a/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go
+++ b/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go
@@ -80,9 +80,11 @@ type BuildEvent struct {
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-a-commit
type CommitCommentEvent struct {
ObjectKind string `json:"object_kind"`
+ EventType string `json:"event_type"`
User *User `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
+ ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
AvatarURL string `json:"avatar_url"`
@@ -112,18 +114,9 @@ type CommitCommentEvent struct {
CommitID string `json:"commit_id"`
NoteableID int `json:"noteable_id"`
System bool `json:"system"`
- StDiff struct {
- Diff string `json:"diff"`
- NewPath string `json:"new_path"`
- OldPath string `json:"old_path"`
- AMode string `json:"a_mode"`
- BMode string `json:"b_mode"`
- NewFile bool `json:"new_file"`
- RenamedFile bool `json:"renamed_file"`
- DeletedFile bool `json:"deleted_file"`
- } `json:"st_diff"`
- Description string `json:"description"`
- URL string `json:"url"`
+ StDiff *Diff `json:"st_diff"`
+ Description string `json:"description"`
+ URL string `json:"url"`
} `json:"object_attributes"`
Commit *struct {
ID string `json:"id"`
@@ -143,12 +136,16 @@ type CommitCommentEvent struct {
// GitLab API docs:
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#deployment-events
type DeploymentEvent struct {
- ObjectKind string `json:"object_kind"`
- Status string `json:"status"`
- DeployableID int `json:"deployable_id"`
- DeployableURL string `json:"deployable_url"`
- Environment string `json:"environment"`
- Project struct {
+ ObjectKind string `json:"object_kind"`
+ Status string `json:"status"`
+ StatusChangedAt string `json:"status_changed_at"`
+ DeploymentID int `json:"deployment_id"`
+ DeployableID int `json:"deployable_id"`
+ DeployableURL string `json:"deployable_url"`
+ Environment string `json:"environment"`
+ EnvironmentSlug string `json:"environment_slug"`
+ EnvironmentExternalURL string `json:"environment_external_url"`
+ Project struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
@@ -174,12 +171,47 @@ type DeploymentEvent struct {
CommitTitle string `json:"commit_title"`
}
+// FeatureFlagEvent represents a feature flag event
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#feature-flag-events
+type FeatureFlagEvent struct {
+ ObjectKind string `json:"object_kind"`
+ Project struct {
+ ID int `json:"id"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ WebURL string `json:"web_url"`
+ AvatarURL *string `json:"avatar_url"`
+ GitSSHURL string `json:"git_ssh_url"`
+ GitHTTPURL string `json:"git_http_url"`
+ Namespace string `json:"namespace"`
+ VisibilityLevel int `json:"visibility_level"`
+ PathWithNamespace string `json:"path_with_namespace"`
+ DefaultBranch string `json:"default_branch"`
+ CIConfigPath string `json:"ci_config_path"`
+ Homepage string `json:"homepage"`
+ URL string `json:"url"`
+ SSHURL string `json:"ssh_url"`
+ HTTPURL string `json:"http_url"`
+ } `json:"project"`
+ User *EventUser `json:"user"`
+ UserURL string `json:"user_url"`
+ ObjectAttributes struct {
+ ID int `json:"id"`
+ Name string `json:"name"`
+ Description string `json:"description"`
+ Active bool `json:"active"`
+ } `json:"object_attributes"`
+}
+
// IssueCommentEvent represents a comment on an issue event.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-an-issue
type IssueCommentEvent struct {
ObjectKind string `json:"object_kind"`
+ EventType string `json:"event_type"`
User *User `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
@@ -223,6 +255,8 @@ type IssueCommentEvent struct {
ProjectID int `json:"project_id"`
MilestoneID int `json:"milestone_id"`
AuthorID int `json:"author_id"`
+ Position int `json:"position"`
+ BranchName string `json:"branch_name"`
Description string `json:"description"`
State string `json:"state"`
Title string `json:"title"`
@@ -251,6 +285,7 @@ type IssueCommentEvent struct {
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#issue-events
type IssueEvent struct {
ObjectKind string `json:"object_kind"`
+ EventType string `json:"event_type"`
User *EventUser `json:"user"`
Project struct {
ID int `json:"id"`
@@ -271,21 +306,45 @@ type IssueEvent struct {
} `json:"project"`
Repository *Repository `json:"repository"`
ObjectAttributes struct {
- ID int `json:"id"`
- Title string `json:"title"`
- AssigneeID int `json:"assignee_id"`
- AuthorID int `json:"author_id"`
- ProjectID int `json:"project_id"`
- CreatedAt string `json:"created_at"` // Should be *time.Time (see Gitlab issue #21468)
- UpdatedAt string `json:"updated_at"` // Should be *time.Time (see Gitlab issue #21468)
- Position int `json:"position"`
- BranchName string `json:"branch_name"`
- Description string `json:"description"`
- MilestoneID int `json:"milestone_id"`
- State string `json:"state"`
- IID int `json:"iid"`
- URL string `json:"url"`
- Action string `json:"action"`
+ ID int `json:"id"`
+ Title string `json:"title"`
+ AssigneeIDs []int `json:"assignee_ids"`
+ AssigneeID int `json:"assignee_id"`
+ AuthorID int `json:"author_id"`
+ ProjectID int `json:"project_id"`
+ CreatedAt string `json:"created_at"` // Should be *time.Time (see Gitlab issue #21468)
+ UpdatedAt string `json:"updated_at"` // Should be *time.Time (see Gitlab issue #21468)
+ UpdatedByID int `json:"updated_by_id"`
+ LastEditedAt string `json:"last_edited_at"`
+ LastEditedByID int `json:"last_edited_by_id"`
+ RelativePosition int `json:"relative_position"`
+ BranchName string `json:"branch_name"`
+ Description string `json:"description"`
+ MilestoneID int `json:"milestone_id"`
+ StateID StateID `json:"state_id"`
+ Confidential bool `json:"confidential"`
+ DiscussionLocked bool `json:"discussion_locked"`
+ DueDate *ISOTime `json:"due_date"`
+ MovedToID int `json:"moved_to_id"`
+ DuplicatedToID int `json:"duplicated_to_id"`
+ TimeEstimate int `json:"time_estimate"`
+ TotalTimeSpent int `json:"total_time_spent"`
+ TimeChange int `json:"time_change"`
+ HumanTotalTimeSpent string `json:"human_total_time_spent"`
+ HumanTimeEstimate string `json:"human_time_estimate"`
+ HumanTimeChange string `json:"human_time_change"`
+ Weight string `json:"weight"`
+ IID int `json:"iid"`
+ URL string `json:"url"`
+ State string `json:"state"`
+ Action string `json:"action"`
+ Severity string `json:"severity"`
+ EscalationStatus string `json:"escalation_status"`
+ EscalationPolicy struct {
+ ID int `json:"id"`
+ Name string `json:"name"`
+ } `json:"escalation_policy"`
+ Labels []*EventLabel `json:"labels"`
} `json:"object_attributes"`
Assignee *EventUser `json:"assignee"`
Assignees *[]EventUser `json:"assignees"`
@@ -335,27 +394,28 @@ type IssueEvent struct {
// GitLab API docs:
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#job-events
type JobEvent struct {
- ObjectKind string `json:"object_kind"`
- Ref string `json:"ref"`
- Tag bool `json:"tag"`
- BeforeSHA string `json:"before_sha"`
- SHA string `json:"sha"`
- BuildID int `json:"build_id"`
- BuildName string `json:"build_name"`
- BuildStage string `json:"build_stage"`
- BuildStatus string `json:"build_status"`
- BuildCreatedAt string `json:"build_created_at"`
- BuildStartedAt string `json:"build_started_at"`
- BuildFinishedAt string `json:"build_finished_at"`
- BuildDuration float64 `json:"build_duration"`
- BuildAllowFailure bool `json:"build_allow_failure"`
- BuildFailureReason string `json:"build_failure_reason"`
- RetriesCount int `json:"retries_count"`
- PipelineID int `json:"pipeline_id"`
- ProjectID int `json:"project_id"`
- ProjectName string `json:"project_name"`
- User *EventUser `json:"user"`
- Commit struct {
+ ObjectKind string `json:"object_kind"`
+ Ref string `json:"ref"`
+ Tag bool `json:"tag"`
+ BeforeSHA string `json:"before_sha"`
+ SHA string `json:"sha"`
+ BuildID int `json:"build_id"`
+ BuildName string `json:"build_name"`
+ BuildStage string `json:"build_stage"`
+ BuildStatus string `json:"build_status"`
+ BuildCreatedAt string `json:"build_created_at"`
+ BuildStartedAt string `json:"build_started_at"`
+ BuildFinishedAt string `json:"build_finished_at"`
+ BuildDuration float64 `json:"build_duration"`
+ BuildQueuedDuration float64 `json:"build_queued_duration"`
+ BuildAllowFailure bool `json:"build_allow_failure"`
+ BuildFailureReason string `json:"build_failure_reason"`
+ RetriesCount int `json:"retries_count"`
+ PipelineID int `json:"pipeline_id"`
+ ProjectID int `json:"project_id"`
+ ProjectName string `json:"project_name"`
+ User *EventUser `json:"user"`
+ Commit struct {
ID int `json:"id"`
Name string `json:"name"`
SHA string `json:"sha"`
@@ -370,11 +430,14 @@ type JobEvent struct {
} `json:"commit"`
Repository *Repository `json:"repository"`
Runner struct {
- ID int `json:"id"`
- Active bool `json:"active"`
- Shared bool `json:"is_shared"`
- Description string `json:"description"`
+ ID int `json:"id"`
+ Active bool `json:"active"`
+ RunnerType string `json:"runner_type"`
+ IsShared bool `json:"is_shared"`
+ Description string `json:"description"`
+ Tags []string `json:"tags"`
} `json:"runner"`
+ Environment string `json:"environment"`
}
// MemberEvent represents a member event.
@@ -403,9 +466,11 @@ type MemberEvent struct {
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-a-merge-request
type MergeCommentEvent struct {
ObjectKind string `json:"object_kind"`
+ EventType string `json:"event_type"`
User *EventUser `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
+ ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
AvatarURL string `json:"avatar_url"`
@@ -449,41 +514,42 @@ type MergeCommentEvent struct {
} `json:"object_attributes"`
Repository *Repository `json:"repository"`
MergeRequest struct {
- ID int `json:"id"`
- TargetBranch string `json:"target_branch"`
- SourceBranch string `json:"source_branch"`
- SourceProjectID int `json:"source_project_id"`
- AuthorID int `json:"author_id"`
- AssigneeID int `json:"assignee_id"`
- AssigneeIDs []int `json:"assignee_ids"`
- Title string `json:"title"`
- CreatedAt string `json:"created_at"`
- UpdatedAt string `json:"updated_at"`
- MilestoneID int `json:"milestone_id"`
- State string `json:"state"`
- MergeStatus string `json:"merge_status"`
- TargetProjectID int `json:"target_project_id"`
- IID int `json:"iid"`
- Description string `json:"description"`
- Position int `json:"position"`
- LockedAt string `json:"locked_at"`
- UpdatedByID int `json:"updated_by_id"`
- MergeError string `json:"merge_error"`
- MergeParams *MergeParams `json:"merge_params"`
- MergeWhenPipelineSucceeds bool `json:"merge_when_pipeline_succeeds"`
- MergeUserID int `json:"merge_user_id"`
- MergeCommitSHA string `json:"merge_commit_sha"`
- DeletedAt string `json:"deleted_at"`
- InProgressMergeCommitSHA string `json:"in_progress_merge_commit_sha"`
- LockVersion int `json:"lock_version"`
- ApprovalsBeforeMerge string `json:"approvals_before_merge"`
- RebaseCommitSHA string `json:"rebase_commit_sha"`
- TimeEstimate int `json:"time_estimate"`
- Squash bool `json:"squash"`
- LastEditedAt string `json:"last_edited_at"`
- LastEditedByID int `json:"last_edited_by_id"`
- Source *Repository `json:"source"`
- Target *Repository `json:"target"`
+ ID int `json:"id"`
+ TargetBranch string `json:"target_branch"`
+ SourceBranch string `json:"source_branch"`
+ SourceProjectID int `json:"source_project_id"`
+ AuthorID int `json:"author_id"`
+ AssigneeID int `json:"assignee_id"`
+ AssigneeIDs []int `json:"assignee_ids"`
+ Title string `json:"title"`
+ CreatedAt string `json:"created_at"`
+ UpdatedAt string `json:"updated_at"`
+ MilestoneID int `json:"milestone_id"`
+ State string `json:"state"`
+ MergeStatus string `json:"merge_status"`
+ TargetProjectID int `json:"target_project_id"`
+ IID int `json:"iid"`
+ Description string `json:"description"`
+ Position int `json:"position"`
+ Labels []*EventLabel `json:"labels"`
+ LockedAt string `json:"locked_at"`
+ UpdatedByID int `json:"updated_by_id"`
+ MergeError string `json:"merge_error"`
+ MergeParams *MergeParams `json:"merge_params"`
+ MergeWhenPipelineSucceeds bool `json:"merge_when_pipeline_succeeds"`
+ MergeUserID int `json:"merge_user_id"`
+ MergeCommitSHA string `json:"merge_commit_sha"`
+ DeletedAt string `json:"deleted_at"`
+ InProgressMergeCommitSHA string `json:"in_progress_merge_commit_sha"`
+ LockVersion int `json:"lock_version"`
+ ApprovalsBeforeMerge string `json:"approvals_before_merge"`
+ RebaseCommitSHA string `json:"rebase_commit_sha"`
+ TimeEstimate int `json:"time_estimate"`
+ Squash bool `json:"squash"`
+ LastEditedAt string `json:"last_edited_at"`
+ LastEditedByID int `json:"last_edited_by_id"`
+ Source *Repository `json:"source"`
+ Target *Repository `json:"target"`
LastCommit struct {
ID string `json:"id"`
Title string `json:"title"`
@@ -495,9 +561,11 @@ type MergeCommentEvent struct {
Email string `json:"email"`
} `json:"author"`
} `json:"last_commit"`
- WorkInProgress bool `json:"work_in_progress"`
- TotalTimeSpent int `json:"total_time_spent"`
- HeadPipelineID int `json:"head_pipeline_id"`
+ WorkInProgress bool `json:"work_in_progress"`
+ TotalTimeSpent int `json:"total_time_spent"`
+ HeadPipelineID int `json:"head_pipeline_id"`
+ Assignee *EventUser `json:"assignee"`
+ DetailedMergeStatus string `json:"detailed_merge_status"`
} `json:"merge_request"`
}
@@ -572,12 +640,15 @@ type MergeEvent struct {
Email string `json:"email"`
} `json:"author"`
} `json:"last_commit"`
- BlockingDiscussionsResolved bool `json:"blocking_discussions_resolved"`
- WorkInProgress bool `json:"work_in_progress"`
- URL string `json:"url"`
- Action string `json:"action"`
- OldRev string `json:"oldrev"`
- Assignee *EventUser `json:"assignee"`
+ BlockingDiscussionsResolved bool `json:"blocking_discussions_resolved"`
+ WorkInProgress bool `json:"work_in_progress"`
+ FirstContribution bool `json:"first_contribution"`
+ URL string `json:"url"`
+ Labels []*EventLabel `json:"labels"`
+ Action string `json:"action"`
+ DetailedMergeStatus string `json:"detailed_merge_status"`
+ OldRev string `json:"oldrev"`
+ Assignee *EventUser `json:"assignee"`
} `json:"object_attributes"`
Repository *Repository `json:"repository"`
Assignee *EventUser `json:"assignee"`
@@ -714,16 +785,17 @@ type PipelineEvent struct {
} `json:"variables"`
} `json:"object_attributes"`
MergeRequest struct {
- ID int `json:"id"`
- IID int `json:"iid"`
- Title string `json:"title"`
- SourceBranch string `json:"source_branch"`
- SourceProjectID int `json:"source_project_id"`
- TargetBranch string `json:"target_branch"`
- TargetProjectID int `json:"target_project_id"`
- State string `json:"state"`
- MergeRequestStatus string `json:"merge_status"`
- URL string `json:"url"`
+ ID int `json:"id"`
+ IID int `json:"iid"`
+ Title string `json:"title"`
+ SourceBranch string `json:"source_branch"`
+ SourceProjectID int `json:"source_project_id"`
+ TargetBranch string `json:"target_branch"`
+ TargetProjectID int `json:"target_project_id"`
+ State string `json:"state"`
+ MergeRequestStatus string `json:"merge_status"`
+ DetailedMergeStatus string `json:"detailed_merge_status"`
+ URL string `json:"url"`
} `json:"merge_request"`
User *EventUser `json:"user"`
Project struct {
@@ -754,6 +826,15 @@ type PipelineEvent struct {
Email string `json:"email"`
} `json:"author"`
} `json:"commit"`
+ SourcePipline struct {
+ Project struct {
+ ID int `json:"id"`
+ WebURL string `json:"web_url"`
+ PathWithNamespace string `json:"path_with_namespace"`
+ } `json:"project"`
+ PipelineID int `json:"pipeline_id"`
+ JobID int `json:"job_id"`
+ } `json:"source_pipeline"`
Builds []struct {
ID int `json:"id"`
Stage string `json:"stage"`
@@ -795,6 +876,7 @@ type PipelineEvent struct {
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#push-events
type PushEvent struct {
ObjectKind string `json:"object_kind"`
+ EventName string `json:"event_name"`
Before string `json:"before"`
After string `json:"after"`
Ref string `json:"ref"`
@@ -806,6 +888,7 @@ type PushEvent struct {
UserAvatar string `json:"user_avatar"`
ProjectID int `json:"project_id"`
Project struct {
+ ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
AvatarURL string `json:"avatar_url"`
@@ -904,6 +987,7 @@ type ReleaseEvent struct {
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-a-code-snippet
type SnippetCommentEvent struct {
ObjectKind string `json:"object_kind"`
+ EventType string `json:"event_type"`
User *EventUser `json:"user"`
ProjectID int `json:"project_id"`
Project struct {
@@ -982,6 +1066,7 @@ type SubGroupEvent struct {
// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#tag-events
type TagEvent struct {
ObjectKind string `json:"object_kind"`
+ EventName string `json:"event_name"`
Before string `json:"before"`
After string `json:"after"`
Ref string `json:"ref"`
@@ -994,6 +1079,7 @@ type TagEvent struct {
ProjectID int `json:"project_id"`
Message string `json:"message"`
Project struct {
+ ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
AvatarURL string `json:"avatar_url"`
@@ -1065,6 +1151,7 @@ type WikiPageEvent struct {
Slug string `json:"slug"`
URL string `json:"url"`
Action string `json:"action"`
+ DiffURL string `json:"diff_url"`
} `json:"object_attributes"`
}
diff --git a/vendor/github.com/xanzy/go-gitlab/events.go b/vendor/github.com/xanzy/go-gitlab/events.go
index cdbee0d46..fb77219db 100644
--- a/vendor/github.com/xanzy/go-gitlab/events.go
+++ b/vendor/github.com/xanzy/go-gitlab/events.go
@@ -123,10 +123,86 @@ func (s *EventsService) ListCurrentUserContributionEvents(opt *ListContributionE
return cs, resp, err
}
-// ListProjectVisibleEvents gets a list of visible events for a particular project
+// ProjectEvent represents a GitLab project event.
//
-// GitLab API docs: https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events
-func (s *EventsService) ListProjectVisibleEvents(pid interface{}, opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error) {
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events
+type ProjectEvent struct {
+ ID int `json:"id"`
+ Title string `json:"title"`
+ ProjectID int `json:"project_id"`
+ ActionName string `json:"action_name"`
+ TargetID int `json:"target_id"`
+ TargetIID int `json:"target_iid"`
+ TargetType string `json:"target_type"`
+ AuthorID int `json:"author_id"`
+ TargetTitle string `json:"target_title"`
+ CreatedAt string `json:"created_at"`
+ Author struct {
+ Name string `json:"name"`
+ Username string `json:"username"`
+ ID int `json:"id"`
+ State string `json:"state"`
+ AvatarURL string `json:"avatar_url"`
+ WebURL string `json:"web_url"`
+ } `json:"author"`
+ AuthorUsername string `json:"author_username"`
+ Data struct {
+ Before string `json:"before"`
+ After string `json:"after"`
+ Ref string `json:"ref"`
+ UserID int `json:"user_id"`
+ UserName string `json:"user_name"`
+ Repository *Repository `json:"repository"`
+ Commits []*Commit `json:"commits"`
+ TotalCommitsCount int `json:"total_commits_count"`
+ } `json:"data"`
+ Note struct {
+ ID int `json:"id"`
+ Body string `json:"body"`
+ Attachment string `json:"attachment"`
+ Author struct {
+ ID int `json:"id"`
+ Username string `json:"username"`
+ Email string `json:"email"`
+ Name string `json:"name"`
+ State string `json:"state"`
+ AvatarURL string `json:"avatar_url"`
+ WebURL string `json:"web_url"`
+ } `json:"author"`
+ CreatedAt *time.Time `json:"created_at"`
+ System bool `json:"system"`
+ NoteableID int `json:"noteable_id"`
+ NoteableType string `json:"noteable_type"`
+ NoteableIID int `json:"noteable_iid"`
+ } `json:"note"`
+ PushData struct {
+ CommitCount int `json:"commit_count"`
+ Action string `json:"action"`
+ RefType string `json:"ref_type"`
+ CommitFrom string `json:"commit_from"`
+ CommitTo string `json:"commit_to"`
+ Ref string `json:"ref"`
+ CommitTitle string `json:"commit_title"`
+ } `json:"push_data"`
+}
+
+func (s ProjectEvent) String() string {
+ return Stringify(s)
+}
+
+// ListProjectVisibleEventsOptions represents the available
+// ListProjectVisibleEvents() options.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events
+type ListProjectVisibleEventsOptions ListOptions
+
+// ListProjectVisibleEvents gets the events for the specified project.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events
+func (s *EventsService) ListProjectVisibleEvents(pid interface{}, opt *ListProjectVisibleEventsOptions, options ...RequestOptionFunc) ([]*ProjectEvent, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
@@ -138,11 +214,11 @@ func (s *EventsService) ListProjectVisibleEvents(pid interface{}, opt *ListContr
return nil, nil, err
}
- var cs []*ContributionEvent
- resp, err := s.client.Do(req, &cs)
+ var p []*ProjectEvent
+ resp, err := s.client.Do(req, &p)
if err != nil {
return nil, resp, err
}
- return cs, resp, err
+ return p, resp, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/gitlab.go b/vendor/github.com/xanzy/go-gitlab/gitlab.go
index 349bc6ab2..81cf3ff9e 100644
--- a/vendor/github.com/xanzy/go-gitlab/gitlab.go
+++ b/vendor/github.com/xanzy/go-gitlab/gitlab.go
@@ -182,6 +182,7 @@ type Client struct {
ProjectMembers *ProjectMembersService
ProjectMirrors *ProjectMirrorService
ProjectSnippets *ProjectSnippetsService
+ ProjectTemplates *ProjectTemplatesService
ProjectVariables *ProjectVariablesService
ProjectVulnerabilities *ProjectVulnerabilitiesService
Projects *ProjectsService
@@ -397,6 +398,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) {
c.ProjectMembers = &ProjectMembersService{client: c}
c.ProjectMirrors = &ProjectMirrorService{client: c}
c.ProjectSnippets = &ProjectSnippetsService{client: c}
+ c.ProjectTemplates = &ProjectTemplatesService{client: c}
c.ProjectVariables = &ProjectVariablesService{client: c}
c.ProjectVulnerabilities = &ProjectVulnerabilitiesService{client: c}
c.Projects = &ProjectsService{client: c}
@@ -568,7 +570,7 @@ func (c *Client) NewRequest(method, path string, opt interface{}, options []Requ
var body interface{}
switch {
- case method == http.MethodPost || method == http.MethodPut:
+ case method == http.MethodPatch || method == http.MethodPost || method == http.MethodPut:
reqHeaders.Set("Content-Type", "application/json")
if opt != nil {
diff --git a/vendor/github.com/xanzy/go-gitlab/group_hooks.go b/vendor/github.com/xanzy/go-gitlab/group_hooks.go
index bbbef54dd..a40894830 100644
--- a/vendor/github.com/xanzy/go-gitlab/group_hooks.go
+++ b/vendor/github.com/xanzy/go-gitlab/group_hooks.go
@@ -44,6 +44,7 @@ type GroupHook struct {
ReleasesEvents bool `json:"releases_events"`
SubGroupEvents bool `json:"subgroup_events"`
EnableSSLVerification bool `json:"enable_ssl_verification"`
+ AlertStatus string `json:"alert_status"`
CreatedAt *time.Time `json:"created_at"`
}
diff --git a/vendor/github.com/xanzy/go-gitlab/group_members.go b/vendor/github.com/xanzy/go-gitlab/group_members.go
index 850b02369..4a169cdf3 100644
--- a/vendor/github.com/xanzy/go-gitlab/group_members.go
+++ b/vendor/github.com/xanzy/go-gitlab/group_members.go
@@ -54,6 +54,7 @@ type GroupMember struct {
CreatedAt *time.Time `json:"created_at"`
ExpiresAt *ISOTime `json:"expires_at"`
AccessLevel AccessLevelValue `json:"access_level"`
+ Email string `json:"email,omitempty"`
GroupSAMLIdentity *GroupMemberSAMLIdentity `json:"group_saml_identity"`
}
@@ -168,7 +169,7 @@ type BillableGroupMember struct {
Email string `json:"email"`
LastActivityOn *ISOTime `json:"last_activity_on"`
MembershipType string `json:"membership_type"`
- Removeable bool `json:"removeable"`
+ Removable bool `json:"removable"`
CreatedAt *time.Time `json:"created_at"`
IsLastOwner bool `json:"is_last_owner"`
LastLoginAt *time.Time `json:"last_login_at"`
diff --git a/vendor/github.com/xanzy/go-gitlab/instance_variables.go b/vendor/github.com/xanzy/go-gitlab/instance_variables.go
index f196a9c0f..79b6304a1 100644
--- a/vendor/github.com/xanzy/go-gitlab/instance_variables.go
+++ b/vendor/github.com/xanzy/go-gitlab/instance_variables.go
@@ -41,6 +41,7 @@ type InstanceVariable struct {
VariableType VariableTypeValue `json:"variable_type"`
Protected bool `json:"protected"`
Masked bool `json:"masked"`
+ Raw bool `json:"raw"`
}
func (v InstanceVariable) String() string {
@@ -107,6 +108,7 @@ type CreateInstanceVariableOptions struct {
VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
Protected *bool `url:"protected,omitempty" json:"protected,omitempty"`
Masked *bool `url:"masked,omitempty" json:"masked,omitempty"`
+ Raw *bool `url:"raw,omitempty" json:"raw,omitempty"`
}
// CreateVariable creates a new instance level CI variable.
@@ -140,6 +142,7 @@ type UpdateInstanceVariableOptions struct {
VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
Protected *bool `url:"protected,omitempty" json:"protected,omitempty"`
Masked *bool `url:"masked,omitempty" json:"masked,omitempty"`
+ Raw *bool `url:"raw,omitempty" json:"raw,omitempty"`
}
// UpdateVariable updates the position of an existing
diff --git a/vendor/github.com/xanzy/go-gitlab/issues.go b/vendor/github.com/xanzy/go-gitlab/issues.go
index 5f832c6ce..4d06fd334 100644
--- a/vendor/github.com/xanzy/go-gitlab/issues.go
+++ b/vendor/github.com/xanzy/go-gitlab/issues.go
@@ -90,6 +90,7 @@ type Issue struct {
ExternalID string `json:"external_id"`
State string `json:"state"`
Description string `json:"description"`
+ HealthStatus string `json:"health_status"`
Author *IssueAuthor `json:"author"`
Milestone *Milestone `json:"milestone"`
ProjectID int `json:"project_id"`
diff --git a/vendor/github.com/xanzy/go-gitlab/issues_statistics.go b/vendor/github.com/xanzy/go-gitlab/issues_statistics.go
index 134c271b4..16b9fce74 100644
--- a/vendor/github.com/xanzy/go-gitlab/issues_statistics.go
+++ b/vendor/github.com/xanzy/go-gitlab/issues_statistics.go
@@ -146,7 +146,7 @@ func (s *IssuesStatisticsService) GetGroupIssuesStatistics(gid interface{}, opt
type GetProjectIssuesStatisticsOptions struct {
IIDs *[]int `url:"iids[],omitempty" json:"iids,omitempty"`
Labels *Labels `url:"labels,omitempty" json:"labels,omitempty"`
- Milestone *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"`
+ Milestone *string `url:"milestone,omitempty" json:"milestone,omitempty"`
Scope *string `url:"scope,omitempty" json:"scope,omitempty"`
AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"`
AuthorUsername *string `url:"author_username,omitempty" json:"author_username,omitempty"`
diff --git a/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go b/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go
index aceec135b..07d6de28d 100644
--- a/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go
+++ b/vendor/github.com/xanzy/go-gitlab/personal_access_tokens.go
@@ -79,6 +79,47 @@ func (s *PersonalAccessTokensService) ListPersonalAccessTokens(opt *ListPersonal
return pats, resp, err
}
+// GetSinglePersonalAccessTokenByID get a single personal access token by its ID.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/personal_access_tokens.html#using-a-personal-access-token-id
+func (s *PersonalAccessTokensService) GetSinglePersonalAccessTokenByID(user int, options ...RequestOptionFunc) (*PersonalAccessToken, *Response, error) {
+ u := fmt.Sprintf("personal_access_tokens/%d", user)
+ req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ pat := new(PersonalAccessToken)
+ resp, err := s.client.Do(req, pat)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return pat, resp, err
+}
+
+// GetSinglePersonalAccessToken get a single personal access token by using
+// passing the token in a header.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/personal_access_tokens.html#using-a-request-header
+func (s *PersonalAccessTokensService) GetSinglePersonalAccessToken(options ...RequestOptionFunc) (*PersonalAccessToken, *Response, error) {
+ u := "personal_access_tokens/self"
+ req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ pat := new(PersonalAccessToken)
+ resp, err := s.client.Do(req, pat)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return pat, resp, err
+}
+
// RevokePersonalAccessToken revokes a personal access token.
//
// GitLab API docs:
diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/github.com/xanzy/go-gitlab/pipelines.go
index d49261f7c..df77edfcf 100644
--- a/vendor/github.com/xanzy/go-gitlab/pipelines.go
+++ b/vendor/github.com/xanzy/go-gitlab/pipelines.go
@@ -87,38 +87,44 @@ func (p Pipeline) String() string {
// PipelineTestReport contains a detailed report of a test run.
type PipelineTestReport struct {
+ TotalTime float64 `json:"total_time"`
+ TotalCount int `json:"total_count"`
+ SuccessCount int `json:"success_count"`
+ FailedCount int `json:"failed_count"`
+ SkippedCount int `json:"skipped_count"`
+ ErrorCount int `json:"error_count"`
+ TestSuites []*PipelineTestSuites `json:"test_suites"`
+}
+
+// PipelineTestSuites contains test suites results.
+type PipelineTestSuites struct {
+ Name string `json:"name"`
TotalTime float64 `json:"total_time"`
TotalCount int `json:"total_count"`
SuccessCount int `json:"success_count"`
FailedCount int `json:"failed_count"`
SkippedCount int `json:"skipped_count"`
ErrorCount int `json:"error_count"`
- TestSuites []PipelineTestSuites `json:"test_suites"`
-}
-
-// PipelineTestSuites contains test suites results.
-type PipelineTestSuites struct {
- Name string `json:"name"`
- TotalTime float64 `json:"total_time"`
- TotalCount int `json:"total_count"`
- SuccessCount int `json:"success_count"`
- FailedCount int `json:"failed_count"`
- SkippedCount int `json:"skipped_count"`
- ErrorCount int `json:"error_count"`
- TestCases []PipelineTestCases `json:"test_cases"`
+ TestCases []*PipelineTestCases `json:"test_cases"`
}
// PipelineTestCases contains test cases details.
type PipelineTestCases struct {
- Status string `json:"status"`
- Name string `json:"name"`
- Classname string `json:"classname"`
- File string `json:"file"`
- ExecutionTime float64 `json:"execution_time"`
- SystemOutput string `json:"system_output"`
- StackTrace string `json:"stack_trace"`
- AttachmentURL string `json:"attachment_url"`
- RecentFailures RecentFailures `json:"recent_failures"`
+ Status string `json:"status"`
+ Name string `json:"name"`
+ Classname string `json:"classname"`
+ File string `json:"file"`
+ ExecutionTime float64 `json:"execution_time"`
+ SystemOutput *SystemOutput `json:"system_output"`
+ StackTrace string `json:"stack_trace"`
+ AttachmentURL string `json:"attachment_url"`
+ RecentFailures *RecentFailures `json:"recent_failures"`
+}
+
+// SystemOutput contains information about test cases when it fails.
+type SystemOutput struct {
+ Type string `json:"type"`
+ Message string `json:"message"`
}
// RecentFailures contains failures count for the project's default branch.
diff --git a/vendor/github.com/xanzy/go-gitlab/project_templates.go b/vendor/github.com/xanzy/go-gitlab/project_templates.go
new file mode 100644
index 000000000..0501660db
--- /dev/null
+++ b/vendor/github.com/xanzy/go-gitlab/project_templates.go
@@ -0,0 +1,110 @@
+//
+// Copyright 2021, Sander van Harmelen
+//
+// 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 gitlab
+
+import (
+ "fmt"
+ "net/http"
+)
+
+// ProjectTemplatesService handles communication with the project templates
+// related methods of the GitLab API.
+//
+// GitLab API docs: https://docs.gitlab.com/ee/api/project_templates.html
+type ProjectTemplatesService struct {
+ client *Client
+}
+
+// ProjectTemplate represents a GitLab ProjectTemplate.
+//
+// GitLab API docs: https://docs.gitlab.com/ee/api/project_templates.html
+type ProjectTemplate struct {
+ Key string `json:"key"`
+ Name string `json:"name"`
+ Nickname string `json:"nickname"`
+ Popular bool `json:"popular"`
+ HTMLURL string `json:"html_url"`
+ SourceURL string `json:"source_url"`
+ Description string `json:"description"`
+ Conditions []string `json:"conditions"`
+ Permissions []string `json:"permissions"`
+ Limitations []string `json:"limitations"`
+ Content string `json:"content"`
+}
+
+func (s ProjectTemplate) String() string {
+ return Stringify(s)
+}
+
+// ListProjectTemplatesOptions represents the available ListSnippets() options.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/project_templates.html#get-all-templates-of-a-particular-type
+type ListProjectTemplatesOptions struct {
+ ListOptions
+ ID *int `url:"id,omitempty" json:"id,omitempty"`
+ Type *string `url:"type,omitempty" json:"type,omitempty"`
+}
+
+// ListTemplates gets a list of project templates.
+//
+// GitLab API docs: https://docs.gitlab.com/ee/api/project_templates.html#get-all-templates-of-a-particular-type
+func (s *ProjectTemplatesService) ListTemplates(pid interface{}, templateType string, opt *ListProjectTemplatesOptions, options ...RequestOptionFunc) ([]*ProjectTemplate, *Response, error) {
+ project, err := parseID(pid)
+ if err != nil {
+ return nil, nil, err
+ }
+ u := fmt.Sprintf("projects/%s/templates/%s", PathEscape(project), templateType)
+
+ req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ var pt []*ProjectTemplate
+ resp, err := s.client.Do(req, &pt)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return pt, resp, err
+}
+
+// GetProjectTemplate gets a single project template.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/project_templates.html#get-one-template-of-a-particular-type
+func (s *ProjectTemplatesService) GetProjectTemplate(pid interface{}, templateType string, templateName string, options ...RequestOptionFunc) (*ProjectTemplate, *Response, error) {
+ project, err := parseID(pid)
+ if err != nil {
+ return nil, nil, err
+ }
+ u := fmt.Sprintf("projects/%s/templates/%s/%s", PathEscape(project), templateType, templateName)
+
+ req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ ptd := new(ProjectTemplate)
+ resp, err := s.client.Do(req, ptd)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return ptd, resp, err
+}
diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/github.com/xanzy/go-gitlab/projects.go
index e85b19224..662a67cd2 100644
--- a/vendor/github.com/xanzy/go-gitlab/projects.go
+++ b/vendor/github.com/xanzy/go-gitlab/projects.go
@@ -567,67 +567,6 @@ func (s *ProjectsService) GetProject(pid interface{}, opt *GetProjectOptions, op
return p, resp, err
}
-// ProjectEvent represents a GitLab project event.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events
-type ProjectEvent struct {
- Title interface{} `json:"title"`
- ProjectID int `json:"project_id"`
- ActionName string `json:"action_name"`
- TargetID interface{} `json:"target_id"`
- TargetType interface{} `json:"target_type"`
- AuthorID int `json:"author_id"`
- AuthorUsername string `json:"author_username"`
- Data struct {
- Before string `json:"before"`
- After string `json:"after"`
- Ref string `json:"ref"`
- UserID int `json:"user_id"`
- UserName string `json:"user_name"`
- Repository *Repository `json:"repository"`
- Commits []*Commit `json:"commits"`
- TotalCommitsCount int `json:"total_commits_count"`
- } `json:"data"`
- TargetTitle interface{} `json:"target_title"`
-}
-
-func (s ProjectEvent) String() string {
- return Stringify(s)
-}
-
-// GetProjectEventsOptions represents the available GetProjectEvents() options.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events
-type GetProjectEventsOptions ListOptions
-
-// GetProjectEvents gets the events for the specified project. Sorted from
-// newest to latest.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events
-func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEventsOptions, options ...RequestOptionFunc) ([]*ProjectEvent, *Response, error) {
- project, err := parseID(pid)
- if err != nil {
- return nil, nil, err
- }
- u := fmt.Sprintf("projects/%s/events", PathEscape(project))
-
- req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
- if err != nil {
- return nil, nil, err
- }
-
- var p []*ProjectEvent
- resp, err := s.client.Do(req, &p)
- if err != nil {
- return nil, resp, err
- }
-
- return p, resp, err
-}
-
// CreateProjectOptions represents the available CreateProject() options.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#create-project
diff --git a/vendor/github.com/xanzy/go-gitlab/protected_branches.go b/vendor/github.com/xanzy/go-gitlab/protected_branches.go
index 9dc919f15..b398bdb47 100644
--- a/vendor/github.com/xanzy/go-gitlab/protected_branches.go
+++ b/vendor/github.com/xanzy/go-gitlab/protected_branches.go
@@ -140,10 +140,12 @@ type ProtectRepositoryBranchesOptions struct {
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_branches.html#protect-repository-branches
type BranchPermissionOptions struct {
+ ID *int `url:"id,omitempty" json:"id,omitempty"`
UserID *int `url:"user_id,omitempty" json:"user_id,omitempty"`
GroupID *int `url:"group_id,omitempty" json:"group_id,omitempty"`
DeployKeyID *int `url:"deploy_key_id,omitempty" json:"deploy_key_id,omitempty"`
AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
+ Destroy *bool `url:"_destroy,omitempty" json:"_destroy,omitempty"`
}
// ProtectRepositoryBranches protects a single repository branch or several
diff --git a/vendor/go.uber.org/atomic/CHANGELOG.md b/vendor/go.uber.org/atomic/CHANGELOG.md
index 5fe03f21b..6f87f33fa 100644
--- a/vendor/go.uber.org/atomic/CHANGELOG.md
+++ b/vendor/go.uber.org/atomic/CHANGELOG.md
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [1.11.0] - 2023-05-02
+### Fixed
+- Fix initialization of `Value` wrappers.
+
+### Added
+- Add `String` method to `atomic.Pointer[T]` type allowing users to safely print
+underlying values of pointers.
+
+[1.11.0]: https://github.com/uber-go/atomic/compare/v1.10.0...v1.11.0
+
## [1.10.0] - 2022-08-11
### Added
- Add `atomic.Float32` type for atomic operations on `float32`.
diff --git a/vendor/go.uber.org/atomic/bool.go b/vendor/go.uber.org/atomic/bool.go
index dfa2085f4..f0a2ddd14 100644
--- a/vendor/go.uber.org/atomic/bool.go
+++ b/vendor/go.uber.org/atomic/bool.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/duration.go b/vendor/go.uber.org/atomic/duration.go
index 6f4157445..7c23868fc 100644
--- a/vendor/go.uber.org/atomic/duration.go
+++ b/vendor/go.uber.org/atomic/duration.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/error.go b/vendor/go.uber.org/atomic/error.go
index 27b23ea16..b7e3f1291 100644
--- a/vendor/go.uber.org/atomic/error.go
+++ b/vendor/go.uber.org/atomic/error.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -52,7 +52,17 @@ func (x *Error) Store(val error) {
// CompareAndSwap is an atomic compare-and-swap for error values.
func (x *Error) CompareAndSwap(old, new error) (swapped bool) {
- return x.v.CompareAndSwap(packError(old), packError(new))
+ if x.v.CompareAndSwap(packError(old), packError(new)) {
+ return true
+ }
+
+ if old == _zeroError {
+ // If the old value is the empty value, then it's possible the
+ // underlying Value hasn't been set and is nil, so retry with nil.
+ return x.v.CompareAndSwap(nil, packError(new))
+ }
+
+ return false
}
// Swap atomically stores the given error and returns the old
diff --git a/vendor/go.uber.org/atomic/float32.go b/vendor/go.uber.org/atomic/float32.go
index 5d535a6d2..62c36334f 100644
--- a/vendor/go.uber.org/atomic/float32.go
+++ b/vendor/go.uber.org/atomic/float32.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/float64.go b/vendor/go.uber.org/atomic/float64.go
index 11d5189a5..5bc11caab 100644
--- a/vendor/go.uber.org/atomic/float64.go
+++ b/vendor/go.uber.org/atomic/float64.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/int32.go b/vendor/go.uber.org/atomic/int32.go
index b9a68f42c..5320eac10 100644
--- a/vendor/go.uber.org/atomic/int32.go
+++ b/vendor/go.uber.org/atomic/int32.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/int64.go b/vendor/go.uber.org/atomic/int64.go
index 78d260976..460821d00 100644
--- a/vendor/go.uber.org/atomic/int64.go
+++ b/vendor/go.uber.org/atomic/int64.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/pointer_go118.go b/vendor/go.uber.org/atomic/pointer_go118.go
index e0f47dba4..1fb6c03b2 100644
--- a/vendor/go.uber.org/atomic/pointer_go118.go
+++ b/vendor/go.uber.org/atomic/pointer_go118.go
@@ -18,43 +18,14 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-//go:build go1.18 && !go1.19
-// +build go1.18,!go1.19
+//go:build go1.18
+// +build go1.18
package atomic
-import "unsafe"
+import "fmt"
-type Pointer[T any] struct {
- _ nocmp // disallow non-atomic comparison
- p UnsafePointer
-}
-
-// NewPointer creates a new Pointer.
-func NewPointer[T any](v *T) *Pointer[T] {
- var p Pointer[T]
- if v != nil {
- p.p.Store(unsafe.Pointer(v))
- }
- return &p
-}
-
-// Load atomically loads the wrapped value.
-func (p *Pointer[T]) Load() *T {
- return (*T)(p.p.Load())
-}
-
-// Store atomically stores the passed value.
-func (p *Pointer[T]) Store(val *T) {
- p.p.Store(unsafe.Pointer(val))
-}
-
-// Swap atomically swaps the wrapped pointer and returns the old value.
-func (p *Pointer[T]) Swap(val *T) (old *T) {
- return (*T)(p.p.Swap(unsafe.Pointer(val)))
-}
-
-// CompareAndSwap is an atomic compare-and-swap.
-func (p *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) {
- return p.p.CompareAndSwap(unsafe.Pointer(old), unsafe.Pointer(new))
+// String returns a human readable representation of a Pointer's underlying value.
+func (p *Pointer[T]) String() string {
+ return fmt.Sprint(p.Load())
}
diff --git a/vendor/go.uber.org/atomic/pointer_go118_pre119.go b/vendor/go.uber.org/atomic/pointer_go118_pre119.go
new file mode 100644
index 000000000..e0f47dba4
--- /dev/null
+++ b/vendor/go.uber.org/atomic/pointer_go118_pre119.go
@@ -0,0 +1,60 @@
+// Copyright (c) 2022 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+//go:build go1.18 && !go1.19
+// +build go1.18,!go1.19
+
+package atomic
+
+import "unsafe"
+
+type Pointer[T any] struct {
+ _ nocmp // disallow non-atomic comparison
+ p UnsafePointer
+}
+
+// NewPointer creates a new Pointer.
+func NewPointer[T any](v *T) *Pointer[T] {
+ var p Pointer[T]
+ if v != nil {
+ p.p.Store(unsafe.Pointer(v))
+ }
+ return &p
+}
+
+// Load atomically loads the wrapped value.
+func (p *Pointer[T]) Load() *T {
+ return (*T)(p.p.Load())
+}
+
+// Store atomically stores the passed value.
+func (p *Pointer[T]) Store(val *T) {
+ p.p.Store(unsafe.Pointer(val))
+}
+
+// Swap atomically swaps the wrapped pointer and returns the old value.
+func (p *Pointer[T]) Swap(val *T) (old *T) {
+ return (*T)(p.p.Swap(unsafe.Pointer(val)))
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (p *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) {
+ return p.p.CompareAndSwap(unsafe.Pointer(old), unsafe.Pointer(new))
+}
diff --git a/vendor/go.uber.org/atomic/string.go b/vendor/go.uber.org/atomic/string.go
index c4bea70f4..061466c5b 100644
--- a/vendor/go.uber.org/atomic/string.go
+++ b/vendor/go.uber.org/atomic/string.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -42,24 +42,31 @@ func NewString(val string) *String {
// Load atomically loads the wrapped string.
func (x *String) Load() string {
- if v := x.v.Load(); v != nil {
- return v.(string)
- }
- return _zeroString
+ return unpackString(x.v.Load())
}
// Store atomically stores the passed string.
func (x *String) Store(val string) {
- x.v.Store(val)
+ x.v.Store(packString(val))
}
// CompareAndSwap is an atomic compare-and-swap for string values.
func (x *String) CompareAndSwap(old, new string) (swapped bool) {
- return x.v.CompareAndSwap(old, new)
+ if x.v.CompareAndSwap(packString(old), packString(new)) {
+ return true
+ }
+
+ if old == _zeroString {
+ // If the old value is the empty value, then it's possible the
+ // underlying Value hasn't been set and is nil, so retry with nil.
+ return x.v.CompareAndSwap(nil, packString(new))
+ }
+
+ return false
}
// Swap atomically stores the given string and returns the old
// value.
func (x *String) Swap(val string) (old string) {
- return x.v.Swap(val).(string)
+ return unpackString(x.v.Swap(packString(val)))
}
diff --git a/vendor/go.uber.org/atomic/string_ext.go b/vendor/go.uber.org/atomic/string_ext.go
index 1f63dfd5b..019109c86 100644
--- a/vendor/go.uber.org/atomic/string_ext.go
+++ b/vendor/go.uber.org/atomic/string_ext.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,18 @@
package atomic
-//go:generate bin/gen-atomicwrapper -name=String -type=string -wrapped=Value -compareandswap -swap -file=string.go
+//go:generate bin/gen-atomicwrapper -name=String -type=string -wrapped Value -pack packString -unpack unpackString -compareandswap -swap -file=string.go
+
+func packString(s string) interface{} {
+ return s
+}
+
+func unpackString(v interface{}) string {
+ if s, ok := v.(string); ok {
+ return s
+ }
+ return ""
+}
// String returns the wrapped value.
func (s *String) String() string {
diff --git a/vendor/go.uber.org/atomic/time.go b/vendor/go.uber.org/atomic/time.go
index 1660feb14..cc2a230c0 100644
--- a/vendor/go.uber.org/atomic/time.go
+++ b/vendor/go.uber.org/atomic/time.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/uint32.go b/vendor/go.uber.org/atomic/uint32.go
index d6f04a96d..4adc294ac 100644
--- a/vendor/go.uber.org/atomic/uint32.go
+++ b/vendor/go.uber.org/atomic/uint32.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/uint64.go b/vendor/go.uber.org/atomic/uint64.go
index 2574bdd5e..0e2eddb30 100644
--- a/vendor/go.uber.org/atomic/uint64.go
+++ b/vendor/go.uber.org/atomic/uint64.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/atomic/uintptr.go b/vendor/go.uber.org/atomic/uintptr.go
index 81b275a7a..7d5b000d6 100644
--- a/vendor/go.uber.org/atomic/uintptr.go
+++ b/vendor/go.uber.org/atomic/uintptr.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2022 Uber Technologies, Inc.
+// Copyright (c) 2020-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/go.uber.org/multierr/CHANGELOG.md b/vendor/go.uber.org/multierr/CHANGELOG.md
index 3ba05276f..f8177b978 100644
--- a/vendor/go.uber.org/multierr/CHANGELOG.md
+++ b/vendor/go.uber.org/multierr/CHANGELOG.md
@@ -1,6 +1,29 @@
Releases
========
+v1.11.0 (2023-03-28)
+====================
+- `Errors` now supports any error that implements multiple-error
+ interface.
+- Add `Every` function to allow checking if all errors in the chain
+ satisfies `errors.Is` against the target error.
+
+v1.10.0 (2023-03-08)
+====================
+
+- Comply with Go 1.20's multiple-error interface.
+- Drop Go 1.18 support.
+ Per the support policy, only Go 1.19 and 1.20 are supported now.
+- Drop all non-test external dependencies.
+
+v1.9.0 (2022-12-12)
+===================
+
+- Add `AppendFunc` that allow passsing functions to similar to
+ `AppendInvoke`.
+
+- Bump up yaml.v3 dependency to 3.0.1.
+
v1.8.0 (2022-02-28)
===================
diff --git a/vendor/go.uber.org/multierr/README.md b/vendor/go.uber.org/multierr/README.md
index 70aacecd7..5ab6ac40f 100644
--- a/vendor/go.uber.org/multierr/README.md
+++ b/vendor/go.uber.org/multierr/README.md
@@ -2,9 +2,29 @@
`multierr` allows combining one or more Go `error`s together.
+## Features
+
+- **Idiomatic**:
+ multierr follows best practices in Go, and keeps your code idiomatic.
+ - It keeps the underlying error type hidden,
+ allowing you to deal in `error` values exclusively.
+ - It provides APIs to safely append into an error from a `defer` statement.
+- **Performant**:
+ multierr is optimized for performance:
+ - It avoids allocations where possible.
+ - It utilizes slice resizing semantics to optimize common cases
+ like appending into the same error object from a loop.
+- **Interoperable**:
+ multierr interoperates with the Go standard library's error APIs seamlessly:
+ - The `errors.Is` and `errors.As` functions *just work*.
+- **Lightweight**:
+ multierr comes with virtually no dependencies.
+
## Installation
- go get -u go.uber.org/multierr
+```bash
+go get -u go.uber.org/multierr@latest
+```
## Status
diff --git a/vendor/go.uber.org/multierr/error.go b/vendor/go.uber.org/multierr/error.go
index f45af149c..3a828b2df 100644
--- a/vendor/go.uber.org/multierr/error.go
+++ b/vendor/go.uber.org/multierr/error.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2017-2021 Uber Technologies, Inc.
+// Copyright (c) 2017-2023 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -20,106 +20,109 @@
// Package multierr allows combining one or more errors together.
//
-// Overview
+// # Overview
//
// Errors can be combined with the use of the Combine function.
//
-// multierr.Combine(
-// reader.Close(),
-// writer.Close(),
-// conn.Close(),
-// )
+// multierr.Combine(
+// reader.Close(),
+// writer.Close(),
+// conn.Close(),
+// )
//
// If only two errors are being combined, the Append function may be used
// instead.
//
-// err = multierr.Append(reader.Close(), writer.Close())
+// err = multierr.Append(reader.Close(), writer.Close())
//
// The underlying list of errors for a returned error object may be retrieved
// with the Errors function.
//
-// errors := multierr.Errors(err)
-// if len(errors) > 0 {
-// fmt.Println("The following errors occurred:", errors)
-// }
+// errors := multierr.Errors(err)
+// if len(errors) > 0 {
+// fmt.Println("The following errors occurred:", errors)
+// }
//
-// Appending from a loop
+// # Appending from a loop
//
// You sometimes need to append into an error from a loop.
//
-// var err error
-// for _, item := range items {
-// err = multierr.Append(err, process(item))
-// }
+// var err error
+// for _, item := range items {
+// err = multierr.Append(err, process(item))
+// }
//
// Cases like this may require knowledge of whether an individual instance
// failed. This usually requires introduction of a new variable.
//
-// var err error
-// for _, item := range items {
-// if perr := process(item); perr != nil {
-// log.Warn("skipping item", item)
-// err = multierr.Append(err, perr)
-// }
-// }
+// var err error
+// for _, item := range items {
+// if perr := process(item); perr != nil {
+// log.Warn("skipping item", item)
+// err = multierr.Append(err, perr)
+// }
+// }
//
// multierr includes AppendInto to simplify cases like this.
//
-// var err error
-// for _, item := range items {
-// if multierr.AppendInto(&err, process(item)) {
-// log.Warn("skipping item", item)
-// }
-// }
+// var err error
+// for _, item := range items {
+// if multierr.AppendInto(&err, process(item)) {
+// log.Warn("skipping item", item)
+// }
+// }
//
// This will append the error into the err variable, and return true if that
// individual error was non-nil.
//
-// See AppendInto for more information.
+// See [AppendInto] for more information.
//
-// Deferred Functions
+// # Deferred Functions
//
// Go makes it possible to modify the return value of a function in a defer
// block if the function was using named returns. This makes it possible to
// record resource cleanup failures from deferred blocks.
//
-// func sendRequest(req Request) (err error) {
-// conn, err := openConnection()
-// if err != nil {
-// return err
-// }
-// defer func() {
-// err = multierr.Append(err, conn.Close())
-// }()
-// // ...
-// }
+// func sendRequest(req Request) (err error) {
+// conn, err := openConnection()
+// if err != nil {
+// return err
+// }
+// defer func() {
+// err = multierr.Append(err, conn.Close())
+// }()
+// // ...
+// }
//
// multierr provides the Invoker type and AppendInvoke function to make cases
// like the above simpler and obviate the need for a closure. The following is
// roughly equivalent to the example above.
//
-// func sendRequest(req Request) (err error) {
-// conn, err := openConnection()
-// if err != nil {
-// return err
-// }
-// defer multierr.AppendInvoke(&err, multierr.Close(conn))
-// // ...
-// }
+// func sendRequest(req Request) (err error) {
+// conn, err := openConnection()
+// if err != nil {
+// return err
+// }
+// defer multierr.AppendInvoke(&err, multierr.Close(conn))
+// // ...
+// }
//
-// See AppendInvoke and Invoker for more information.
+// See [AppendInvoke] and [Invoker] for more information.
//
-// Advanced Usage
+// NOTE: If you're modifying an error from inside a defer, you MUST use a named
+// return value for that function.
+//
+// # Advanced Usage
//
// Errors returned by Combine and Append MAY implement the following
// interface.
//
-// type errorGroup interface {
-// // Returns a slice containing the underlying list of errors.
-// //
-// // This slice MUST NOT be modified by the caller.
-// Errors() []error
-// }
+// type errorGroup interface {
+// // Returns a slice containing the underlying list of errors.
+// //
+// // This slice MUST NOT be modified by the caller.
+// Errors() []error
+// }
//
// Note that if you need access to list of errors behind a multierr error, you
// should prefer using the Errors function. That said, if you need cheap
@@ -128,13 +131,13 @@
// because errors returned by Combine and Append are not guaranteed to
// implement this interface.
//
-// var errors []error
-// group, ok := err.(errorGroup)
-// if ok {
-// errors = group.Errors()
-// } else {
-// errors = []error{err}
-// }
+// var errors []error
+// group, ok := err.(errorGroup)
+// if ok {
+// errors = group.Errors()
+// } else {
+// errors = []error{err}
+// }
package multierr // import "go.uber.org/multierr"
import (
@@ -144,8 +147,7 @@ import (
"io"
"strings"
"sync"
-
- "go.uber.org/atomic"
+ "sync/atomic"
)
var (
@@ -185,34 +187,15 @@ type errorGroup interface {
// Errors returns a slice containing zero or more errors that the supplied
// error is composed of. If the error is nil, a nil slice is returned.
//
-// err := multierr.Append(r.Close(), w.Close())
-// errors := multierr.Errors(err)
+// err := multierr.Append(r.Close(), w.Close())
+// errors := multierr.Errors(err)
//
// If the error is not composed of other errors, the returned slice contains
// just the error that was passed in.
//
// Callers of this function are free to modify the returned slice.
func Errors(err error) []error {
- if err == nil {
- return nil
- }
-
- // Note that we're casting to multiError, not errorGroup. Our contract is
- // that returned errors MAY implement errorGroup. Errors, however, only
- // has special behavior for multierr-specific error objects.
- //
- // This behavior can be expanded in the future but I think it's prudent to
- // start with as little as possible in terms of contract and possibility
- // of misuse.
- eg, ok := err.(*multiError)
- if !ok {
- return []error{err}
- }
-
- errors := eg.Errors()
- result := make([]error, len(errors))
- copy(result, errors)
- return result
+ return extractErrors(err)
}
// multiError is an error that holds one or more errors.
@@ -227,8 +210,6 @@ type multiError struct {
errors []error
}
-var _ errorGroup = (*multiError)(nil)
-
// Errors returns the list of underlying errors.
//
// This slice MUST NOT be modified.
@@ -239,33 +220,6 @@ func (merr *multiError) Errors() []error {
return merr.errors
}
-// As attempts to find the first error in the error list that matches the type
-// of the value that target points to.
-//
-// This function allows errors.As to traverse the values stored on the
-// multierr error.
-func (merr *multiError) As(target interface{}) bool {
- for _, err := range merr.Errors() {
- if errors.As(err, target) {
- return true
- }
- }
- return false
-}
-
-// Is attempts to match the provided error against errors in the error list.
-//
-// This function allows errors.Is to traverse the values stored on the
-// multierr error.
-func (merr *multiError) Is(target error) bool {
- for _, err := range merr.Errors() {
- if errors.Is(err, target) {
- return true
- }
- }
- return false
-}
-
func (merr *multiError) Error() string {
if merr == nil {
return ""
@@ -281,6 +235,17 @@ func (merr *multiError) Error() string {
return result
}
+// Every compares every error in the given err against the given target error
+// using [errors.Is], and returns true only if every comparison returned true.
+func Every(err error, target error) bool {
+ for _, e := range extractErrors(err) {
+ if !errors.Is(e, target) {
+ return false
+ }
+ }
+ return true
+}
+
func (merr *multiError) Format(f fmt.State, c rune) {
if c == 'v' && f.Flag('+') {
merr.writeMultiline(f)
@@ -393,8 +358,7 @@ func fromSlice(errors []error) error {
// Otherwise "errors" escapes to the heap
// unconditionally for all other cases.
// This lets us optimize for the "no errors" case.
- out := make([]error, len(errors))
- copy(out, errors)
+ out := append(([]error)(nil), errors...)
return &multiError{errors: out}
}
}
@@ -420,32 +384,32 @@ func fromSlice(errors []error) error {
// If zero arguments were passed or if all items are nil, a nil error is
// returned.
//
-// Combine(nil, nil) // == nil
+// Combine(nil, nil) // == nil
//
// If only a single error was passed, it is returned as-is.
//
-// Combine(err) // == err
+// Combine(err) // == err
//
// Combine skips over nil arguments so this function may be used to combine
// together errors from operations that fail independently of each other.
//
-// multierr.Combine(
-// reader.Close(),
-// writer.Close(),
-// pipe.Close(),
-// )
+// multierr.Combine(
+// reader.Close(),
+// writer.Close(),
+// pipe.Close(),
+// )
//
// If any of the passed errors is a multierr error, it will be flattened along
// with the other errors.
//
-// multierr.Combine(multierr.Combine(err1, err2), err3)
-// // is the same as
-// multierr.Combine(err1, err2, err3)
+// multierr.Combine(multierr.Combine(err1, err2), err3)
+// // is the same as
+// multierr.Combine(err1, err2, err3)
//
// The returned error formats into a readable multi-line error message if
// formatted with %+v.
//
-// fmt.Sprintf("%+v", multierr.Combine(err1, err2))
+// fmt.Sprintf("%+v", multierr.Combine(err1, err2))
func Combine(errors ...error) error {
return fromSlice(errors)
}
@@ -455,16 +419,19 @@ func Combine(errors ...error) error {
// This function is a specialization of Combine for the common case where
// there are only two errors.
//
-// err = multierr.Append(reader.Close(), writer.Close())
+// err = multierr.Append(reader.Close(), writer.Close())
//
// The following pattern may also be used to record failure of deferred
// operations without losing information about the original error.
//
-// func doSomething(..) (err error) {
-// f := acquireResource()
-// defer func() {
-// err = multierr.Append(err, f.Close())
-// }()
+// func doSomething(..) (err error) {
+// f := acquireResource()
+// defer func() {
+// err = multierr.Append(err, f.Close())
+// }()
+//
+// Note that the variable MUST be a named return to append an error to it from
+// the defer statement. See also [AppendInvoke].
func Append(left error, right error) error {
switch {
case left == nil:
@@ -494,37 +461,37 @@ func Append(left error, right error) error {
// AppendInto appends an error into the destination of an error pointer and
// returns whether the error being appended was non-nil.
//
-// var err error
-// multierr.AppendInto(&err, r.Close())
-// multierr.AppendInto(&err, w.Close())
+// var err error
+// multierr.AppendInto(&err, r.Close())
+// multierr.AppendInto(&err, w.Close())
//
// The above is equivalent to,
//
-// err := multierr.Append(r.Close(), w.Close())
+// err := multierr.Append(r.Close(), w.Close())
//
// As AppendInto reports whether the provided error was non-nil, it may be
// used to build a multierr error in a loop more ergonomically. For example:
//
-// var err error
-// for line := range lines {
-// var item Item
-// if multierr.AppendInto(&err, parse(line, &item)) {
-// continue
-// }
-// items = append(items, item)
-// }
+// var err error
+// for line := range lines {
+// var item Item
+// if multierr.AppendInto(&err, parse(line, &item)) {
+// continue
+// }
+// items = append(items, item)
+// }
//
// Compare this with a version that relies solely on Append:
//
-// var err error
-// for line := range lines {
-// var item Item
-// if parseErr := parse(line, &item); parseErr != nil {
-// err = multierr.Append(err, parseErr)
-// continue
-// }
-// items = append(items, item)
-// }
+// var err error
+// for line := range lines {
+// var item Item
+// if parseErr := parse(line, &item); parseErr != nil {
+// err = multierr.Append(err, parseErr)
+// continue
+// }
+// items = append(items, item)
+// }
func AppendInto(into *error, err error) (errored bool) {
if into == nil {
// We panic if 'into' is nil. This is not documented above
@@ -545,7 +512,7 @@ func AppendInto(into *error, err error) (errored bool) {
// AppendInvoke to append the result of calling the function into an error.
// This allows you to conveniently defer capture of failing operations.
//
-// See also, Close and Invoke.
+// See also, [Close] and [Invoke].
type Invoker interface {
Invoke() error
}
@@ -556,19 +523,22 @@ type Invoker interface {
//
// For example,
//
-// func processReader(r io.Reader) (err error) {
-// scanner := bufio.NewScanner(r)
-// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
-// for scanner.Scan() {
-// // ...
-// }
-// // ...
-// }
+// func processReader(r io.Reader) (err error) {
+// scanner := bufio.NewScanner(r)
+// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
+// for scanner.Scan() {
+// // ...
+// }
+// // ...
+// }
//
// In this example, the following line will construct the Invoker right away,
// but defer the invocation of scanner.Err() until the function returns.
//
-// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
+// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
+//
+// Note that the error you're appending to from the defer statement MUST be a
+// named return.
type Invoke func() error
// Invoke calls the supplied function and returns its result.
@@ -579,19 +549,22 @@ func (i Invoke) Invoke() error { return i() }
//
// For example,
//
-// func processFile(path string) (err error) {
-// f, err := os.Open(path)
-// if err != nil {
-// return err
-// }
-// defer multierr.AppendInvoke(&err, multierr.Close(f))
-// return processReader(f)
-// }
+// func processFile(path string) (err error) {
+// f, err := os.Open(path)
+// if err != nil {
+// return err
+// }
+// defer multierr.AppendInvoke(&err, multierr.Close(f))
+// return processReader(f)
+// }
//
// In this example, multierr.Close will construct the Invoker right away, but
// defer the invocation of f.Close until the function returns.
//
-// defer multierr.AppendInvoke(&err, multierr.Close(f))
+// defer multierr.AppendInvoke(&err, multierr.Close(f))
+//
+// Note that the error you're appending to from the defer statement MUST be a
+// named return.
func Close(closer io.Closer) Invoker {
return Invoke(closer.Close)
}
@@ -601,52 +574,73 @@ func Close(closer io.Closer) Invoker {
// invocation of fallible operations until a function returns, and capture the
// resulting errors.
//
-// func doSomething(...) (err error) {
-// // ...
-// f, err := openFile(..)
-// if err != nil {
-// return err
-// }
+// func doSomething(...) (err error) {
+// // ...
+// f, err := openFile(..)
+// if err != nil {
+// return err
+// }
+//
+// // multierr will call f.Close() when this function returns and
+// // if the operation fails, its append its error into the
+// // returned error.
+// defer multierr.AppendInvoke(&err, multierr.Close(f))
//
-// // multierr will call f.Close() when this function returns and
-// // if the operation fails, its append its error into the
-// // returned error.
-// defer multierr.AppendInvoke(&err, multierr.Close(f))
+// scanner := bufio.NewScanner(f)
+// // Similarly, this scheduled scanner.Err to be called and
+// // inspected when the function returns and append its error
+// // into the returned error.
+// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
//
-// scanner := bufio.NewScanner(f)
-// // Similarly, this scheduled scanner.Err to be called and
-// // inspected when the function returns and append its error
-// // into the returned error.
-// defer multierr.AppendInvoke(&err, multierr.Invoke(scanner.Err))
+// // ...
+// }
//
-// // ...
-// }
+// NOTE: If used with a defer, the error variable MUST be a named return.
//
// Without defer, AppendInvoke behaves exactly like AppendInto.
//
-// err := // ...
-// multierr.AppendInvoke(&err, mutltierr.Invoke(foo))
+// err := // ...
+// multierr.AppendInvoke(&err, mutltierr.Invoke(foo))
//
-// // ...is roughly equivalent to...
+// // ...is roughly equivalent to...
//
-// err := // ...
-// multierr.AppendInto(&err, foo())
+// err := // ...
+// multierr.AppendInto(&err, foo())
//
// The advantage of the indirection introduced by Invoker is to make it easy
// to defer the invocation of a function. Without this indirection, the
// invoked function will be evaluated at the time of the defer block rather
// than when the function returns.
//
-// // BAD: This is likely not what the caller intended. This will evaluate
-// // foo() right away and append its result into the error when the
-// // function returns.
-// defer multierr.AppendInto(&err, foo())
+// // BAD: This is likely not what the caller intended. This will evaluate
+// // foo() right away and append its result into the error when the
+// // function returns.
+// defer multierr.AppendInto(&err, foo())
//
-// // GOOD: This will defer invocation of foo unutil the function returns.
-// defer multierr.AppendInvoke(&err, multierr.Invoke(foo))
+// // GOOD: This will defer invocation of foo unutil the function returns.
+// defer multierr.AppendInvoke(&err, multierr.Invoke(foo))
//
// multierr provides a few Invoker implementations out of the box for
-// convenience. See Invoker for more information.
+// convenience. See [Invoker] for more information.
func AppendInvoke(into *error, invoker Invoker) {
AppendInto(into, invoker.Invoke())
}
+
+// AppendFunc is a shorthand for [AppendInvoke].
+// It allows using function or method value directly
+// without having to wrap it into an [Invoker] interface.
+//
+// func doSomething(...) (err error) {
+// w, err := startWorker(...)
+// if err != nil {
+// return err
+// }
+//
+// // multierr will call w.Stop() when this function returns and
+// // if the operation fails, it appends its error into the
+// // returned error.
+// defer multierr.AppendFunc(&err, w.Stop)
+// }
+func AppendFunc(into *error, fn func() error) {
+ AppendInvoke(into, Invoke(fn))
+}
diff --git a/vendor/go.uber.org/multierr/error_post_go120.go b/vendor/go.uber.org/multierr/error_post_go120.go
new file mode 100644
index 000000000..a173f9c25
--- /dev/null
+++ b/vendor/go.uber.org/multierr/error_post_go120.go
@@ -0,0 +1,48 @@
+// Copyright (c) 2017-2023 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+//go:build go1.20
+// +build go1.20
+
+package multierr
+
+// Unwrap returns a list of errors wrapped by this multierr.
+func (merr *multiError) Unwrap() []error {
+ return merr.Errors()
+}
+
+type multipleErrors interface {
+ Unwrap() []error
+}
+
+func extractErrors(err error) []error {
+ if err == nil {
+ return nil
+ }
+
+ // check if the given err is an Unwrapable error that
+ // implements multipleErrors interface.
+ eg, ok := err.(multipleErrors)
+ if !ok {
+ return []error{err}
+ }
+
+ return append(([]error)(nil), eg.Unwrap()...)
+}
diff --git a/vendor/go.uber.org/multierr/error_pre_go120.go b/vendor/go.uber.org/multierr/error_pre_go120.go
new file mode 100644
index 000000000..93872a3fc
--- /dev/null
+++ b/vendor/go.uber.org/multierr/error_pre_go120.go
@@ -0,0 +1,79 @@
+// Copyright (c) 2017-2023 Uber Technologies, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+//go:build !go1.20
+// +build !go1.20
+
+package multierr
+
+import "errors"
+
+// Versions of Go before 1.20 did not support the Unwrap() []error method.
+// This provides a similar behavior by implementing the Is(..) and As(..)
+// methods.
+// See the errors.Join proposal for details:
+// https://github.com/golang/go/issues/53435
+
+// As attempts to find the first error in the error list that matches the type
+// of the value that target points to.
+//
+// This function allows errors.As to traverse the values stored on the
+// multierr error.
+func (merr *multiError) As(target interface{}) bool {
+ for _, err := range merr.Errors() {
+ if errors.As(err, target) {
+ return true
+ }
+ }
+ return false
+}
+
+// Is attempts to match the provided error against errors in the error list.
+//
+// This function allows errors.Is to traverse the values stored on the
+// multierr error.
+func (merr *multiError) Is(target error) bool {
+ for _, err := range merr.Errors() {
+ if errors.Is(err, target) {
+ return true
+ }
+ }
+ return false
+}
+
+func extractErrors(err error) []error {
+ if err == nil {
+ return nil
+ }
+
+ // Note that we're casting to multiError, not errorGroup. Our contract is
+ // that returned errors MAY implement errorGroup. Errors, however, only
+ // has special behavior for multierr-specific error objects.
+ //
+ // This behavior can be expanded in the future but I think it's prudent to
+ // start with as little as possible in terms of contract and possibility
+ // of misuse.
+ eg, ok := err.(*multiError)
+ if !ok {
+ return []error{err}
+ }
+
+ return append(([]error)(nil), eg.Errors()...)
+}
diff --git a/vendor/go.uber.org/multierr/glide.yaml b/vendor/go.uber.org/multierr/glide.yaml
deleted file mode 100644
index 6ef084ec2..000000000
--- a/vendor/go.uber.org/multierr/glide.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-package: go.uber.org/multierr
-import:
-- package: go.uber.org/atomic
- version: ^1
-testImport:
-- package: github.com/stretchr/testify
- subpackages:
- - assert
diff --git a/vendor/golang.org/x/exp/constraints/constraints.go b/vendor/golang.org/x/exp/constraints/constraints.go
new file mode 100644
index 000000000..2c033dff4
--- /dev/null
+++ b/vendor/golang.org/x/exp/constraints/constraints.go
@@ -0,0 +1,50 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package constraints defines a set of useful constraints to be used
+// with type parameters.
+package constraints
+
+// Signed is a constraint that permits any signed integer type.
+// If future releases of Go add new predeclared signed integer types,
+// this constraint will be modified to include them.
+type Signed interface {
+ ~int | ~int8 | ~int16 | ~int32 | ~int64
+}
+
+// Unsigned is a constraint that permits any unsigned integer type.
+// If future releases of Go add new predeclared unsigned integer types,
+// this constraint will be modified to include them.
+type Unsigned interface {
+ ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
+}
+
+// Integer is a constraint that permits any integer type.
+// If future releases of Go add new predeclared integer types,
+// this constraint will be modified to include them.
+type Integer interface {
+ Signed | Unsigned
+}
+
+// Float is a constraint that permits any floating-point type.
+// If future releases of Go add new predeclared floating-point types,
+// this constraint will be modified to include them.
+type Float interface {
+ ~float32 | ~float64
+}
+
+// Complex is a constraint that permits any complex numeric type.
+// If future releases of Go add new predeclared complex numeric types,
+// this constraint will be modified to include them.
+type Complex interface {
+ ~complex64 | ~complex128
+}
+
+// Ordered is a constraint that permits any ordered type: any type
+// that supports the operators < <= >= >.
+// If future releases of Go add new ordered types,
+// this constraint will be modified to include them.
+type Ordered interface {
+ Integer | Float | ~string
+}
diff --git a/vendor/golang.org/x/exp/slices/slices.go b/vendor/golang.org/x/exp/slices/slices.go
new file mode 100644
index 000000000..2540bd682
--- /dev/null
+++ b/vendor/golang.org/x/exp/slices/slices.go
@@ -0,0 +1,258 @@
+// Copyright 2021 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package slices defines various functions useful with slices of any type.
+// Unless otherwise specified, these functions all apply to the elements
+// of a slice at index 0 <= i < len(s).
+//
+// Note that the less function in IsSortedFunc, SortFunc, SortStableFunc requires a
+// strict weak ordering (https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings),
+// or the sorting may fail to sort correctly. A common case is when sorting slices of
+// floating-point numbers containing NaN values.
+package slices
+
+import "golang.org/x/exp/constraints"
+
+// Equal reports whether two slices are equal: the same length and all
+// elements equal. If the lengths are different, Equal returns false.
+// Otherwise, the elements are compared in increasing index order, and the
+// comparison stops at the first unequal pair.
+// Floating point NaNs are not considered equal.
+func Equal[E comparable](s1, s2 []E) bool {
+ if len(s1) != len(s2) {
+ return false
+ }
+ for i := range s1 {
+ if s1[i] != s2[i] {
+ return false
+ }
+ }
+ return true
+}
+
+// EqualFunc reports whether two slices are equal using a comparison
+// function on each pair of elements. If the lengths are different,
+// EqualFunc returns false. Otherwise, the elements are compared in
+// increasing index order, and the comparison stops at the first index
+// for which eq returns false.
+func EqualFunc[E1, E2 any](s1 []E1, s2 []E2, eq func(E1, E2) bool) bool {
+ if len(s1) != len(s2) {
+ return false
+ }
+ for i, v1 := range s1 {
+ v2 := s2[i]
+ if !eq(v1, v2) {
+ return false
+ }
+ }
+ return true
+}
+
+// Compare compares the elements of s1 and s2.
+// The elements are compared sequentially, starting at index 0,
+// until one element is not equal to the other.
+// The result of comparing the first non-matching elements is returned.
+// If both slices are equal until one of them ends, the shorter slice is
+// considered less than the longer one.
+// The result is 0 if s1 == s2, -1 if s1 < s2, and +1 if s1 > s2.
+// Comparisons involving floating point NaNs are ignored.
+func Compare[E constraints.Ordered](s1, s2 []E) int {
+ s2len := len(s2)
+ for i, v1 := range s1 {
+ if i >= s2len {
+ return +1
+ }
+ v2 := s2[i]
+ switch {
+ case v1 < v2:
+ return -1
+ case v1 > v2:
+ return +1
+ }
+ }
+ if len(s1) < s2len {
+ return -1
+ }
+ return 0
+}
+
+// CompareFunc is like Compare but uses a comparison function
+// on each pair of elements. The elements are compared in increasing
+// index order, and the comparisons stop after the first time cmp
+// returns non-zero.
+// The result is the first non-zero result of cmp; if cmp always
+// returns 0 the result is 0 if len(s1) == len(s2), -1 if len(s1) < len(s2),
+// and +1 if len(s1) > len(s2).
+func CompareFunc[E1, E2 any](s1 []E1, s2 []E2, cmp func(E1, E2) int) int {
+ s2len := len(s2)
+ for i, v1 := range s1 {
+ if i >= s2len {
+ return +1
+ }
+ v2 := s2[i]
+ if c := cmp(v1, v2); c != 0 {
+ return c
+ }
+ }
+ if len(s1) < s2len {
+ return -1
+ }
+ return 0
+}
+
+// Index returns the index of the first occurrence of v in s,
+// or -1 if not present.
+func Index[E comparable](s []E, v E) int {
+ for i := range s {
+ if v == s[i] {
+ return i
+ }
+ }
+ return -1
+}
+
+// IndexFunc returns the first index i satisfying f(s[i]),
+// or -1 if none do.
+func IndexFunc[E any](s []E, f func(E) bool) int {
+ for i := range s {
+ if f(s[i]) {
+ return i
+ }
+ }
+ return -1
+}
+
+// Contains reports whether v is present in s.
+func Contains[E comparable](s []E, v E) bool {
+ return Index(s, v) >= 0
+}
+
+// ContainsFunc reports whether at least one
+// element e of s satisfies f(e).
+func ContainsFunc[E any](s []E, f func(E) bool) bool {
+ return IndexFunc(s, f) >= 0
+}
+
+// Insert inserts the values v... into s at index i,
+// returning the modified slice.
+// In the returned slice r, r[i] == v[0].
+// Insert panics if i is out of range.
+// This function is O(len(s) + len(v)).
+func Insert[S ~[]E, E any](s S, i int, v ...E) S {
+ tot := len(s) + len(v)
+ if tot <= cap(s) {
+ s2 := s[:tot]
+ copy(s2[i+len(v):], s[i:])
+ copy(s2[i:], v)
+ return s2
+ }
+ s2 := make(S, tot)
+ copy(s2, s[:i])
+ copy(s2[i:], v)
+ copy(s2[i+len(v):], s[i:])
+ return s2
+}
+
+// Delete removes the elements s[i:j] from s, returning the modified slice.
+// Delete panics if s[i:j] is not a valid slice of s.
+// Delete modifies the contents of the slice s; it does not create a new slice.
+// Delete is O(len(s)-j), so if many items must be deleted, it is better to
+// make a single call deleting them all together than to delete one at a time.
+// Delete might not modify the elements s[len(s)-(j-i):len(s)]. If those
+// elements contain pointers you might consider zeroing those elements so that
+// objects they reference can be garbage collected.
+func Delete[S ~[]E, E any](s S, i, j int) S {
+ _ = s[i:j] // bounds check
+
+ return append(s[:i], s[j:]...)
+}
+
+// Replace replaces the elements s[i:j] by the given v, and returns the
+// modified slice. Replace panics if s[i:j] is not a valid slice of s.
+func Replace[S ~[]E, E any](s S, i, j int, v ...E) S {
+ _ = s[i:j] // verify that i:j is a valid subslice
+ tot := len(s[:i]) + len(v) + len(s[j:])
+ if tot <= cap(s) {
+ s2 := s[:tot]
+ copy(s2[i+len(v):], s[j:])
+ copy(s2[i:], v)
+ return s2
+ }
+ s2 := make(S, tot)
+ copy(s2, s[:i])
+ copy(s2[i:], v)
+ copy(s2[i+len(v):], s[j:])
+ return s2
+}
+
+// Clone returns a copy of the slice.
+// The elements are copied using assignment, so this is a shallow clone.
+func Clone[S ~[]E, E any](s S) S {
+ // Preserve nil in case it matters.
+ if s == nil {
+ return nil
+ }
+ return append(S([]E{}), s...)
+}
+
+// Compact replaces consecutive runs of equal elements with a single copy.
+// This is like the uniq command found on Unix.
+// Compact modifies the contents of the slice s; it does not create a new slice.
+// When Compact discards m elements in total, it might not modify the elements
+// s[len(s)-m:len(s)]. If those elements contain pointers you might consider
+// zeroing those elements so that objects they reference can be garbage collected.
+func Compact[S ~[]E, E comparable](s S) S {
+ if len(s) < 2 {
+ return s
+ }
+ i := 1
+ for k := 1; k < len(s); k++ {
+ if s[k] != s[k-1] {
+ if i != k {
+ s[i] = s[k]
+ }
+ i++
+ }
+ }
+ return s[:i]
+}
+
+// CompactFunc is like Compact but uses a comparison function.
+func CompactFunc[S ~[]E, E any](s S, eq func(E, E) bool) S {
+ if len(s) < 2 {
+ return s
+ }
+ i := 1
+ for k := 1; k < len(s); k++ {
+ if !eq(s[k], s[k-1]) {
+ if i != k {
+ s[i] = s[k]
+ }
+ i++
+ }
+ }
+ return s[:i]
+}
+
+// Grow increases the slice's capacity, if necessary, to guarantee space for
+// another n elements. After Grow(n), at least n elements can be appended
+// to the slice without another allocation. If n is negative or too large to
+// allocate the memory, Grow panics.
+func Grow[S ~[]E, E any](s S, n int) S {
+ if n < 0 {
+ panic("cannot be negative")
+ }
+ if n -= cap(s) - len(s); n > 0 {
+ // TODO(https://go.dev/issue/53888): Make using []E instead of S
+ // to workaround a compiler bug where the runtime.growslice optimization
+ // does not take effect. Revert when the compiler is fixed.
+ s = append([]E(s)[:cap(s)], make([]E, n)...)[:len(s)]
+ }
+ return s
+}
+
+// Clip removes unused capacity from the slice, returning s[:len(s):len(s)].
+func Clip[S ~[]E, E any](s S) S {
+ return s[:len(s):len(s)]
+}
diff --git a/vendor/golang.org/x/exp/slices/sort.go b/vendor/golang.org/x/exp/slices/sort.go
new file mode 100644
index 000000000..231b6448a
--- /dev/null
+++ b/vendor/golang.org/x/exp/slices/sort.go
@@ -0,0 +1,128 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package slices
+
+import (
+ "math/bits"
+
+ "golang.org/x/exp/constraints"
+)
+
+// Sort sorts a slice of any ordered type in ascending order.
+// Sort may fail to sort correctly when sorting slices of floating-point
+// numbers containing Not-a-number (NaN) values.
+// Use slices.SortFunc(x, func(a, b float64) bool {return a < b || (math.IsNaN(a) && !math.IsNaN(b))})
+// instead if the input may contain NaNs.
+func Sort[E constraints.Ordered](x []E) {
+ n := len(x)
+ pdqsortOrdered(x, 0, n, bits.Len(uint(n)))
+}
+
+// SortFunc sorts the slice x in ascending order as determined by the less function.
+// This sort is not guaranteed to be stable.
+//
+// SortFunc requires that less is a strict weak ordering.
+// See https://en.wikipedia.org/wiki/Weak_ordering#Strict_weak_orderings.
+func SortFunc[E any](x []E, less func(a, b E) bool) {
+ n := len(x)
+ pdqsortLessFunc(x, 0, n, bits.Len(uint(n)), less)
+}
+
+// SortStableFunc sorts the slice x while keeping the original order of equal
+// elements, using less to compare elements.
+func SortStableFunc[E any](x []E, less func(a, b E) bool) {
+ stableLessFunc(x, len(x), less)
+}
+
+// IsSorted reports whether x is sorted in ascending order.
+func IsSorted[E constraints.Ordered](x []E) bool {
+ for i := len(x) - 1; i > 0; i-- {
+ if x[i] < x[i-1] {
+ return false
+ }
+ }
+ return true
+}
+
+// IsSortedFunc reports whether x is sorted in ascending order, with less as the
+// comparison function.
+func IsSortedFunc[E any](x []E, less func(a, b E) bool) bool {
+ for i := len(x) - 1; i > 0; i-- {
+ if less(x[i], x[i-1]) {
+ return false
+ }
+ }
+ return true
+}
+
+// BinarySearch searches for target in a sorted slice and returns the position
+// where target is found, or the position where target would appear in the
+// sort order; it also returns a bool saying whether the target is really found
+// in the slice. The slice must be sorted in increasing order.
+func BinarySearch[E constraints.Ordered](x []E, target E) (int, bool) {
+ // Inlining is faster than calling BinarySearchFunc with a lambda.
+ n := len(x)
+ // Define x[-1] < target and x[n] >= target.
+ // Invariant: x[i-1] < target, x[j] >= target.
+ i, j := 0, n
+ for i < j {
+ h := int(uint(i+j) >> 1) // avoid overflow when computing h
+ // i ≤ h < j
+ if x[h] < target {
+ i = h + 1 // preserves x[i-1] < target
+ } else {
+ j = h // preserves x[j] >= target
+ }
+ }
+ // i == j, x[i-1] < target, and x[j] (= x[i]) >= target => answer is i.
+ return i, i < n && x[i] == target
+}
+
+// BinarySearchFunc works like BinarySearch, but uses a custom comparison
+// function. The slice must be sorted in increasing order, where "increasing"
+// is defined by cmp. cmp should return 0 if the slice element matches
+// the target, a negative number if the slice element precedes the target,
+// or a positive number if the slice element follows the target.
+// cmp must implement the same ordering as the slice, such that if
+// cmp(a, t) < 0 and cmp(b, t) >= 0, then a must precede b in the slice.
+func BinarySearchFunc[E, T any](x []E, target T, cmp func(E, T) int) (int, bool) {
+ n := len(x)
+ // Define cmp(x[-1], target) < 0 and cmp(x[n], target) >= 0 .
+ // Invariant: cmp(x[i - 1], target) < 0, cmp(x[j], target) >= 0.
+ i, j := 0, n
+ for i < j {
+ h := int(uint(i+j) >> 1) // avoid overflow when computing h
+ // i ≤ h < j
+ if cmp(x[h], target) < 0 {
+ i = h + 1 // preserves cmp(x[i - 1], target) < 0
+ } else {
+ j = h // preserves cmp(x[j], target) >= 0
+ }
+ }
+ // i == j, cmp(x[i-1], target) < 0, and cmp(x[j], target) (= cmp(x[i], target)) >= 0 => answer is i.
+ return i, i < n && cmp(x[i], target) == 0
+}
+
+type sortedHint int // hint for pdqsort when choosing the pivot
+
+const (
+ unknownHint sortedHint = iota
+ increasingHint
+ decreasingHint
+)
+
+// xorshift paper: https://www.jstatsoft.org/article/view/v008i14/xorshift.pdf
+type xorshift uint64
+
+func (r *xorshift) Next() uint64 {
+ *r ^= *r << 13
+ *r ^= *r >> 17
+ *r ^= *r << 5
+ return uint64(*r)
+}
+
+func nextPowerOfTwo(length int) uint {
+ return 1 << bits.Len(uint(length))
+}
diff --git a/vendor/golang.org/x/exp/slices/zsortfunc.go b/vendor/golang.org/x/exp/slices/zsortfunc.go
new file mode 100644
index 000000000..2a632476c
--- /dev/null
+++ b/vendor/golang.org/x/exp/slices/zsortfunc.go
@@ -0,0 +1,479 @@
+// Code generated by gen_sort_variants.go; DO NOT EDIT.
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package slices
+
+// insertionSortLessFunc sorts data[a:b] using insertion sort.
+func insertionSortLessFunc[E any](data []E, a, b int, less func(a, b E) bool) {
+ for i := a + 1; i < b; i++ {
+ for j := i; j > a && less(data[j], data[j-1]); j-- {
+ data[j], data[j-1] = data[j-1], data[j]
+ }
+ }
+}
+
+// siftDownLessFunc implements the heap property on data[lo:hi].
+// first is an offset into the array where the root of the heap lies.
+func siftDownLessFunc[E any](data []E, lo, hi, first int, less func(a, b E) bool) {
+ root := lo
+ for {
+ child := 2*root + 1
+ if child >= hi {
+ break
+ }
+ if child+1 < hi && less(data[first+child], data[first+child+1]) {
+ child++
+ }
+ if !less(data[first+root], data[first+child]) {
+ return
+ }
+ data[first+root], data[first+child] = data[first+child], data[first+root]
+ root = child
+ }
+}
+
+func heapSortLessFunc[E any](data []E, a, b int, less func(a, b E) bool) {
+ first := a
+ lo := 0
+ hi := b - a
+
+ // Build heap with greatest element at top.
+ for i := (hi - 1) / 2; i >= 0; i-- {
+ siftDownLessFunc(data, i, hi, first, less)
+ }
+
+ // Pop elements, largest first, into end of data.
+ for i := hi - 1; i >= 0; i-- {
+ data[first], data[first+i] = data[first+i], data[first]
+ siftDownLessFunc(data, lo, i, first, less)
+ }
+}
+
+// pdqsortLessFunc sorts data[a:b].
+// The algorithm based on pattern-defeating quicksort(pdqsort), but without the optimizations from BlockQuicksort.
+// pdqsort paper: https://arxiv.org/pdf/2106.05123.pdf
+// C++ implementation: https://github.com/orlp/pdqsort
+// Rust implementation: https://docs.rs/pdqsort/latest/pdqsort/
+// limit is the number of allowed bad (very unbalanced) pivots before falling back to heapsort.
+func pdqsortLessFunc[E any](data []E, a, b, limit int, less func(a, b E) bool) {
+ const maxInsertion = 12
+
+ var (
+ wasBalanced = true // whether the last partitioning was reasonably balanced
+ wasPartitioned = true // whether the slice was already partitioned
+ )
+
+ for {
+ length := b - a
+
+ if length <= maxInsertion {
+ insertionSortLessFunc(data, a, b, less)
+ return
+ }
+
+ // Fall back to heapsort if too many bad choices were made.
+ if limit == 0 {
+ heapSortLessFunc(data, a, b, less)
+ return
+ }
+
+ // If the last partitioning was imbalanced, we need to breaking patterns.
+ if !wasBalanced {
+ breakPatternsLessFunc(data, a, b, less)
+ limit--
+ }
+
+ pivot, hint := choosePivotLessFunc(data, a, b, less)
+ if hint == decreasingHint {
+ reverseRangeLessFunc(data, a, b, less)
+ // The chosen pivot was pivot-a elements after the start of the array.
+ // After reversing it is pivot-a elements before the end of the array.
+ // The idea came from Rust's implementation.
+ pivot = (b - 1) - (pivot - a)
+ hint = increasingHint
+ }
+
+ // The slice is likely already sorted.
+ if wasBalanced && wasPartitioned && hint == increasingHint {
+ if partialInsertionSortLessFunc(data, a, b, less) {
+ return
+ }
+ }
+
+ // Probably the slice contains many duplicate elements, partition the slice into
+ // elements equal to and elements greater than the pivot.
+ if a > 0 && !less(data[a-1], data[pivot]) {
+ mid := partitionEqualLessFunc(data, a, b, pivot, less)
+ a = mid
+ continue
+ }
+
+ mid, alreadyPartitioned := partitionLessFunc(data, a, b, pivot, less)
+ wasPartitioned = alreadyPartitioned
+
+ leftLen, rightLen := mid-a, b-mid
+ balanceThreshold := length / 8
+ if leftLen < rightLen {
+ wasBalanced = leftLen >= balanceThreshold
+ pdqsortLessFunc(data, a, mid, limit, less)
+ a = mid + 1
+ } else {
+ wasBalanced = rightLen >= balanceThreshold
+ pdqsortLessFunc(data, mid+1, b, limit, less)
+ b = mid
+ }
+ }
+}
+
+// partitionLessFunc does one quicksort partition.
+// Let p = data[pivot]
+// Moves elements in data[a:b] around, so that data[i]=p for inewpivot.
+// On return, data[newpivot] = p
+func partitionLessFunc[E any](data []E, a, b, pivot int, less func(a, b E) bool) (newpivot int, alreadyPartitioned bool) {
+ data[a], data[pivot] = data[pivot], data[a]
+ i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned
+
+ for i <= j && less(data[i], data[a]) {
+ i++
+ }
+ for i <= j && !less(data[j], data[a]) {
+ j--
+ }
+ if i > j {
+ data[j], data[a] = data[a], data[j]
+ return j, true
+ }
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+
+ for {
+ for i <= j && less(data[i], data[a]) {
+ i++
+ }
+ for i <= j && !less(data[j], data[a]) {
+ j--
+ }
+ if i > j {
+ break
+ }
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+ }
+ data[j], data[a] = data[a], data[j]
+ return j, false
+}
+
+// partitionEqualLessFunc partitions data[a:b] into elements equal to data[pivot] followed by elements greater than data[pivot].
+// It assumed that data[a:b] does not contain elements smaller than the data[pivot].
+func partitionEqualLessFunc[E any](data []E, a, b, pivot int, less func(a, b E) bool) (newpivot int) {
+ data[a], data[pivot] = data[pivot], data[a]
+ i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned
+
+ for {
+ for i <= j && !less(data[a], data[i]) {
+ i++
+ }
+ for i <= j && less(data[a], data[j]) {
+ j--
+ }
+ if i > j {
+ break
+ }
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+ }
+ return i
+}
+
+// partialInsertionSortLessFunc partially sorts a slice, returns true if the slice is sorted at the end.
+func partialInsertionSortLessFunc[E any](data []E, a, b int, less func(a, b E) bool) bool {
+ const (
+ maxSteps = 5 // maximum number of adjacent out-of-order pairs that will get shifted
+ shortestShifting = 50 // don't shift any elements on short arrays
+ )
+ i := a + 1
+ for j := 0; j < maxSteps; j++ {
+ for i < b && !less(data[i], data[i-1]) {
+ i++
+ }
+
+ if i == b {
+ return true
+ }
+
+ if b-a < shortestShifting {
+ return false
+ }
+
+ data[i], data[i-1] = data[i-1], data[i]
+
+ // Shift the smaller one to the left.
+ if i-a >= 2 {
+ for j := i - 1; j >= 1; j-- {
+ if !less(data[j], data[j-1]) {
+ break
+ }
+ data[j], data[j-1] = data[j-1], data[j]
+ }
+ }
+ // Shift the greater one to the right.
+ if b-i >= 2 {
+ for j := i + 1; j < b; j++ {
+ if !less(data[j], data[j-1]) {
+ break
+ }
+ data[j], data[j-1] = data[j-1], data[j]
+ }
+ }
+ }
+ return false
+}
+
+// breakPatternsLessFunc scatters some elements around in an attempt to break some patterns
+// that might cause imbalanced partitions in quicksort.
+func breakPatternsLessFunc[E any](data []E, a, b int, less func(a, b E) bool) {
+ length := b - a
+ if length >= 8 {
+ random := xorshift(length)
+ modulus := nextPowerOfTwo(length)
+
+ for idx := a + (length/4)*2 - 1; idx <= a+(length/4)*2+1; idx++ {
+ other := int(uint(random.Next()) & (modulus - 1))
+ if other >= length {
+ other -= length
+ }
+ data[idx], data[a+other] = data[a+other], data[idx]
+ }
+ }
+}
+
+// choosePivotLessFunc chooses a pivot in data[a:b].
+//
+// [0,8): chooses a static pivot.
+// [8,shortestNinther): uses the simple median-of-three method.
+// [shortestNinther,∞): uses the Tukey ninther method.
+func choosePivotLessFunc[E any](data []E, a, b int, less func(a, b E) bool) (pivot int, hint sortedHint) {
+ const (
+ shortestNinther = 50
+ maxSwaps = 4 * 3
+ )
+
+ l := b - a
+
+ var (
+ swaps int
+ i = a + l/4*1
+ j = a + l/4*2
+ k = a + l/4*3
+ )
+
+ if l >= 8 {
+ if l >= shortestNinther {
+ // Tukey ninther method, the idea came from Rust's implementation.
+ i = medianAdjacentLessFunc(data, i, &swaps, less)
+ j = medianAdjacentLessFunc(data, j, &swaps, less)
+ k = medianAdjacentLessFunc(data, k, &swaps, less)
+ }
+ // Find the median among i, j, k and stores it into j.
+ j = medianLessFunc(data, i, j, k, &swaps, less)
+ }
+
+ switch swaps {
+ case 0:
+ return j, increasingHint
+ case maxSwaps:
+ return j, decreasingHint
+ default:
+ return j, unknownHint
+ }
+}
+
+// order2LessFunc returns x,y where data[x] <= data[y], where x,y=a,b or x,y=b,a.
+func order2LessFunc[E any](data []E, a, b int, swaps *int, less func(a, b E) bool) (int, int) {
+ if less(data[b], data[a]) {
+ *swaps++
+ return b, a
+ }
+ return a, b
+}
+
+// medianLessFunc returns x where data[x] is the median of data[a],data[b],data[c], where x is a, b, or c.
+func medianLessFunc[E any](data []E, a, b, c int, swaps *int, less func(a, b E) bool) int {
+ a, b = order2LessFunc(data, a, b, swaps, less)
+ b, c = order2LessFunc(data, b, c, swaps, less)
+ a, b = order2LessFunc(data, a, b, swaps, less)
+ return b
+}
+
+// medianAdjacentLessFunc finds the median of data[a - 1], data[a], data[a + 1] and stores the index into a.
+func medianAdjacentLessFunc[E any](data []E, a int, swaps *int, less func(a, b E) bool) int {
+ return medianLessFunc(data, a-1, a, a+1, swaps, less)
+}
+
+func reverseRangeLessFunc[E any](data []E, a, b int, less func(a, b E) bool) {
+ i := a
+ j := b - 1
+ for i < j {
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+ }
+}
+
+func swapRangeLessFunc[E any](data []E, a, b, n int, less func(a, b E) bool) {
+ for i := 0; i < n; i++ {
+ data[a+i], data[b+i] = data[b+i], data[a+i]
+ }
+}
+
+func stableLessFunc[E any](data []E, n int, less func(a, b E) bool) {
+ blockSize := 20 // must be > 0
+ a, b := 0, blockSize
+ for b <= n {
+ insertionSortLessFunc(data, a, b, less)
+ a = b
+ b += blockSize
+ }
+ insertionSortLessFunc(data, a, n, less)
+
+ for blockSize < n {
+ a, b = 0, 2*blockSize
+ for b <= n {
+ symMergeLessFunc(data, a, a+blockSize, b, less)
+ a = b
+ b += 2 * blockSize
+ }
+ if m := a + blockSize; m < n {
+ symMergeLessFunc(data, a, m, n, less)
+ }
+ blockSize *= 2
+ }
+}
+
+// symMergeLessFunc merges the two sorted subsequences data[a:m] and data[m:b] using
+// the SymMerge algorithm from Pok-Son Kim and Arne Kutzner, "Stable Minimum
+// Storage Merging by Symmetric Comparisons", in Susanne Albers and Tomasz
+// Radzik, editors, Algorithms - ESA 2004, volume 3221 of Lecture Notes in
+// Computer Science, pages 714-723. Springer, 2004.
+//
+// Let M = m-a and N = b-n. Wolog M < N.
+// The recursion depth is bound by ceil(log(N+M)).
+// The algorithm needs O(M*log(N/M + 1)) calls to data.Less.
+// The algorithm needs O((M+N)*log(M)) calls to data.Swap.
+//
+// The paper gives O((M+N)*log(M)) as the number of assignments assuming a
+// rotation algorithm which uses O(M+N+gcd(M+N)) assignments. The argumentation
+// in the paper carries through for Swap operations, especially as the block
+// swapping rotate uses only O(M+N) Swaps.
+//
+// symMerge assumes non-degenerate arguments: a < m && m < b.
+// Having the caller check this condition eliminates many leaf recursion calls,
+// which improves performance.
+func symMergeLessFunc[E any](data []E, a, m, b int, less func(a, b E) bool) {
+ // Avoid unnecessary recursions of symMerge
+ // by direct insertion of data[a] into data[m:b]
+ // if data[a:m] only contains one element.
+ if m-a == 1 {
+ // Use binary search to find the lowest index i
+ // such that data[i] >= data[a] for m <= i < b.
+ // Exit the search loop with i == b in case no such index exists.
+ i := m
+ j := b
+ for i < j {
+ h := int(uint(i+j) >> 1)
+ if less(data[h], data[a]) {
+ i = h + 1
+ } else {
+ j = h
+ }
+ }
+ // Swap values until data[a] reaches the position before i.
+ for k := a; k < i-1; k++ {
+ data[k], data[k+1] = data[k+1], data[k]
+ }
+ return
+ }
+
+ // Avoid unnecessary recursions of symMerge
+ // by direct insertion of data[m] into data[a:m]
+ // if data[m:b] only contains one element.
+ if b-m == 1 {
+ // Use binary search to find the lowest index i
+ // such that data[i] > data[m] for a <= i < m.
+ // Exit the search loop with i == m in case no such index exists.
+ i := a
+ j := m
+ for i < j {
+ h := int(uint(i+j) >> 1)
+ if !less(data[m], data[h]) {
+ i = h + 1
+ } else {
+ j = h
+ }
+ }
+ // Swap values until data[m] reaches the position i.
+ for k := m; k > i; k-- {
+ data[k], data[k-1] = data[k-1], data[k]
+ }
+ return
+ }
+
+ mid := int(uint(a+b) >> 1)
+ n := mid + m
+ var start, r int
+ if m > mid {
+ start = n - b
+ r = mid
+ } else {
+ start = a
+ r = m
+ }
+ p := n - 1
+
+ for start < r {
+ c := int(uint(start+r) >> 1)
+ if !less(data[p-c], data[c]) {
+ start = c + 1
+ } else {
+ r = c
+ }
+ }
+
+ end := n - start
+ if start < m && m < end {
+ rotateLessFunc(data, start, m, end, less)
+ }
+ if a < start && start < mid {
+ symMergeLessFunc(data, a, start, mid, less)
+ }
+ if mid < end && end < b {
+ symMergeLessFunc(data, mid, end, b, less)
+ }
+}
+
+// rotateLessFunc rotates two consecutive blocks u = data[a:m] and v = data[m:b] in data:
+// Data of the form 'x u v y' is changed to 'x v u y'.
+// rotate performs at most b-a many calls to data.Swap,
+// and it assumes non-degenerate arguments: a < m && m < b.
+func rotateLessFunc[E any](data []E, a, m, b int, less func(a, b E) bool) {
+ i := m - a
+ j := b - m
+
+ for i != j {
+ if i > j {
+ swapRangeLessFunc(data, m-i, m, j, less)
+ i -= j
+ } else {
+ swapRangeLessFunc(data, m-i, m+j-i, i, less)
+ j -= i
+ }
+ }
+ // i == j
+ swapRangeLessFunc(data, m-i, m, i, less)
+}
diff --git a/vendor/golang.org/x/exp/slices/zsortordered.go b/vendor/golang.org/x/exp/slices/zsortordered.go
new file mode 100644
index 000000000..efaa1c8b7
--- /dev/null
+++ b/vendor/golang.org/x/exp/slices/zsortordered.go
@@ -0,0 +1,481 @@
+// Code generated by gen_sort_variants.go; DO NOT EDIT.
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package slices
+
+import "golang.org/x/exp/constraints"
+
+// insertionSortOrdered sorts data[a:b] using insertion sort.
+func insertionSortOrdered[E constraints.Ordered](data []E, a, b int) {
+ for i := a + 1; i < b; i++ {
+ for j := i; j > a && (data[j] < data[j-1]); j-- {
+ data[j], data[j-1] = data[j-1], data[j]
+ }
+ }
+}
+
+// siftDownOrdered implements the heap property on data[lo:hi].
+// first is an offset into the array where the root of the heap lies.
+func siftDownOrdered[E constraints.Ordered](data []E, lo, hi, first int) {
+ root := lo
+ for {
+ child := 2*root + 1
+ if child >= hi {
+ break
+ }
+ if child+1 < hi && (data[first+child] < data[first+child+1]) {
+ child++
+ }
+ if !(data[first+root] < data[first+child]) {
+ return
+ }
+ data[first+root], data[first+child] = data[first+child], data[first+root]
+ root = child
+ }
+}
+
+func heapSortOrdered[E constraints.Ordered](data []E, a, b int) {
+ first := a
+ lo := 0
+ hi := b - a
+
+ // Build heap with greatest element at top.
+ for i := (hi - 1) / 2; i >= 0; i-- {
+ siftDownOrdered(data, i, hi, first)
+ }
+
+ // Pop elements, largest first, into end of data.
+ for i := hi - 1; i >= 0; i-- {
+ data[first], data[first+i] = data[first+i], data[first]
+ siftDownOrdered(data, lo, i, first)
+ }
+}
+
+// pdqsortOrdered sorts data[a:b].
+// The algorithm based on pattern-defeating quicksort(pdqsort), but without the optimizations from BlockQuicksort.
+// pdqsort paper: https://arxiv.org/pdf/2106.05123.pdf
+// C++ implementation: https://github.com/orlp/pdqsort
+// Rust implementation: https://docs.rs/pdqsort/latest/pdqsort/
+// limit is the number of allowed bad (very unbalanced) pivots before falling back to heapsort.
+func pdqsortOrdered[E constraints.Ordered](data []E, a, b, limit int) {
+ const maxInsertion = 12
+
+ var (
+ wasBalanced = true // whether the last partitioning was reasonably balanced
+ wasPartitioned = true // whether the slice was already partitioned
+ )
+
+ for {
+ length := b - a
+
+ if length <= maxInsertion {
+ insertionSortOrdered(data, a, b)
+ return
+ }
+
+ // Fall back to heapsort if too many bad choices were made.
+ if limit == 0 {
+ heapSortOrdered(data, a, b)
+ return
+ }
+
+ // If the last partitioning was imbalanced, we need to breaking patterns.
+ if !wasBalanced {
+ breakPatternsOrdered(data, a, b)
+ limit--
+ }
+
+ pivot, hint := choosePivotOrdered(data, a, b)
+ if hint == decreasingHint {
+ reverseRangeOrdered(data, a, b)
+ // The chosen pivot was pivot-a elements after the start of the array.
+ // After reversing it is pivot-a elements before the end of the array.
+ // The idea came from Rust's implementation.
+ pivot = (b - 1) - (pivot - a)
+ hint = increasingHint
+ }
+
+ // The slice is likely already sorted.
+ if wasBalanced && wasPartitioned && hint == increasingHint {
+ if partialInsertionSortOrdered(data, a, b) {
+ return
+ }
+ }
+
+ // Probably the slice contains many duplicate elements, partition the slice into
+ // elements equal to and elements greater than the pivot.
+ if a > 0 && !(data[a-1] < data[pivot]) {
+ mid := partitionEqualOrdered(data, a, b, pivot)
+ a = mid
+ continue
+ }
+
+ mid, alreadyPartitioned := partitionOrdered(data, a, b, pivot)
+ wasPartitioned = alreadyPartitioned
+
+ leftLen, rightLen := mid-a, b-mid
+ balanceThreshold := length / 8
+ if leftLen < rightLen {
+ wasBalanced = leftLen >= balanceThreshold
+ pdqsortOrdered(data, a, mid, limit)
+ a = mid + 1
+ } else {
+ wasBalanced = rightLen >= balanceThreshold
+ pdqsortOrdered(data, mid+1, b, limit)
+ b = mid
+ }
+ }
+}
+
+// partitionOrdered does one quicksort partition.
+// Let p = data[pivot]
+// Moves elements in data[a:b] around, so that data[i]=p for inewpivot.
+// On return, data[newpivot] = p
+func partitionOrdered[E constraints.Ordered](data []E, a, b, pivot int) (newpivot int, alreadyPartitioned bool) {
+ data[a], data[pivot] = data[pivot], data[a]
+ i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned
+
+ for i <= j && (data[i] < data[a]) {
+ i++
+ }
+ for i <= j && !(data[j] < data[a]) {
+ j--
+ }
+ if i > j {
+ data[j], data[a] = data[a], data[j]
+ return j, true
+ }
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+
+ for {
+ for i <= j && (data[i] < data[a]) {
+ i++
+ }
+ for i <= j && !(data[j] < data[a]) {
+ j--
+ }
+ if i > j {
+ break
+ }
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+ }
+ data[j], data[a] = data[a], data[j]
+ return j, false
+}
+
+// partitionEqualOrdered partitions data[a:b] into elements equal to data[pivot] followed by elements greater than data[pivot].
+// It assumed that data[a:b] does not contain elements smaller than the data[pivot].
+func partitionEqualOrdered[E constraints.Ordered](data []E, a, b, pivot int) (newpivot int) {
+ data[a], data[pivot] = data[pivot], data[a]
+ i, j := a+1, b-1 // i and j are inclusive of the elements remaining to be partitioned
+
+ for {
+ for i <= j && !(data[a] < data[i]) {
+ i++
+ }
+ for i <= j && (data[a] < data[j]) {
+ j--
+ }
+ if i > j {
+ break
+ }
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+ }
+ return i
+}
+
+// partialInsertionSortOrdered partially sorts a slice, returns true if the slice is sorted at the end.
+func partialInsertionSortOrdered[E constraints.Ordered](data []E, a, b int) bool {
+ const (
+ maxSteps = 5 // maximum number of adjacent out-of-order pairs that will get shifted
+ shortestShifting = 50 // don't shift any elements on short arrays
+ )
+ i := a + 1
+ for j := 0; j < maxSteps; j++ {
+ for i < b && !(data[i] < data[i-1]) {
+ i++
+ }
+
+ if i == b {
+ return true
+ }
+
+ if b-a < shortestShifting {
+ return false
+ }
+
+ data[i], data[i-1] = data[i-1], data[i]
+
+ // Shift the smaller one to the left.
+ if i-a >= 2 {
+ for j := i - 1; j >= 1; j-- {
+ if !(data[j] < data[j-1]) {
+ break
+ }
+ data[j], data[j-1] = data[j-1], data[j]
+ }
+ }
+ // Shift the greater one to the right.
+ if b-i >= 2 {
+ for j := i + 1; j < b; j++ {
+ if !(data[j] < data[j-1]) {
+ break
+ }
+ data[j], data[j-1] = data[j-1], data[j]
+ }
+ }
+ }
+ return false
+}
+
+// breakPatternsOrdered scatters some elements around in an attempt to break some patterns
+// that might cause imbalanced partitions in quicksort.
+func breakPatternsOrdered[E constraints.Ordered](data []E, a, b int) {
+ length := b - a
+ if length >= 8 {
+ random := xorshift(length)
+ modulus := nextPowerOfTwo(length)
+
+ for idx := a + (length/4)*2 - 1; idx <= a+(length/4)*2+1; idx++ {
+ other := int(uint(random.Next()) & (modulus - 1))
+ if other >= length {
+ other -= length
+ }
+ data[idx], data[a+other] = data[a+other], data[idx]
+ }
+ }
+}
+
+// choosePivotOrdered chooses a pivot in data[a:b].
+//
+// [0,8): chooses a static pivot.
+// [8,shortestNinther): uses the simple median-of-three method.
+// [shortestNinther,∞): uses the Tukey ninther method.
+func choosePivotOrdered[E constraints.Ordered](data []E, a, b int) (pivot int, hint sortedHint) {
+ const (
+ shortestNinther = 50
+ maxSwaps = 4 * 3
+ )
+
+ l := b - a
+
+ var (
+ swaps int
+ i = a + l/4*1
+ j = a + l/4*2
+ k = a + l/4*3
+ )
+
+ if l >= 8 {
+ if l >= shortestNinther {
+ // Tukey ninther method, the idea came from Rust's implementation.
+ i = medianAdjacentOrdered(data, i, &swaps)
+ j = medianAdjacentOrdered(data, j, &swaps)
+ k = medianAdjacentOrdered(data, k, &swaps)
+ }
+ // Find the median among i, j, k and stores it into j.
+ j = medianOrdered(data, i, j, k, &swaps)
+ }
+
+ switch swaps {
+ case 0:
+ return j, increasingHint
+ case maxSwaps:
+ return j, decreasingHint
+ default:
+ return j, unknownHint
+ }
+}
+
+// order2Ordered returns x,y where data[x] <= data[y], where x,y=a,b or x,y=b,a.
+func order2Ordered[E constraints.Ordered](data []E, a, b int, swaps *int) (int, int) {
+ if data[b] < data[a] {
+ *swaps++
+ return b, a
+ }
+ return a, b
+}
+
+// medianOrdered returns x where data[x] is the median of data[a],data[b],data[c], where x is a, b, or c.
+func medianOrdered[E constraints.Ordered](data []E, a, b, c int, swaps *int) int {
+ a, b = order2Ordered(data, a, b, swaps)
+ b, c = order2Ordered(data, b, c, swaps)
+ a, b = order2Ordered(data, a, b, swaps)
+ return b
+}
+
+// medianAdjacentOrdered finds the median of data[a - 1], data[a], data[a + 1] and stores the index into a.
+func medianAdjacentOrdered[E constraints.Ordered](data []E, a int, swaps *int) int {
+ return medianOrdered(data, a-1, a, a+1, swaps)
+}
+
+func reverseRangeOrdered[E constraints.Ordered](data []E, a, b int) {
+ i := a
+ j := b - 1
+ for i < j {
+ data[i], data[j] = data[j], data[i]
+ i++
+ j--
+ }
+}
+
+func swapRangeOrdered[E constraints.Ordered](data []E, a, b, n int) {
+ for i := 0; i < n; i++ {
+ data[a+i], data[b+i] = data[b+i], data[a+i]
+ }
+}
+
+func stableOrdered[E constraints.Ordered](data []E, n int) {
+ blockSize := 20 // must be > 0
+ a, b := 0, blockSize
+ for b <= n {
+ insertionSortOrdered(data, a, b)
+ a = b
+ b += blockSize
+ }
+ insertionSortOrdered(data, a, n)
+
+ for blockSize < n {
+ a, b = 0, 2*blockSize
+ for b <= n {
+ symMergeOrdered(data, a, a+blockSize, b)
+ a = b
+ b += 2 * blockSize
+ }
+ if m := a + blockSize; m < n {
+ symMergeOrdered(data, a, m, n)
+ }
+ blockSize *= 2
+ }
+}
+
+// symMergeOrdered merges the two sorted subsequences data[a:m] and data[m:b] using
+// the SymMerge algorithm from Pok-Son Kim and Arne Kutzner, "Stable Minimum
+// Storage Merging by Symmetric Comparisons", in Susanne Albers and Tomasz
+// Radzik, editors, Algorithms - ESA 2004, volume 3221 of Lecture Notes in
+// Computer Science, pages 714-723. Springer, 2004.
+//
+// Let M = m-a and N = b-n. Wolog M < N.
+// The recursion depth is bound by ceil(log(N+M)).
+// The algorithm needs O(M*log(N/M + 1)) calls to data.Less.
+// The algorithm needs O((M+N)*log(M)) calls to data.Swap.
+//
+// The paper gives O((M+N)*log(M)) as the number of assignments assuming a
+// rotation algorithm which uses O(M+N+gcd(M+N)) assignments. The argumentation
+// in the paper carries through for Swap operations, especially as the block
+// swapping rotate uses only O(M+N) Swaps.
+//
+// symMerge assumes non-degenerate arguments: a < m && m < b.
+// Having the caller check this condition eliminates many leaf recursion calls,
+// which improves performance.
+func symMergeOrdered[E constraints.Ordered](data []E, a, m, b int) {
+ // Avoid unnecessary recursions of symMerge
+ // by direct insertion of data[a] into data[m:b]
+ // if data[a:m] only contains one element.
+ if m-a == 1 {
+ // Use binary search to find the lowest index i
+ // such that data[i] >= data[a] for m <= i < b.
+ // Exit the search loop with i == b in case no such index exists.
+ i := m
+ j := b
+ for i < j {
+ h := int(uint(i+j) >> 1)
+ if data[h] < data[a] {
+ i = h + 1
+ } else {
+ j = h
+ }
+ }
+ // Swap values until data[a] reaches the position before i.
+ for k := a; k < i-1; k++ {
+ data[k], data[k+1] = data[k+1], data[k]
+ }
+ return
+ }
+
+ // Avoid unnecessary recursions of symMerge
+ // by direct insertion of data[m] into data[a:m]
+ // if data[m:b] only contains one element.
+ if b-m == 1 {
+ // Use binary search to find the lowest index i
+ // such that data[i] > data[m] for a <= i < m.
+ // Exit the search loop with i == m in case no such index exists.
+ i := a
+ j := m
+ for i < j {
+ h := int(uint(i+j) >> 1)
+ if !(data[m] < data[h]) {
+ i = h + 1
+ } else {
+ j = h
+ }
+ }
+ // Swap values until data[m] reaches the position i.
+ for k := m; k > i; k-- {
+ data[k], data[k-1] = data[k-1], data[k]
+ }
+ return
+ }
+
+ mid := int(uint(a+b) >> 1)
+ n := mid + m
+ var start, r int
+ if m > mid {
+ start = n - b
+ r = mid
+ } else {
+ start = a
+ r = m
+ }
+ p := n - 1
+
+ for start < r {
+ c := int(uint(start+r) >> 1)
+ if !(data[p-c] < data[c]) {
+ start = c + 1
+ } else {
+ r = c
+ }
+ }
+
+ end := n - start
+ if start < m && m < end {
+ rotateOrdered(data, start, m, end)
+ }
+ if a < start && start < mid {
+ symMergeOrdered(data, a, start, mid)
+ }
+ if mid < end && end < b {
+ symMergeOrdered(data, mid, end, b)
+ }
+}
+
+// rotateOrdered rotates two consecutive blocks u = data[a:m] and v = data[m:b] in data:
+// Data of the form 'x u v y' is changed to 'x v u y'.
+// rotate performs at most b-a many calls to data.Swap,
+// and it assumes non-degenerate arguments: a < m && m < b.
+func rotateOrdered[E constraints.Ordered](data []E, a, m, b int) {
+ i := m - a
+ j := b - m
+
+ for i != j {
+ if i > j {
+ swapRangeOrdered(data, m-i, m, j)
+ i -= j
+ } else {
+ swapRangeOrdered(data, m-i, m+j-i, i)
+ j -= i
+ }
+ }
+ // i == j
+ swapRangeOrdered(data, m-i, m, i)
+}
diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go
index 7a96eae33..2466ae3d9 100644
--- a/vendor/golang.org/x/net/html/doc.go
+++ b/vendor/golang.org/x/net/html/doc.go
@@ -99,14 +99,20 @@ Care should be taken when parsing and interpreting HTML, whether full documents
or fragments, within the framework of the HTML specification, especially with
regard to untrusted inputs.
-This package provides both a tokenizer and a parser. Only the parser constructs
-a DOM according to the HTML specification, resolving malformed and misplaced
-tags where appropriate. The tokenizer simply tokenizes the HTML presented to it,
-and as such does not resolve issues that may exist in the processed HTML,
-producing a literal interpretation of the input.
-
-If your use case requires semantically well-formed HTML, as defined by the
-WHATWG specifiction, the parser should be used rather than the tokenizer.
+This package provides both a tokenizer and a parser, which implement the
+tokenization, and tokenization and tree construction stages of the WHATWG HTML
+parsing specification respectively. While the tokenizer parses and normalizes
+individual HTML tokens, only the parser constructs the DOM tree from the
+tokenized HTML, as described in the tree construction stage of the
+specification, dynamically modifying or extending the docuemnt's DOM tree.
+
+If your use case requires semantically well-formed HTML documents, as defined by
+the WHATWG specification, the parser should be used rather than the tokenizer.
+
+In security contexts, if trust decisions are being made using the tokenized or
+parsed content, the input must be re-serialized (for instance by using Render or
+Token.String) in order for those trust decisions to hold, as the process of
+tokenization or parsing may alter the content.
*/
package html // import "golang.org/x/net/html"
diff --git a/vendor/golang.org/x/net/http2/pipe.go b/vendor/golang.org/x/net/http2/pipe.go
index c15b8a771..684d984fd 100644
--- a/vendor/golang.org/x/net/http2/pipe.go
+++ b/vendor/golang.org/x/net/http2/pipe.go
@@ -88,13 +88,9 @@ func (p *pipe) Write(d []byte) (n int, err error) {
p.c.L = &p.mu
}
defer p.c.Signal()
- if p.err != nil {
+ if p.err != nil || p.breakErr != nil {
return 0, errClosedPipeWrite
}
- if p.breakErr != nil {
- p.unread += len(d)
- return len(d), nil // discard when there is no reader
- }
return p.b.Write(d)
}
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index 8cb14f3c9..cd057f398 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -1822,15 +1822,18 @@ func (sc *serverConn) processData(f *DataFrame) error {
}
if len(data) > 0 {
+ st.bodyBytes += int64(len(data))
wrote, err := st.body.Write(data)
if err != nil {
+ // The handler has closed the request body.
+ // Return the connection-level flow control for the discarded data,
+ // but not the stream-level flow control.
sc.sendWindowUpdate(nil, int(f.Length)-wrote)
- return sc.countError("body_write_err", streamError(id, ErrCodeStreamClosed))
+ return nil
}
if wrote != len(data) {
panic("internal error: bad Writer")
}
- st.bodyBytes += int64(len(data))
}
// Return any padded flow control now, since we won't
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index 05ba23d3d..ac90a2631 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -560,10 +560,11 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
traceGotConn(req, cc, reused)
res, err := cc.RoundTrip(req)
if err != nil && retry <= 6 {
+ roundTripErr := err
if req, err = shouldRetryRequest(req, err); err == nil {
// After the first retry, do exponential backoff with 10% jitter.
if retry == 0 {
- t.vlogf("RoundTrip retrying after failure: %v", err)
+ t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
continue
}
backoff := float64(uint(1) << (uint(retry) - 1))
@@ -572,7 +573,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
timer := backoffNewTimer(d)
select {
case <-timer.C:
- t.vlogf("RoundTrip retrying after failure: %v", err)
+ t.vlogf("RoundTrip retrying after failure: %v", roundTripErr)
continue
case <-req.Context().Done():
timer.Stop()
@@ -1265,6 +1266,27 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
return res, nil
}
+ cancelRequest := func(cs *clientStream, err error) error {
+ cs.cc.mu.Lock()
+ defer cs.cc.mu.Unlock()
+ cs.abortStreamLocked(err)
+ if cs.ID != 0 {
+ // This request may have failed because of a problem with the connection,
+ // or for some unrelated reason. (For example, the user might have canceled
+ // the request without waiting for a response.) Mark the connection as
+ // not reusable, since trying to reuse a dead connection is worse than
+ // unnecessarily creating a new one.
+ //
+ // If cs.ID is 0, then the request was never allocated a stream ID and
+ // whatever went wrong was unrelated to the connection. We might have
+ // timed out waiting for a stream slot when StrictMaxConcurrentStreams
+ // is set, for example, in which case retrying on a different connection
+ // will not help.
+ cs.cc.doNotReuse = true
+ }
+ return err
+ }
+
for {
select {
case <-cs.respHeaderRecv:
@@ -1279,15 +1301,12 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
return handleResponseHeaders()
default:
waitDone()
- return nil, cs.abortErr
+ return nil, cancelRequest(cs, cs.abortErr)
}
case <-ctx.Done():
- err := ctx.Err()
- cs.abortStream(err)
- return nil, err
+ return nil, cancelRequest(cs, ctx.Err())
case <-cs.reqCancel:
- cs.abortStream(errRequestCanceled)
- return nil, errRequestCanceled
+ return nil, cancelRequest(cs, errRequestCanceled)
}
}
}
@@ -2555,6 +2574,9 @@ func (b transportResponseBody) Close() error {
cs := b.cs
cc := cs.cc
+ cs.bufPipe.BreakWithError(errClosedResponseBody)
+ cs.abortStream(errClosedResponseBody)
+
unread := cs.bufPipe.Len()
if unread > 0 {
cc.mu.Lock()
@@ -2573,9 +2595,6 @@ func (b transportResponseBody) Close() error {
cc.wmu.Unlock()
}
- cs.bufPipe.BreakWithError(errClosedResponseBody)
- cs.abortStream(errClosedResponseBody)
-
select {
case <-cs.donec:
case <-cs.ctx.Done():
diff --git a/vendor/golang.org/x/oauth2/README.md b/vendor/golang.org/x/oauth2/README.md
index 1473e1296..781770c20 100644
--- a/vendor/golang.org/x/oauth2/README.md
+++ b/vendor/golang.org/x/oauth2/README.md
@@ -19,7 +19,7 @@ See pkg.go.dev for further documentation and examples.
* [pkg.go.dev/golang.org/x/oauth2](https://pkg.go.dev/golang.org/x/oauth2)
* [pkg.go.dev/golang.org/x/oauth2/google](https://pkg.go.dev/golang.org/x/oauth2/google)
-## Policy for new packages
+## Policy for new endpoints
We no longer accept new provider-specific packages in this repo if all
they do is add a single endpoint variable. If you just want to add a
@@ -29,8 +29,12 @@ package.
## Report Issues / Send Patches
-This repository uses Gerrit for code changes. To learn how to submit changes to
-this repository, see https://golang.org/doc/contribute.html.
-
The main issue tracker for the oauth2 repository is located at
https://github.com/golang/oauth2/issues.
+
+This repository uses Gerrit for code changes. To learn how to submit changes to
+this repository, see https://golang.org/doc/contribute.html. In particular:
+
+* Excluding trivial changes, all contributions should be connected to an existing issue.
+* API changes must go through the [change proposal process](https://go.dev/s/proposal-process) before they can be accepted.
+* The code owners are listed at [dev.golang.org/owners](https://dev.golang.org/owners#:~:text=x/oauth2).
diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go
index c0ab196cf..14989beaf 100644
--- a/vendor/golang.org/x/oauth2/internal/oauth2.go
+++ b/vendor/golang.org/x/oauth2/internal/oauth2.go
@@ -14,7 +14,7 @@ import (
// ParseKey converts the binary contents of a private key file
// to an *rsa.PrivateKey. It detects whether the private key is in a
-// PEM container or not. If so, it extracts the the private key
+// PEM container or not. If so, it extracts the private key
// from PEM container before conversion. It only supports PEM
// containers with no passphrase.
func ParseKey(key []byte) (*rsa.PrivateKey, error) {
diff --git a/vendor/golang.org/x/oauth2/internal/token.go b/vendor/golang.org/x/oauth2/internal/token.go
index b4723fcac..58901bda5 100644
--- a/vendor/golang.org/x/oauth2/internal/token.go
+++ b/vendor/golang.org/x/oauth2/internal/token.go
@@ -55,12 +55,18 @@ type Token struct {
}
// tokenJSON is the struct representing the HTTP response from OAuth2
-// providers returning a token in JSON form.
+// providers returning a token or error in JSON form.
+// https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
type tokenJSON struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
ExpiresIn expirationTime `json:"expires_in"` // at least PayPal returns string, while most return number
+ // error fields
+ // https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
+ ErrorCode string `json:"error"`
+ ErrorDescription string `json:"error_description"`
+ ErrorURI string `json:"error_uri"`
}
func (e *tokenJSON) expiry() (t time.Time) {
@@ -236,21 +242,29 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
if err != nil {
return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err)
}
- if code := r.StatusCode; code < 200 || code > 299 {
- return nil, &RetrieveError{
- Response: r,
- Body: body,
- }
+
+ failureStatus := r.StatusCode < 200 || r.StatusCode > 299
+ retrieveError := &RetrieveError{
+ Response: r,
+ Body: body,
+ // attempt to populate error detail below
}
var token *Token
content, _, _ := mime.ParseMediaType(r.Header.Get("Content-Type"))
switch content {
case "application/x-www-form-urlencoded", "text/plain":
+ // some endpoints return a query string
vals, err := url.ParseQuery(string(body))
if err != nil {
- return nil, err
+ if failureStatus {
+ return nil, retrieveError
+ }
+ return nil, fmt.Errorf("oauth2: cannot parse response: %v", err)
}
+ retrieveError.ErrorCode = vals.Get("error")
+ retrieveError.ErrorDescription = vals.Get("error_description")
+ retrieveError.ErrorURI = vals.Get("error_uri")
token = &Token{
AccessToken: vals.Get("access_token"),
TokenType: vals.Get("token_type"),
@@ -265,8 +279,14 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
default:
var tj tokenJSON
if err = json.Unmarshal(body, &tj); err != nil {
- return nil, err
+ if failureStatus {
+ return nil, retrieveError
+ }
+ return nil, fmt.Errorf("oauth2: cannot parse json: %v", err)
}
+ retrieveError.ErrorCode = tj.ErrorCode
+ retrieveError.ErrorDescription = tj.ErrorDescription
+ retrieveError.ErrorURI = tj.ErrorURI
token = &Token{
AccessToken: tj.AccessToken,
TokenType: tj.TokenType,
@@ -276,17 +296,37 @@ func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
}
json.Unmarshal(body, &token.Raw) // no error checks for optional fields
}
+ // according to spec, servers should respond status 400 in error case
+ // https://www.rfc-editor.org/rfc/rfc6749#section-5.2
+ // but some unorthodox servers respond 200 in error case
+ if failureStatus || retrieveError.ErrorCode != "" {
+ return nil, retrieveError
+ }
if token.AccessToken == "" {
return nil, errors.New("oauth2: server response missing access_token")
}
return token, nil
}
+// mirrors oauth2.RetrieveError
type RetrieveError struct {
- Response *http.Response
- Body []byte
+ Response *http.Response
+ Body []byte
+ ErrorCode string
+ ErrorDescription string
+ ErrorURI string
}
func (r *RetrieveError) Error() string {
+ if r.ErrorCode != "" {
+ s := fmt.Sprintf("oauth2: %q", r.ErrorCode)
+ if r.ErrorDescription != "" {
+ s += fmt.Sprintf(" %q", r.ErrorDescription)
+ }
+ if r.ErrorURI != "" {
+ s += fmt.Sprintf(" %q", r.ErrorURI)
+ }
+ return s
+ }
return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body)
}
diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go
index 291df5c83..9085fabe3 100644
--- a/vendor/golang.org/x/oauth2/oauth2.go
+++ b/vendor/golang.org/x/oauth2/oauth2.go
@@ -16,6 +16,7 @@ import (
"net/url"
"strings"
"sync"
+ "time"
"golang.org/x/oauth2/internal"
)
@@ -140,7 +141,7 @@ func SetAuthURLParam(key, value string) AuthCodeOption {
//
// State is a token to protect the user from CSRF attacks. You must
// always provide a non-empty string and validate that it matches the
-// the state query parameter on your redirect callback.
+// state query parameter on your redirect callback.
// See http://tools.ietf.org/html/rfc6749#section-10.12 for more info.
//
// Opts may include AccessTypeOnline or AccessTypeOffline, as well
@@ -290,6 +291,8 @@ type reuseTokenSource struct {
mu sync.Mutex // guards t
t *Token
+
+ expiryDelta time.Duration
}
// Token returns the current token if it's still valid, else will
@@ -305,6 +308,7 @@ func (s *reuseTokenSource) Token() (*Token, error) {
if err != nil {
return nil, err
}
+ t.expiryDelta = s.expiryDelta
s.t = t
return t, nil
}
@@ -379,3 +383,30 @@ func ReuseTokenSource(t *Token, src TokenSource) TokenSource {
new: src,
}
}
+
+// ReuseTokenSource returns a TokenSource that acts in the same manner as the
+// TokenSource returned by ReuseTokenSource, except the expiry buffer is
+// configurable. The expiration time of a token is calculated as
+// t.Expiry.Add(-earlyExpiry).
+func ReuseTokenSourceWithExpiry(t *Token, src TokenSource, earlyExpiry time.Duration) TokenSource {
+ // Don't wrap a reuseTokenSource in itself. That would work,
+ // but cause an unnecessary number of mutex operations.
+ // Just build the equivalent one.
+ if rt, ok := src.(*reuseTokenSource); ok {
+ if t == nil {
+ // Just use it directly, but set the expiryDelta to earlyExpiry,
+ // so the behavior matches what the user expects.
+ rt.expiryDelta = earlyExpiry
+ return rt
+ }
+ src = rt.new
+ }
+ if t != nil {
+ t.expiryDelta = earlyExpiry
+ }
+ return &reuseTokenSource{
+ t: t,
+ new: src,
+ expiryDelta: earlyExpiry,
+ }
+}
diff --git a/vendor/golang.org/x/oauth2/token.go b/vendor/golang.org/x/oauth2/token.go
index 822720341..5ffce9764 100644
--- a/vendor/golang.org/x/oauth2/token.go
+++ b/vendor/golang.org/x/oauth2/token.go
@@ -16,10 +16,10 @@ import (
"golang.org/x/oauth2/internal"
)
-// expiryDelta determines how earlier a token should be considered
+// defaultExpiryDelta determines how earlier a token should be considered
// expired than its actual expiration time. It is used to avoid late
// expirations due to client-server time mismatches.
-const expiryDelta = 10 * time.Second
+const defaultExpiryDelta = 10 * time.Second
// Token represents the credentials used to authorize
// the requests to access protected resources on the OAuth 2.0
@@ -52,6 +52,11 @@ type Token struct {
// raw optionally contains extra metadata from the server
// when updating a token.
raw interface{}
+
+ // expiryDelta is used to calculate when a token is considered
+ // expired, by subtracting from Expiry. If zero, defaultExpiryDelta
+ // is used.
+ expiryDelta time.Duration
}
// Type returns t.TokenType if non-empty, else "Bearer".
@@ -127,6 +132,11 @@ func (t *Token) expired() bool {
if t.Expiry.IsZero() {
return false
}
+
+ expiryDelta := defaultExpiryDelta
+ if t.expiryDelta != 0 {
+ expiryDelta = t.expiryDelta
+ }
return t.Expiry.Round(0).Add(-expiryDelta).Before(timeNow())
}
@@ -165,14 +175,31 @@ func retrieveToken(ctx context.Context, c *Config, v url.Values) (*Token, error)
}
// RetrieveError is the error returned when the token endpoint returns a
-// non-2XX HTTP status code.
+// non-2XX HTTP status code or populates RFC 6749's 'error' parameter.
+// https://datatracker.ietf.org/doc/html/rfc6749#section-5.2
type RetrieveError struct {
Response *http.Response
// Body is the body that was consumed by reading Response.Body.
// It may be truncated.
Body []byte
+ // ErrorCode is RFC 6749's 'error' parameter.
+ ErrorCode string
+ // ErrorDescription is RFC 6749's 'error_description' parameter.
+ ErrorDescription string
+ // ErrorURI is RFC 6749's 'error_uri' parameter.
+ ErrorURI string
}
func (r *RetrieveError) Error() string {
+ if r.ErrorCode != "" {
+ s := fmt.Sprintf("oauth2: %q", r.ErrorCode)
+ if r.ErrorDescription != "" {
+ s += fmt.Sprintf(" %q", r.ErrorDescription)
+ }
+ if r.ErrorURI != "" {
+ s += fmt.Sprintf(" %q", r.ErrorURI)
+ }
+ return s
+ }
return fmt.Sprintf("oauth2: cannot fetch token: %v\nResponse: %s", r.Response.Status, r.Body)
}
diff --git a/vendor/golang.org/x/sys/unix/ioctl_signed.go b/vendor/golang.org/x/sys/unix/ioctl_signed.go
new file mode 100644
index 000000000..7def9580e
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ioctl_signed.go
@@ -0,0 +1,70 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build aix || solaris
+// +build aix solaris
+
+package unix
+
+import (
+ "unsafe"
+)
+
+// ioctl itself should not be exposed directly, but additional get/set
+// functions for specific types are permissible.
+
+// IoctlSetInt performs an ioctl operation which sets an integer value
+// on fd, using the specified request number.
+func IoctlSetInt(fd int, req int, value int) error {
+ return ioctl(fd, req, uintptr(value))
+}
+
+// IoctlSetPointerInt performs an ioctl operation which sets an
+// integer value on fd, using the specified request number. The ioctl
+// argument is called with a pointer to the integer value, rather than
+// passing the integer value directly.
+func IoctlSetPointerInt(fd int, req int, value int) error {
+ v := int32(value)
+ return ioctlPtr(fd, req, unsafe.Pointer(&v))
+}
+
+// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
+//
+// To change fd's window size, the req argument should be TIOCSWINSZ.
+func IoctlSetWinsize(fd int, req int, value *Winsize) error {
+ // TODO: if we get the chance, remove the req parameter and
+ // hardcode TIOCSWINSZ.
+ return ioctlPtr(fd, req, unsafe.Pointer(value))
+}
+
+// IoctlSetTermios performs an ioctl on fd with a *Termios.
+//
+// The req value will usually be TCSETA or TIOCSETA.
+func IoctlSetTermios(fd int, req int, value *Termios) error {
+ // TODO: if we get the chance, remove the req parameter.
+ return ioctlPtr(fd, req, unsafe.Pointer(value))
+}
+
+// IoctlGetInt performs an ioctl operation which gets an integer value
+// from fd, using the specified request number.
+//
+// A few ioctl requests use the return value as an output parameter;
+// for those, IoctlRetInt should be used instead of this function.
+func IoctlGetInt(fd int, req int) (int, error) {
+ var value int
+ err := ioctlPtr(fd, req, unsafe.Pointer(&value))
+ return value, err
+}
+
+func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
+ var value Winsize
+ err := ioctlPtr(fd, req, unsafe.Pointer(&value))
+ return &value, err
+}
+
+func IoctlGetTermios(fd int, req int) (*Termios, error) {
+ var value Termios
+ err := ioctlPtr(fd, req, unsafe.Pointer(&value))
+ return &value, err
+}
diff --git a/vendor/golang.org/x/sys/unix/ioctl.go b/vendor/golang.org/x/sys/unix/ioctl_unsigned.go
similarity index 92%
rename from vendor/golang.org/x/sys/unix/ioctl.go
rename to vendor/golang.org/x/sys/unix/ioctl_unsigned.go
index 7ce8dd406..649913d1e 100644
--- a/vendor/golang.org/x/sys/unix/ioctl.go
+++ b/vendor/golang.org/x/sys/unix/ioctl_unsigned.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build aix || darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
+//go:build darwin || dragonfly || freebsd || hurd || linux || netbsd || openbsd
+// +build darwin dragonfly freebsd hurd linux netbsd openbsd
package unix
diff --git a/vendor/golang.org/x/sys/unix/ioctl_zos.go b/vendor/golang.org/x/sys/unix/ioctl_zos.go
index 6532f09af..cdc21bf76 100644
--- a/vendor/golang.org/x/sys/unix/ioctl_zos.go
+++ b/vendor/golang.org/x/sys/unix/ioctl_zos.go
@@ -17,14 +17,14 @@ import (
// IoctlSetInt performs an ioctl operation which sets an integer value
// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) error {
+func IoctlSetInt(fd int, req int, value int) error {
return ioctl(fd, req, uintptr(value))
}
// IoctlSetWinsize performs an ioctl on fd with a *Winsize argument.
//
// To change fd's window size, the req argument should be TIOCSWINSZ.
-func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
+func IoctlSetWinsize(fd int, req int, value *Winsize) error {
// TODO: if we get the chance, remove the req parameter and
// hardcode TIOCSWINSZ.
return ioctlPtr(fd, req, unsafe.Pointer(value))
@@ -33,7 +33,7 @@ func IoctlSetWinsize(fd int, req uint, value *Winsize) error {
// IoctlSetTermios performs an ioctl on fd with a *Termios.
//
// The req value is expected to be TCSETS, TCSETSW, or TCSETSF
-func IoctlSetTermios(fd int, req uint, value *Termios) error {
+func IoctlSetTermios(fd int, req int, value *Termios) error {
if (req != TCSETS) && (req != TCSETSW) && (req != TCSETSF) {
return ENOSYS
}
@@ -47,13 +47,13 @@ func IoctlSetTermios(fd int, req uint, value *Termios) error {
//
// A few ioctl requests use the return value as an output parameter;
// for those, IoctlRetInt should be used instead of this function.
-func IoctlGetInt(fd int, req uint) (int, error) {
+func IoctlGetInt(fd int, req int) (int, error) {
var value int
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return value, err
}
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
+func IoctlGetWinsize(fd int, req int) (*Winsize, error) {
var value Winsize
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return &value, err
@@ -62,7 +62,7 @@ func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
// IoctlGetTermios performs an ioctl on fd with a *Termios.
//
// The req value is expected to be TCGETS
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
+func IoctlGetTermios(fd int, req int) (*Termios, error) {
var value Termios
if req != TCGETS {
return &value, ENOSYS
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 7456d9ddd..be0423e68 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -66,6 +66,7 @@ includes_Darwin='
#include
#include
#include
+#include
#include
#include
#include
@@ -203,6 +204,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -517,10 +519,11 @@ ccflags="$@"
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^LO_(KEY|NAME)_SIZE$/ ||
$2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT)_/ ||
+ $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ ||
$2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ ||
$2 ~ /^NFC_.*_(MAX)?SIZE$/ ||
$2 ~ /^RAW_PAYLOAD_/ ||
+ $2 ~ /^[US]F_/ ||
$2 ~ /^TP_STATUS_/ ||
$2 ~ /^FALLOC_/ ||
$2 ~ /^ICMPV?6?_(FILTER|SEC)/ ||
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
index d9f5544cc..c406ae00f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -408,8 +408,8 @@ func (w WaitStatus) CoreDump() bool { return w&0x80 == 0x80 }
func (w WaitStatus) TrapCause() int { return -1 }
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
-//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = ioctl
+//sys ioctl(fd int, req int, arg uintptr) (err error)
+//sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = ioctl
// fcntl must never be called with cmd=F_DUP2FD because it doesn't work on AIX
// There is no way to create a custom fcntl and to keep //sys fcntl easily,
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
index e92a0be16..f2871fa95 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc.go
@@ -8,7 +8,6 @@
package unix
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
index 16eed1709..75718ec0f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go
@@ -8,7 +8,6 @@
package unix
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 7064d6eba..206921504 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -613,6 +613,7 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
//sys Rmdir(path string) (err error)
//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
+//sys Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error)
//sys Setegid(egid int) (err error)
//sysnb Seteuid(euid int) (err error)
//sysnb Setgid(gid int) (err error)
@@ -622,7 +623,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
//sys Setprivexec(flag int) (err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Settimeofday(tp *Timeval) (err error)
//sysnb Setuid(uid int) (err error)
@@ -676,7 +676,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
// Kqueue_from_portset_np
// Kqueue_portset
// Getattrlist
-// Setattrlist
// Getdirentriesattr
// Searchfs
// Delete
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index 221efc26b..d4ce988e7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -326,7 +326,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sysnb Setreuid(ruid int, euid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Settimeofday(tp *Timeval) (err error)
//sysnb Setuid(uid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 5bdde03e4..afb10106f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -433,7 +433,6 @@ func Dup3(oldfd, newfd, flags int) error {
//sysnb Setreuid(ruid int, euid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Settimeofday(tp *Timeval) (err error)
//sysnb Setuid(uid int) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 973533153..fbaeb5fff 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -1873,7 +1873,6 @@ func Getpgrp() (pid int) {
//sys OpenTree(dfd int, fileName string, flags uint) (r int, err error)
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error)
//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) = SYS_PSELECT6
//sys read(fd int, p []byte) (n int, err error)
@@ -1887,6 +1886,15 @@ func Getpgrp() (pid int) {
//sysnb Settimeofday(tv *Timeval) (err error)
//sys Setns(fd int, nstype int) (err error)
+//go:linkname syscall_prlimit syscall.prlimit
+func syscall_prlimit(pid, resource int, newlimit, old *syscall.Rlimit) error
+
+func Prlimit(pid, resource int, newlimit, old *Rlimit) error {
+ // Just call the syscall version, because as of Go 1.21
+ // it will affect starting a new process.
+ return syscall_prlimit(pid, resource, (*syscall.Rlimit)(newlimit), (*syscall.Rlimit)(old))
+}
+
// PrctlRetInt performs a prctl operation specified by option and further
// optional arguments arg2 through arg5 depending on option. It returns a
// non-negative integer that is returned by the prctl syscall.
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index ff5b5899d..c7d9945ea 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -97,33 +97,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = Prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
newoffset, errno := seek(fd, offset, whence)
if errno != 0 {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index 9b2703532..5b21fcfd7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -46,7 +46,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index 856ad1d63..da2986415 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -171,33 +171,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = Prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index 6422704bc..a81f5742b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -39,7 +39,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
@@ -143,15 +142,6 @@ func Getrlimit(resource int, rlim *Rlimit) error {
return getrlimit(resource, rlim)
}
-// Setrlimit prefers the prlimit64 system call. See issue 38604.
-func Setrlimit(resource int, rlim *Rlimit) error {
- err := Prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
- return setrlimit(resource, rlim)
-}
-
func (r *PtraceRegs) PC() uint64 { return r.Pc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
index 59dab510e..69d2d7c3d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
@@ -126,11 +126,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = Prlimit(0, resource, rlim, nil)
- return
-}
-
func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
if tv == nil {
return utimensat(dirfd, path, nil, 0)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index bfef09a39..76d564095 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -37,7 +37,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index ab3025096..aae7f0ffd 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -151,33 +151,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = Prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
func (r *PtraceRegs) PC() uint64 { return r.Epc }
func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
index eac1cf1ac..66eff19a3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -159,33 +159,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
return
}
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = Prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
func (r *PtraceRegs) PC() uint32 { return r.Nip }
func (r *PtraceRegs) SetPC(pc uint32) { r.Nip = pc }
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index 4df56616b..806aa2574 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -34,7 +34,6 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 5f4243dea..35851ef70 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -38,7 +38,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index d0a7d4066..2f89e8f5d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -34,7 +34,6 @@ import (
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index f5c793be2..7ca064ae7 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -31,7 +31,6 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index e66865dcc..018d7d478 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -340,7 +340,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
//sys Setpriority(which int, who int, prio int) (err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Settimeofday(tp *Timeval) (err error)
//sysnb Setuid(uid int) (err error)
@@ -501,7 +500,6 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
// compat_43_osendmsg
// compat_43_osethostid
// compat_43_osethostname
-// compat_43_osetrlimit
// compat_43_osigblock
// compat_43_osigsetmask
// compat_43_osigstack
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index 5e9de23ae..f9c7a9663 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -294,7 +294,6 @@ func Uname(uname *Utsname) error {
//sysnb Setreuid(ruid int, euid int) (err error)
//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
//sysnb Setrtable(rtable int) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Settimeofday(tp *Timeval) (err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index d3444b64d..b600a289d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -545,24 +545,24 @@ func Minor(dev uint64) uint32 {
* Expose the ioctl function
*/
-//sys ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) = libc.ioctl
-//sys ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
+//sys ioctlRet(fd int, req int, arg uintptr) (ret int, err error) = libc.ioctl
+//sys ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) = libc.ioctl
-func ioctl(fd int, req uint, arg uintptr) (err error) {
+func ioctl(fd int, req int, arg uintptr) (err error) {
_, err = ioctlRet(fd, req, arg)
return err
}
-func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
_, err = ioctlPtrRet(fd, req, arg)
return err
}
-func IoctlSetTermio(fd int, req uint, value *Termio) error {
+func IoctlSetTermio(fd int, req int, value *Termio) error {
return ioctlPtr(fd, req, unsafe.Pointer(value))
}
-func IoctlGetTermio(fd int, req uint) (*Termio, error) {
+func IoctlGetTermio(fd int, req int) (*Termio, error) {
var value Termio
err := ioctlPtr(fd, req, unsafe.Pointer(&value))
return &value, err
@@ -665,7 +665,6 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//sys Setpriority(which int, who int, prio int) (err error)
//sysnb Setregid(rgid int, egid int) (err error)
//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
//sysnb Setsid() (pid int, err error)
//sysnb Setuid(uid int) (err error)
//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
@@ -1080,11 +1079,11 @@ func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags
return retCl, retData, flags, nil
}
-func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
+func IoctlSetIntRetInt(fd int, req int, arg int) (int, error) {
return ioctlRet(fd, req, uintptr(arg))
}
-func IoctlSetString(fd int, req uint, val string) error {
+func IoctlSetString(fd int, req int, val string) error {
bs := make([]byte, len(val)+1)
copy(bs[:len(bs)-1], val)
err := ioctlPtr(fd, req, unsafe.Pointer(&bs[0]))
@@ -1120,7 +1119,7 @@ func (l *Lifreq) GetLifruUint() uint {
return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
}
-func IoctlLifreq(fd int, req uint, l *Lifreq) error {
+func IoctlLifreq(fd int, req int, l *Lifreq) error {
return ioctlPtr(fd, req, unsafe.Pointer(l))
}
@@ -1131,6 +1130,6 @@ func (s *Strioctl) SetInt(i int) {
s.Dp = (*int8)(unsafe.Pointer(&i))
}
-func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
+func IoctlSetStrioctlRetInt(fd int, req int, s *Strioctl) (int, error) {
return ioctlPtrRet(fd, req, unsafe.Pointer(s))
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index 00f0aa375..8e48c29ec 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -587,3 +587,10 @@ func emptyIovecs(iov []Iovec) bool {
}
return true
}
+
+// Setrlimit sets a resource limit.
+func Setrlimit(resource int, rlim *Rlimit) error {
+ // Just call the syscall version, because as of Go 1.21
+ // it will affect starting a new process.
+ return syscall.Setrlimit(resource, (*syscall.Rlimit)(rlim))
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
index b295497ae..d3d49ec3e 100644
--- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -212,8 +212,8 @@ func (cmsg *Cmsghdr) SetLen(length int) {
//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = SYS___SENDMSG_A
//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) = SYS_MMAP
//sys munmap(addr uintptr, length uintptr) (err error) = SYS_MUNMAP
-//sys ioctl(fd int, req uint, arg uintptr) (err error) = SYS_IOCTL
-//sys ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) = SYS_IOCTL
+//sys ioctl(fd int, req int, arg uintptr) (err error) = SYS_IOCTL
+//sys ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) = SYS_IOCTL
//sys Access(path string, mode uint32) (err error) = SYS___ACCESS_A
//sys Chdir(path string) (err error) = SYS___CHDIR_A
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
index 476a1c7e7..143007627 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go
@@ -1270,6 +1270,16 @@ const (
SEEK_END = 0x2
SEEK_HOLE = 0x3
SEEK_SET = 0x0
+ SF_APPEND = 0x40000
+ SF_ARCHIVED = 0x10000
+ SF_DATALESS = 0x40000000
+ SF_FIRMLINK = 0x800000
+ SF_IMMUTABLE = 0x20000
+ SF_NOUNLINK = 0x100000
+ SF_RESTRICTED = 0x80000
+ SF_SETTABLE = 0x3fff0000
+ SF_SUPPORTED = 0x9f0000
+ SF_SYNTHETIC = 0xc0000000
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1543,6 +1553,15 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UF_APPEND = 0x4
+ UF_COMPRESSED = 0x20
+ UF_DATAVAULT = 0x80
+ UF_HIDDEN = 0x8000
+ UF_IMMUTABLE = 0x2
+ UF_NODUMP = 0x1
+ UF_OPAQUE = 0x8
+ UF_SETTABLE = 0xffff
+ UF_TRACKED = 0x40
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
index e36f5178d..ab044a742 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go
@@ -1270,6 +1270,16 @@ const (
SEEK_END = 0x2
SEEK_HOLE = 0x3
SEEK_SET = 0x0
+ SF_APPEND = 0x40000
+ SF_ARCHIVED = 0x10000
+ SF_DATALESS = 0x40000000
+ SF_FIRMLINK = 0x800000
+ SF_IMMUTABLE = 0x20000
+ SF_NOUNLINK = 0x100000
+ SF_RESTRICTED = 0x80000
+ SF_SETTABLE = 0x3fff0000
+ SF_SUPPORTED = 0x9f0000
+ SF_SYNTHETIC = 0xc0000000
SHUT_RD = 0x0
SHUT_RDWR = 0x2
SHUT_WR = 0x1
@@ -1543,6 +1553,15 @@ const (
TIOCTIMESTAMP = 0x40107459
TIOCUCNTL = 0x80047466
TOSTOP = 0x400000
+ UF_APPEND = 0x4
+ UF_COMPRESSED = 0x20
+ UF_DATAVAULT = 0x80
+ UF_HIDDEN = 0x8000
+ UF_IMMUTABLE = 0x2
+ UF_NODUMP = 0x1
+ UF_OPAQUE = 0x8
+ UF_SETTABLE = 0xffff
+ UF_TRACKED = 0x40
VDISCARD = 0xf
VDSUSP = 0xb
VEOF = 0x0
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index 398c37e52..de936b677 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -2967,6 +2967,7 @@ const (
SOL_TCP = 0x6
SOL_TIPC = 0x10f
SOL_TLS = 0x11a
+ SOL_UDP = 0x11
SOL_X25 = 0x106
SOL_XDP = 0x11b
SOMAXCONN = 0x1000
@@ -3251,6 +3252,19 @@ const (
TRACEFS_MAGIC = 0x74726163
TS_COMM_LEN = 0x20
UDF_SUPER_MAGIC = 0x15013346
+ UDP_CORK = 0x1
+ UDP_ENCAP = 0x64
+ UDP_ENCAP_ESPINUDP = 0x2
+ UDP_ENCAP_ESPINUDP_NON_IKE = 0x1
+ UDP_ENCAP_GTP0 = 0x4
+ UDP_ENCAP_GTP1U = 0x5
+ UDP_ENCAP_L2TPINUDP = 0x3
+ UDP_GRO = 0x68
+ UDP_NO_CHECK6_RX = 0x66
+ UDP_NO_CHECK6_TX = 0x65
+ UDP_SEGMENT = 0x67
+ UDP_V4_FLOW = 0x2
+ UDP_V6_FLOW = 0x6
UMOUNT_NOFOLLOW = 0x8
USBDEVICE_SUPER_MAGIC = 0x9fa2
UTIME_NOW = 0x3fffffff
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
index ef9dcd1be..9a257219d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -124,7 +124,6 @@ int utime(uintptr_t, uintptr_t);
unsigned long long getsystemcfg(int);
int umount(uintptr_t);
int getrlimit64(int, uintptr_t);
-int setrlimit64(int, uintptr_t);
long long lseek64(int, long long, int);
uintptr_t mmap(uintptr_t, uintptr_t, int, int, int, long long);
@@ -213,7 +212,7 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
+func ioctl(fd int, req int, arg uintptr) (err error) {
r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(arg))
if r0 == -1 && er != nil {
err = er
@@ -223,7 +222,7 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
r0, er := C.ioctl(C.int(fd), C.int(req), C.uintptr_t(uintptr(arg)))
if r0 == -1 && er != nil {
err = er
@@ -1464,16 +1463,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- r0, er := C.setrlimit64(C.int(resource), C.uintptr_t(uintptr(unsafe.Pointer(rlim))))
- if r0 == -1 && er != nil {
- err = er
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Seek(fd int, offset int64, whence int) (off int64, err error) {
r0, er := C.lseek64(C.int(fd), C.longlong(offset), C.int(whence))
off = int64(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
index f86a94592..6de80c20c 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -93,8 +93,8 @@ func wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t,
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, e1 := callioctl(fd, int(req), arg)
+func ioctl(fd int, req int, arg uintptr) (err error) {
+ _, e1 := callioctl(fd, req, arg)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -103,8 +103,8 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
- _, e1 := callioctl_ptr(fd, int(req), arg)
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
+ _, e1 := callioctl_ptr(fd, req, arg)
if e1 != 0 {
err = errnoErr(e1)
}
@@ -1422,16 +1422,6 @@ func Getrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, e1 := callsetrlimit(resource, uintptr(unsafe.Pointer(rlim)))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Seek(fd int, offset int64, whence int) (off int64, err error) {
r0, e1 := calllseek(fd, offset, whence)
off = int64(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
index d32a84cae..c4d50ae50 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go
@@ -124,7 +124,6 @@ import (
//go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_umount umount "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.a/shr_64.o"
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_lseek lseek "libc.a/shr_64.o"
//go:cgo_import_dynamic libc_mmap64 mmap64 "libc.a/shr_64.o"
@@ -242,7 +241,6 @@ import (
//go:linkname libc_getsystemcfg libc_getsystemcfg
//go:linkname libc_umount libc_umount
//go:linkname libc_getrlimit libc_getrlimit
-//go:linkname libc_setrlimit libc_setrlimit
//go:linkname libc_lseek libc_lseek
//go:linkname libc_mmap64 libc_mmap64
@@ -363,7 +361,6 @@ var (
libc_getsystemcfg,
libc_umount,
libc_getrlimit,
- libc_setrlimit,
libc_lseek,
libc_mmap64 syscallFunc
)
@@ -1179,13 +1176,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
- r1, _, e1 = rawSyscall6(uintptr(unsafe.Pointer(&libc_setrlimit)), 2, uintptr(resource), rlim, 0, 0, 0, 0)
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_lseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0)
return
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
index d7d8baf81..6903d3b09 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go
@@ -123,7 +123,6 @@ int utime(uintptr_t, uintptr_t);
unsigned long long getsystemcfg(int);
int umount(uintptr_t);
int getrlimit(int, uintptr_t);
-int setrlimit(int, uintptr_t);
long long lseek(int, long long, int);
uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
@@ -131,6 +130,7 @@ uintptr_t mmap64(uintptr_t, uintptr_t, int, int, int, long long);
import "C"
import (
"syscall"
+ "unsafe"
)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1055,14 +1055,6 @@ func callgetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func callsetrlimit(resource int, rlim uintptr) (r1 uintptr, e1 Errno) {
- r1 = uintptr(C.setrlimit(C.int(resource), C.uintptr_t(rlim)))
- e1 = syscall.GetErrno()
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func calllseek(fd int, offset int64, whence int) (r1 uintptr, e1 Errno) {
r1 = uintptr(C.lseek(C.int(fd), C.longlong(offset), C.int(whence)))
e1 = syscall.GetErrno()
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index a29ffdd56..4037ccf7a 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -1992,6 +1992,31 @@ var libc_select_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(attrBuf) > 0 {
+ _p1 = unsafe.Pointer(&attrBuf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setattrlist_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Setegid(egid int) (err error) {
_, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
@@ -2123,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index 95fe4c0eb..4baaed0bc 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setattrlist(SB)
+GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setegid(SB)
@@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsid(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 2fd4590bb..51d6f3fb2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -1992,6 +1992,31 @@ var libc_select_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(attrBuf) > 0 {
+ _p1 = unsafe.Pointer(&attrBuf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setattrlist_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Setegid(egid int) (err error) {
_, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
@@ -2123,20 +2148,6 @@ var libc_setreuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index efa5b4c98..c3b82c037 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -705,6 +705,11 @@ TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setattrlist(SB)
+GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+
TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setegid(SB)
@@ -759,12 +764,6 @@ TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setsid(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
index 3b8513470..0eabac7ad 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go
@@ -1410,16 +1410,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index 112906562..ee313eb00 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
@@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index 55f5abfe5..4c986e448 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
@@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index d39651c2b..555216944 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
@@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
index ddb740868..67a226fbf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
@@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
index 09a53a616..f0b9ddaaa 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_riscv64.go
@@ -1645,16 +1645,6 @@ func Setresuid(ruid int, euid int, suid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 430cb24de..da63d9d78 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -1346,16 +1346,6 @@ func PivotRoot(newroot string, putold string) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
- _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index c81b0ad47..07b549cc2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -411,16 +411,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func futimesat(dirfd int, path string, times *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index 2206bce7f..5f481bf83 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -334,16 +334,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index edf6b39f1..824cd52c7 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -578,16 +578,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func armSyncFileRange(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_ARM_SYNC_FILE_RANGE, uintptr(fd), uintptr(flags), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index 190609f21..e77aecfe9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -289,16 +289,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index 5f984cbb1..961a3afb7 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
remaining = uint(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index 46fc380a4..ed05005e9 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index cbd0d4dad..d365b718f 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -278,16 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 0c13d15f0..c3f1b8bbd 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -644,16 +644,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Alarm(seconds uint) (remaining uint, err error) {
r0, _, e1 := Syscall(SYS_ALARM, uintptr(seconds), 0, 0)
remaining = uint(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
index e01432aed..a6574cf98 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -624,16 +624,6 @@ func getrlimit(resource int, rlim *rlimit32) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setrlimit(resource int, rlim *rlimit32) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func syncFileRange2(fd int, flags int, off int64, n int64) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n))
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index 13c7ee7ba..f40990264 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index 02d0c0fd6..9dfcc2997 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -349,16 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index 9fee3b1d2..0b2923958 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -269,16 +269,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index 647bbfecd..6cde32237 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -319,16 +319,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
n = int64(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index ada057f89..5253d65bf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -329,16 +329,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index 8e1d9c8f6..cdb2af5ae 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index 21c695040..9d25f76b0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index 298168f90..d3f803516 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
index 68b8bd492..887188a52 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
@@ -1607,16 +1607,6 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index 0b0f910e1..6699a783e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrtable(rtable int) (err error) {
_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
index 087444250..04f0de34b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4
DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4
-DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrtable(SB)
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 48ff5de75..1e775fe05 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrtable(rtable int) (err error) {
_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
index 5782cd108..27b6f4df7 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrtable(SB)
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 2452a641d..7f6427899 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrtable(rtable int) (err error) {
_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
index cf310420c..b797045fd 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4
DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4
-DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrtable(SB)
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index 5e35600a6..756ef7b17 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrtable(rtable int) (err error) {
_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
index 484bb42e0..a87126622 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrtable(SB)
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index b04cef1a1..7bc2e24eb 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrtable(rtable int) (err error) {
_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
index 55af27263..05d4bffd7 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrtable(SB)
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
index 47a07ee0c..739be6217 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
@@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrtable(rtable int) (err error) {
_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
index 4028255b0..74a25f8d6 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
@@ -687,12 +687,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- CALL libc_setrlimit(SB)
- RET
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
CALL libc_setrtable(SB)
RET
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
index 573378fdb..7d95a1978 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
@@ -1894,20 +1894,6 @@ var libc_setresuid_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_setrlimit_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrtable(rtable int) (err error) {
_, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
index e1fbd4dfa..990be2457 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
@@ -573,11 +573,6 @@ TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
-TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setrlimit(SB)
-GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
-
TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_setrtable(SB)
GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index 4873a1e5d..609d1c598 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -110,7 +110,6 @@ import (
//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
//go:cgo_import_dynamic libc_setregid setregid "libc.so"
//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
-//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
//go:cgo_import_dynamic libc_setsid setsid "libc.so"
//go:cgo_import_dynamic libc_setuid setuid "libc.so"
//go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so"
@@ -250,7 +249,6 @@ import (
//go:linkname procSetpriority libc_setpriority
//go:linkname procSetregid libc_setregid
//go:linkname procSetreuid libc_setreuid
-//go:linkname procSetrlimit libc_setrlimit
//go:linkname procSetsid libc_setsid
//go:linkname procSetuid libc_setuid
//go:linkname procshutdown libc_shutdown
@@ -391,7 +389,6 @@ var (
procSetpriority,
procSetregid,
procSetreuid,
- procSetrlimit,
procSetsid,
procSetuid,
procshutdown,
@@ -646,7 +643,7 @@ func __minor(version int, dev uint64) (val uint) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) {
+func ioctlRet(fd int, req int, arg uintptr) (ret int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
ret = int(r0)
if e1 != 0 {
@@ -657,7 +654,7 @@ func ioctlRet(fd int, req uint, arg uintptr) (ret int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctlPtrRet(fd int, req uint, arg unsafe.Pointer) (ret int, err error) {
+func ioctlPtrRet(fd int, req int, arg unsafe.Pointer) (ret int, err error) {
r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0)
ret = int(r0)
if e1 != 0 {
@@ -1650,16 +1647,6 @@ func Setreuid(ruid int, euid int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setsid() (pid int, err error) {
r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0)
pid = int(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
index 07bfe2ef9..c31681743 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go
@@ -257,7 +257,7 @@ func munmap(addr uintptr, length uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctl(fd int, req uint, arg uintptr) (err error) {
+func ioctl(fd int, req int, arg uintptr) (err error) {
_, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
@@ -267,7 +267,7 @@ func ioctl(fd int, req uint, arg uintptr) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
+func ioctlPtr(fd int, req int, arg unsafe.Pointer) (err error) {
_, _, e1 := syscall_syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
index e2a64f099..690cefc3d 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go
@@ -151,6 +151,16 @@ type Dirent struct {
_ [3]byte
}
+type Attrlist struct {
+ Bitmapcount uint16
+ Reserved uint16
+ Commonattr uint32
+ Volattr uint32
+ Dirattr uint32
+ Fileattr uint32
+ Forkattr uint32
+}
+
const (
PathMax = 0x400
)
@@ -610,6 +620,7 @@ const (
AT_REMOVEDIR = 0x80
AT_SYMLINK_FOLLOW = 0x40
AT_SYMLINK_NOFOLLOW = 0x20
+ AT_EACCESS = 0x10
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
index 34aa77521..5bffc10ea 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go
@@ -151,6 +151,16 @@ type Dirent struct {
_ [3]byte
}
+type Attrlist struct {
+ Bitmapcount uint16
+ Reserved uint16
+ Commonattr uint32
+ Volattr uint32
+ Dirattr uint32
+ Fileattr uint32
+ Forkattr uint32
+}
+
const (
PathMax = 0x400
)
@@ -610,6 +620,7 @@ const (
AT_REMOVEDIR = 0x80
AT_SYMLINK_FOLLOW = 0x40
AT_SYMLINK_NOFOLLOW = 0x20
+ AT_EACCESS = 0x10
)
type PollFd struct {
diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go
index 92ac05ff4..b8ad19250 100644
--- a/vendor/golang.org/x/sys/windows/env_windows.go
+++ b/vendor/golang.org/x/sys/windows/env_windows.go
@@ -37,14 +37,14 @@ func (token Token) Environ(inheritExisting bool) (env []string, err error) {
return nil, err
}
defer DestroyEnvironmentBlock(block)
- blockp := uintptr(unsafe.Pointer(block))
+ blockp := unsafe.Pointer(block)
for {
- entry := UTF16PtrToString((*uint16)(unsafe.Pointer(blockp)))
+ entry := UTF16PtrToString((*uint16)(blockp))
if len(entry) == 0 {
break
}
env = append(env, entry)
- blockp += 2 * (uintptr(len(entry)) + 1)
+ blockp = unsafe.Add(blockp, 2*(len(entry)+1))
}
return env, nil
}
diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go
index 75980fd44..a52e0331d 100644
--- a/vendor/golang.org/x/sys/windows/exec_windows.go
+++ b/vendor/golang.org/x/sys/windows/exec_windows.go
@@ -95,12 +95,17 @@ func ComposeCommandLine(args []string) string {
// DecomposeCommandLine breaks apart its argument command line into unescaped parts using CommandLineToArgv,
// as gathered from GetCommandLine, QUERY_SERVICE_CONFIG's BinaryPathName argument, or elsewhere that
// command lines are passed around.
+// DecomposeCommandLine returns error if commandLine contains NUL.
func DecomposeCommandLine(commandLine string) ([]string, error) {
if len(commandLine) == 0 {
return []string{}, nil
}
+ utf16CommandLine, err := UTF16FromString(commandLine)
+ if err != nil {
+ return nil, errorspkg.New("string with NUL passed to DecomposeCommandLine")
+ }
var argc int32
- argv, err := CommandLineToArgv(StringToUTF16Ptr(commandLine), &argc)
+ argv, err := CommandLineToArgv(&utf16CommandLine[0], &argc)
if err != nil {
return nil, err
}
diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go
index f8deca839..c964b6848 100644
--- a/vendor/golang.org/x/sys/windows/service.go
+++ b/vendor/golang.org/x/sys/windows/service.go
@@ -141,6 +141,12 @@ const (
SERVICE_DYNAMIC_INFORMATION_LEVEL_START_REASON = 1
)
+type ENUM_SERVICE_STATUS struct {
+ ServiceName *uint16
+ DisplayName *uint16
+ ServiceStatus SERVICE_STATUS
+}
+
type SERVICE_STATUS struct {
ServiceType uint32
CurrentState uint32
@@ -245,3 +251,4 @@ type QUERY_SERVICE_LOCK_STATUS struct {
//sys UnsubscribeServiceChangeNotifications(subscription uintptr) = sechost.UnsubscribeServiceChangeNotifications?
//sys RegisterServiceCtrlHandlerEx(serviceName *uint16, handlerProc uintptr, context uintptr) (handle Handle, err error) = advapi32.RegisterServiceCtrlHandlerExW
//sys QueryServiceDynamicInformation(service Handle, infoLevel uint32, dynamicInfo unsafe.Pointer) (err error) = advapi32.QueryServiceDynamicInformation?
+//sys EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) = advapi32.EnumDependentServicesW
diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go
index 857acf103..88e62a638 100644
--- a/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/vendor/golang.org/x/sys/windows/types_windows.go
@@ -2220,19 +2220,23 @@ type JOBOBJECT_BASIC_UI_RESTRICTIONS struct {
}
const (
- // JobObjectInformationClass
+ // JobObjectInformationClass for QueryInformationJobObject and SetInformationJobObject
JobObjectAssociateCompletionPortInformation = 7
+ JobObjectBasicAccountingInformation = 1
+ JobObjectBasicAndIoAccountingInformation = 8
JobObjectBasicLimitInformation = 2
+ JobObjectBasicProcessIdList = 3
JobObjectBasicUIRestrictions = 4
JobObjectCpuRateControlInformation = 15
JobObjectEndOfJobTimeInformation = 6
JobObjectExtendedLimitInformation = 9
JobObjectGroupInformation = 11
JobObjectGroupInformationEx = 14
- JobObjectLimitViolationInformation2 = 35
+ JobObjectLimitViolationInformation = 13
+ JobObjectLimitViolationInformation2 = 34
JobObjectNetRateControlInformation = 32
JobObjectNotificationLimitInformation = 12
- JobObjectNotificationLimitInformation2 = 34
+ JobObjectNotificationLimitInformation2 = 33
JobObjectSecurityLimitInformation = 5
)
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 6d2a26853..a81ea2c70 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -86,6 +86,7 @@ var (
procDeleteService = modadvapi32.NewProc("DeleteService")
procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource")
procDuplicateTokenEx = modadvapi32.NewProc("DuplicateTokenEx")
+ procEnumDependentServicesW = modadvapi32.NewProc("EnumDependentServicesW")
procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW")
procEqualSid = modadvapi32.NewProc("EqualSid")
procFreeSid = modadvapi32.NewProc("FreeSid")
@@ -734,6 +735,14 @@ func DuplicateTokenEx(existingToken Token, desiredAccess uint32, tokenAttributes
return
}
+func EnumDependentServices(service Handle, activityState uint32, services *ENUM_SERVICE_STATUS, buffSize uint32, bytesNeeded *uint32, servicesReturned *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procEnumDependentServicesW.Addr(), 6, uintptr(service), uintptr(activityState), uintptr(unsafe.Pointer(services)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func EnumServicesStatusEx(mgr Handle, infoLevel uint32, serviceType uint32, serviceState uint32, services *byte, bufSize uint32, bytesNeeded *uint32, servicesReturned *uint32, resumeHandle *uint32, groupName *uint16) (err error) {
r1, _, e1 := syscall.Syscall12(procEnumServicesStatusExW.Addr(), 10, uintptr(mgr), uintptr(infoLevel), uintptr(serviceType), uintptr(serviceState), uintptr(unsafe.Pointer(services)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), uintptr(unsafe.Pointer(servicesReturned)), uintptr(unsafe.Pointer(resumeHandle)), uintptr(unsafe.Pointer(groupName)), 0, 0)
if r1 == 0 {
diff --git a/vendor/google.golang.org/grpc/CONTRIBUTING.md b/vendor/google.golang.org/grpc/CONTRIBUTING.md
index 52338d004..608aa6e1a 100644
--- a/vendor/google.golang.org/grpc/CONTRIBUTING.md
+++ b/vendor/google.golang.org/grpc/CONTRIBUTING.md
@@ -20,6 +20,15 @@ How to get your contributions merged smoothly and quickly.
both author's & review's time is wasted. Create more PRs to address different
concerns and everyone will be happy.
+- If you are searching for features to work on, issues labeled [Status: Help
+ Wanted](https://github.com/grpc/grpc-go/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Status%3A+Help+Wanted%22)
+ is a great place to start. These issues are well-documented and usually can be
+ resolved with a single pull request.
+
+- If you are adding a new file, make sure it has the copyright message template
+ at the top as a comment. You can copy over the message from an existing file
+ and update the year.
+
- The grpc package should only depend on standard Go packages and a small number
of exceptions. If your contribution introduces new dependencies which are NOT
in the [list](https://godoc.org/google.golang.org/grpc?imports), you need a
@@ -32,14 +41,18 @@ How to get your contributions merged smoothly and quickly.
- Provide a good **PR description** as a record of **what** change is being made
and **why** it was made. Link to a github issue if it exists.
-- Don't fix code style and formatting unless you are already changing that line
- to address an issue. PRs with irrelevant changes won't be merged. If you do
- want to fix formatting or style, do that in a separate PR.
+- If you want to fix formatting or style, consider whether your changes are an
+ obvious improvement or might be considered a personal preference. If a style
+ change is based on preference, it likely will not be accepted. If it corrects
+ widely agreed-upon anti-patterns, then please do create a PR and explain the
+ benefits of the change.
- Unless your PR is trivial, you should expect there will be reviewer comments
- that you'll need to address before merging. We expect you to be reasonably
- responsive to those comments, otherwise the PR will be closed after 2-3 weeks
- of inactivity.
+ that you'll need to address before merging. We'll mark it as `Status: Requires
+ Reporter Clarification` if we expect you to respond to these comments in a
+ timely manner. If the PR remains inactive for 6 days, it will be marked as
+ `stale` and automatically close 7 days after that if we don't hear back from
+ you.
- Maintain **clean commit history** and use **meaningful commit messages**. PRs
with messy commit history are difficult to review and won't be merged. Use
diff --git a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
index 66d141fce..ec2c2fa14 100644
--- a/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
+++ b/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
@@ -18,8 +18,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.14.0
+// protoc-gen-go v1.30.0
+// protoc v4.22.0
// source: grpc/binlog/v1/binarylog.proto
package grpc_binarylog_v1
diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go
index d607d4e9e..3a7614242 100644
--- a/vendor/google.golang.org/grpc/clientconn.go
+++ b/vendor/google.golang.org/grpc/clientconn.go
@@ -146,8 +146,18 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{nil})
cc.ctx, cc.cancel = context.WithCancel(context.Background())
- for _, opt := range extraDialOptions {
- opt.apply(&cc.dopts)
+ disableGlobalOpts := false
+ for _, opt := range opts {
+ if _, ok := opt.(*disableGlobalDialOptions); ok {
+ disableGlobalOpts = true
+ break
+ }
+ }
+
+ if !disableGlobalOpts {
+ for _, opt := range globalDialOptions {
+ opt.apply(&cc.dopts)
+ }
}
for _, opt := range opts {
@@ -234,19 +244,6 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
}
}()
- scSet := false
- if cc.dopts.scChan != nil {
- // Try to get an initial service config.
- select {
- case sc, ok := <-cc.dopts.scChan:
- if ok {
- cc.sc = &sc
- cc.safeConfigSelector.UpdateConfigSelector(&defaultConfigSelector{&sc})
- scSet = true
- }
- default:
- }
- }
if cc.dopts.bs == nil {
cc.dopts.bs = backoff.DefaultExponential
}
@@ -262,7 +259,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
}
channelz.Infof(logger, cc.channelzID, "Channel authority set to %q", cc.authority)
- if cc.dopts.scChan != nil && !scSet {
+ if cc.dopts.scChan != nil {
// Blocking wait for the initial service config.
select {
case sc, ok := <-cc.dopts.scChan:
@@ -1103,7 +1100,11 @@ func (ac *addrConn) updateConnectivityState(s connectivity.State, lastErr error)
return
}
ac.state = s
- channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v", s)
+ if lastErr == nil {
+ channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v", s)
+ } else {
+ channelz.Infof(logger, ac.channelzID, "Subchannel Connectivity change to %v, last error: %s", s, lastErr)
+ }
ac.cc.handleSubConnStateChange(ac.acbw, s, lastErr)
}
@@ -1527,6 +1528,9 @@ func (c *channelzChannel) ChannelzMetric() *channelz.ChannelInternalMetric {
// referenced by users.
var ErrClientConnTimeout = errors.New("grpc: timed out when dialing")
+// getResolver finds the scheme in the cc's resolvers or the global registry.
+// scheme should always be lowercase (typically by virtue of url.Parse()
+// performing proper RFC3986 behavior).
func (cc *ClientConn) getResolver(scheme string) resolver.Builder {
for _, rb := range cc.dopts.resolvers {
if scheme == rb.Scheme() {
diff --git a/vendor/google.golang.org/grpc/codes/code_string.go b/vendor/google.golang.org/grpc/codes/code_string.go
index 0b206a578..934fac2b0 100644
--- a/vendor/google.golang.org/grpc/codes/code_string.go
+++ b/vendor/google.golang.org/grpc/codes/code_string.go
@@ -18,7 +18,15 @@
package codes
-import "strconv"
+import (
+ "strconv"
+
+ "google.golang.org/grpc/internal"
+)
+
+func init() {
+ internal.CanonicalString = canonicalString
+}
func (c Code) String() string {
switch c {
@@ -60,3 +68,44 @@ func (c Code) String() string {
return "Code(" + strconv.FormatInt(int64(c), 10) + ")"
}
}
+
+func canonicalString(c Code) string {
+ switch c {
+ case OK:
+ return "OK"
+ case Canceled:
+ return "CANCELLED"
+ case Unknown:
+ return "UNKNOWN"
+ case InvalidArgument:
+ return "INVALID_ARGUMENT"
+ case DeadlineExceeded:
+ return "DEADLINE_EXCEEDED"
+ case NotFound:
+ return "NOT_FOUND"
+ case AlreadyExists:
+ return "ALREADY_EXISTS"
+ case PermissionDenied:
+ return "PERMISSION_DENIED"
+ case ResourceExhausted:
+ return "RESOURCE_EXHAUSTED"
+ case FailedPrecondition:
+ return "FAILED_PRECONDITION"
+ case Aborted:
+ return "ABORTED"
+ case OutOfRange:
+ return "OUT_OF_RANGE"
+ case Unimplemented:
+ return "UNIMPLEMENTED"
+ case Internal:
+ return "INTERNAL"
+ case Unavailable:
+ return "UNAVAILABLE"
+ case DataLoss:
+ return "DATA_LOSS"
+ case Unauthenticated:
+ return "UNAUTHENTICATED"
+ default:
+ return "CODE(" + strconv.FormatInt(int64(c), 10) + ")"
+ }
+}
diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go
index 4866da101..cdc8263bd 100644
--- a/vendor/google.golang.org/grpc/dialoptions.go
+++ b/vendor/google.golang.org/grpc/dialoptions.go
@@ -38,13 +38,14 @@ import (
func init() {
internal.AddGlobalDialOptions = func(opt ...DialOption) {
- extraDialOptions = append(extraDialOptions, opt...)
+ globalDialOptions = append(globalDialOptions, opt...)
}
internal.ClearGlobalDialOptions = func() {
- extraDialOptions = nil
+ globalDialOptions = nil
}
internal.WithBinaryLogger = withBinaryLogger
internal.JoinDialOptions = newJoinDialOption
+ internal.DisableGlobalDialOptions = newDisableGlobalDialOptions
}
// dialOptions configure a Dial call. dialOptions are set by the DialOption
@@ -83,7 +84,7 @@ type DialOption interface {
apply(*dialOptions)
}
-var extraDialOptions []DialOption
+var globalDialOptions []DialOption
// EmptyDialOption does not alter the dial configuration. It can be embedded in
// another structure to build custom dial options.
@@ -96,6 +97,16 @@ type EmptyDialOption struct{}
func (EmptyDialOption) apply(*dialOptions) {}
+type disableGlobalDialOptions struct{}
+
+func (disableGlobalDialOptions) apply(*dialOptions) {}
+
+// newDisableGlobalDialOptions returns a DialOption that prevents the ClientConn
+// from applying the global DialOptions (set via AddGlobalDialOptions).
+func newDisableGlobalDialOptions() DialOption {
+ return &disableGlobalDialOptions{}
+}
+
// funcDialOption wraps a function that modifies dialOptions into an
// implementation of the DialOption interface.
type funcDialOption struct {
@@ -284,6 +295,9 @@ func withBackoff(bs internalbackoff.Strategy) DialOption {
// WithBlock returns a DialOption which makes callers of Dial block until the
// underlying connection is up. Without this, Dial returns immediately and
// connecting the server happens in background.
+//
+// Use of this feature is not recommended. For more information, please see:
+// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md
func WithBlock() DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.block = true
@@ -295,6 +309,9 @@ func WithBlock() DialOption {
// the context.DeadlineExceeded error.
// Implies WithBlock()
//
+// Use of this feature is not recommended. For more information, please see:
+// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md
+//
// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
@@ -437,6 +454,9 @@ func withBinaryLogger(bl binarylog.Logger) DialOption {
// FailOnNonTempDialError only affects the initial dial, and does not do
// anything useful unless you are also using WithBlock().
//
+// Use of this feature is not recommended. For more information, please see:
+// https://github.com/grpc/grpc-go/blob/master/Documentation/anti-patterns.md
+//
// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
index 8e29a62f1..142d35f75 100644
--- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
+++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health.pb.go
@@ -17,8 +17,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
-// protoc-gen-go v1.28.1
-// protoc v3.14.0
+// protoc-gen-go v1.30.0
+// protoc v4.22.0
// source: grpc/health/v1/health.proto
package grpc_health_v1
diff --git a/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
index a332dfd7b..a01a1b4d5 100644
--- a/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
+++ b/vendor/google.golang.org/grpc/health/grpc_health_v1/health_grpc.pb.go
@@ -17,8 +17,8 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
-// - protoc-gen-go-grpc v1.2.0
-// - protoc v3.14.0
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v4.22.0
// source: grpc/health/v1/health.proto
package grpc_health_v1
@@ -35,6 +35,11 @@ import (
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
+const (
+ Health_Check_FullMethodName = "/grpc.health.v1.Health/Check"
+ Health_Watch_FullMethodName = "/grpc.health.v1.Health/Watch"
+)
+
// HealthClient is the client API for Health service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
@@ -70,7 +75,7 @@ func NewHealthClient(cc grpc.ClientConnInterface) HealthClient {
func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
out := new(HealthCheckResponse)
- err := c.cc.Invoke(ctx, "/grpc.health.v1.Health/Check", in, out, opts...)
+ err := c.cc.Invoke(ctx, Health_Check_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -78,7 +83,7 @@ func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts .
}
func (c *healthClient) Watch(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (Health_WatchClient, error) {
- stream, err := c.cc.NewStream(ctx, &Health_ServiceDesc.Streams[0], "/grpc.health.v1.Health/Watch", opts...)
+ stream, err := c.cc.NewStream(ctx, &Health_ServiceDesc.Streams[0], Health_Watch_FullMethodName, opts...)
if err != nil {
return nil, err
}
@@ -166,7 +171,7 @@ func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interf
}
info := &grpc.UnaryServerInfo{
Server: srv,
- FullMethod: "/grpc.health.v1.Health/Check",
+ FullMethod: Health_Check_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest))
diff --git a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
index 809d73cca..af03a40d9 100644
--- a/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
+++ b/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
@@ -28,8 +28,10 @@ import (
"google.golang.org/grpc/internal/grpcutil"
)
-// Logger is the global binary logger. It can be used to get binary logger for
-// each method.
+var grpclogLogger = grpclog.Component("binarylog")
+
+// Logger specifies MethodLoggers for method names with a Log call that
+// takes a context.
type Logger interface {
GetMethodLogger(methodName string) MethodLogger
}
@@ -40,8 +42,6 @@ type Logger interface {
// It is used to get a MethodLogger for each individual method.
var binLogger Logger
-var grpclogLogger = grpclog.Component("binarylog")
-
// SetLogger sets the binary logger.
//
// Only call this at init time.
diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
index d71e44177..56fcf008d 100644
--- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
+++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
@@ -19,6 +19,7 @@
package binarylog
import (
+ "context"
"net"
"strings"
"sync/atomic"
@@ -49,7 +50,7 @@ var idGen callIDGenerator
// MethodLogger is the sub-logger for each method.
type MethodLogger interface {
- Log(LogEntryConfig)
+ Log(context.Context, LogEntryConfig)
}
// TruncatingMethodLogger is a method logger that truncates headers and messages
@@ -98,7 +99,7 @@ func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *binlogpb.GrpcLogEntry
}
// Log creates a proto binary log entry, and logs it to the sink.
-func (ml *TruncatingMethodLogger) Log(c LogEntryConfig) {
+func (ml *TruncatingMethodLogger) Log(ctx context.Context, c LogEntryConfig) {
ml.sink.Write(ml.Build(c))
}
diff --git a/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/vendor/google.golang.org/grpc/internal/envconfig/xds.go
index 04136882c..3b17705ba 100644
--- a/vendor/google.golang.org/grpc/internal/envconfig/xds.go
+++ b/vendor/google.golang.org/grpc/internal/envconfig/xds.go
@@ -79,7 +79,7 @@ var (
// XDSFederation indicates whether federation support is enabled, which can
// be enabled by setting the environment variable
// "GRPC_EXPERIMENTAL_XDS_FEDERATION" to "true".
- XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", false)
+ XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", true)
// XDSRLS indicates whether processing of Cluster Specifier plugins and
// support for the RLS CLuster Specifier is enabled, which can be enabled by
diff --git a/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go b/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go
index 82af70e96..02224b42c 100644
--- a/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go
+++ b/vendor/google.golang.org/grpc/internal/grpclog/prefixLogger.go
@@ -63,6 +63,9 @@ func (pl *PrefixLogger) Errorf(format string, args ...interface{}) {
// Debugf does info logging at verbose level 2.
func (pl *PrefixLogger) Debugf(format string, args ...interface{}) {
+ // TODO(6044): Refactor interfaces LoggerV2 and DepthLogger, and maybe
+ // rewrite PrefixLogger a little to ensure that we don't use the global
+ // `Logger` here, and instead use the `logger` field.
if !Logger.V(2) {
return
}
@@ -73,6 +76,15 @@ func (pl *PrefixLogger) Debugf(format string, args ...interface{}) {
return
}
InfoDepth(1, fmt.Sprintf(format, args...))
+
+}
+
+// V reports whether verbosity level l is at least the requested verbose level.
+func (pl *PrefixLogger) V(l int) bool {
+ // TODO(6044): Refactor interfaces LoggerV2 and DepthLogger, and maybe
+ // rewrite PrefixLogger a little to ensure that we don't use the global
+ // `Logger` here, and instead use the `logger` field.
+ return Logger.V(l)
}
// NewPrefixLogger creates a prefix logger with the given prefix.
diff --git a/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
new file mode 100644
index 000000000..79993d343
--- /dev/null
+++ b/vendor/google.golang.org/grpc/internal/grpcsync/callback_serializer.go
@@ -0,0 +1,65 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 grpcsync
+
+import (
+ "context"
+
+ "google.golang.org/grpc/internal/buffer"
+)
+
+// CallbackSerializer provides a mechanism to schedule callbacks in a
+// synchronized manner. It provides a FIFO guarantee on the order of execution
+// of scheduled callbacks. New callbacks can be scheduled by invoking the
+// Schedule() method.
+//
+// This type is safe for concurrent access.
+type CallbackSerializer struct {
+ callbacks *buffer.Unbounded
+}
+
+// NewCallbackSerializer returns a new CallbackSerializer instance. The provided
+// context will be passed to the scheduled callbacks. Users should cancel the
+// provided context to shutdown the CallbackSerializer. It is guaranteed that no
+// callbacks will be executed once this context is canceled.
+func NewCallbackSerializer(ctx context.Context) *CallbackSerializer {
+ t := &CallbackSerializer{callbacks: buffer.NewUnbounded()}
+ go t.run(ctx)
+ return t
+}
+
+// Schedule adds a callback to be scheduled after existing callbacks are run.
+//
+// Callbacks are expected to honor the context when performing any blocking
+// operations, and should return early when the context is canceled.
+func (t *CallbackSerializer) Schedule(f func(ctx context.Context)) {
+ t.callbacks.Put(f)
+}
+
+func (t *CallbackSerializer) run(ctx context.Context) {
+ for ctx.Err() == nil {
+ select {
+ case <-ctx.Done():
+ return
+ case callback := <-t.callbacks.Get():
+ t.callbacks.Load()
+ callback.(func(ctx context.Context))(ctx)
+ }
+ }
+}
diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go
index 0a76d9de6..836b6a3b3 100644
--- a/vendor/google.golang.org/grpc/internal/internal.go
+++ b/vendor/google.golang.org/grpc/internal/internal.go
@@ -58,6 +58,9 @@ var (
// gRPC server. An xDS-enabled server needs to know what type of credentials
// is configured on the underlying gRPC server. This is set by server.go.
GetServerCredentials interface{} // func (*grpc.Server) credentials.TransportCredentials
+ // CanonicalString returns the canonical string of the code defined here:
+ // https://github.com/grpc/grpc/blob/master/doc/statuscodes.md.
+ CanonicalString interface{} // func (codes.Code) string
// DrainServerTransports initiates a graceful close of existing connections
// on a gRPC server accepted on the provided listener address. An
// xDS-enabled server invokes this method on a grpc.Server when a particular
@@ -74,6 +77,10 @@ var (
// globally for newly created client channels. The priority will be: 1.
// user-provided; 2. this method; 3. default values.
AddGlobalDialOptions interface{} // func(opt ...DialOption)
+ // DisableGlobalDialOptions returns a DialOption that prevents the
+ // ClientConn from applying the global DialOptions (set via
+ // AddGlobalDialOptions).
+ DisableGlobalDialOptions interface{} // func() grpc.DialOption
// ClearGlobalDialOptions clears the array of extra DialOption. This
// method is useful in testing and benchmarking.
ClearGlobalDialOptions func()
@@ -130,6 +137,9 @@ var (
//
// TODO: Remove this function once the RBAC env var is removed.
UnregisterRBACHTTPFilterForTesting func()
+
+ // ORCAAllowAnyMinReportingInterval is for examples/orca use ONLY.
+ ORCAAllowAnyMinReportingInterval interface{} // func(so *orca.ServiceOptions)
)
// HealthChecker defines the signature of the client-side LB channel health checking function.
diff --git a/vendor/google.golang.org/grpc/internal/metadata/metadata.go b/vendor/google.golang.org/grpc/internal/metadata/metadata.go
index b2980f8ac..c82e608e0 100644
--- a/vendor/google.golang.org/grpc/internal/metadata/metadata.go
+++ b/vendor/google.golang.org/grpc/internal/metadata/metadata.go
@@ -76,33 +76,11 @@ func Set(addr resolver.Address, md metadata.MD) resolver.Address {
return addr
}
-// Validate returns an error if the input md contains invalid keys or values.
-//
-// If the header is not a pseudo-header, the following items are checked:
-// - header names must contain one or more characters from this set [0-9 a-z _ - .].
-// - if the header-name ends with a "-bin" suffix, no validation of the header value is performed.
-// - otherwise, the header value must contain one or more characters from the set [%x20-%x7E].
+// Validate validates every pair in md with ValidatePair.
func Validate(md metadata.MD) error {
for k, vals := range md {
- // pseudo-header will be ignored
- if k[0] == ':' {
- continue
- }
- // check key, for i that saving a conversion if not using for range
- for i := 0; i < len(k); i++ {
- r := k[i]
- if !(r >= 'a' && r <= 'z') && !(r >= '0' && r <= '9') && r != '.' && r != '-' && r != '_' {
- return fmt.Errorf("header key %q contains illegal characters not in [0-9a-z-_.]", k)
- }
- }
- if strings.HasSuffix(k, "-bin") {
- continue
- }
- // check value
- for _, val := range vals {
- if hasNotPrintable(val) {
- return fmt.Errorf("header key %q contains value with non-printable ASCII characters", k)
- }
+ if err := ValidatePair(k, vals...); err != nil {
+ return err
}
}
return nil
@@ -118,3 +96,37 @@ func hasNotPrintable(msg string) bool {
}
return false
}
+
+// ValidatePair validate a key-value pair with the following rules (the pseudo-header will be skipped) :
+//
+// - key must contain one or more characters.
+// - the characters in the key must be contained in [0-9 a-z _ - .].
+// - if the key ends with a "-bin" suffix, no validation of the corresponding value is performed.
+// - the characters in the every value must be printable (in [%x20-%x7E]).
+func ValidatePair(key string, vals ...string) error {
+ // key should not be empty
+ if key == "" {
+ return fmt.Errorf("there is an empty key in the header")
+ }
+ // pseudo-header will be ignored
+ if key[0] == ':' {
+ return nil
+ }
+ // check key, for i that saving a conversion if not using for range
+ for i := 0; i < len(key); i++ {
+ r := key[i]
+ if !(r >= 'a' && r <= 'z') && !(r >= '0' && r <= '9') && r != '.' && r != '-' && r != '_' {
+ return fmt.Errorf("header key %q contains illegal characters not in [0-9a-z-_.]", key)
+ }
+ }
+ if strings.HasSuffix(key, "-bin") {
+ return nil
+ }
+ // check value
+ for _, val := range vals {
+ if hasNotPrintable(val) {
+ return fmt.Errorf("header key %q contains value with non-printable ASCII characters", key)
+ }
+ }
+ return nil
+}
diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
index 9097385e1..be5a9c81e 100644
--- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
+++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
@@ -22,6 +22,7 @@ import (
"bytes"
"errors"
"fmt"
+ "net"
"runtime"
"strconv"
"sync"
@@ -29,6 +30,7 @@ import (
"golang.org/x/net/http2"
"golang.org/x/net/http2/hpack"
+ "google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcutil"
"google.golang.org/grpc/status"
)
@@ -486,12 +488,14 @@ type loopyWriter struct {
hEnc *hpack.Encoder // HPACK encoder.
bdpEst *bdpEstimator
draining bool
+ conn net.Conn
+ logger *grpclog.PrefixLogger
// Side-specific handlers
ssGoAwayHandler func(*goAway) (bool, error)
}
-func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator) *loopyWriter {
+func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimator, conn net.Conn, logger *grpclog.PrefixLogger) *loopyWriter {
var buf bytes.Buffer
l := &loopyWriter{
side: s,
@@ -504,6 +508,8 @@ func newLoopyWriter(s side, fr *framer, cbuf *controlBuffer, bdpEst *bdpEstimato
hBuf: &buf,
hEnc: hpack.NewEncoder(&buf),
bdpEst: bdpEst,
+ conn: conn,
+ logger: logger,
}
return l
}
@@ -521,15 +527,27 @@ const minBatchSize = 1000
// 2. Stream level flow control quota available.
//
// In each iteration of run loop, other than processing the incoming control
-// frame, loopy calls processData, which processes one node from the activeStreams linked-list.
-// This results in writing of HTTP2 frames into an underlying write buffer.
-// When there's no more control frames to read from controlBuf, loopy flushes the write buffer.
-// As an optimization, to increase the batch size for each flush, loopy yields the processor, once
-// if the batch size is too low to give stream goroutines a chance to fill it up.
+// frame, loopy calls processData, which processes one node from the
+// activeStreams linked-list. This results in writing of HTTP2 frames into an
+// underlying write buffer. When there's no more control frames to read from
+// controlBuf, loopy flushes the write buffer. As an optimization, to increase
+// the batch size for each flush, loopy yields the processor, once if the batch
+// size is too low to give stream goroutines a chance to fill it up.
+//
+// Upon exiting, if the error causing the exit is not an I/O error, run()
+// flushes and closes the underlying connection. Otherwise, the connection is
+// left open to allow the I/O error to be encountered by the reader instead.
func (l *loopyWriter) run() (err error) {
- // Always flush the writer before exiting in case there are pending frames
- // to be sent.
- defer l.framer.writer.Flush()
+ defer func() {
+ if l.logger.V(logLevel) {
+ l.logger.Infof("loopyWriter exiting with error: %v", err)
+ }
+ if !isIOError(err) {
+ l.framer.writer.Flush()
+ l.conn.Close()
+ }
+ l.cbuf.finish()
+ }()
for {
it, err := l.cbuf.get(true)
if err != nil {
@@ -581,11 +599,11 @@ func (l *loopyWriter) outgoingWindowUpdateHandler(w *outgoingWindowUpdate) error
return l.framer.fr.WriteWindowUpdate(w.streamID, w.increment)
}
-func (l *loopyWriter) incomingWindowUpdateHandler(w *incomingWindowUpdate) error {
+func (l *loopyWriter) incomingWindowUpdateHandler(w *incomingWindowUpdate) {
// Otherwise update the quota.
if w.streamID == 0 {
l.sendQuota += w.increment
- return nil
+ return
}
// Find the stream and update it.
if str, ok := l.estdStreams[w.streamID]; ok {
@@ -593,10 +611,9 @@ func (l *loopyWriter) incomingWindowUpdateHandler(w *incomingWindowUpdate) error
if strQuota := int(l.oiws) - str.bytesOutStanding; strQuota > 0 && str.state == waitingOnStreamQuota {
str.state = active
l.activeStreams.enqueue(str)
- return nil
+ return
}
}
- return nil
}
func (l *loopyWriter) outgoingSettingsHandler(s *outgoingSettings) error {
@@ -604,13 +621,11 @@ func (l *loopyWriter) outgoingSettingsHandler(s *outgoingSettings) error {
}
func (l *loopyWriter) incomingSettingsHandler(s *incomingSettings) error {
- if err := l.applySettings(s.ss); err != nil {
- return err
- }
+ l.applySettings(s.ss)
return l.framer.fr.WriteSettingsAck()
}
-func (l *loopyWriter) registerStreamHandler(h *registerStream) error {
+func (l *loopyWriter) registerStreamHandler(h *registerStream) {
str := &outStream{
id: h.streamID,
state: empty,
@@ -618,15 +633,14 @@ func (l *loopyWriter) registerStreamHandler(h *registerStream) error {
wq: h.wq,
}
l.estdStreams[h.streamID] = str
- return nil
}
func (l *loopyWriter) headerHandler(h *headerFrame) error {
if l.side == serverSide {
str, ok := l.estdStreams[h.streamID]
if !ok {
- if logger.V(logLevel) {
- logger.Warningf("transport: loopy doesn't recognize the stream: %d", h.streamID)
+ if l.logger.V(logLevel) {
+ l.logger.Infof("Unrecognized streamID %d in loopyWriter", h.streamID)
}
return nil
}
@@ -681,8 +695,8 @@ func (l *loopyWriter) writeHeader(streamID uint32, endStream bool, hf []hpack.He
l.hBuf.Reset()
for _, f := range hf {
if err := l.hEnc.WriteField(f); err != nil {
- if logger.V(logLevel) {
- logger.Warningf("transport: loopyWriter.writeHeader encountered error while encoding headers: %v", err)
+ if l.logger.V(logLevel) {
+ l.logger.Warningf("Encountered error while encoding headers: %v", err)
}
}
}
@@ -720,10 +734,10 @@ func (l *loopyWriter) writeHeader(streamID uint32, endStream bool, hf []hpack.He
return nil
}
-func (l *loopyWriter) preprocessData(df *dataFrame) error {
+func (l *loopyWriter) preprocessData(df *dataFrame) {
str, ok := l.estdStreams[df.streamID]
if !ok {
- return nil
+ return
}
// If we got data for a stream it means that
// stream was originated and the headers were sent out.
@@ -732,7 +746,6 @@ func (l *loopyWriter) preprocessData(df *dataFrame) error {
str.state = active
l.activeStreams.enqueue(str)
}
- return nil
}
func (l *loopyWriter) pingHandler(p *ping) error {
@@ -743,9 +756,8 @@ func (l *loopyWriter) pingHandler(p *ping) error {
}
-func (l *loopyWriter) outFlowControlSizeRequestHandler(o *outFlowControlSizeRequest) error {
+func (l *loopyWriter) outFlowControlSizeRequestHandler(o *outFlowControlSizeRequest) {
o.resp <- l.sendQuota
- return nil
}
func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error {
@@ -763,6 +775,7 @@ func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error {
}
}
if l.draining && len(l.estdStreams) == 0 {
+ // Flush and close the connection; we are done with it.
return errors.New("finished processing active streams while in draining mode")
}
return nil
@@ -798,6 +811,7 @@ func (l *loopyWriter) incomingGoAwayHandler(*incomingGoAway) error {
if l.side == clientSide {
l.draining = true
if len(l.estdStreams) == 0 {
+ // Flush and close the connection; we are done with it.
return errors.New("received GOAWAY with no active streams")
}
}
@@ -816,17 +830,10 @@ func (l *loopyWriter) goAwayHandler(g *goAway) error {
return nil
}
-func (l *loopyWriter) closeConnectionHandler() error {
- // Exit loopyWriter entirely by returning an error here. This will lead to
- // the transport closing the connection, and, ultimately, transport
- // closure.
- return ErrConnClosing
-}
-
func (l *loopyWriter) handle(i interface{}) error {
switch i := i.(type) {
case *incomingWindowUpdate:
- return l.incomingWindowUpdateHandler(i)
+ l.incomingWindowUpdateHandler(i)
case *outgoingWindowUpdate:
return l.outgoingWindowUpdateHandler(i)
case *incomingSettings:
@@ -836,7 +843,7 @@ func (l *loopyWriter) handle(i interface{}) error {
case *headerFrame:
return l.headerHandler(i)
case *registerStream:
- return l.registerStreamHandler(i)
+ l.registerStreamHandler(i)
case *cleanupStream:
return l.cleanupStreamHandler(i)
case *earlyAbortStream:
@@ -844,21 +851,24 @@ func (l *loopyWriter) handle(i interface{}) error {
case *incomingGoAway:
return l.incomingGoAwayHandler(i)
case *dataFrame:
- return l.preprocessData(i)
+ l.preprocessData(i)
case *ping:
return l.pingHandler(i)
case *goAway:
return l.goAwayHandler(i)
case *outFlowControlSizeRequest:
- return l.outFlowControlSizeRequestHandler(i)
+ l.outFlowControlSizeRequestHandler(i)
case closeConnection:
- return l.closeConnectionHandler()
+ // Just return a non-I/O error and run() will flush and close the
+ // connection.
+ return ErrConnClosing
default:
return fmt.Errorf("transport: unknown control message type %T", i)
}
+ return nil
}
-func (l *loopyWriter) applySettings(ss []http2.Setting) error {
+func (l *loopyWriter) applySettings(ss []http2.Setting) {
for _, s := range ss {
switch s.ID {
case http2.SettingInitialWindowSize:
@@ -877,7 +887,6 @@ func (l *loopyWriter) applySettings(ss []http2.Setting) error {
updateHeaderTblSize(l.hEnc, s.Val)
}
}
- return nil
}
// processData removes the first stream from active streams, writes out at most 16KB
@@ -911,7 +920,7 @@ func (l *loopyWriter) processData() (bool, error) {
return false, err
}
if err := l.cleanupStreamHandler(trailer.cleanup); err != nil {
- return false, nil
+ return false, err
}
} else {
l.activeStreams.enqueue(str)
diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index e6626bf96..fbee581b8 100644
--- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -39,6 +39,7 @@ import (
"golang.org/x/net/http2"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
+ "google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcutil"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/peer"
@@ -83,6 +84,7 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s
contentSubtype: contentSubtype,
stats: stats,
}
+ st.logger = prefixLoggerForServerHandlerTransport(st)
if v := r.Header.Get("grpc-timeout"); v != "" {
to, err := decodeTimeout(v)
@@ -150,13 +152,14 @@ type serverHandlerTransport struct {
// TODO make sure this is consistent across handler_server and http2_server
contentSubtype string
- stats []stats.Handler
+ stats []stats.Handler
+ logger *grpclog.PrefixLogger
}
func (ht *serverHandlerTransport) Close(err error) {
ht.closeOnce.Do(func() {
- if logger.V(logLevel) {
- logger.Infof("Closing serverHandlerTransport: %v", err)
+ if ht.logger.V(logLevel) {
+ ht.logger.Infof("Closing: %v", err)
}
close(ht.closedCh)
})
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index 79ee8aea0..5216998a8 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -38,6 +38,7 @@ import (
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/internal/channelz"
icredentials "google.golang.org/grpc/internal/credentials"
+ "google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/internal/grpcutil"
imetadata "google.golang.org/grpc/internal/metadata"
@@ -145,6 +146,7 @@ type http2Client struct {
bufferPool *bufferPool
connectionID uint64
+ logger *grpclog.PrefixLogger
}
func dial(ctx context.Context, fn func(context.Context, string) (net.Conn, error), addr resolver.Address, useProxy bool, grpcUA string) (net.Conn, error) {
@@ -244,7 +246,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
if err := connectCtx.Err(); err != nil {
// connectCtx expired before exiting the function. Hard close the connection.
if logger.V(logLevel) {
- logger.Infof("newClientTransport: aborting due to connectCtx: %v", err)
+ logger.Infof("Aborting due to connect deadline expiring: %v", err)
}
conn.Close()
}
@@ -346,6 +348,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
bufferPool: newBufferPool(),
onClose: onClose,
}
+ t.logger = prefixLoggerForClientTransport(t)
// Add peer information to the http2client context.
t.ctx = peer.NewContext(t.ctx, t.getPeer())
@@ -444,15 +447,8 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
return nil, err
}
go func() {
- t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst)
- err := t.loopy.run()
- if logger.V(logLevel) {
- logger.Infof("transport: loopyWriter exited. Closing connection. Err: %v", err)
- }
- // Do not close the transport. Let reader goroutine handle it since
- // there might be data in the buffers.
- t.conn.Close()
- t.controlBuf.finish()
+ t.loopy = newLoopyWriter(clientSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger)
+ t.loopy.run()
close(t.writerDone)
}()
return t, nil
@@ -789,7 +785,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
s.id = h.streamID
s.fc = &inFlow{limit: uint32(t.initialWindowSize)}
t.mu.Lock()
- if t.activeStreams == nil { // Can be niled from Close().
+ if t.state == draining || t.activeStreams == nil { // Can be niled from Close().
t.mu.Unlock()
return false // Don't create a stream if the transport is already closed.
}
@@ -866,8 +862,8 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
}
}
if transportDrainRequired {
- if logger.V(logLevel) {
- logger.Infof("transport: t.nextID > MaxStreamID. Draining")
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Draining transport: t.nextID > MaxStreamID")
}
t.GracefulClose()
}
@@ -959,8 +955,8 @@ func (t *http2Client) Close(err error) {
t.mu.Unlock()
return
}
- if logger.V(logLevel) {
- logger.Infof("transport: closing: %v", err)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Closing: %v", err)
}
// Call t.onClose ASAP to prevent the client from attempting to create new
// streams.
@@ -1016,8 +1012,8 @@ func (t *http2Client) GracefulClose() {
t.mu.Unlock()
return
}
- if logger.V(logLevel) {
- logger.Infof("transport: GracefulClose called")
+ if t.logger.V(logLevel) {
+ t.logger.Infof("GracefulClose called")
}
t.onClose(GoAwayInvalid)
t.state = draining
@@ -1181,8 +1177,8 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) {
}
statusCode, ok := http2ErrConvTab[f.ErrCode]
if !ok {
- if logger.V(logLevel) {
- logger.Warningf("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error: %v", f.ErrCode)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Received a RST_STREAM frame with code %q, but found no mapped gRPC status", f.ErrCode)
}
statusCode = codes.Unknown
}
@@ -1264,10 +1260,12 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
t.mu.Unlock()
return
}
- if f.ErrCode == http2.ErrCodeEnhanceYourCalm {
- if logger.V(logLevel) {
- logger.Infof("Client received GoAway with http2.ErrCodeEnhanceYourCalm.")
- }
+ if f.ErrCode == http2.ErrCodeEnhanceYourCalm && string(f.DebugData()) == "too_many_pings" {
+ // When a client receives a GOAWAY with error code ENHANCE_YOUR_CALM and debug
+ // data equal to ASCII "too_many_pings", it should log the occurrence at a log level that is
+ // enabled by default and double the configure KEEPALIVE_TIME used for new connections
+ // on that channel.
+ logger.Errorf("Client received GoAway with error code ENHANCE_YOUR_CALM and debug data equal to ASCII \"too_many_pings\".")
}
id := f.LastStreamID
if id > 0 && id%2 == 0 {
diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index bc3da7067..4b406b8cb 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -35,7 +35,9 @@ import (
"github.com/golang/protobuf/proto"
"golang.org/x/net/http2"
"golang.org/x/net/http2/hpack"
+ "google.golang.org/grpc/internal/grpclog"
"google.golang.org/grpc/internal/grpcutil"
+ "google.golang.org/grpc/internal/pretty"
"google.golang.org/grpc/internal/syscall"
"google.golang.org/grpc/codes"
@@ -129,6 +131,8 @@ type http2Server struct {
// This lock may not be taken if mu is already held.
maxStreamMu sync.Mutex
maxStreamID uint32 // max stream ID ever seen
+
+ logger *grpclog.PrefixLogger
}
// NewServerTransport creates a http2 transport with conn and configuration
@@ -267,6 +271,7 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
czData: new(channelzData),
bufferPool: newBufferPool(),
}
+ t.logger = prefixLoggerForServerTransport(t)
// Add peer information to the http2server context.
t.ctx = peer.NewContext(t.ctx, t.getPeer())
@@ -331,14 +336,9 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
t.handleSettings(sf)
go func() {
- t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst)
+ t.loopy = newLoopyWriter(serverSide, t.framer, t.controlBuf, t.bdpEst, t.conn, t.logger)
t.loopy.ssGoAwayHandler = t.outgoingGoAwayHandler
- err := t.loopy.run()
- if logger.V(logLevel) {
- logger.Infof("transport: loopyWriter exited. Closing connection. Err: %v", err)
- }
- t.conn.Close()
- t.controlBuf.finish()
+ t.loopy.run()
close(t.writerDone)
}()
go t.keepalive()
@@ -383,7 +383,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
// if false, content-type was missing or invalid
isGRPC = false
contentType = ""
- mdata = make(map[string][]string)
+ mdata = make(metadata.MD, len(frame.Fields))
httpMethod string
// these are set if an error is encountered while parsing the headers
protocolError bool
@@ -404,6 +404,17 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
mdata[hf.Name] = append(mdata[hf.Name], hf.Value)
s.contentSubtype = contentSubtype
isGRPC = true
+
+ case "grpc-accept-encoding":
+ mdata[hf.Name] = append(mdata[hf.Name], hf.Value)
+ if hf.Value == "" {
+ continue
+ }
+ compressors := hf.Value
+ if s.clientAdvertisedCompressors != "" {
+ compressors = s.clientAdvertisedCompressors + "," + compressors
+ }
+ s.clientAdvertisedCompressors = compressors
case "grpc-encoding":
s.recvCompress = hf.Value
case ":method":
@@ -419,8 +430,8 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
// "Transports must consider requests containing the Connection header
// as malformed." - A41
case "connection":
- if logger.V(logLevel) {
- logger.Errorf("transport: http2Server.operateHeaders parsed a :connection header which makes a request malformed as per the HTTP/2 spec")
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Received a HEADERS frame with a :connection header which makes the request malformed, as per the HTTP/2 spec")
}
protocolError = true
default:
@@ -430,7 +441,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
v, err := decodeMetadataHeader(hf.Name, hf.Value)
if err != nil {
headerError = status.Newf(codes.Internal, "malformed binary metadata %q in header %q: %v", hf.Value, hf.Name, err)
- logger.Warningf("Failed to decode metadata header (%q, %q): %v", hf.Name, hf.Value, err)
+ t.logger.Warningf("Failed to decode metadata header (%q, %q): %v", hf.Name, hf.Value, err)
break
}
mdata[hf.Name] = append(mdata[hf.Name], v)
@@ -444,8 +455,8 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
// error, this takes precedence over a client not speaking gRPC.
if len(mdata[":authority"]) > 1 || len(mdata["host"]) > 1 {
errMsg := fmt.Sprintf("num values of :authority: %v, num values of host: %v, both must only have 1 value as per HTTP/2 spec", len(mdata[":authority"]), len(mdata["host"]))
- if logger.V(logLevel) {
- logger.Errorf("transport: %v", errMsg)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Aborting the stream early: %v", errMsg)
}
t.controlBuf.put(&earlyAbortStream{
httpStatus: http.StatusBadRequest,
@@ -539,9 +550,9 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
}
if httpMethod != http.MethodPost {
t.mu.Unlock()
- errMsg := fmt.Sprintf("http2Server.operateHeaders parsed a :method field: %v which should be POST", httpMethod)
- if logger.V(logLevel) {
- logger.Infof("transport: %v", errMsg)
+ errMsg := fmt.Sprintf("Received a HEADERS frame with :method %q which should be POST", httpMethod)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Aborting the stream early: %v", errMsg)
}
t.controlBuf.put(&earlyAbortStream{
httpStatus: 405,
@@ -557,8 +568,8 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
var err error
if s.ctx, err = t.inTapHandle(s.ctx, &tap.Info{FullMethodName: s.method}); err != nil {
t.mu.Unlock()
- if logger.V(logLevel) {
- logger.Infof("transport: http2Server.operateHeaders got an error from InTapHandle: %v", err)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Aborting the stream early due to InTapHandle failure: %v", err)
}
stat, ok := status.FromError(err)
if !ok {
@@ -595,7 +606,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
LocalAddr: t.localAddr,
Compression: s.recvCompress,
WireLength: int(frame.Header().Length),
- Header: metadata.MD(mdata).Copy(),
+ Header: mdata.Copy(),
}
sh.HandleRPC(s.ctx, inHeader)
}
@@ -632,8 +643,8 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context.
atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
if err != nil {
if se, ok := err.(http2.StreamError); ok {
- if logger.V(logLevel) {
- logger.Warningf("transport: http2Server.HandleStreams encountered http2.StreamError: %v", se)
+ if t.logger.V(logLevel) {
+ t.logger.Warningf("Encountered http2.StreamError: %v", se)
}
t.mu.Lock()
s := t.activeStreams[se.StreamID]
@@ -676,8 +687,8 @@ func (t *http2Server) HandleStreams(handle func(*Stream), traceCtx func(context.
case *http2.GoAwayFrame:
// TODO: Handle GoAway from the client appropriately.
default:
- if logger.V(logLevel) {
- logger.Errorf("transport: http2Server.HandleStreams found unhandled frame type %v.", frame)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Received unsupported frame type %T", frame)
}
}
}
@@ -936,8 +947,8 @@ func (t *http2Server) checkForHeaderListSize(it interface{}) bool {
var sz int64
for _, f := range hdrFrame.hf {
if sz += int64(f.Size()); sz > int64(*t.maxSendHeaderListSize) {
- if logger.V(logLevel) {
- logger.Errorf("header list size to send violates the maximum size (%d bytes) set by client", *t.maxSendHeaderListSize)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Header list size to send violates the maximum size (%d bytes) set by client", *t.maxSendHeaderListSize)
}
return false
}
@@ -1050,7 +1061,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
stBytes, err := proto.Marshal(p)
if err != nil {
// TODO: return error instead, when callers are able to handle it.
- logger.Errorf("transport: failed to marshal rpc status: %v, error: %v", p, err)
+ t.logger.Errorf("Failed to marshal rpc status: %s, error: %v", pretty.ToJSON(p), err)
} else {
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-status-details-bin", Value: encodeBinHeader(stBytes)})
}
@@ -1165,8 +1176,8 @@ func (t *http2Server) keepalive() {
select {
case <-ageTimer.C:
// Close the connection after grace period.
- if logger.V(logLevel) {
- logger.Infof("transport: closing server transport due to maximum connection age.")
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Closing server transport due to maximum connection age")
}
t.controlBuf.put(closeConnection{})
case <-t.done:
@@ -1217,8 +1228,8 @@ func (t *http2Server) Close(err error) {
t.mu.Unlock()
return
}
- if logger.V(logLevel) {
- logger.Infof("transport: closing: %v", err)
+ if t.logger.V(logLevel) {
+ t.logger.Infof("Closing: %v", err)
}
t.state = closing
streams := t.activeStreams
@@ -1226,8 +1237,8 @@ func (t *http2Server) Close(err error) {
t.mu.Unlock()
t.controlBuf.finish()
close(t.done)
- if err := t.conn.Close(); err != nil && logger.V(logLevel) {
- logger.Infof("transport: error closing conn during Close: %v", err)
+ if err := t.conn.Close(); err != nil && t.logger.V(logLevel) {
+ t.logger.Infof("Error closing underlying net.Conn during Close: %v", err)
}
channelz.RemoveEntry(t.channelzID)
// Cancel all active streams.
@@ -1344,9 +1355,6 @@ func (t *http2Server) outgoingGoAwayHandler(g *goAway) (bool, error) {
return false, err
}
if retErr != nil {
- // Abruptly close the connection following the GoAway (via
- // loopywriter). But flush out what's inside the buffer first.
- t.framer.writer.Flush()
return false, retErr
}
return true, nil
diff --git a/vendor/google.golang.org/grpc/internal/transport/http_util.go b/vendor/google.golang.org/grpc/internal/transport/http_util.go
index 2c601a864..19cbb18f5 100644
--- a/vendor/google.golang.org/grpc/internal/transport/http_util.go
+++ b/vendor/google.golang.org/grpc/internal/transport/http_util.go
@@ -21,6 +21,7 @@ package transport
import (
"bufio"
"encoding/base64"
+ "errors"
"fmt"
"io"
"math"
@@ -37,7 +38,6 @@ import (
"golang.org/x/net/http2/hpack"
spb "google.golang.org/genproto/googleapis/rpc/status"
"google.golang.org/grpc/codes"
- "google.golang.org/grpc/grpclog"
"google.golang.org/grpc/status"
)
@@ -85,7 +85,6 @@ var (
// 504 Gateway timeout - UNAVAILABLE.
http.StatusGatewayTimeout: codes.Unavailable,
}
- logger = grpclog.Component("transport")
)
// isReservedHeader checks whether hdr belongs to HTTP2 headers
@@ -330,7 +329,8 @@ func (w *bufWriter) Write(b []byte) (n int, err error) {
return 0, w.err
}
if w.batchSize == 0 { // Buffer has been disabled.
- return w.conn.Write(b)
+ n, err = w.conn.Write(b)
+ return n, toIOError(err)
}
for len(b) > 0 {
nn := copy(w.buf[w.offset:], b)
@@ -352,10 +352,30 @@ func (w *bufWriter) Flush() error {
return nil
}
_, w.err = w.conn.Write(w.buf[:w.offset])
+ w.err = toIOError(w.err)
w.offset = 0
return w.err
}
+type ioError struct {
+ error
+}
+
+func (i ioError) Unwrap() error {
+ return i.error
+}
+
+func isIOError(err error) bool {
+ return errors.As(err, &ioError{})
+}
+
+func toIOError(err error) error {
+ if err == nil {
+ return nil
+ }
+ return ioError{error: err}
+}
+
type framer struct {
writer *bufWriter
fr *http2.Framer
diff --git a/vendor/google.golang.org/grpc/internal/transport/logging.go b/vendor/google.golang.org/grpc/internal/transport/logging.go
new file mode 100644
index 000000000..42ed2b07a
--- /dev/null
+++ b/vendor/google.golang.org/grpc/internal/transport/logging.go
@@ -0,0 +1,40 @@
+/*
+ *
+ * Copyright 2023 gRPC 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 transport
+
+import (
+ "fmt"
+
+ "google.golang.org/grpc/grpclog"
+ internalgrpclog "google.golang.org/grpc/internal/grpclog"
+)
+
+var logger = grpclog.Component("transport")
+
+func prefixLoggerForServerTransport(p *http2Server) *internalgrpclog.PrefixLogger {
+ return internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[server-transport %p] ", p))
+}
+
+func prefixLoggerForServerHandlerTransport(p *serverHandlerTransport) *internalgrpclog.PrefixLogger {
+ return internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[server-handler-transport %p] ", p))
+}
+
+func prefixLoggerForClientTransport(p *http2Client) *internalgrpclog.PrefixLogger {
+ return internalgrpclog.NewPrefixLogger(logger, fmt.Sprintf("[client-transport %p] ", p))
+}
diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go
index 0ac77ea4f..1b7d7fabc 100644
--- a/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -257,6 +257,9 @@ type Stream struct {
fc *inFlow
wq *writeQuota
+ // Holds compressor names passed in grpc-accept-encoding metadata from the
+ // client. This is empty for the client side stream.
+ clientAdvertisedCompressors string
// Callback to state application's intentions to read data. This
// is used to adjust flow control, if needed.
requestRead func(int)
@@ -345,8 +348,24 @@ func (s *Stream) RecvCompress() string {
}
// SetSendCompress sets the compression algorithm to the stream.
-func (s *Stream) SetSendCompress(str string) {
- s.sendCompress = str
+func (s *Stream) SetSendCompress(name string) error {
+ if s.isHeaderSent() || s.getState() == streamDone {
+ return errors.New("transport: set send compressor called after headers sent or stream done")
+ }
+
+ s.sendCompress = name
+ return nil
+}
+
+// SendCompress returns the send compressor name.
+func (s *Stream) SendCompress() string {
+ return s.sendCompress
+}
+
+// ClientAdvertisedCompressors returns the compressor names advertised by the
+// client via grpc-accept-encoding header.
+func (s *Stream) ClientAdvertisedCompressors() string {
+ return s.clientAdvertisedCompressors
}
// Done returns a channel which is closed when it receives the final status
diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go
index fb4a88f59..a2cdcaf12 100644
--- a/vendor/google.golang.org/grpc/metadata/metadata.go
+++ b/vendor/google.golang.org/grpc/metadata/metadata.go
@@ -91,7 +91,11 @@ func (md MD) Len() int {
// Copy returns a copy of md.
func (md MD) Copy() MD {
- return Join(md)
+ out := make(MD, len(md))
+ for k, v := range md {
+ out[k] = copyOf(v)
+ }
+ return out
}
// Get obtains the values for a given key.
@@ -171,8 +175,11 @@ func AppendToOutgoingContext(ctx context.Context, kv ...string) context.Context
md, _ := ctx.Value(mdOutgoingKey{}).(rawMD)
added := make([][]string, len(md.added)+1)
copy(added, md.added)
- added[len(added)-1] = make([]string, len(kv))
- copy(added[len(added)-1], kv)
+ kvCopy := make([]string, 0, len(kv))
+ for i := 0; i < len(kv); i += 2 {
+ kvCopy = append(kvCopy, strings.ToLower(kv[i]), kv[i+1])
+ }
+ added[len(added)-1] = kvCopy
return context.WithValue(ctx, mdOutgoingKey{}, rawMD{md: md.md, added: added})
}
diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go
index 654e9ce69..6215e5ef2 100644
--- a/vendor/google.golang.org/grpc/resolver/resolver.go
+++ b/vendor/google.golang.org/grpc/resolver/resolver.go
@@ -41,8 +41,9 @@ var (
// TODO(bar) install dns resolver in init(){}.
-// Register registers the resolver builder to the resolver map. b.Scheme will be
-// used as the scheme registered with this builder.
+// Register registers the resolver builder to the resolver map. b.Scheme will
+// be used as the scheme registered with this builder. The registry is case
+// sensitive, and schemes should not contain any uppercase characters.
//
// NOTE: this function must only be called during initialization time (i.e. in
// an init() function), and is not thread-safe. If multiple Resolvers are
@@ -203,6 +204,15 @@ type State struct {
// gRPC to add new methods to this interface.
type ClientConn interface {
// UpdateState updates the state of the ClientConn appropriately.
+ //
+ // If an error is returned, the resolver should try to resolve the
+ // target again. The resolver should use a backoff timer to prevent
+ // overloading the server with requests. If a resolver is certain that
+ // reresolving will not change the result, e.g. because it is
+ // a watch-based resolver, returned errors can be ignored.
+ //
+ // If the resolved State is the same as the last reported one, calling
+ // UpdateState can be omitted.
UpdateState(State) error
// ReportError notifies the ClientConn that the Resolver encountered an
// error. The ClientConn will notify the load balancer and begin calling
@@ -280,8 +290,10 @@ type Builder interface {
// gRPC dial calls Build synchronously, and fails if the returned error is
// not nil.
Build(target Target, cc ClientConn, opts BuildOptions) (Resolver, error)
- // Scheme returns the scheme supported by this resolver.
- // Scheme is defined at https://github.com/grpc/grpc/blob/master/doc/naming.md.
+ // Scheme returns the scheme supported by this resolver. Scheme is defined
+ // at https://github.com/grpc/grpc/blob/master/doc/naming.md. The returned
+ // string should not contain uppercase characters, as they will not match
+ // the parsed target's scheme as defined in RFC 3986.
Scheme() string
}
diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go
index cb7020ebe..2030736a3 100644
--- a/vendor/google.golang.org/grpc/rpc_util.go
+++ b/vendor/google.golang.org/grpc/rpc_util.go
@@ -159,6 +159,7 @@ type callInfo struct {
contentSubtype string
codec baseCodec
maxRetryRPCBufferSize int
+ onFinish []func(err error)
}
func defaultCallInfo() *callInfo {
@@ -295,6 +296,41 @@ func (o FailFastCallOption) before(c *callInfo) error {
}
func (o FailFastCallOption) after(c *callInfo, attempt *csAttempt) {}
+// OnFinish returns a CallOption that configures a callback to be called when
+// the call completes. The error passed to the callback is the status of the
+// RPC, and may be nil. The onFinish callback provided will only be called once
+// by gRPC. This is mainly used to be used by streaming interceptors, to be
+// notified when the RPC completes along with information about the status of
+// the RPC.
+//
+// # Experimental
+//
+// Notice: This API is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func OnFinish(onFinish func(err error)) CallOption {
+ return OnFinishCallOption{
+ OnFinish: onFinish,
+ }
+}
+
+// OnFinishCallOption is CallOption that indicates a callback to be called when
+// the call completes.
+//
+// # Experimental
+//
+// Notice: This type is EXPERIMENTAL and may be changed or removed in a
+// later release.
+type OnFinishCallOption struct {
+ OnFinish func(error)
+}
+
+func (o OnFinishCallOption) before(c *callInfo) error {
+ c.onFinish = append(c.onFinish, o.OnFinish)
+ return nil
+}
+
+func (o OnFinishCallOption) after(c *callInfo, attempt *csAttempt) {}
+
// MaxCallRecvMsgSize returns a CallOption which sets the maximum message size
// in bytes the client can receive. If this is not set, gRPC uses the default
// 4MB.
@@ -658,12 +694,13 @@ func msgHeader(data, compData []byte) (hdr []byte, payload []byte) {
func outPayload(client bool, msg interface{}, data, payload []byte, t time.Time) *stats.OutPayload {
return &stats.OutPayload{
- Client: client,
- Payload: msg,
- Data: data,
- Length: len(data),
- WireLength: len(payload) + headerLen,
- SentTime: t,
+ Client: client,
+ Payload: msg,
+ Data: data,
+ Length: len(data),
+ WireLength: len(payload) + headerLen,
+ CompressedLength: len(payload),
+ SentTime: t,
}
}
@@ -684,7 +721,7 @@ func checkRecvPayload(pf payloadFormat, recvCompress string, haveCompressor bool
}
type payloadInfo struct {
- wireLength int // The compressed length got from wire.
+ compressedLength int // The compressed length got from wire.
uncompressedBytes []byte
}
@@ -694,7 +731,7 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei
return nil, err
}
if payInfo != nil {
- payInfo.wireLength = len(d)
+ payInfo.compressedLength = len(d)
}
if st := checkRecvPayload(pf, s.RecvCompress(), compressor != nil || dc != nil); st != nil {
diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go
index d5a6e78be..76d152a69 100644
--- a/vendor/google.golang.org/grpc/server.go
+++ b/vendor/google.golang.org/grpc/server.go
@@ -43,8 +43,8 @@ import (
"google.golang.org/grpc/internal"
"google.golang.org/grpc/internal/binarylog"
"google.golang.org/grpc/internal/channelz"
- "google.golang.org/grpc/internal/grpcrand"
"google.golang.org/grpc/internal/grpcsync"
+ "google.golang.org/grpc/internal/grpcutil"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/metadata"
@@ -74,10 +74,10 @@ func init() {
srv.drainServerTransports(addr)
}
internal.AddGlobalServerOptions = func(opt ...ServerOption) {
- extraServerOptions = append(extraServerOptions, opt...)
+ globalServerOptions = append(globalServerOptions, opt...)
}
internal.ClearGlobalServerOptions = func() {
- extraServerOptions = nil
+ globalServerOptions = nil
}
internal.BinaryLogger = binaryLogger
internal.JoinServerOptions = newJoinServerOption
@@ -145,7 +145,7 @@ type Server struct {
channelzID *channelz.Identifier
czData *channelzData
- serverWorkerChannels []chan *serverWorkerData
+ serverWorkerChannel chan *serverWorkerData
}
type serverOptions struct {
@@ -183,7 +183,7 @@ var defaultServerOptions = serverOptions{
writeBufferSize: defaultWriteBufSize,
readBufferSize: defaultReadBufSize,
}
-var extraServerOptions []ServerOption
+var globalServerOptions []ServerOption
// A ServerOption sets options such as credentials, codec and keepalive parameters, etc.
type ServerOption interface {
@@ -560,47 +560,45 @@ func NumStreamWorkers(numServerWorkers uint32) ServerOption {
const serverWorkerResetThreshold = 1 << 16
// serverWorkers blocks on a *transport.Stream channel forever and waits for
-// data to be fed by serveStreams. This allows different requests to be
+// data to be fed by serveStreams. This allows multiple requests to be
// processed by the same goroutine, removing the need for expensive stack
// re-allocations (see the runtime.morestack problem [1]).
//
// [1] https://github.com/golang/go/issues/18138
-func (s *Server) serverWorker(ch chan *serverWorkerData) {
- // To make sure all server workers don't reset at the same time, choose a
- // random number of iterations before resetting.
- threshold := serverWorkerResetThreshold + grpcrand.Intn(serverWorkerResetThreshold)
- for completed := 0; completed < threshold; completed++ {
- data, ok := <-ch
+func (s *Server) serverWorker() {
+ for completed := 0; completed < serverWorkerResetThreshold; completed++ {
+ data, ok := <-s.serverWorkerChannel
if !ok {
return
}
- s.handleStream(data.st, data.stream, s.traceInfo(data.st, data.stream))
- data.wg.Done()
+ s.handleSingleStream(data)
}
- go s.serverWorker(ch)
+ go s.serverWorker()
}
-// initServerWorkers creates worker goroutines and channels to process incoming
+func (s *Server) handleSingleStream(data *serverWorkerData) {
+ defer data.wg.Done()
+ s.handleStream(data.st, data.stream, s.traceInfo(data.st, data.stream))
+}
+
+// initServerWorkers creates worker goroutines and a channel to process incoming
// connections to reduce the time spent overall on runtime.morestack.
func (s *Server) initServerWorkers() {
- s.serverWorkerChannels = make([]chan *serverWorkerData, s.opts.numServerWorkers)
+ s.serverWorkerChannel = make(chan *serverWorkerData)
for i := uint32(0); i < s.opts.numServerWorkers; i++ {
- s.serverWorkerChannels[i] = make(chan *serverWorkerData)
- go s.serverWorker(s.serverWorkerChannels[i])
+ go s.serverWorker()
}
}
func (s *Server) stopServerWorkers() {
- for i := uint32(0); i < s.opts.numServerWorkers; i++ {
- close(s.serverWorkerChannels[i])
- }
+ close(s.serverWorkerChannel)
}
// NewServer creates a gRPC server which has no service registered and has not
// started to accept requests yet.
func NewServer(opt ...ServerOption) *Server {
opts := defaultServerOptions
- for _, o := range extraServerOptions {
+ for _, o := range globalServerOptions {
o.apply(&opts)
}
for _, o := range opt {
@@ -945,26 +943,21 @@ func (s *Server) serveStreams(st transport.ServerTransport) {
defer st.Close(errors.New("finished serving streams for the server transport"))
var wg sync.WaitGroup
- var roundRobinCounter uint32
st.HandleStreams(func(stream *transport.Stream) {
wg.Add(1)
if s.opts.numServerWorkers > 0 {
data := &serverWorkerData{st: st, wg: &wg, stream: stream}
select {
- case s.serverWorkerChannels[atomic.AddUint32(&roundRobinCounter, 1)%s.opts.numServerWorkers] <- data:
+ case s.serverWorkerChannel <- data:
+ return
default:
// If all stream workers are busy, fallback to the default code path.
- go func() {
- s.handleStream(st, stream, s.traceInfo(st, stream))
- wg.Done()
- }()
}
- } else {
- go func() {
- defer wg.Done()
- s.handleStream(st, stream, s.traceInfo(st, stream))
- }()
}
+ go func() {
+ defer wg.Done()
+ s.handleStream(st, stream, s.traceInfo(st, stream))
+ }()
}, func(ctx context.Context, method string) context.Context {
if !EnableTracing {
return ctx
@@ -1252,7 +1245,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
logEntry.PeerAddr = peer.Addr
}
for _, binlog := range binlogs {
- binlog.Log(logEntry)
+ binlog.Log(ctx, logEntry)
}
}
@@ -1263,6 +1256,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
var comp, decomp encoding.Compressor
var cp Compressor
var dc Decompressor
+ var sendCompressorName string
// If dc is set and matches the stream's compression, use it. Otherwise, try
// to find a matching registered compressor for decomp.
@@ -1283,12 +1277,18 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
// NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686.
if s.opts.cp != nil {
cp = s.opts.cp
- stream.SetSendCompress(cp.Type())
+ sendCompressorName = cp.Type()
} else if rc := stream.RecvCompress(); rc != "" && rc != encoding.Identity {
// Legacy compressor not specified; attempt to respond with same encoding.
comp = encoding.GetCompressor(rc)
if comp != nil {
- stream.SetSendCompress(rc)
+ sendCompressorName = comp.Name()
+ }
+ }
+
+ if sendCompressorName != "" {
+ if err := stream.SetSendCompress(sendCompressorName); err != nil {
+ return status.Errorf(codes.Internal, "grpc: failed to set send compressor: %v", err)
}
}
@@ -1312,11 +1312,12 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
}
for _, sh := range shs {
sh.HandleRPC(stream.Context(), &stats.InPayload{
- RecvTime: time.Now(),
- Payload: v,
- WireLength: payInfo.wireLength + headerLen,
- Data: d,
- Length: len(d),
+ RecvTime: time.Now(),
+ Payload: v,
+ Length: len(d),
+ WireLength: payInfo.compressedLength + headerLen,
+ CompressedLength: payInfo.compressedLength,
+ Data: d,
})
}
if len(binlogs) != 0 {
@@ -1324,7 +1325,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
Message: d,
}
for _, binlog := range binlogs {
- binlog.Log(cm)
+ binlog.Log(stream.Context(), cm)
}
}
if trInfo != nil {
@@ -1357,7 +1358,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
Header: h,
}
for _, binlog := range binlogs {
- binlog.Log(sh)
+ binlog.Log(stream.Context(), sh)
}
}
st := &binarylog.ServerTrailer{
@@ -1365,7 +1366,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
Err: appErr,
}
for _, binlog := range binlogs {
- binlog.Log(st)
+ binlog.Log(stream.Context(), st)
}
}
return appErr
@@ -1375,6 +1376,11 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
}
opts := &transport.Options{Last: true}
+ // Server handler could have set new compressor by calling SetSendCompressor.
+ // In case it is set, we need to use it for compressing outbound message.
+ if stream.SendCompress() != sendCompressorName {
+ comp = encoding.GetCompressor(stream.SendCompress())
+ }
if err := s.sendResponse(t, stream, reply, cp, opts, comp); err != nil {
if err == io.EOF {
// The entire stream is done (for unary RPC only).
@@ -1402,8 +1408,8 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
Err: appErr,
}
for _, binlog := range binlogs {
- binlog.Log(sh)
- binlog.Log(st)
+ binlog.Log(stream.Context(), sh)
+ binlog.Log(stream.Context(), st)
}
}
return err
@@ -1417,8 +1423,8 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
Message: reply,
}
for _, binlog := range binlogs {
- binlog.Log(sh)
- binlog.Log(sm)
+ binlog.Log(stream.Context(), sh)
+ binlog.Log(stream.Context(), sm)
}
}
if channelz.IsOn() {
@@ -1430,17 +1436,16 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
// TODO: Should we be logging if writing status failed here, like above?
// Should the logging be in WriteStatus? Should we ignore the WriteStatus
// error or allow the stats handler to see it?
- err = t.WriteStatus(stream, statusOK)
if len(binlogs) != 0 {
st := &binarylog.ServerTrailer{
Trailer: stream.Trailer(),
Err: appErr,
}
for _, binlog := range binlogs {
- binlog.Log(st)
+ binlog.Log(stream.Context(), st)
}
}
- return err
+ return t.WriteStatus(stream, statusOK)
}
// chainStreamServerInterceptors chains all stream server interceptors into one.
@@ -1574,7 +1579,7 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
logEntry.PeerAddr = peer.Addr
}
for _, binlog := range ss.binlogs {
- binlog.Log(logEntry)
+ binlog.Log(stream.Context(), logEntry)
}
}
@@ -1597,12 +1602,18 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
// NOTE: this needs to be ahead of all handling, https://github.com/grpc/grpc-go/issues/686.
if s.opts.cp != nil {
ss.cp = s.opts.cp
- stream.SetSendCompress(s.opts.cp.Type())
+ ss.sendCompressorName = s.opts.cp.Type()
} else if rc := stream.RecvCompress(); rc != "" && rc != encoding.Identity {
// Legacy compressor not specified; attempt to respond with same encoding.
ss.comp = encoding.GetCompressor(rc)
if ss.comp != nil {
- stream.SetSendCompress(rc)
+ ss.sendCompressorName = rc
+ }
+ }
+
+ if ss.sendCompressorName != "" {
+ if err := stream.SetSendCompress(ss.sendCompressorName); err != nil {
+ return status.Errorf(codes.Internal, "grpc: failed to set send compressor: %v", err)
}
}
@@ -1640,16 +1651,16 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
ss.trInfo.tr.SetError()
ss.mu.Unlock()
}
- t.WriteStatus(ss.s, appStatus)
if len(ss.binlogs) != 0 {
st := &binarylog.ServerTrailer{
Trailer: ss.s.Trailer(),
Err: appErr,
}
for _, binlog := range ss.binlogs {
- binlog.Log(st)
+ binlog.Log(stream.Context(), st)
}
}
+ t.WriteStatus(ss.s, appStatus)
// TODO: Should we log an error from WriteStatus here and below?
return appErr
}
@@ -1658,17 +1669,16 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
ss.trInfo.tr.LazyLog(stringer("OK"), false)
ss.mu.Unlock()
}
- err = t.WriteStatus(ss.s, statusOK)
if len(ss.binlogs) != 0 {
st := &binarylog.ServerTrailer{
Trailer: ss.s.Trailer(),
Err: appErr,
}
for _, binlog := range ss.binlogs {
- binlog.Log(st)
+ binlog.Log(stream.Context(), st)
}
}
- return err
+ return t.WriteStatus(ss.s, statusOK)
}
func (s *Server) handleStream(t transport.ServerTransport, stream *transport.Stream, trInfo *traceInfo) {
@@ -1935,6 +1945,60 @@ func SendHeader(ctx context.Context, md metadata.MD) error {
return nil
}
+// SetSendCompressor sets a compressor for outbound messages from the server.
+// It must not be called after any event that causes headers to be sent
+// (see ServerStream.SetHeader for the complete list). Provided compressor is
+// used when below conditions are met:
+//
+// - compressor is registered via encoding.RegisterCompressor
+// - compressor name must exist in the client advertised compressor names
+// sent in grpc-accept-encoding header. Use ClientSupportedCompressors to
+// get client supported compressor names.
+//
+// The context provided must be the context passed to the server's handler.
+// It must be noted that compressor name encoding.Identity disables the
+// outbound compression.
+// By default, server messages will be sent using the same compressor with
+// which request messages were sent.
+//
+// It is not safe to call SetSendCompressor concurrently with SendHeader and
+// SendMsg.
+//
+// # Experimental
+//
+// Notice: This function is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func SetSendCompressor(ctx context.Context, name string) error {
+ stream, ok := ServerTransportStreamFromContext(ctx).(*transport.Stream)
+ if !ok || stream == nil {
+ return fmt.Errorf("failed to fetch the stream from the given context")
+ }
+
+ if err := validateSendCompressor(name, stream.ClientAdvertisedCompressors()); err != nil {
+ return fmt.Errorf("unable to set send compressor: %w", err)
+ }
+
+ return stream.SetSendCompress(name)
+}
+
+// ClientSupportedCompressors returns compressor names advertised by the client
+// via grpc-accept-encoding header.
+//
+// The context provided must be the context passed to the server's handler.
+//
+// # Experimental
+//
+// Notice: This function is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func ClientSupportedCompressors(ctx context.Context) ([]string, error) {
+ stream, ok := ServerTransportStreamFromContext(ctx).(*transport.Stream)
+ if !ok || stream == nil {
+ return nil, fmt.Errorf("failed to fetch the stream from the given context %v", ctx)
+ }
+
+ return strings.Split(stream.ClientAdvertisedCompressors(), ","), nil
+}
+
// SetTrailer sets the trailer metadata that will be sent when an RPC returns.
// When called more than once, all the provided metadata will be merged.
//
@@ -1969,3 +2033,22 @@ type channelzServer struct {
func (c *channelzServer) ChannelzMetric() *channelz.ServerInternalMetric {
return c.s.channelzMetric()
}
+
+// validateSendCompressor returns an error when given compressor name cannot be
+// handled by the server or the client based on the advertised compressors.
+func validateSendCompressor(name, clientCompressors string) error {
+ if name == encoding.Identity {
+ return nil
+ }
+
+ if !grpcutil.IsCompressorNameRegistered(name) {
+ return fmt.Errorf("compressor not registered %q", name)
+ }
+
+ for _, c := range strings.Split(clientCompressors, ",") {
+ if c == name {
+ return nil // found match
+ }
+ }
+ return fmt.Errorf("client does not support compressor %q", name)
+}
diff --git a/vendor/google.golang.org/grpc/stats/stats.go b/vendor/google.golang.org/grpc/stats/stats.go
index 0285dcc6a..7a552a9b7 100644
--- a/vendor/google.golang.org/grpc/stats/stats.go
+++ b/vendor/google.golang.org/grpc/stats/stats.go
@@ -67,10 +67,18 @@ type InPayload struct {
Payload interface{}
// Data is the serialized message payload.
Data []byte
- // Length is the length of uncompressed data.
+
+ // Length is the size of the uncompressed payload data. Does not include any
+ // framing (gRPC or HTTP/2).
Length int
- // WireLength is the length of data on wire (compressed, signed, encrypted).
+ // CompressedLength is the size of the compressed payload data. Does not
+ // include any framing (gRPC or HTTP/2). Same as Length if compression not
+ // enabled.
+ CompressedLength int
+ // WireLength is the size of the compressed payload data plus gRPC framing.
+ // Does not include HTTP/2 framing.
WireLength int
+
// RecvTime is the time when the payload is received.
RecvTime time.Time
}
@@ -129,9 +137,15 @@ type OutPayload struct {
Payload interface{}
// Data is the serialized message payload.
Data []byte
- // Length is the length of uncompressed data.
+ // Length is the size of the uncompressed payload data. Does not include any
+ // framing (gRPC or HTTP/2).
Length int
- // WireLength is the length of data on wire (compressed, signed, encrypted).
+ // CompressedLength is the size of the compressed payload data. Does not
+ // include any framing (gRPC or HTTP/2). Same as Length if compression not
+ // enabled.
+ CompressedLength int
+ // WireLength is the size of the compressed payload data plus gRPC framing.
+ // Does not include HTTP/2 framing.
WireLength int
// SentTime is the time when the payload is sent.
SentTime time.Time
diff --git a/vendor/google.golang.org/grpc/status/status.go b/vendor/google.golang.org/grpc/status/status.go
index 623be39f2..53910fb7c 100644
--- a/vendor/google.golang.org/grpc/status/status.go
+++ b/vendor/google.golang.org/grpc/status/status.go
@@ -77,7 +77,9 @@ func FromProto(s *spb.Status) *Status {
// FromError returns a Status representation of err.
//
// - If err was produced by this package or implements the method `GRPCStatus()
-// *Status`, the appropriate Status is returned.
+// *Status`, or if err wraps a type satisfying this, the appropriate Status is
+// returned. For wrapped errors, the message returned contains the entire
+// err.Error() text and not just the wrapped status.
//
// - If err is nil, a Status is returned with codes.OK and no message.
//
@@ -88,10 +90,15 @@ func FromError(err error) (s *Status, ok bool) {
if err == nil {
return nil, true
}
- if se, ok := err.(interface {
- GRPCStatus() *Status
- }); ok {
- return se.GRPCStatus(), true
+ type grpcstatus interface{ GRPCStatus() *Status }
+ if gs, ok := err.(grpcstatus); ok {
+ return gs.GRPCStatus(), true
+ }
+ var gs grpcstatus
+ if errors.As(err, &gs) {
+ p := gs.GRPCStatus().Proto()
+ p.Message = err.Error()
+ return status.FromProto(p), true
}
return New(codes.Unknown, err.Error()), false
}
@@ -103,19 +110,16 @@ func Convert(err error) *Status {
return s
}
-// Code returns the Code of the error if it is a Status error, codes.OK if err
-// is nil, or codes.Unknown otherwise.
+// Code returns the Code of the error if it is a Status error or if it wraps a
+// Status error. If that is not the case, it returns codes.OK if err is nil, or
+// codes.Unknown otherwise.
func Code(err error) codes.Code {
// Don't use FromError to avoid allocation of OK status.
if err == nil {
return codes.OK
}
- if se, ok := err.(interface {
- GRPCStatus() *Status
- }); ok {
- return se.GRPCStatus().Code()
- }
- return codes.Unknown
+
+ return Convert(err).Code()
}
// FromContextError converts a context error or wrapped context error into a
diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go
index 93231af2a..d1226a412 100644
--- a/vendor/google.golang.org/grpc/stream.go
+++ b/vendor/google.golang.org/grpc/stream.go
@@ -168,10 +168,19 @@ func NewClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
}
func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, method string, opts ...CallOption) (_ ClientStream, err error) {
- if md, _, ok := metadata.FromOutgoingContextRaw(ctx); ok {
+ if md, added, ok := metadata.FromOutgoingContextRaw(ctx); ok {
+ // validate md
if err := imetadata.Validate(md); err != nil {
return nil, status.Error(codes.Internal, err.Error())
}
+ // validate added
+ for _, kvs := range added {
+ for i := 0; i < len(kvs); i += 2 {
+ if err := imetadata.ValidatePair(kvs[i], kvs[i+1]); err != nil {
+ return nil, status.Error(codes.Internal, err.Error())
+ }
+ }
+ }
}
if channelz.IsOn() {
cc.incrCallsStarted()
@@ -352,7 +361,7 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
}
}
for _, binlog := range cs.binlogs {
- binlog.Log(logEntry)
+ binlog.Log(cs.ctx, logEntry)
}
}
@@ -800,7 +809,7 @@ func (cs *clientStream) Header() (metadata.MD, error) {
}
cs.serverHeaderBinlogged = true
for _, binlog := range cs.binlogs {
- binlog.Log(logEntry)
+ binlog.Log(cs.ctx, logEntry)
}
}
return m, nil
@@ -881,7 +890,7 @@ func (cs *clientStream) SendMsg(m interface{}) (err error) {
Message: data,
}
for _, binlog := range cs.binlogs {
- binlog.Log(cm)
+ binlog.Log(cs.ctx, cm)
}
}
return err
@@ -905,7 +914,7 @@ func (cs *clientStream) RecvMsg(m interface{}) error {
Message: recvInfo.uncompressedBytes,
}
for _, binlog := range cs.binlogs {
- binlog.Log(sm)
+ binlog.Log(cs.ctx, sm)
}
}
if err != nil || !cs.desc.ServerStreams {
@@ -926,7 +935,7 @@ func (cs *clientStream) RecvMsg(m interface{}) error {
logEntry.PeerAddr = peer.Addr
}
for _, binlog := range cs.binlogs {
- binlog.Log(logEntry)
+ binlog.Log(cs.ctx, logEntry)
}
}
}
@@ -953,7 +962,7 @@ func (cs *clientStream) CloseSend() error {
OnClientSide: true,
}
for _, binlog := range cs.binlogs {
- binlog.Log(chc)
+ binlog.Log(cs.ctx, chc)
}
}
// We never returned an error here for reasons.
@@ -971,6 +980,9 @@ func (cs *clientStream) finish(err error) {
return
}
cs.finished = true
+ for _, onFinish := range cs.callInfo.onFinish {
+ onFinish(err)
+ }
cs.commitAttemptLocked()
if cs.attempt != nil {
cs.attempt.finish(err)
@@ -992,7 +1004,7 @@ func (cs *clientStream) finish(err error) {
OnClientSide: true,
}
for _, binlog := range cs.binlogs {
- binlog.Log(c)
+ binlog.Log(cs.ctx, c)
}
}
if err == nil {
@@ -1081,9 +1093,10 @@ func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) {
RecvTime: time.Now(),
Payload: m,
// TODO truncate large payload.
- Data: payInfo.uncompressedBytes,
- WireLength: payInfo.wireLength + headerLen,
- Length: len(payInfo.uncompressedBytes),
+ Data: payInfo.uncompressedBytes,
+ WireLength: payInfo.compressedLength + headerLen,
+ CompressedLength: payInfo.compressedLength,
+ Length: len(payInfo.uncompressedBytes),
})
}
if channelz.IsOn() {
@@ -1511,6 +1524,8 @@ type serverStream struct {
comp encoding.Compressor
decomp encoding.Compressor
+ sendCompressorName string
+
maxReceiveMessageSize int
maxSendMessageSize int
trInfo *traceInfo
@@ -1558,7 +1573,7 @@ func (ss *serverStream) SendHeader(md metadata.MD) error {
}
ss.serverHeaderBinlogged = true
for _, binlog := range ss.binlogs {
- binlog.Log(sh)
+ binlog.Log(ss.ctx, sh)
}
}
return err
@@ -1603,6 +1618,13 @@ func (ss *serverStream) SendMsg(m interface{}) (err error) {
}
}()
+ // Server handler could have set new compressor by calling SetSendCompressor.
+ // In case it is set, we need to use it for compressing outbound message.
+ if sendCompressorsName := ss.s.SendCompress(); sendCompressorsName != ss.sendCompressorName {
+ ss.comp = encoding.GetCompressor(sendCompressorsName)
+ ss.sendCompressorName = sendCompressorsName
+ }
+
// load hdr, payload, data
hdr, payload, data, err := prepareMsg(m, ss.codec, ss.cp, ss.comp)
if err != nil {
@@ -1624,14 +1646,14 @@ func (ss *serverStream) SendMsg(m interface{}) (err error) {
}
ss.serverHeaderBinlogged = true
for _, binlog := range ss.binlogs {
- binlog.Log(sh)
+ binlog.Log(ss.ctx, sh)
}
}
sm := &binarylog.ServerMessage{
Message: data,
}
for _, binlog := range ss.binlogs {
- binlog.Log(sm)
+ binlog.Log(ss.ctx, sm)
}
}
if len(ss.statsHandler) != 0 {
@@ -1679,7 +1701,7 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) {
if len(ss.binlogs) != 0 {
chc := &binarylog.ClientHalfClose{}
for _, binlog := range ss.binlogs {
- binlog.Log(chc)
+ binlog.Log(ss.ctx, chc)
}
}
return err
@@ -1695,9 +1717,10 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) {
RecvTime: time.Now(),
Payload: m,
// TODO truncate large payload.
- Data: payInfo.uncompressedBytes,
- WireLength: payInfo.wireLength + headerLen,
- Length: len(payInfo.uncompressedBytes),
+ Data: payInfo.uncompressedBytes,
+ Length: len(payInfo.uncompressedBytes),
+ WireLength: payInfo.compressedLength + headerLen,
+ CompressedLength: payInfo.compressedLength,
})
}
}
@@ -1706,7 +1729,7 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) {
Message: payInfo.uncompressedBytes,
}
for _, binlog := range ss.binlogs {
- binlog.Log(cm)
+ binlog.Log(ss.ctx, cm)
}
}
return nil
diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go
index fe552c315..853ce0e30 100644
--- a/vendor/google.golang.org/grpc/version.go
+++ b/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.53.0"
+const Version = "1.55.0"
diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh
index 3728aed04..a8e4732b3 100644
--- a/vendor/google.golang.org/grpc/vet.sh
+++ b/vendor/google.golang.org/grpc/vet.sh
@@ -41,16 +41,8 @@ if [[ "$1" = "-install" ]]; then
github.com/client9/misspell/cmd/misspell
popd
if [[ -z "${VET_SKIP_PROTO}" ]]; then
- if [[ "${TRAVIS}" = "true" ]]; then
- PROTOBUF_VERSION=3.14.0
- PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
- pushd /home/travis
- wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME}
- unzip ${PROTOC_FILENAME}
- bin/protoc --version
- popd
- elif [[ "${GITHUB_ACTIONS}" = "true" ]]; then
- PROTOBUF_VERSION=3.14.0
+ if [[ "${GITHUB_ACTIONS}" = "true" ]]; then
+ PROTOBUF_VERSION=22.0 # a.k.a v4.22.0 in pb.go files.
PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
pushd /home/runner/go
wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME}
@@ -68,8 +60,7 @@ fi
# - Check that generated proto files are up to date.
if [[ -z "${VET_SKIP_PROTO}" ]]; then
- PATH="/home/travis/bin:${PATH}" make proto && \
- git status --porcelain 2>&1 | fail_on_output || \
+ make proto && git status --porcelain 2>&1 | fail_on_output || \
(git status; git --no-pager diff; exit 1)
fi
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go
index f402c416d..04ce206bb 100644
--- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go
@@ -196,6 +196,18 @@ type ValidationRule struct {
// If unset, the message is "failed rule: {Rule}".
// e.g. "must be a URL with the host matching spec.host"
Message string
+ // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
+ // Since messageExpression is used as a failure message, it must evaluate to a string.
+ // If both message and messageExpression are present on a rule, then messageExpression will be used if validation
+ // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced
+ // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string
+ // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and
+ // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.
+ // messageExpression has access to all the same variables as the rule; the only difference is the return type.
+ // Example:
+ // "x must be less than max ("+string(self.max)+")"
+ // +optional
+ MessageExpression string
}
// JSON represents any valid JSON value.
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go
index 68eb08082..5dbb38c8b 100644
--- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go
@@ -814,198 +814,199 @@ func init() {
}
var fileDescriptor_f5a35c9667703937 = []byte{
- // 3047 bytes of a gzipped FileDescriptorProto
+ // 3072 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0xdf, 0x6f, 0x24, 0x47,
0xf1, 0xbf, 0x59, 0xff, 0x5a, 0xb7, 0xed, 0xb3, 0xdd, 0x77, 0xf6, 0x77, 0xce, 0xb9, 0xf3, 0xfa,
0x36, 0xdf, 0x1c, 0x4e, 0x72, 0x59, 0x27, 0x26, 0x21, 0x47, 0x84, 0x40, 0x5e, 0xdb, 0x97, 0x38,
- 0x67, 0x9f, 0xad, 0xde, 0xbb, 0x8b, 0x93, 0x00, 0xc9, 0x78, 0xa7, 0xbd, 0x9e, 0x78, 0x7e, 0x5d,
- 0xf7, 0xcc, 0xda, 0x96, 0x40, 0x8a, 0x40, 0x11, 0x10, 0x09, 0xc2, 0x03, 0x0a, 0x4f, 0x08, 0x21,
- 0x94, 0x07, 0x78, 0x80, 0x37, 0xf8, 0x17, 0xf2, 0x82, 0x94, 0x27, 0x14, 0x09, 0x69, 0x45, 0x96,
- 0x7f, 0x00, 0x09, 0x10, 0xc2, 0x0f, 0x08, 0xf5, 0x8f, 0xe9, 0xe9, 0x9d, 0xdd, 0xbd, 0x3b, 0xd9,
- 0xeb, 0xe4, 0xcd, 0xae, 0xaa, 0xae, 0x4f, 0x75, 0x75, 0x75, 0x55, 0x75, 0xcd, 0x02, 0x6b, 0xff,
- 0x06, 0x2d, 0x39, 0xc1, 0xc2, 0x7e, 0xbc, 0x83, 0x89, 0x8f, 0x23, 0x4c, 0x17, 0xea, 0xd8, 0xb7,
- 0x03, 0xb2, 0x20, 0x19, 0x56, 0xe8, 0xe0, 0xc3, 0x08, 0xfb, 0xd4, 0x09, 0x7c, 0xfa, 0x8c, 0x15,
- 0x3a, 0x14, 0x93, 0x3a, 0x26, 0x0b, 0xe1, 0x7e, 0x8d, 0xf1, 0x68, 0xab, 0xc0, 0x42, 0xfd, 0xb9,
- 0x85, 0x1a, 0xf6, 0x31, 0xb1, 0x22, 0x6c, 0x97, 0x42, 0x12, 0x44, 0x01, 0xbc, 0x21, 0x34, 0x95,
- 0x5a, 0x04, 0xdf, 0x52, 0x9a, 0x4a, 0xe1, 0x7e, 0x8d, 0xf1, 0x68, 0xab, 0x40, 0xa9, 0xfe, 0xdc,
- 0xcc, 0x33, 0x35, 0x27, 0xda, 0x8b, 0x77, 0x4a, 0xd5, 0xc0, 0x5b, 0xa8, 0x05, 0xb5, 0x60, 0x81,
- 0x2b, 0xdc, 0x89, 0x77, 0xf9, 0x7f, 0xfc, 0x1f, 0xfe, 0x97, 0x00, 0x9a, 0x79, 0x3e, 0x35, 0xd9,
+ 0x67, 0x9f, 0xad, 0xde, 0xbb, 0x8b, 0x93, 0x20, 0x92, 0xf1, 0x4e, 0x7b, 0x3d, 0xf1, 0xfc, 0xba,
+ 0xee, 0x99, 0xb5, 0x2d, 0x81, 0x14, 0x81, 0x22, 0x20, 0x12, 0x84, 0x07, 0x14, 0x9e, 0x10, 0x42,
+ 0x28, 0x48, 0xf0, 0x00, 0x6f, 0xf0, 0x2f, 0xe4, 0x05, 0x29, 0x4f, 0x28, 0x12, 0xd2, 0x8a, 0x2c,
+ 0xff, 0x00, 0x12, 0x20, 0x84, 0x1f, 0x10, 0xea, 0x1f, 0xd3, 0xd3, 0x3b, 0xbb, 0x7b, 0x77, 0xb2,
+ 0xd7, 0xc9, 0xdb, 0x6e, 0x55, 0x75, 0x7d, 0xaa, 0xab, 0xab, 0xab, 0xab, 0xab, 0x07, 0x58, 0xfb,
+ 0x37, 0x68, 0xc9, 0x09, 0x16, 0xf6, 0xe3, 0x1d, 0x4c, 0x7c, 0x1c, 0x61, 0xba, 0x50, 0xc7, 0xbe,
+ 0x1d, 0x90, 0x05, 0xc9, 0xb0, 0x42, 0x07, 0x1f, 0x46, 0xd8, 0xa7, 0x4e, 0xe0, 0xd3, 0x67, 0xac,
+ 0xd0, 0xa1, 0x98, 0xd4, 0x31, 0x59, 0x08, 0xf7, 0x6b, 0x8c, 0x47, 0x5b, 0x05, 0x16, 0xea, 0xcf,
+ 0x2d, 0xd4, 0xb0, 0x8f, 0x89, 0x15, 0x61, 0xbb, 0x14, 0x92, 0x20, 0x0a, 0xe0, 0x0d, 0xa1, 0xa9,
+ 0xd4, 0x22, 0xf8, 0x96, 0xd2, 0x54, 0x0a, 0xf7, 0x6b, 0x8c, 0x47, 0x5b, 0x05, 0x4a, 0xf5, 0xe7,
+ 0x66, 0x9e, 0xa9, 0x39, 0xd1, 0x5e, 0xbc, 0x53, 0xaa, 0x06, 0xde, 0x42, 0x2d, 0xa8, 0x05, 0x0b,
+ 0x5c, 0xe1, 0x4e, 0xbc, 0xcb, 0xff, 0xf1, 0x3f, 0xfc, 0x97, 0x00, 0x9a, 0x79, 0x3e, 0x35, 0xd9,
0xb3, 0xaa, 0x7b, 0x8e, 0x8f, 0xc9, 0x51, 0x6a, 0xa7, 0x87, 0x23, 0xab, 0x83, 0x79, 0x33, 0x0b,
- 0xdd, 0x56, 0x91, 0xd8, 0x8f, 0x1c, 0x0f, 0xb7, 0x2d, 0xf8, 0xca, 0xc3, 0x16, 0xd0, 0xea, 0x1e,
- 0xf6, 0xac, 0xec, 0xba, 0xe2, 0xb1, 0x01, 0x26, 0x97, 0x03, 0xbf, 0x8e, 0x09, 0xdb, 0x20, 0xc2,
+ 0xdd, 0x46, 0x91, 0xd8, 0x8f, 0x1c, 0x0f, 0xb7, 0x0d, 0xf8, 0xca, 0xc3, 0x06, 0xd0, 0xea, 0x1e,
+ 0xf6, 0xac, 0xec, 0xb8, 0xe2, 0xb1, 0x01, 0x26, 0x97, 0x03, 0xbf, 0x8e, 0x09, 0x9b, 0x20, 0xc2,
0xf7, 0x63, 0x4c, 0x23, 0x58, 0x06, 0x7d, 0xb1, 0x63, 0x9b, 0xc6, 0x9c, 0x31, 0x3f, 0x5c, 0x7e,
0xf6, 0xe3, 0x46, 0xe1, 0x5c, 0xb3, 0x51, 0xe8, 0xbb, 0xbb, 0xb6, 0x72, 0xdc, 0x28, 0x5c, 0xed,
- 0x86, 0x14, 0x1d, 0x85, 0x98, 0x96, 0xee, 0xae, 0xad, 0x20, 0xb6, 0x18, 0xbe, 0x0c, 0x26, 0x6d,
+ 0x86, 0x14, 0x1d, 0x85, 0x98, 0x96, 0xee, 0xae, 0xad, 0x20, 0x36, 0x18, 0xbe, 0x0c, 0x26, 0x6d,
0x4c, 0x1d, 0x82, 0xed, 0xa5, 0xad, 0xb5, 0x7b, 0x42, 0xbf, 0x99, 0xe3, 0x1a, 0x2f, 0x49, 0x8d,
- 0x93, 0x2b, 0x59, 0x01, 0xd4, 0xbe, 0x06, 0x6e, 0x83, 0xa1, 0x60, 0xe7, 0x1d, 0x5c, 0x8d, 0xa8,
- 0xd9, 0x37, 0xd7, 0x37, 0x3f, 0xb2, 0xf8, 0x4c, 0x29, 0x3d, 0x3c, 0x65, 0x02, 0x3f, 0x31, 0xb9,
- 0xd9, 0x12, 0xb2, 0x0e, 0x56, 0x93, 0x43, 0x2b, 0x8f, 0x4b, 0xb4, 0xa1, 0x4d, 0xa1, 0x05, 0x25,
- 0xea, 0x8a, 0xbf, 0xce, 0x01, 0xa8, 0x6f, 0x9e, 0x86, 0x81, 0x4f, 0x71, 0x4f, 0x76, 0x4f, 0xc1,
+ 0x93, 0x2b, 0x59, 0x01, 0xd4, 0x3e, 0x06, 0x6e, 0x83, 0xa1, 0x60, 0xe7, 0x1d, 0x5c, 0x8d, 0xa8,
+ 0xd9, 0x37, 0xd7, 0x37, 0x3f, 0xb2, 0xf8, 0x4c, 0x29, 0x5d, 0x3c, 0x65, 0x02, 0x5f, 0x31, 0x39,
+ 0xd9, 0x12, 0xb2, 0x0e, 0x56, 0x93, 0x45, 0x2b, 0x8f, 0x4b, 0xb4, 0xa1, 0x4d, 0xa1, 0x05, 0x25,
+ 0xea, 0x8a, 0xbf, 0xca, 0x01, 0xa8, 0x4f, 0x9e, 0x86, 0x81, 0x4f, 0x71, 0x4f, 0x66, 0x4f, 0xc1,
0x44, 0x95, 0x6b, 0x8e, 0xb0, 0x2d, 0x71, 0xcd, 0xdc, 0x49, 0xac, 0x37, 0x25, 0xfe, 0xc4, 0x72,
0x46, 0x1d, 0x6a, 0x03, 0x80, 0x77, 0xc0, 0x20, 0xc1, 0x34, 0x76, 0x23, 0xb3, 0x6f, 0xce, 0x98,
0x1f, 0x59, 0xbc, 0xde, 0x15, 0x8a, 0x87, 0x36, 0x0b, 0xbe, 0x52, 0xfd, 0xb9, 0x52, 0x25, 0xb2,
0xa2, 0x98, 0x96, 0xcf, 0x4b, 0xa4, 0x41, 0xc4, 0x75, 0x20, 0xa9, 0xab, 0xf8, 0x5f, 0x03, 0x4c,
0xe8, 0x5e, 0xaa, 0x3b, 0xf8, 0x00, 0x12, 0x30, 0x44, 0x44, 0xb0, 0x70, 0x3f, 0x8d, 0x2c, 0xde,
- 0x2a, 0x9d, 0xf4, 0x46, 0x95, 0xda, 0xe2, 0xaf, 0x3c, 0xc2, 0x8e, 0x4b, 0xfe, 0x83, 0x12, 0x20,
- 0x58, 0x07, 0x79, 0x22, 0xcf, 0x88, 0x07, 0xd2, 0xc8, 0xe2, 0x7a, 0x6f, 0x40, 0x85, 0xce, 0xf2,
- 0x68, 0xb3, 0x51, 0xc8, 0x27, 0xff, 0x21, 0x85, 0x55, 0xfc, 0x65, 0x0e, 0xcc, 0x2e, 0xc7, 0x34,
- 0x0a, 0x3c, 0x84, 0x69, 0x10, 0x93, 0x2a, 0x5e, 0x0e, 0xdc, 0xd8, 0xf3, 0x57, 0xf0, 0xae, 0xe3,
- 0x3b, 0x11, 0x8b, 0xd1, 0x39, 0xd0, 0xef, 0x5b, 0x1e, 0x96, 0x31, 0x33, 0x2a, 0x3d, 0xd9, 0x7f,
- 0xdb, 0xf2, 0x30, 0xe2, 0x1c, 0x26, 0xc1, 0x42, 0x44, 0xde, 0x00, 0x25, 0x71, 0xe7, 0x28, 0xc4,
- 0x88, 0x73, 0xe0, 0x35, 0x30, 0xb8, 0x1b, 0x10, 0xcf, 0x12, 0xa7, 0x37, 0x9c, 0x9e, 0xc7, 0x4d,
- 0x4e, 0x45, 0x92, 0x0b, 0x5f, 0x00, 0x23, 0x36, 0xa6, 0x55, 0xe2, 0x84, 0x0c, 0xda, 0xec, 0xe7,
- 0xc2, 0x17, 0xa4, 0xf0, 0xc8, 0x4a, 0xca, 0x42, 0xba, 0x1c, 0xbc, 0x0e, 0xf2, 0x21, 0x71, 0x02,
- 0xe2, 0x44, 0x47, 0xe6, 0xc0, 0x9c, 0x31, 0x3f, 0x50, 0x9e, 0x90, 0x6b, 0xf2, 0x5b, 0x92, 0x8e,
- 0x94, 0x04, 0x93, 0x7e, 0x87, 0x06, 0xfe, 0x96, 0x15, 0xed, 0x99, 0x83, 0x1c, 0x41, 0x49, 0xbf,
- 0x5a, 0xd9, 0xbc, 0xcd, 0xe8, 0x48, 0x49, 0x14, 0xff, 0x6c, 0x00, 0x33, 0xeb, 0xa1, 0xc4, 0xbd,
- 0xf0, 0x26, 0xc8, 0xd3, 0x88, 0xe5, 0x9c, 0xda, 0x91, 0xf4, 0xcf, 0x53, 0x89, 0xaa, 0x8a, 0xa4,
- 0x1f, 0x37, 0x0a, 0xd3, 0xe9, 0x8a, 0x84, 0xca, 0x7d, 0xa3, 0xd6, 0xb2, 0x90, 0x3b, 0xc0, 0x3b,
- 0x7b, 0x41, 0xb0, 0x2f, 0x4f, 0xff, 0x14, 0x21, 0xf7, 0x9a, 0x50, 0x94, 0x62, 0x8a, 0x90, 0x93,
- 0x64, 0x94, 0x00, 0x15, 0xff, 0x93, 0xcb, 0x6e, 0x4c, 0x3b, 0xf4, 0xb7, 0x41, 0x9e, 0x5d, 0x21,
- 0xdb, 0x8a, 0x2c, 0x79, 0x09, 0x9e, 0x7d, 0xb4, 0x0b, 0x27, 0xee, 0xeb, 0x06, 0x8e, 0xac, 0x32,
- 0x94, 0xae, 0x00, 0x29, 0x0d, 0x29, 0xad, 0xf0, 0x10, 0xf4, 0xd3, 0x10, 0x57, 0xe5, 0x7e, 0xef,
- 0x9d, 0x22, 0xda, 0xbb, 0xec, 0xa1, 0x12, 0xe2, 0x6a, 0x1a, 0x8c, 0xec, 0x3f, 0xc4, 0x11, 0xe1,
- 0xbb, 0x06, 0x18, 0xa4, 0x3c, 0x2f, 0xc8, 0x5c, 0xb2, 0x7d, 0x06, 0xe0, 0x99, 0xbc, 0x23, 0xfe,
- 0x47, 0x12, 0xb7, 0xf8, 0xcf, 0x1c, 0xb8, 0xda, 0x6d, 0xe9, 0x72, 0xe0, 0xdb, 0xe2, 0x10, 0xd6,
- 0xe4, 0xbd, 0x12, 0x91, 0xf5, 0x82, 0x7e, 0xaf, 0x8e, 0x1b, 0x85, 0x27, 0x1e, 0xaa, 0x40, 0xbb,
- 0x80, 0x5f, 0x55, 0x5b, 0x16, 0x97, 0xf4, 0x6a, 0xab, 0x61, 0xc7, 0x8d, 0xc2, 0xb8, 0x5a, 0xd6,
- 0x6a, 0x2b, 0xac, 0x03, 0xe8, 0x5a, 0x34, 0xba, 0x43, 0x2c, 0x9f, 0x0a, 0xb5, 0x8e, 0x87, 0xa5,
- 0xe7, 0x9e, 0x7a, 0xb4, 0xa0, 0x60, 0x2b, 0xca, 0x33, 0x12, 0x12, 0xae, 0xb7, 0x69, 0x43, 0x1d,
- 0x10, 0x58, 0xce, 0x20, 0xd8, 0xa2, 0x2a, 0x0d, 0x68, 0x39, 0x9c, 0x51, 0x91, 0xe4, 0xc2, 0x27,
- 0xc1, 0x90, 0x87, 0x29, 0xb5, 0x6a, 0x98, 0xdf, 0xfd, 0xe1, 0xb4, 0x28, 0x6e, 0x08, 0x32, 0x4a,
- 0xf8, 0xc5, 0x7f, 0x19, 0xe0, 0x72, 0x37, 0xaf, 0xad, 0x3b, 0x34, 0x82, 0xdf, 0x6c, 0x0b, 0xfb,
- 0xd2, 0xa3, 0xed, 0x90, 0xad, 0xe6, 0x41, 0xaf, 0x52, 0x49, 0x42, 0xd1, 0x42, 0xfe, 0x00, 0x0c,
- 0x38, 0x11, 0xf6, 0x92, 0x6a, 0x89, 0x7a, 0x1f, 0x76, 0xe5, 0x31, 0x09, 0x3f, 0xb0, 0xc6, 0x80,
- 0x90, 0xc0, 0x2b, 0x7e, 0x94, 0x03, 0x57, 0xba, 0x2d, 0x61, 0x79, 0x9c, 0x32, 0x67, 0x87, 0x6e,
- 0x4c, 0x2c, 0x57, 0x06, 0x9b, 0x72, 0xf6, 0x16, 0xa7, 0x22, 0xc9, 0x65, 0xb9, 0x93, 0x3a, 0x7e,
- 0x2d, 0x76, 0x2d, 0x22, 0x23, 0x49, 0x6d, 0xb8, 0x22, 0xe9, 0x48, 0x49, 0xc0, 0x12, 0x00, 0x74,
- 0x2f, 0x20, 0x11, 0xc7, 0xe0, 0x1d, 0xce, 0x70, 0xf9, 0x3c, 0xcb, 0x08, 0x15, 0x45, 0x45, 0x9a,
- 0x04, 0x2b, 0x24, 0xfb, 0x8e, 0x6f, 0xcb, 0x03, 0x57, 0x77, 0xf7, 0x96, 0xe3, 0xdb, 0x88, 0x73,
- 0x18, 0xbe, 0xeb, 0xd0, 0x88, 0x51, 0xe4, 0x69, 0xb7, 0x38, 0x9c, 0x4b, 0x2a, 0x09, 0x86, 0x5f,
- 0x65, 0x09, 0x36, 0x20, 0x0e, 0xa6, 0xe6, 0x60, 0x8a, 0xbf, 0xac, 0xa8, 0x48, 0x93, 0x28, 0xfe,
- 0xa5, 0xbf, 0x7b, 0x7c, 0xb0, 0x04, 0x02, 0x1f, 0x07, 0x03, 0x35, 0x12, 0xc4, 0xa1, 0xf4, 0x92,
- 0xf2, 0xf6, 0xcb, 0x8c, 0x88, 0x04, 0x0f, 0x7e, 0x07, 0x0c, 0xf8, 0x72, 0xc3, 0x2c, 0x82, 0x5e,
- 0xeb, 0xfd, 0x31, 0x73, 0x6f, 0xa5, 0xe8, 0xc2, 0x91, 0x02, 0x14, 0x3e, 0x0f, 0x06, 0x68, 0x35,
- 0x08, 0xb1, 0x74, 0xe2, 0x6c, 0x22, 0x54, 0x61, 0xc4, 0xe3, 0x46, 0x61, 0x2c, 0x51, 0xc7, 0x09,
- 0x48, 0x08, 0xc3, 0x1f, 0x18, 0x20, 0x2f, 0xcb, 0x05, 0x35, 0x87, 0x78, 0x78, 0xbe, 0xde, 0x7b,
- 0xbb, 0x65, 0xdb, 0x9b, 0x9e, 0x99, 0x24, 0x50, 0xa4, 0xc0, 0xe1, 0xf7, 0x0c, 0x00, 0xaa, 0xaa,
- 0x76, 0x99, 0xc3, 0xdc, 0x87, 0x3d, 0xbb, 0x2a, 0x5a, 0x55, 0x14, 0x81, 0x90, 0xb6, 0x4a, 0x1a,
- 0x2a, 0xac, 0x80, 0xa9, 0x90, 0x60, 0xae, 0xfb, 0xae, 0xbf, 0xef, 0x07, 0x07, 0xfe, 0x4d, 0x07,
- 0xbb, 0x36, 0x35, 0xc1, 0x9c, 0x31, 0x9f, 0x2f, 0x5f, 0x91, 0xf6, 0x4f, 0x6d, 0x75, 0x12, 0x42,
- 0x9d, 0xd7, 0x16, 0xdf, 0xeb, 0xcb, 0xf6, 0x5a, 0xd9, 0x7a, 0x01, 0x3f, 0x10, 0x9b, 0x17, 0x79,
- 0x98, 0x9a, 0x06, 0x3f, 0x88, 0x37, 0x7b, 0x7f, 0x10, 0x2a, 0xd7, 0xa7, 0x45, 0x5a, 0x91, 0x28,
- 0xd2, 0x4c, 0x80, 0x3f, 0x33, 0xc0, 0x98, 0x55, 0xad, 0xe2, 0x30, 0xc2, 0xb6, 0xb8, 0xc6, 0xb9,
- 0xb3, 0x8d, 0xea, 0x29, 0x69, 0xd0, 0xd8, 0x92, 0x8e, 0x8a, 0x5a, 0x8d, 0x80, 0x2f, 0x81, 0xf3,
- 0x34, 0x0a, 0x08, 0xb6, 0x93, 0x08, 0x92, 0xd9, 0x05, 0x36, 0x1b, 0x85, 0xf3, 0x95, 0x16, 0x0e,
- 0xca, 0x48, 0x16, 0x3f, 0x19, 0x00, 0x85, 0x87, 0x44, 0xe8, 0x23, 0x34, 0xbd, 0xd7, 0xc0, 0x20,
- 0xdf, 0xa9, 0xcd, 0x1d, 0x92, 0xd7, 0x4a, 0x3d, 0xa7, 0x22, 0xc9, 0x65, 0xe5, 0x89, 0xe1, 0xb3,
- 0xf2, 0xd4, 0xc7, 0x05, 0x55, 0x79, 0xaa, 0x08, 0x32, 0x4a, 0xf8, 0x70, 0x11, 0x00, 0x1b, 0x87,
- 0x04, 0xb3, 0x8c, 0x64, 0x9b, 0x43, 0x5c, 0x5a, 0x9d, 0xcf, 0x8a, 0xe2, 0x20, 0x4d, 0x0a, 0xde,
- 0x04, 0x30, 0xf9, 0xcf, 0x09, 0xfc, 0xd7, 0x2c, 0xe2, 0x3b, 0x7e, 0xcd, 0xcc, 0x73, 0xb3, 0xa7,
- 0x59, 0xb5, 0x5d, 0x69, 0xe3, 0xa2, 0x0e, 0x2b, 0x60, 0x1d, 0x0c, 0x8a, 0x67, 0x34, 0xcf, 0x1b,
- 0x3d, 0xbc, 0x71, 0xf7, 0x2c, 0xd7, 0xb1, 0x39, 0x54, 0x19, 0x70, 0xf7, 0x70, 0x14, 0x24, 0xd1,
- 0xe0, 0xfb, 0x06, 0x18, 0xa5, 0xf1, 0x0e, 0x91, 0xd2, 0x94, 0x67, 0xf5, 0x91, 0xc5, 0x3b, 0xbd,
- 0x82, 0xaf, 0x68, 0xba, 0xcb, 0x13, 0xcd, 0x46, 0x61, 0x54, 0xa7, 0xa0, 0x16, 0x6c, 0xf8, 0x07,
- 0x03, 0x98, 0x96, 0x2d, 0x42, 0xdf, 0x72, 0xb7, 0x88, 0xe3, 0x47, 0x98, 0x88, 0x07, 0x91, 0x28,
- 0x1f, 0x3d, 0xec, 0x15, 0xb3, 0xef, 0xac, 0xf2, 0x9c, 0x3c, 0x69, 0x73, 0xa9, 0x8b, 0x05, 0xa8,
- 0xab, 0x6d, 0xc5, 0x7f, 0x1b, 0xd9, 0xd4, 0xa2, 0xed, 0xb2, 0x52, 0xb5, 0x5c, 0x0c, 0x57, 0xc0,
- 0x04, 0xeb, 0x7e, 0x11, 0x0e, 0x5d, 0xa7, 0x6a, 0x51, 0xfe, 0xfa, 0x11, 0xd1, 0xad, 0x9e, 0xe1,
- 0x95, 0x0c, 0x1f, 0xb5, 0xad, 0x80, 0xaf, 0x02, 0x28, 0xda, 0xc2, 0x16, 0x3d, 0xa2, 0x13, 0x50,
- 0x0d, 0x5e, 0xa5, 0x4d, 0x02, 0x75, 0x58, 0x05, 0x97, 0xc1, 0xa4, 0x6b, 0xed, 0x60, 0xb7, 0x82,
- 0x5d, 0x5c, 0x8d, 0x02, 0xc2, 0x55, 0x89, 0xf7, 0xe1, 0x54, 0xb3, 0x51, 0x98, 0x5c, 0xcf, 0x32,
- 0x51, 0xbb, 0x7c, 0xf1, 0x6a, 0xf6, 0x2e, 0xeb, 0x1b, 0x17, 0xcd, 0xf6, 0x87, 0x39, 0x30, 0xd3,
- 0x3d, 0x28, 0xe0, 0x77, 0x55, 0x6b, 0x2c, 0x3a, 0xbe, 0xd7, 0xcf, 0x20, 0xf4, 0xe4, 0x73, 0x00,
- 0xb4, 0x3f, 0x05, 0xe0, 0x11, 0xab, 0xd7, 0x96, 0x9b, 0x3c, 0xfb, 0xb7, 0xcf, 0x02, 0x9d, 0xe9,
- 0x2f, 0x0f, 0x8b, 0x2e, 0xc0, 0x72, 0x79, 0xd1, 0xb7, 0x5c, 0x5c, 0xfc, 0xa8, 0xed, 0x69, 0x9b,
- 0x5e, 0x56, 0xf8, 0x43, 0x03, 0x8c, 0x07, 0x21, 0xf6, 0x97, 0xb6, 0xd6, 0xee, 0x7d, 0x59, 0x5c,
- 0x5a, 0xe9, 0xa0, 0xb5, 0x93, 0x9b, 0xc8, 0xde, 0xd7, 0x42, 0xd7, 0x16, 0x09, 0x42, 0x5a, 0xbe,
- 0xd0, 0x6c, 0x14, 0xc6, 0x37, 0x5b, 0x51, 0x50, 0x16, 0xb6, 0xe8, 0x81, 0xa9, 0xd5, 0xc3, 0x08,
- 0x13, 0xdf, 0x72, 0x57, 0x82, 0x6a, 0xec, 0x61, 0x3f, 0x12, 0x36, 0x66, 0xc6, 0x05, 0xc6, 0x23,
- 0x8e, 0x0b, 0xae, 0x80, 0xbe, 0x98, 0xb8, 0x32, 0x6a, 0x47, 0xd4, 0x10, 0x0c, 0xad, 0x23, 0x46,
- 0x2f, 0x5e, 0x05, 0xfd, 0xcc, 0x4e, 0x78, 0x09, 0xf4, 0x11, 0xeb, 0x80, 0x6b, 0x1d, 0x2d, 0x0f,
- 0x31, 0x11, 0x64, 0x1d, 0x20, 0x46, 0x2b, 0xfe, 0x7d, 0x0e, 0x8c, 0x67, 0xf6, 0x02, 0x67, 0x40,
- 0x4e, 0x4d, 0xd6, 0x80, 0x54, 0x9a, 0x5b, 0x5b, 0x41, 0x39, 0xc7, 0x86, 0x2f, 0xaa, 0xec, 0x2a,
- 0x40, 0x0b, 0xaa, 0x58, 0x70, 0x2a, 0x6b, 0xcb, 0x52, 0x75, 0xcc, 0x90, 0x24, 0x3d, 0x32, 0x1b,
- 0xf0, 0xae, 0xbc, 0x15, 0xc2, 0x06, 0xbc, 0x8b, 0x18, 0xed, 0xa4, 0xb3, 0x92, 0x64, 0x58, 0x33,
- 0xf0, 0x08, 0xc3, 0x9a, 0xc1, 0x07, 0x0e, 0x6b, 0x1e, 0x07, 0x03, 0x91, 0x13, 0xb9, 0x98, 0x57,
- 0x2a, 0xad, 0x19, 0xbe, 0xc3, 0x88, 0x48, 0xf0, 0x20, 0x06, 0x43, 0x36, 0xde, 0xb5, 0x62, 0x37,
- 0xe2, 0x45, 0x69, 0x64, 0xf1, 0xeb, 0xa7, 0x8b, 0x1e, 0x31, 0xcc, 0x58, 0x11, 0x2a, 0x51, 0xa2,
- 0x1b, 0x3e, 0x01, 0x86, 0x3c, 0xeb, 0xd0, 0xf1, 0x62, 0x8f, 0x77, 0x8c, 0x86, 0x10, 0xdb, 0x10,
- 0x24, 0x94, 0xf0, 0x58, 0x12, 0xc4, 0x87, 0x55, 0x37, 0xa6, 0x4e, 0x1d, 0x4b, 0xa6, 0x6c, 0xe9,
- 0x54, 0x12, 0x5c, 0xcd, 0xf0, 0x51, 0xdb, 0x0a, 0x0e, 0xe6, 0xf8, 0x7c, 0xf1, 0x88, 0x06, 0x26,
- 0x48, 0x28, 0xe1, 0xb5, 0x82, 0x49, 0xf9, 0xd1, 0x6e, 0x60, 0x72, 0x71, 0xdb, 0x0a, 0xf8, 0x34,
- 0x18, 0xf6, 0xac, 0xc3, 0x75, 0xec, 0xd7, 0xa2, 0x3d, 0x73, 0x6c, 0xce, 0x98, 0xef, 0x2b, 0x8f,
- 0x35, 0x1b, 0x85, 0xe1, 0x8d, 0x84, 0x88, 0x52, 0x3e, 0x17, 0x76, 0x7c, 0x29, 0x7c, 0x5e, 0x13,
- 0x4e, 0x88, 0x28, 0xe5, 0xb3, 0xce, 0x24, 0xb4, 0x22, 0x76, 0xaf, 0xcc, 0xf1, 0xd6, 0x87, 0xf3,
- 0x96, 0x20, 0xa3, 0x84, 0x0f, 0xe7, 0x41, 0xde, 0xb3, 0x0e, 0xf9, 0x9b, 0xd2, 0x9c, 0xe0, 0x6a,
- 0xf9, 0x40, 0x71, 0x43, 0xd2, 0x90, 0xe2, 0x72, 0x49, 0xc7, 0x17, 0x92, 0x93, 0x9a, 0xa4, 0xa4,
- 0x21, 0xc5, 0x65, 0xf1, 0x1b, 0xfb, 0xce, 0xfd, 0x18, 0x0b, 0x61, 0xc8, 0x3d, 0xa3, 0xe2, 0xf7,
- 0x6e, 0xca, 0x42, 0xba, 0x1c, 0x7b, 0xd3, 0x79, 0xb1, 0x1b, 0x39, 0xa1, 0x8b, 0x37, 0x77, 0xcd,
- 0x0b, 0xdc, 0xff, 0xbc, 0x95, 0xdf, 0x50, 0x54, 0xa4, 0x49, 0xc0, 0xb7, 0x41, 0x3f, 0xf6, 0x63,
- 0xcf, 0xbc, 0xc8, 0xcb, 0xf7, 0x69, 0xa3, 0x4f, 0xdd, 0x97, 0x55, 0x3f, 0xf6, 0x10, 0xd7, 0x0c,
- 0x5f, 0x04, 0x63, 0x9e, 0x75, 0xc8, 0x92, 0x00, 0x26, 0x11, 0x7b, 0x68, 0x4e, 0xf1, 0x7d, 0x4f,
- 0xb2, 0x26, 0x76, 0x43, 0x67, 0xa0, 0x56, 0x39, 0xbe, 0xd0, 0xf1, 0xb5, 0x85, 0xd3, 0xda, 0x42,
- 0x9d, 0x81, 0x5a, 0xe5, 0x98, 0x93, 0x09, 0xbe, 0x1f, 0x3b, 0x04, 0xdb, 0xe6, 0xff, 0xf1, 0xbe,
- 0x57, 0xce, 0x77, 0x05, 0x0d, 0x29, 0x2e, 0xbc, 0x9f, 0x8c, 0x1c, 0x4c, 0x7e, 0xf9, 0xb6, 0x7a,
- 0x96, 0xba, 0x37, 0xc9, 0x12, 0x21, 0xd6, 0x91, 0xa8, 0x2a, 0xfa, 0xb0, 0x01, 0xfa, 0x60, 0xc0,
- 0x72, 0xdd, 0xcd, 0x5d, 0xf3, 0x12, 0xf7, 0x78, 0x0f, 0xab, 0x85, 0xca, 0x30, 0x4b, 0x4c, 0x3f,
- 0x12, 0x30, 0x0c, 0x2f, 0xf0, 0x59, 0x2c, 0xcc, 0x9c, 0x19, 0xde, 0x26, 0xd3, 0x8f, 0x04, 0x0c,
- 0xdf, 0x9f, 0x7f, 0xb4, 0xb9, 0x6b, 0x3e, 0x76, 0x76, 0xfb, 0x63, 0xfa, 0x91, 0x80, 0x81, 0x36,
- 0xe8, 0xf3, 0x83, 0xc8, 0xbc, 0xdc, 0xeb, 0xda, 0xcb, 0xab, 0xc9, 0xed, 0x20, 0x42, 0x4c, 0x3d,
- 0xfc, 0xb1, 0x01, 0x40, 0x98, 0x46, 0xe2, 0x95, 0xd3, 0x8e, 0x00, 0x32, 0x68, 0xa5, 0x34, 0x7a,
- 0x57, 0xfd, 0x88, 0x1c, 0xa5, 0xef, 0x1a, 0x2d, 0xca, 0x35, 0x03, 0xe0, 0x2f, 0x0c, 0x70, 0x51,
- 0x6f, 0x77, 0x95, 0x65, 0xb3, 0xdc, 0x0f, 0x9b, 0x3d, 0x0c, 0xe4, 0x72, 0x10, 0xb8, 0x65, 0xb3,
- 0xd9, 0x28, 0x5c, 0x5c, 0xea, 0x00, 0x88, 0x3a, 0x9a, 0x01, 0x7f, 0x63, 0x80, 0x49, 0x99, 0x1d,
- 0x35, 0xe3, 0x0a, 0xdc, 0x6d, 0x6f, 0xf7, 0xd0, 0x6d, 0x59, 0x08, 0xe1, 0x3d, 0xf5, 0x95, 0xb1,
- 0x8d, 0x8f, 0xda, 0xad, 0x82, 0xbf, 0x37, 0xc0, 0xa8, 0x8d, 0x43, 0xec, 0xdb, 0xd8, 0xaf, 0x32,
- 0x33, 0xe7, 0x4e, 0x3b, 0x57, 0xc8, 0x9a, 0xb9, 0xa2, 0x69, 0x17, 0x16, 0x96, 0xa4, 0x85, 0xa3,
- 0x3a, 0xeb, 0xb8, 0x51, 0x98, 0x4e, 0x97, 0xea, 0x1c, 0xd4, 0x62, 0x20, 0xfc, 0x89, 0x01, 0xc6,
- 0x53, 0xb7, 0x8b, 0x02, 0x71, 0xf5, 0x6c, 0x0e, 0x9e, 0xb7, 0xa0, 0x4b, 0xad, 0x58, 0x28, 0x0b,
- 0x0e, 0x7f, 0x6b, 0xb0, 0x6e, 0x2b, 0x79, 0xab, 0x51, 0xb3, 0xc8, 0x3d, 0xf8, 0x46, 0x2f, 0x3d,
- 0xa8, 0x94, 0x0b, 0x07, 0x5e, 0x4f, 0x3b, 0x39, 0xc5, 0x39, 0x6e, 0x14, 0xa6, 0x74, 0xff, 0x29,
- 0x06, 0xd2, 0x8d, 0x83, 0xef, 0x19, 0x60, 0x14, 0xa7, 0x0d, 0x33, 0x35, 0x1f, 0x3f, 0xad, 0xeb,
- 0x3a, 0xb6, 0xdf, 0xe2, 0x39, 0xad, 0xb1, 0x28, 0x6a, 0x81, 0x65, 0xbd, 0x1f, 0x3e, 0xb4, 0xbc,
- 0xd0, 0xc5, 0xe6, 0xff, 0xf7, 0xae, 0xf7, 0x5b, 0x15, 0x2a, 0x51, 0xa2, 0x1b, 0x5e, 0x07, 0x79,
- 0x3f, 0x76, 0x5d, 0x6b, 0xc7, 0xc5, 0xe6, 0x13, 0xbc, 0x8b, 0x50, 0xf3, 0xc5, 0xdb, 0x92, 0x8e,
- 0x94, 0x04, 0xdc, 0x05, 0x73, 0x87, 0xb7, 0xd4, 0x8f, 0x2f, 0x3a, 0x0e, 0xf0, 0xcc, 0x6b, 0x5c,
- 0xcb, 0x4c, 0xb3, 0x51, 0x98, 0xde, 0xee, 0x3c, 0xe2, 0x7b, 0xa8, 0x0e, 0xf8, 0x26, 0x78, 0x4c,
- 0x93, 0x59, 0xf5, 0x76, 0xb0, 0x6d, 0x63, 0x3b, 0x79, 0x68, 0x99, 0x5f, 0xe2, 0x10, 0xea, 0x1e,
- 0x6f, 0x67, 0x05, 0xd0, 0x83, 0x56, 0xc3, 0x75, 0x30, 0xad, 0xb1, 0xd7, 0xfc, 0x68, 0x93, 0x54,
- 0x22, 0xe2, 0xf8, 0x35, 0x73, 0x9e, 0xeb, 0xbd, 0x98, 0xdc, 0xbe, 0x6d, 0x8d, 0x87, 0xba, 0xac,
- 0x81, 0xaf, 0xb4, 0x68, 0xe3, 0x1f, 0x2e, 0xac, 0xf0, 0x16, 0x3e, 0xa2, 0xe6, 0x93, 0xbc, 0xb9,
- 0xe0, 0xe7, 0xbc, 0xad, 0xd1, 0x51, 0x17, 0x79, 0xf8, 0x0d, 0x70, 0x21, 0xc3, 0x61, 0xef, 0x0a,
- 0xf3, 0x29, 0xf1, 0x40, 0x60, 0x9d, 0xe8, 0x76, 0x42, 0x44, 0x9d, 0x24, 0xe1, 0xd7, 0x00, 0xd4,
- 0xc8, 0x1b, 0x56, 0xc8, 0xd7, 0x3f, 0x2d, 0xde, 0x2a, 0xec, 0x44, 0xb7, 0x25, 0x0d, 0x75, 0x90,
- 0x83, 0x1f, 0x1a, 0x2d, 0x3b, 0x49, 0x5f, 0xb3, 0xd4, 0xbc, 0xce, 0x2f, 0xec, 0x2b, 0x27, 0x0f,
- 0xc0, 0x54, 0x19, 0x8a, 0x5d, 0xac, 0x79, 0x58, 0x43, 0x41, 0x5d, 0xd0, 0x67, 0xd8, 0x63, 0x3a,
- 0x93, 0xc3, 0xe1, 0x04, 0xe8, 0xdb, 0xc7, 0xf2, 0xb3, 0x31, 0x62, 0x7f, 0xc2, 0xb7, 0xc0, 0x40,
- 0xdd, 0x72, 0xe3, 0x64, 0x14, 0xd0, 0xbb, 0x5a, 0x8f, 0x84, 0xde, 0x97, 0x72, 0x37, 0x8c, 0x99,
- 0x0f, 0x0c, 0x30, 0xdd, 0xb9, 0xaa, 0x7c, 0x51, 0x16, 0xfd, 0xdc, 0x00, 0x93, 0x6d, 0x05, 0xa4,
- 0x83, 0x31, 0x6e, 0xab, 0x31, 0xf7, 0x7a, 0x58, 0x09, 0xc4, 0x45, 0xe0, 0x1d, 0xad, 0x6e, 0xd9,
- 0x8f, 0x0c, 0x30, 0x91, 0x4d, 0xcc, 0x5f, 0x90, 0x97, 0x8a, 0xef, 0xe7, 0xc0, 0x74, 0xe7, 0x1e,
- 0x1c, 0x7a, 0x6a, 0xba, 0xd0, 0xf3, 0x01, 0x4d, 0xa7, 0x91, 0xed, 0xbb, 0x06, 0x18, 0x79, 0x47,
- 0xc9, 0x25, 0x5f, 0x33, 0x7b, 0x39, 0x15, 0x4a, 0x4a, 0x5f, 0xca, 0xa0, 0x48, 0x87, 0x2c, 0xfe,
- 0xce, 0x00, 0x53, 0x1d, 0xcb, 0x39, 0xbc, 0x06, 0x06, 0x2d, 0xd7, 0x0d, 0x0e, 0xc4, 0x34, 0x4f,
- 0x1b, 0xcb, 0x2f, 0x71, 0x2a, 0x92, 0x5c, 0xcd, 0x67, 0xb9, 0xcf, 0xc1, 0x67, 0xc5, 0x3f, 0x1a,
- 0xe0, 0xf2, 0x83, 0xa2, 0xee, 0xf3, 0x3e, 0xc3, 0x79, 0x90, 0x97, 0xcd, 0xf6, 0x11, 0x3f, 0x3f,
- 0x99, 0x5d, 0x65, 0x46, 0xe0, 0xbf, 0x96, 0x11, 0x7f, 0x15, 0x7f, 0x65, 0x80, 0x89, 0x0a, 0x26,
- 0x75, 0xa7, 0x8a, 0x11, 0xde, 0xc5, 0x04, 0xfb, 0x55, 0x0c, 0x17, 0xc0, 0x30, 0xff, 0xda, 0x18,
- 0x5a, 0xd5, 0xe4, 0x1b, 0xc9, 0xa4, 0x74, 0xf4, 0xf0, 0xed, 0x84, 0x81, 0x52, 0x19, 0xf5, 0x3d,
- 0x25, 0xd7, 0xf5, 0x7b, 0xca, 0x65, 0xd0, 0x1f, 0xa6, 0x03, 0xe0, 0x3c, 0xe3, 0xf2, 0x99, 0x2f,
- 0xa7, 0x72, 0x6e, 0x40, 0x22, 0x3e, 0xe5, 0x1a, 0x90, 0xdc, 0x80, 0x44, 0x88, 0x53, 0x8b, 0xdf,
- 0x02, 0xe7, 0x5b, 0xd3, 0x33, 0xc3, 0x23, 0xb1, 0xdb, 0xf6, 0xfd, 0x86, 0xf1, 0x10, 0xe7, 0xe8,
- 0x3f, 0x1b, 0xc8, 0x3d, 0xe4, 0x67, 0x03, 0x7f, 0x32, 0xc0, 0x85, 0xe4, 0x57, 0x35, 0xae, 0x83,
- 0xfd, 0x68, 0x39, 0xf0, 0x77, 0x9d, 0x1a, 0xbc, 0x24, 0xe6, 0x88, 0xda, 0x70, 0x2e, 0x99, 0x21,
- 0xc2, 0xfb, 0x60, 0x88, 0x0a, 0xa7, 0xc9, 0xf3, 0x7c, 0xf5, 0xe4, 0xe7, 0x99, 0xf5, 0xbe, 0x68,
- 0x83, 0x12, 0x6a, 0x82, 0xc3, 0x8e, 0xb4, 0x6a, 0x95, 0x63, 0xdf, 0x96, 0xb3, 0xe4, 0x51, 0x71,
- 0xa4, 0xcb, 0x4b, 0x82, 0x86, 0x14, 0xb7, 0xf8, 0x0f, 0x03, 0x4c, 0xb6, 0xfd, 0x4a, 0x08, 0x7e,
- 0xdf, 0x00, 0xa3, 0x55, 0x6d, 0x7b, 0xf2, 0x62, 0x6c, 0x9c, 0xfe, 0x97, 0x48, 0x9a, 0x52, 0xd1,
- 0x4b, 0xe8, 0x14, 0xd4, 0x02, 0x0a, 0xb7, 0x81, 0x59, 0xcd, 0xfc, 0x20, 0x2f, 0xf3, 0x89, 0xef,
- 0x72, 0xb3, 0x51, 0x30, 0x97, 0xbb, 0xc8, 0xa0, 0xae, 0xab, 0xcb, 0xdf, 0xfe, 0xf8, 0xb3, 0xd9,
- 0x73, 0x9f, 0x7c, 0x36, 0x7b, 0xee, 0xd3, 0xcf, 0x66, 0xcf, 0xbd, 0xdb, 0x9c, 0x35, 0x3e, 0x6e,
- 0xce, 0x1a, 0x9f, 0x34, 0x67, 0x8d, 0x4f, 0x9b, 0xb3, 0xc6, 0x5f, 0x9b, 0xb3, 0xc6, 0x4f, 0xff,
- 0x36, 0x7b, 0xee, 0x8d, 0x1b, 0x27, 0xfd, 0x19, 0xee, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc0,
- 0x20, 0xb3, 0x2b, 0xda, 0x2b, 0x00, 0x00,
+ 0x2a, 0x9d, 0x74, 0x47, 0x95, 0xda, 0xe2, 0xaf, 0x3c, 0xc2, 0x96, 0x4b, 0xfe, 0x41, 0x09, 0x10,
+ 0xac, 0x83, 0x3c, 0x91, 0x6b, 0xc4, 0x03, 0x69, 0x64, 0x71, 0xbd, 0x37, 0xa0, 0x42, 0x67, 0x79,
+ 0xb4, 0xd9, 0x28, 0xe4, 0x93, 0x7f, 0x48, 0x61, 0x15, 0x7f, 0x91, 0x03, 0xb3, 0xcb, 0x31, 0x8d,
+ 0x02, 0x0f, 0x61, 0x1a, 0xc4, 0xa4, 0x8a, 0x97, 0x03, 0x37, 0xf6, 0xfc, 0x15, 0xbc, 0xeb, 0xf8,
+ 0x4e, 0xc4, 0x62, 0x74, 0x0e, 0xf4, 0xfb, 0x96, 0x87, 0x65, 0xcc, 0x8c, 0x4a, 0x4f, 0xf6, 0xdf,
+ 0xb6, 0x3c, 0x8c, 0x38, 0x87, 0x49, 0xb0, 0x10, 0x91, 0x3b, 0x40, 0x49, 0xdc, 0x39, 0x0a, 0x31,
+ 0xe2, 0x1c, 0x78, 0x0d, 0x0c, 0xee, 0x06, 0xc4, 0xb3, 0xc4, 0xea, 0x0d, 0xa7, 0xeb, 0x71, 0x93,
+ 0x53, 0x91, 0xe4, 0xc2, 0x17, 0xc0, 0x88, 0x8d, 0x69, 0x95, 0x38, 0x21, 0x83, 0x36, 0xfb, 0xb9,
+ 0xf0, 0x05, 0x29, 0x3c, 0xb2, 0x92, 0xb2, 0x90, 0x2e, 0x07, 0xaf, 0x83, 0x7c, 0x48, 0x9c, 0x80,
+ 0x38, 0xd1, 0x91, 0x39, 0x30, 0x67, 0xcc, 0x0f, 0x94, 0x27, 0xe4, 0x98, 0xfc, 0x96, 0xa4, 0x23,
+ 0x25, 0xc1, 0xa4, 0xdf, 0xa1, 0x81, 0xbf, 0x65, 0x45, 0x7b, 0xe6, 0x20, 0x47, 0x50, 0xd2, 0xaf,
+ 0x56, 0x36, 0x6f, 0x33, 0x3a, 0x52, 0x12, 0xc5, 0x3f, 0x1b, 0xc0, 0xcc, 0x7a, 0x28, 0x71, 0x2f,
+ 0xbc, 0x09, 0xf2, 0x34, 0x62, 0x39, 0xa7, 0x76, 0x24, 0xfd, 0xf3, 0x54, 0xa2, 0xaa, 0x22, 0xe9,
+ 0xc7, 0x8d, 0xc2, 0x74, 0x3a, 0x22, 0xa1, 0x72, 0xdf, 0xa8, 0xb1, 0x2c, 0xe4, 0x0e, 0xf0, 0xce,
+ 0x5e, 0x10, 0xec, 0xcb, 0xd5, 0x3f, 0x45, 0xc8, 0xbd, 0x26, 0x14, 0xa5, 0x98, 0x22, 0xe4, 0x24,
+ 0x19, 0x25, 0x40, 0xc5, 0xff, 0xe4, 0xb2, 0x13, 0xd3, 0x16, 0xfd, 0x6d, 0x90, 0x67, 0x5b, 0xc8,
+ 0xb6, 0x22, 0x4b, 0x6e, 0x82, 0x67, 0x1f, 0x6d, 0xc3, 0x89, 0xfd, 0xba, 0x81, 0x23, 0xab, 0x0c,
+ 0xa5, 0x2b, 0x40, 0x4a, 0x43, 0x4a, 0x2b, 0x3c, 0x04, 0xfd, 0x34, 0xc4, 0x55, 0x39, 0xdf, 0x7b,
+ 0xa7, 0x88, 0xf6, 0x2e, 0x73, 0xa8, 0x84, 0xb8, 0x9a, 0x06, 0x23, 0xfb, 0x87, 0x38, 0x22, 0x7c,
+ 0xd7, 0x00, 0x83, 0x94, 0xe7, 0x05, 0x99, 0x4b, 0xb6, 0xcf, 0x00, 0x3c, 0x93, 0x77, 0xc4, 0x7f,
+ 0x24, 0x71, 0x8b, 0xff, 0xcc, 0x81, 0xab, 0xdd, 0x86, 0x2e, 0x07, 0xbe, 0x2d, 0x16, 0x61, 0x4d,
+ 0xee, 0x2b, 0x11, 0x59, 0x2f, 0xe8, 0xfb, 0xea, 0xb8, 0x51, 0x78, 0xe2, 0xa1, 0x0a, 0xb4, 0x0d,
+ 0xf8, 0x55, 0x35, 0x65, 0xb1, 0x49, 0xaf, 0xb6, 0x1a, 0x76, 0xdc, 0x28, 0x8c, 0xab, 0x61, 0xad,
+ 0xb6, 0xc2, 0x3a, 0x80, 0xae, 0x45, 0xa3, 0x3b, 0xc4, 0xf2, 0xa9, 0x50, 0xeb, 0x78, 0x58, 0x7a,
+ 0xee, 0xa9, 0x47, 0x0b, 0x0a, 0x36, 0xa2, 0x3c, 0x23, 0x21, 0xe1, 0x7a, 0x9b, 0x36, 0xd4, 0x01,
+ 0x81, 0xe5, 0x0c, 0x82, 0x2d, 0xaa, 0xd2, 0x80, 0x96, 0xc3, 0x19, 0x15, 0x49, 0x2e, 0x7c, 0x12,
+ 0x0c, 0x79, 0x98, 0x52, 0xab, 0x86, 0xf9, 0xde, 0x1f, 0x4e, 0x0f, 0xc5, 0x0d, 0x41, 0x46, 0x09,
+ 0xbf, 0xf8, 0x2f, 0x03, 0x5c, 0xee, 0xe6, 0xb5, 0x75, 0x87, 0x46, 0xf0, 0x9b, 0x6d, 0x61, 0x5f,
+ 0x7a, 0xb4, 0x19, 0xb2, 0xd1, 0x3c, 0xe8, 0x55, 0x2a, 0x49, 0x28, 0x5a, 0xc8, 0x1f, 0x80, 0x01,
+ 0x27, 0xc2, 0x5e, 0x72, 0x5a, 0xa2, 0xde, 0x87, 0x5d, 0x79, 0x4c, 0xc2, 0x0f, 0xac, 0x31, 0x20,
+ 0x24, 0xf0, 0x8a, 0x1f, 0xe5, 0xc0, 0x95, 0x6e, 0x43, 0x58, 0x1e, 0xa7, 0xcc, 0xd9, 0xa1, 0x1b,
+ 0x13, 0xcb, 0x95, 0xc1, 0xa6, 0x9c, 0xbd, 0xc5, 0xa9, 0x48, 0x72, 0x59, 0xee, 0xa4, 0x8e, 0x5f,
+ 0x8b, 0x5d, 0x8b, 0xc8, 0x48, 0x52, 0x13, 0xae, 0x48, 0x3a, 0x52, 0x12, 0xb0, 0x04, 0x00, 0xdd,
+ 0x0b, 0x48, 0xc4, 0x31, 0x78, 0x85, 0x33, 0x5c, 0x3e, 0xcf, 0x32, 0x42, 0x45, 0x51, 0x91, 0x26,
+ 0xc1, 0x0e, 0x92, 0x7d, 0xc7, 0xb7, 0xe5, 0x82, 0xab, 0xbd, 0x7b, 0xcb, 0xf1, 0x6d, 0xc4, 0x39,
+ 0x0c, 0xdf, 0x75, 0x68, 0xc4, 0x28, 0x72, 0xb5, 0x5b, 0x1c, 0xce, 0x25, 0x95, 0x04, 0xc3, 0xaf,
+ 0xb2, 0x04, 0x1b, 0x10, 0x07, 0x53, 0x73, 0x30, 0xc5, 0x5f, 0x56, 0x54, 0xa4, 0x49, 0x14, 0xff,
+ 0xd2, 0xdf, 0x3d, 0x3e, 0x58, 0x02, 0x81, 0x8f, 0x83, 0x81, 0x1a, 0x09, 0xe2, 0x50, 0x7a, 0x49,
+ 0x79, 0xfb, 0x65, 0x46, 0x44, 0x82, 0x07, 0xbf, 0x0d, 0x06, 0x7c, 0x39, 0x61, 0x16, 0x41, 0xaf,
+ 0xf5, 0x7e, 0x99, 0xb9, 0xb7, 0x52, 0x74, 0xe1, 0x48, 0x01, 0x0a, 0x9f, 0x07, 0x03, 0xb4, 0x1a,
+ 0x84, 0x58, 0x3a, 0x71, 0x36, 0x11, 0xaa, 0x30, 0xe2, 0x71, 0xa3, 0x30, 0x96, 0xa8, 0xe3, 0x04,
+ 0x24, 0x84, 0xe1, 0xf7, 0x0d, 0x90, 0x97, 0xc7, 0x05, 0x35, 0x87, 0x78, 0x78, 0xbe, 0xde, 0x7b,
+ 0xbb, 0x65, 0xd9, 0x9b, 0xae, 0x99, 0x24, 0x50, 0xa4, 0xc0, 0xe1, 0x77, 0x0d, 0x00, 0xaa, 0xea,
+ 0xec, 0x32, 0x87, 0xb9, 0x0f, 0x7b, 0xb6, 0x55, 0xb4, 0x53, 0x51, 0x04, 0x42, 0x5a, 0x2a, 0x69,
+ 0xa8, 0xb0, 0x02, 0xa6, 0x42, 0x82, 0xb9, 0xee, 0xbb, 0xfe, 0xbe, 0x1f, 0x1c, 0xf8, 0x37, 0x1d,
+ 0xec, 0xda, 0xd4, 0x04, 0x73, 0xc6, 0x7c, 0xbe, 0x7c, 0x45, 0xda, 0x3f, 0xb5, 0xd5, 0x49, 0x08,
+ 0x75, 0x1e, 0x5b, 0x7c, 0xaf, 0x2f, 0x5b, 0x6b, 0x65, 0xcf, 0x0b, 0xf8, 0x81, 0x98, 0xbc, 0xc8,
+ 0xc3, 0xd4, 0x34, 0xf8, 0x42, 0xbc, 0xd9, 0xfb, 0x85, 0x50, 0xb9, 0x3e, 0x3d, 0xa4, 0x15, 0x89,
+ 0x22, 0xcd, 0x04, 0xf8, 0x53, 0x03, 0x8c, 0x59, 0xd5, 0x2a, 0x0e, 0x23, 0x6c, 0x8b, 0x6d, 0x9c,
+ 0x3b, 0xdb, 0xa8, 0x9e, 0x92, 0x06, 0x8d, 0x2d, 0xe9, 0xa8, 0xa8, 0xd5, 0x08, 0xf8, 0x12, 0x38,
+ 0x4f, 0xa3, 0x80, 0x60, 0x3b, 0x89, 0x20, 0x99, 0x5d, 0x60, 0xb3, 0x51, 0x38, 0x5f, 0x69, 0xe1,
+ 0xa0, 0x8c, 0x64, 0xf1, 0x93, 0x01, 0x50, 0x78, 0x48, 0x84, 0x3e, 0x42, 0xd1, 0x7b, 0x0d, 0x0c,
+ 0xf2, 0x99, 0xda, 0xdc, 0x21, 0x79, 0xed, 0xa8, 0xe7, 0x54, 0x24, 0xb9, 0xec, 0x78, 0x62, 0xf8,
+ 0xec, 0x78, 0xea, 0xe3, 0x82, 0xea, 0x78, 0xaa, 0x08, 0x32, 0x4a, 0xf8, 0x70, 0x11, 0x00, 0x1b,
+ 0x87, 0x04, 0xb3, 0x8c, 0x64, 0x9b, 0x43, 0x5c, 0x5a, 0xad, 0xcf, 0x8a, 0xe2, 0x20, 0x4d, 0x0a,
+ 0xde, 0x04, 0x30, 0xf9, 0xe7, 0x04, 0xfe, 0x6b, 0x16, 0xf1, 0x1d, 0xbf, 0x66, 0xe6, 0xb9, 0xd9,
+ 0xd3, 0xec, 0xb4, 0x5d, 0x69, 0xe3, 0xa2, 0x0e, 0x23, 0x60, 0x1d, 0x0c, 0x8a, 0x6b, 0x34, 0xcf,
+ 0x1b, 0x3d, 0xdc, 0x71, 0xf7, 0x2c, 0xd7, 0xb1, 0x39, 0x54, 0x19, 0x70, 0xf7, 0x70, 0x14, 0x24,
+ 0xd1, 0xe0, 0xfb, 0x06, 0x18, 0xa5, 0xf1, 0x0e, 0x91, 0xd2, 0x94, 0x67, 0xf5, 0x91, 0xc5, 0x3b,
+ 0xbd, 0x82, 0xaf, 0x68, 0xba, 0xcb, 0x13, 0xcd, 0x46, 0x61, 0x54, 0xa7, 0xa0, 0x16, 0x6c, 0xf8,
+ 0x07, 0x03, 0x98, 0x96, 0x2d, 0x42, 0xdf, 0x72, 0xb7, 0x88, 0xe3, 0x47, 0x98, 0x88, 0x0b, 0x91,
+ 0x38, 0x3e, 0x7a, 0x58, 0x2b, 0x66, 0xef, 0x59, 0xe5, 0x39, 0xb9, 0xd2, 0xe6, 0x52, 0x17, 0x0b,
+ 0x50, 0x57, 0xdb, 0x8a, 0xff, 0x36, 0xb2, 0xa9, 0x45, 0x9b, 0x65, 0xa5, 0x6a, 0xb9, 0x18, 0xae,
+ 0x80, 0x09, 0x56, 0xfd, 0x22, 0x1c, 0xba, 0x4e, 0xd5, 0xa2, 0xfc, 0xf6, 0x23, 0xa2, 0x5b, 0x5d,
+ 0xc3, 0x2b, 0x19, 0x3e, 0x6a, 0x1b, 0x01, 0x5f, 0x05, 0x50, 0x94, 0x85, 0x2d, 0x7a, 0x44, 0x25,
+ 0xa0, 0x0a, 0xbc, 0x4a, 0x9b, 0x04, 0xea, 0x30, 0x0a, 0x2e, 0x83, 0x49, 0xd7, 0xda, 0xc1, 0x6e,
+ 0x05, 0xbb, 0xb8, 0x1a, 0x05, 0x84, 0xab, 0x12, 0xf7, 0xc3, 0xa9, 0x66, 0xa3, 0x30, 0xb9, 0x9e,
+ 0x65, 0xa2, 0x76, 0xf9, 0xe2, 0xd5, 0xec, 0x5e, 0xd6, 0x27, 0x2e, 0x8a, 0xed, 0x0f, 0x73, 0x60,
+ 0xa6, 0x7b, 0x50, 0xc0, 0xef, 0xa8, 0xd2, 0x58, 0x54, 0x7c, 0xaf, 0x9f, 0x41, 0xe8, 0xc9, 0xeb,
+ 0x00, 0x68, 0xbf, 0x0a, 0xc0, 0x23, 0x76, 0x5e, 0x5b, 0x6e, 0x72, 0xed, 0xdf, 0x3e, 0x0b, 0x74,
+ 0xa6, 0xbf, 0x3c, 0x2c, 0xaa, 0x00, 0xcb, 0xe5, 0x87, 0xbe, 0xe5, 0xe2, 0xe2, 0x47, 0x6d, 0x57,
+ 0xdb, 0x74, 0xb3, 0xc2, 0x1f, 0x18, 0x60, 0x3c, 0x08, 0xb1, 0xbf, 0xb4, 0xb5, 0x76, 0xef, 0xcb,
+ 0x62, 0xd3, 0x4a, 0x07, 0xad, 0x9d, 0xdc, 0x44, 0x76, 0xbf, 0x16, 0xba, 0xb6, 0x48, 0x10, 0xd2,
+ 0xf2, 0x85, 0x66, 0xa3, 0x30, 0xbe, 0xd9, 0x8a, 0x82, 0xb2, 0xb0, 0x45, 0x0f, 0x4c, 0xad, 0x1e,
+ 0x46, 0x98, 0xf8, 0x96, 0xbb, 0x12, 0x54, 0x63, 0x0f, 0xfb, 0x91, 0xb0, 0x31, 0xd3, 0x2e, 0x30,
+ 0x1e, 0xb1, 0x5d, 0x70, 0x05, 0xf4, 0xc5, 0xc4, 0x95, 0x51, 0x3b, 0xa2, 0x9a, 0x60, 0x68, 0x1d,
+ 0x31, 0x7a, 0xf1, 0x2a, 0xe8, 0x67, 0x76, 0xc2, 0x4b, 0xa0, 0x8f, 0x58, 0x07, 0x5c, 0xeb, 0x68,
+ 0x79, 0x88, 0x89, 0x20, 0xeb, 0x00, 0x31, 0x5a, 0xf1, 0xef, 0x73, 0x60, 0x3c, 0x33, 0x17, 0x38,
+ 0x03, 0x72, 0xaa, 0xb3, 0x06, 0xa4, 0xd2, 0xdc, 0xda, 0x0a, 0xca, 0x39, 0x36, 0x7c, 0x51, 0x65,
+ 0x57, 0x01, 0x5a, 0x50, 0x87, 0x05, 0xa7, 0xb2, 0xb2, 0x2c, 0x55, 0xc7, 0x0c, 0x49, 0xd2, 0x23,
+ 0xb3, 0x01, 0xef, 0xca, 0x5d, 0x21, 0x6c, 0xc0, 0xbb, 0x88, 0xd1, 0x4e, 0xda, 0x2b, 0x49, 0x9a,
+ 0x35, 0x03, 0x8f, 0xd0, 0xac, 0x19, 0x7c, 0x60, 0xb3, 0xe6, 0x71, 0x30, 0x10, 0x39, 0x91, 0x8b,
+ 0xf9, 0x49, 0xa5, 0x15, 0xc3, 0x77, 0x18, 0x11, 0x09, 0x1e, 0xc4, 0x60, 0xc8, 0xc6, 0xbb, 0x56,
+ 0xec, 0x46, 0xfc, 0x50, 0x1a, 0x59, 0xfc, 0xfa, 0xe9, 0xa2, 0x47, 0x34, 0x33, 0x56, 0x84, 0x4a,
+ 0x94, 0xe8, 0x86, 0x4f, 0x80, 0x21, 0xcf, 0x3a, 0x74, 0xbc, 0xd8, 0xe3, 0x15, 0xa3, 0x21, 0xc4,
+ 0x36, 0x04, 0x09, 0x25, 0x3c, 0x96, 0x04, 0xf1, 0x61, 0xd5, 0x8d, 0xa9, 0x53, 0xc7, 0x92, 0x29,
+ 0x4b, 0x3a, 0x95, 0x04, 0x57, 0x33, 0x7c, 0xd4, 0x36, 0x82, 0x83, 0x39, 0x3e, 0x1f, 0x3c, 0xa2,
+ 0x81, 0x09, 0x12, 0x4a, 0x78, 0xad, 0x60, 0x52, 0x7e, 0xb4, 0x1b, 0x98, 0x1c, 0xdc, 0x36, 0x02,
+ 0x3e, 0x0d, 0x86, 0x3d, 0xeb, 0x70, 0x1d, 0xfb, 0xb5, 0x68, 0xcf, 0x1c, 0x9b, 0x33, 0xe6, 0xfb,
+ 0xca, 0x63, 0xcd, 0x46, 0x61, 0x78, 0x23, 0x21, 0xa2, 0x94, 0xcf, 0x85, 0x1d, 0x5f, 0x0a, 0x9f,
+ 0xd7, 0x84, 0x13, 0x22, 0x4a, 0xf9, 0xac, 0x32, 0x09, 0xad, 0x88, 0xed, 0x2b, 0x73, 0xbc, 0xf5,
+ 0xe2, 0xbc, 0x25, 0xc8, 0x28, 0xe1, 0xc3, 0x79, 0x90, 0xf7, 0xac, 0x43, 0x7e, 0xa7, 0x34, 0x27,
+ 0xb8, 0x5a, 0xde, 0x50, 0xdc, 0x90, 0x34, 0xa4, 0xb8, 0x5c, 0xd2, 0xf1, 0x85, 0xe4, 0xa4, 0x26,
+ 0x29, 0x69, 0x48, 0x71, 0x59, 0xfc, 0xc6, 0xbe, 0x73, 0x3f, 0xc6, 0x42, 0x18, 0x72, 0xcf, 0xa8,
+ 0xf8, 0xbd, 0x9b, 0xb2, 0x90, 0x2e, 0xc7, 0xee, 0x74, 0x5e, 0xec, 0x46, 0x4e, 0xe8, 0xe2, 0xcd,
+ 0x5d, 0xf3, 0x02, 0xf7, 0x3f, 0x2f, 0xe5, 0x37, 0x14, 0x15, 0x69, 0x12, 0xf0, 0x6d, 0xd0, 0x8f,
+ 0xfd, 0xd8, 0x33, 0x2f, 0xf2, 0xe3, 0xfb, 0xb4, 0xd1, 0xa7, 0xf6, 0xcb, 0xaa, 0x1f, 0x7b, 0x88,
+ 0x6b, 0x86, 0x2f, 0x82, 0x31, 0xcf, 0x3a, 0x64, 0x49, 0x00, 0x93, 0x88, 0x5d, 0x34, 0xa7, 0xf8,
+ 0xbc, 0x27, 0x59, 0x11, 0xbb, 0xa1, 0x33, 0x50, 0xab, 0x1c, 0x1f, 0xe8, 0xf8, 0xda, 0xc0, 0x69,
+ 0x6d, 0xa0, 0xce, 0x40, 0xad, 0x72, 0xcc, 0xc9, 0x04, 0xdf, 0x8f, 0x1d, 0x82, 0x6d, 0xf3, 0xff,
+ 0x78, 0xdd, 0x2b, 0xfb, 0xbb, 0x82, 0x86, 0x14, 0x17, 0xde, 0x4f, 0x5a, 0x0e, 0x26, 0xdf, 0x7c,
+ 0x5b, 0x3d, 0x4b, 0xdd, 0x9b, 0x64, 0x89, 0x10, 0xeb, 0x48, 0x9c, 0x2a, 0x7a, 0xb3, 0x01, 0xfa,
+ 0x60, 0xc0, 0x72, 0xdd, 0xcd, 0x5d, 0xf3, 0x12, 0xf7, 0x78, 0x0f, 0x4f, 0x0b, 0x95, 0x61, 0x96,
+ 0x98, 0x7e, 0x24, 0x60, 0x18, 0x5e, 0xe0, 0xb3, 0x58, 0x98, 0x39, 0x33, 0xbc, 0x4d, 0xa6, 0x1f,
+ 0x09, 0x18, 0x3e, 0x3f, 0xff, 0x68, 0x73, 0xd7, 0x7c, 0xec, 0xec, 0xe6, 0xc7, 0xf4, 0x23, 0x01,
+ 0x03, 0x6d, 0xd0, 0xe7, 0x07, 0x91, 0x79, 0xb9, 0xd7, 0x67, 0x2f, 0x3f, 0x4d, 0x6e, 0x07, 0x11,
+ 0x62, 0xea, 0xe1, 0x8f, 0x0c, 0x00, 0xc2, 0x34, 0x12, 0xaf, 0x9c, 0xb6, 0x05, 0x90, 0x41, 0x2b,
+ 0xa5, 0xd1, 0xbb, 0xea, 0x47, 0xe4, 0x28, 0xbd, 0xd7, 0x68, 0x51, 0xae, 0x19, 0x00, 0x7f, 0x6e,
+ 0x80, 0x8b, 0x7a, 0xb9, 0xab, 0x2c, 0x9b, 0xe5, 0x7e, 0xd8, 0xec, 0x61, 0x20, 0x97, 0x83, 0xc0,
+ 0x2d, 0x9b, 0xcd, 0x46, 0xe1, 0xe2, 0x52, 0x07, 0x40, 0xd4, 0xd1, 0x0c, 0xf8, 0x1b, 0x03, 0x4c,
+ 0xca, 0xec, 0xa8, 0x19, 0x57, 0xe0, 0x6e, 0x7b, 0xbb, 0x87, 0x6e, 0xcb, 0x42, 0x08, 0xef, 0xa9,
+ 0x57, 0xc6, 0x36, 0x3e, 0x6a, 0xb7, 0x0a, 0xfe, 0xde, 0x00, 0xa3, 0x36, 0x0e, 0xb1, 0x6f, 0x63,
+ 0xbf, 0xca, 0xcc, 0x9c, 0x3b, 0x6d, 0x5f, 0x21, 0x6b, 0xe6, 0x8a, 0xa6, 0x5d, 0x58, 0x58, 0x92,
+ 0x16, 0x8e, 0xea, 0xac, 0xe3, 0x46, 0x61, 0x3a, 0x1d, 0xaa, 0x73, 0x50, 0x8b, 0x81, 0xf0, 0xc7,
+ 0x06, 0x18, 0x4f, 0xdd, 0x2e, 0x0e, 0x88, 0xab, 0x67, 0xb3, 0xf0, 0xbc, 0x04, 0x5d, 0x6a, 0xc5,
+ 0x42, 0x59, 0x70, 0xf8, 0x5b, 0x83, 0x55, 0x5b, 0xc9, 0x5d, 0x8d, 0x9a, 0x45, 0xee, 0xc1, 0x37,
+ 0x7a, 0xe9, 0x41, 0xa5, 0x5c, 0x38, 0xf0, 0x7a, 0x5a, 0xc9, 0x29, 0xce, 0x71, 0xa3, 0x30, 0xa5,
+ 0xfb, 0x4f, 0x31, 0x90, 0x6e, 0x1c, 0x7c, 0xcf, 0x00, 0xa3, 0x38, 0x2d, 0x98, 0xa9, 0xf9, 0xf8,
+ 0x69, 0x5d, 0xd7, 0xb1, 0xfc, 0x16, 0xd7, 0x69, 0x8d, 0x45, 0x51, 0x0b, 0x2c, 0xab, 0xfd, 0xf0,
+ 0xa1, 0xe5, 0x85, 0x2e, 0x36, 0xff, 0xbf, 0x77, 0xb5, 0xdf, 0xaa, 0x50, 0x89, 0x12, 0xdd, 0xf0,
+ 0x3a, 0xc8, 0xfb, 0xb1, 0xeb, 0x5a, 0x3b, 0x2e, 0x36, 0x9f, 0xe0, 0x55, 0x84, 0xea, 0x2f, 0xde,
+ 0x96, 0x74, 0xa4, 0x24, 0xe0, 0x2e, 0x98, 0x3b, 0xbc, 0xa5, 0x3e, 0xbe, 0xe8, 0xd8, 0xc0, 0x33,
+ 0xaf, 0x71, 0x2d, 0x33, 0xcd, 0x46, 0x61, 0x7a, 0xbb, 0x73, 0x8b, 0xef, 0xa1, 0x3a, 0xe0, 0x9b,
+ 0xe0, 0x31, 0x4d, 0x66, 0xd5, 0xdb, 0xc1, 0xb6, 0x8d, 0xed, 0xe4, 0xa2, 0x65, 0x7e, 0x89, 0x43,
+ 0xa8, 0x7d, 0xbc, 0x9d, 0x15, 0x40, 0x0f, 0x1a, 0x0d, 0xd7, 0xc1, 0xb4, 0xc6, 0x5e, 0xf3, 0xa3,
+ 0x4d, 0x52, 0x89, 0x88, 0xe3, 0xd7, 0xcc, 0x79, 0xae, 0xf7, 0x62, 0xb2, 0xfb, 0xb6, 0x35, 0x1e,
+ 0xea, 0x32, 0x06, 0xbe, 0xd2, 0xa2, 0x8d, 0x3f, 0x5c, 0x58, 0xe1, 0x2d, 0x7c, 0x44, 0xcd, 0x27,
+ 0x79, 0x71, 0xc1, 0xd7, 0x79, 0x5b, 0xa3, 0xa3, 0x2e, 0xf2, 0xf0, 0x1b, 0xe0, 0x42, 0x86, 0xc3,
+ 0xee, 0x15, 0xe6, 0x53, 0xe2, 0x82, 0xc0, 0x2a, 0xd1, 0xed, 0x84, 0x88, 0x3a, 0x49, 0xc2, 0xaf,
+ 0x01, 0xa8, 0x91, 0x37, 0xac, 0x90, 0x8f, 0x7f, 0x5a, 0xdc, 0x55, 0xd8, 0x8a, 0x6e, 0x4b, 0x1a,
+ 0xea, 0x20, 0x07, 0x3f, 0x34, 0x5a, 0x66, 0x92, 0xde, 0x66, 0xa9, 0x79, 0x9d, 0x6f, 0xd8, 0x57,
+ 0x4e, 0x1e, 0x80, 0xa9, 0x32, 0x14, 0xbb, 0x58, 0xf3, 0xb0, 0x86, 0x82, 0xba, 0xa0, 0xcf, 0xb0,
+ 0xcb, 0x74, 0x26, 0x87, 0xc3, 0x09, 0xd0, 0xb7, 0x8f, 0xe5, 0xb3, 0x31, 0x62, 0x3f, 0xe1, 0x5b,
+ 0x60, 0xa0, 0x6e, 0xb9, 0x71, 0xd2, 0x0a, 0xe8, 0xdd, 0x59, 0x8f, 0x84, 0xde, 0x97, 0x72, 0x37,
+ 0x8c, 0x99, 0x0f, 0x0c, 0x30, 0xdd, 0xf9, 0x54, 0xf9, 0xa2, 0x2c, 0xfa, 0x99, 0x01, 0x26, 0xdb,
+ 0x0e, 0x90, 0x0e, 0xc6, 0xb8, 0xad, 0xc6, 0xdc, 0xeb, 0xe1, 0x49, 0x20, 0x36, 0x02, 0xaf, 0x68,
+ 0x75, 0xcb, 0x7e, 0x68, 0x80, 0x89, 0x6c, 0x62, 0xfe, 0x82, 0xbc, 0x54, 0x7c, 0x3f, 0x07, 0xa6,
+ 0x3b, 0xd7, 0xe0, 0xd0, 0x53, 0xdd, 0x85, 0x9e, 0x37, 0x68, 0x3a, 0xb5, 0x6c, 0xdf, 0x35, 0xc0,
+ 0xc8, 0x3b, 0x4a, 0x2e, 0x79, 0xcd, 0xec, 0x65, 0x57, 0x28, 0x39, 0xfa, 0x52, 0x06, 0x45, 0x3a,
+ 0x64, 0xf1, 0x77, 0x06, 0x98, 0xea, 0x78, 0x9c, 0xc3, 0x6b, 0x60, 0xd0, 0x72, 0xdd, 0xe0, 0x40,
+ 0x74, 0xf3, 0xb4, 0xb6, 0xfc, 0x12, 0xa7, 0x22, 0xc9, 0xd5, 0x7c, 0x96, 0xfb, 0x1c, 0x7c, 0x56,
+ 0xfc, 0xa3, 0x01, 0x2e, 0x3f, 0x28, 0xea, 0x3e, 0xef, 0x35, 0x9c, 0x07, 0x79, 0x59, 0x6c, 0x1f,
+ 0xf1, 0xf5, 0x93, 0xd9, 0x55, 0x66, 0x04, 0xfe, 0xb5, 0x8c, 0xf8, 0x55, 0xfc, 0xa5, 0x01, 0x26,
+ 0x2a, 0x98, 0xd4, 0x9d, 0x2a, 0x46, 0x78, 0x17, 0x13, 0xec, 0x57, 0x31, 0x5c, 0x00, 0xc3, 0xfc,
+ 0xb5, 0x31, 0xb4, 0xaa, 0xc9, 0x1b, 0xc9, 0xa4, 0x74, 0xf4, 0xf0, 0xed, 0x84, 0x81, 0x52, 0x19,
+ 0xf5, 0x9e, 0x92, 0xeb, 0xfa, 0x9e, 0x72, 0x19, 0xf4, 0x87, 0x69, 0x03, 0x38, 0xcf, 0xb8, 0xbc,
+ 0xe7, 0xcb, 0xa9, 0x9c, 0x1b, 0x90, 0x88, 0x77, 0xb9, 0x06, 0x24, 0x37, 0x20, 0x11, 0xe2, 0xd4,
+ 0xe2, 0xaf, 0x0d, 0x70, 0xbe, 0x35, 0x3f, 0x33, 0x40, 0x12, 0xbb, 0x6d, 0x0f, 0x38, 0x8c, 0x87,
+ 0x38, 0x47, 0xff, 0x6e, 0x20, 0xf7, 0xe0, 0xef, 0x06, 0xe0, 0xcb, 0x60, 0x52, 0xfe, 0x5c, 0x3d,
+ 0x0c, 0x09, 0xa6, 0xfc, 0x65, 0xb2, 0xaf, 0xf5, 0x7b, 0xbf, 0x8d, 0xac, 0x00, 0x6a, 0x1f, 0x53,
+ 0xfc, 0x93, 0x01, 0x2e, 0x24, 0xdf, 0xe7, 0xb8, 0x0e, 0xf6, 0xa3, 0xe5, 0xc0, 0xdf, 0x75, 0x6a,
+ 0xf0, 0x92, 0xe8, 0x48, 0x6a, 0x6d, 0xbe, 0xa4, 0x1b, 0x09, 0xef, 0x83, 0x21, 0x2a, 0xdc, 0x2f,
+ 0x23, 0xe3, 0xd5, 0x93, 0x47, 0x46, 0x76, 0x1d, 0x45, 0x41, 0x95, 0x50, 0x13, 0x1c, 0x16, 0x1c,
+ 0x55, 0xab, 0x1c, 0xfb, 0xb6, 0xec, 0x4a, 0x8f, 0x8a, 0xe0, 0x58, 0x5e, 0x12, 0x34, 0xa4, 0xb8,
+ 0xc5, 0x7f, 0x18, 0x60, 0xb2, 0xed, 0x7b, 0x23, 0xf8, 0x3d, 0x03, 0x8c, 0x56, 0xb5, 0xe9, 0xc9,
+ 0x2d, 0xb6, 0x71, 0xfa, 0x6f, 0x9a, 0x34, 0xa5, 0xa2, 0x2a, 0xd1, 0x29, 0xa8, 0x05, 0x14, 0x6e,
+ 0x03, 0xb3, 0x9a, 0xf9, 0xb4, 0x2f, 0xf3, 0x58, 0x78, 0xb9, 0xd9, 0x28, 0x98, 0xcb, 0x5d, 0x64,
+ 0x50, 0xd7, 0xd1, 0xe5, 0x6f, 0x7d, 0xfc, 0xd9, 0xec, 0xb9, 0x4f, 0x3e, 0x9b, 0x3d, 0xf7, 0xe9,
+ 0x67, 0xb3, 0xe7, 0xde, 0x6d, 0xce, 0x1a, 0x1f, 0x37, 0x67, 0x8d, 0x4f, 0x9a, 0xb3, 0xc6, 0xa7,
+ 0xcd, 0x59, 0xe3, 0xaf, 0xcd, 0x59, 0xe3, 0x27, 0x7f, 0x9b, 0x3d, 0xf7, 0xc6, 0x8d, 0x93, 0x7e,
+ 0xd0, 0xfb, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0x66, 0xfd, 0x82, 0x24, 0x2c, 0x00, 0x00,
}
func (m *ConversionRequest) Marshal() (dAtA []byte, err error) {
@@ -2629,6 +2630,11 @@ func (m *ValidationRule) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ i -= len(m.MessageExpression)
+ copy(dAtA[i:], m.MessageExpression)
+ i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression)))
+ i--
+ dAtA[i] = 0x1a
i -= len(m.Message)
copy(dAtA[i:], m.Message)
i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message)))
@@ -3338,6 +3344,8 @@ func (m *ValidationRule) Size() (n int) {
n += 1 + l + sovGenerated(uint64(l))
l = len(m.Message)
n += 1 + l + sovGenerated(uint64(l))
+ l = len(m.MessageExpression)
+ n += 1 + l + sovGenerated(uint64(l))
return n
}
@@ -3813,6 +3821,7 @@ func (this *ValidationRule) String() string {
s := strings.Join([]string{`&ValidationRule{`,
`Rule:` + fmt.Sprintf("%v", this.Rule) + `,`,
`Message:` + fmt.Sprintf("%v", this.Message) + `,`,
+ `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`,
`}`,
}, "")
return s
@@ -8879,6 +8888,38 @@ func (m *ValidationRule) Unmarshal(dAtA []byte) error {
}
m.Message = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field MessageExpression", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthGenerated
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.MessageExpression = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto
index d0b190fd5..4632a83e5 100644
--- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto
@@ -107,12 +107,12 @@ message CustomResourceColumnDefinition {
// CustomResourceConversion describes how to convert different versions of a CR.
message CustomResourceConversion {
// strategy specifies how custom resources are converted between versions. Allowed values are:
- // - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource.
- // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information
+ // - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource.
+ // - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information
// is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
optional string strategy = 1;
- // webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.
+ // webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`.
// +optional
optional WebhookConversion webhook = 2;
}
@@ -665,6 +665,19 @@ message ValidationRule {
// If unset, the message is "failed rule: {Rule}".
// e.g. "must be a URL with the host matching spec.host"
optional string message = 2;
+
+ // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
+ // Since messageExpression is used as a failure message, it must evaluate to a string.
+ // If both message and messageExpression are present on a rule, then messageExpression will be used if validation
+ // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced
+ // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string
+ // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and
+ // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.
+ // messageExpression has access to all the same variables as the rule; the only difference is the return type.
+ // Example:
+ // "x must be less than max ("+string(self.max)+")"
+ // +optional
+ optional string messageExpression = 3;
}
// WebhookClientConfig contains the information to make a TLS connection with the webhook.
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go
index 285058d77..59ec0e372 100644
--- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go
@@ -74,12 +74,12 @@ type CustomResourceDefinitionSpec struct {
// CustomResourceConversion describes how to convert different versions of a CR.
type CustomResourceConversion struct {
// strategy specifies how custom resources are converted between versions. Allowed values are:
- // - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource.
- // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information
+ // - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource.
+ // - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information
// is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"`
- // webhook describes how to call the conversion webhook. Required when `strategy` is set to `Webhook`.
+ // webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`.
// +optional
Webhook *WebhookConversion `json:"webhook,omitempty" protobuf:"bytes,2,opt,name=webhook"`
}
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go
index 277fd7a12..b348d0d19 100644
--- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go
@@ -235,12 +235,24 @@ type ValidationRule struct {
// If unset, the message is "failed rule: {Rule}".
// e.g. "must be a URL with the host matching spec.host"
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
+ // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
+ // Since messageExpression is used as a failure message, it must evaluate to a string.
+ // If both message and messageExpression are present on a rule, then messageExpression will be used if validation
+ // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced
+ // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string
+ // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and
+ // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged.
+ // messageExpression has access to all the same variables as the rule; the only difference is the return type.
+ // Example:
+ // "x must be less than max ("+string(self.max)+")"
+ // +optional
+ MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,3,opt,name=messageExpression"`
}
// JSON represents any valid JSON value.
// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil.
type JSON struct {
- Raw []byte `protobuf:"bytes,1,opt,name=raw"`
+ Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"`
}
// OpenAPISchemaType is used by the kube-openapi generator when constructing
diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go
index 95a58529b..cde5275ce 100644
--- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go
+++ b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go
@@ -1258,6 +1258,7 @@ func Convert_apiextensions_ServiceReference_To_v1_ServiceReference(in *apiextens
func autoConvert_v1_ValidationRule_To_apiextensions_ValidationRule(in *ValidationRule, out *apiextensions.ValidationRule, s conversion.Scope) error {
out.Rule = in.Rule
out.Message = in.Message
+ out.MessageExpression = in.MessageExpression
return nil
}
@@ -1269,6 +1270,7 @@ func Convert_v1_ValidationRule_To_apiextensions_ValidationRule(in *ValidationRul
func autoConvert_apiextensions_ValidationRule_To_v1_ValidationRule(in *apiextensions.ValidationRule, out *ValidationRule, s conversion.Scope) error {
out.Rule = in.Rule
out.Message = in.Message
+ out.MessageExpression = in.MessageExpression
return nil
}
diff --git a/vendor/k8s.io/apimachinery/pkg/api/meta/help.go b/vendor/k8s.io/apimachinery/pkg/api/meta/help.go
index 899d3e8a6..1bf6b06d4 100644
--- a/vendor/k8s.io/apimachinery/pkg/api/meta/help.go
+++ b/vendor/k8s.io/apimachinery/pkg/api/meta/help.go
@@ -40,8 +40,7 @@ var (
// IsListType returns true if the provided Object has a slice called Items.
// TODO: Replace the code in this check with an interface comparison by
-//
-// creating and enforcing that lists implement a list accessor.
+// creating and enforcing that lists implement a list accessor.
func IsListType(obj runtime.Object) bool {
switch t := obj.(type) {
case runtime.Unstructured:
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/defaults.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/defaults.go
new file mode 100644
index 000000000..29c6a48b6
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/defaults.go
@@ -0,0 +1,38 @@
+/*
+Copyright 2023 The Kubernetes 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 internalversion
+
+import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+// SetListOptionsDefaults sets defaults on the provided ListOptions if applicable.
+//
+// TODO(#115478): once the watch-list fg is always on we register this function in the scheme (via AddTypeDefaultingFunc).
+// TODO(#115478): when the function is registered in the scheme remove all callers of this method.
+func SetListOptionsDefaults(obj *ListOptions, isWatchListFeatureEnabled bool) {
+ if !isWatchListFeatureEnabled {
+ return
+ }
+ if obj.SendInitialEvents != nil || len(obj.ResourceVersionMatch) != 0 {
+ return
+ }
+ legacy := obj.ResourceVersion == "" || obj.ResourceVersion == "0"
+ if obj.Watch && legacy {
+ turnOnInitialEvents := true
+ obj.SendInitialEvents = &turnOnInitialEvents
+ obj.ResourceVersionMatch = metav1.ResourceVersionMatchNotOlderThan
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go
index a49b5f2be..00d2b8c68 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/types.go
@@ -66,6 +66,31 @@ type ListOptions struct {
// it does not recognize and will return a 410 error if the token can no longer be used because
// it has expired.
Continue string
+
+ // `sendInitialEvents=true` may be set together with `watch=true`.
+ // In that case, the watch stream will begin with synthetic events to
+ // produce the current state of objects in the collection. Once all such
+ // events have been sent, a synthetic "Bookmark" event will be sent.
+ // The bookmark will report the ResourceVersion (RV) corresponding to the
+ // set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation.
+ // Afterwards, the watch stream will proceed as usual, sending watch events
+ // corresponding to changes (subsequent to the RV) to objects watched.
+ //
+ // When `sendInitialEvents` option is set, we require `resourceVersionMatch`
+ // option to also be set. The semantic of the watch request is as following:
+ // - `resourceVersionMatch` = NotOlderThan
+ // is interpreted as "data at least as new as the provided `resourceVersion`"
+ // and the bookmark event is send when the state is synced
+ // to a `resourceVersion` at least as fresh as the one provided by the ListOptions.
+ // If `resourceVersion` is unset, this is interpreted as "consistent read" and the
+ // bookmark event is send when the state is synced at least to the moment
+ // when request started being processed.
+ // - `resourceVersionMatch` set to any other value or unset
+ // Invalid error is returned.
+ //
+ // Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward
+ // compatibility reasons) and to false otherwise.
+ SendInitialEvents *bool
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go
index 6d212b846..a6552c276 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.conversion.go
@@ -115,6 +115,7 @@ func autoConvert_internalversion_ListOptions_To_v1_ListOptions(in *ListOptions,
out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
out.Limit = in.Limit
out.Continue = in.Continue
+ out.SendInitialEvents = (*bool)(unsafe.Pointer(in.SendInitialEvents))
return nil
}
@@ -137,6 +138,7 @@ func autoConvert_v1_ListOptions_To_internalversion_ListOptions(in *v1.ListOption
out.TimeoutSeconds = (*int64)(unsafe.Pointer(in.TimeoutSeconds))
out.Limit = in.Limit
out.Continue = in.Continue
+ out.SendInitialEvents = (*bool)(unsafe.Pointer(in.SendInitialEvents))
return nil
}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go
index 6e1eac5c7..af66a2ac4 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/internalversion/zz_generated.deepcopy.go
@@ -75,6 +75,11 @@ func (in *ListOptions) DeepCopyInto(out *ListOptions) {
*out = new(int64)
**out = **in
}
+ if in.SendInitialEvents != nil {
+ in, out := &in.SendInitialEvents, &out.SendInitialEvents
+ *out = new(bool)
+ **out = **in
+ }
return
}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go
index 7e00eb7d9..1a641e7c1 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.pb.go
@@ -1326,185 +1326,187 @@ func init() {
}
var fileDescriptor_cf52fa777ced5367 = []byte{
- // 2842 bytes of a gzipped FileDescriptorProto
+ // 2867 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x1a, 0x4b, 0x6f, 0x24, 0x47,
0xd9, 0x3d, 0x0f, 0x7b, 0xe6, 0x9b, 0x19, 0x3f, 0x6a, 0xbd, 0x30, 0x6b, 0x84, 0xc7, 0xe9, 0x44,
0xd1, 0x06, 0x92, 0x71, 0x76, 0x09, 0xd1, 0x66, 0x43, 0x02, 0x1e, 0xcf, 0x7a, 0xe3, 0x64, 0x1d,
0x5b, 0xe5, 0xdd, 0x05, 0x42, 0x84, 0xd2, 0x9e, 0x2e, 0x8f, 0x1b, 0xf7, 0x74, 0x4f, 0xaa, 0x7a,
0xbc, 0x19, 0x38, 0x90, 0x03, 0x08, 0x90, 0x50, 0x14, 0x6e, 0x9c, 0x50, 0x22, 0xf8, 0x01, 0x88,
- 0x0b, 0xdc, 0x41, 0x22, 0xc7, 0x20, 0x2e, 0x91, 0x40, 0xa3, 0xc4, 0x1c, 0x38, 0x22, 0xae, 0xbe,
- 0x80, 0xea, 0xd1, 0xdd, 0xd5, 0xf3, 0x58, 0xf7, 0x64, 0x97, 0x88, 0xdb, 0xf4, 0xf7, 0xae, 0xaa,
- 0xaf, 0xbe, 0x47, 0x7d, 0x03, 0x3b, 0xc7, 0xd7, 0x58, 0xdd, 0xf1, 0xd7, 0x8f, 0x7b, 0x07, 0x84,
- 0x7a, 0x24, 0x20, 0x6c, 0xfd, 0x84, 0x78, 0xb6, 0x4f, 0xd7, 0x15, 0xc2, 0xea, 0x3a, 0x1d, 0xab,
- 0x75, 0xe4, 0x78, 0x84, 0xf6, 0xd7, 0xbb, 0xc7, 0x6d, 0x0e, 0x60, 0xeb, 0x1d, 0x12, 0x58, 0xeb,
- 0x27, 0x57, 0xd6, 0xdb, 0xc4, 0x23, 0xd4, 0x0a, 0x88, 0x5d, 0xef, 0x52, 0x3f, 0xf0, 0xd1, 0x63,
- 0x92, 0xab, 0xae, 0x73, 0xd5, 0xbb, 0xc7, 0x6d, 0x0e, 0x60, 0x75, 0xce, 0x55, 0x3f, 0xb9, 0xb2,
- 0xf2, 0x54, 0xdb, 0x09, 0x8e, 0x7a, 0x07, 0xf5, 0x96, 0xdf, 0x59, 0x6f, 0xfb, 0x6d, 0x7f, 0x5d,
- 0x30, 0x1f, 0xf4, 0x0e, 0xc5, 0x97, 0xf8, 0x10, 0xbf, 0xa4, 0xd0, 0x95, 0x89, 0xa6, 0xd0, 0x9e,
- 0x17, 0x38, 0x1d, 0x32, 0x6c, 0xc5, 0xca, 0xb3, 0xe7, 0x31, 0xb0, 0xd6, 0x11, 0xe9, 0x58, 0xc3,
- 0x7c, 0xe6, 0x9f, 0xb3, 0x50, 0xd8, 0xd8, 0xdb, 0xbe, 0x49, 0xfd, 0x5e, 0x17, 0xad, 0x41, 0xce,
- 0xb3, 0x3a, 0xa4, 0x6a, 0xac, 0x19, 0x97, 0x8b, 0x8d, 0xf2, 0x07, 0x83, 0xda, 0xcc, 0xe9, 0xa0,
- 0x96, 0x7b, 0xd5, 0xea, 0x10, 0x2c, 0x30, 0xc8, 0x85, 0xc2, 0x09, 0xa1, 0xcc, 0xf1, 0x3d, 0x56,
- 0xcd, 0xac, 0x65, 0x2f, 0x97, 0xae, 0xbe, 0x58, 0x4f, 0xb3, 0xfe, 0xba, 0x50, 0x70, 0x57, 0xb2,
- 0x6e, 0xf9, 0xb4, 0xe9, 0xb0, 0x96, 0x7f, 0x42, 0x68, 0xbf, 0xb1, 0xa8, 0xb4, 0x14, 0x14, 0x92,
- 0xe1, 0x48, 0x03, 0xfa, 0x91, 0x01, 0x8b, 0x5d, 0x4a, 0x0e, 0x09, 0xa5, 0xc4, 0x56, 0xf8, 0x6a,
- 0x76, 0xcd, 0x78, 0x08, 0x6a, 0xab, 0x4a, 0xed, 0xe2, 0xde, 0x90, 0x7c, 0x3c, 0xa2, 0x11, 0xfd,
- 0xda, 0x80, 0x15, 0x46, 0xe8, 0x09, 0xa1, 0x1b, 0xb6, 0x4d, 0x09, 0x63, 0x8d, 0xfe, 0xa6, 0xeb,
- 0x10, 0x2f, 0xd8, 0xdc, 0x6e, 0x62, 0x56, 0xcd, 0x89, 0x7d, 0xf8, 0x7a, 0x3a, 0x83, 0xf6, 0x27,
- 0xc9, 0x69, 0x98, 0xca, 0xa2, 0x95, 0x89, 0x24, 0x0c, 0xdf, 0xc7, 0x0c, 0xf3, 0x10, 0xca, 0xe1,
- 0x41, 0xde, 0x72, 0x58, 0x80, 0xee, 0xc2, 0x6c, 0x9b, 0x7f, 0xb0, 0xaa, 0x21, 0x0c, 0xac, 0xa7,
- 0x33, 0x30, 0x94, 0xd1, 0x98, 0x57, 0xf6, 0xcc, 0x8a, 0x4f, 0x86, 0x95, 0x34, 0xf3, 0x67, 0x39,
- 0x28, 0x6d, 0xec, 0x6d, 0x63, 0xc2, 0xfc, 0x1e, 0x6d, 0x91, 0x14, 0x4e, 0x73, 0x0d, 0xca, 0xcc,
- 0xf1, 0xda, 0x3d, 0xd7, 0xa2, 0x1c, 0x5a, 0x9d, 0x15, 0x94, 0xcb, 0x8a, 0xb2, 0xbc, 0xaf, 0xe1,
- 0x70, 0x82, 0x12, 0x5d, 0x05, 0xe0, 0x12, 0x58, 0xd7, 0x6a, 0x11, 0xbb, 0x9a, 0x59, 0x33, 0x2e,
- 0x17, 0x1a, 0x48, 0xf1, 0xc1, 0xab, 0x11, 0x06, 0x6b, 0x54, 0xe8, 0x51, 0xc8, 0x0b, 0x4b, 0xab,
- 0x05, 0xa1, 0xa6, 0xa2, 0xc8, 0xf3, 0x62, 0x19, 0x58, 0xe2, 0xd0, 0x13, 0x30, 0xa7, 0xbc, 0xac,
- 0x5a, 0x14, 0x64, 0x0b, 0x8a, 0x6c, 0x2e, 0x74, 0x83, 0x10, 0xcf, 0xd7, 0x77, 0xec, 0x78, 0xb6,
- 0xf0, 0x3b, 0x6d, 0x7d, 0xaf, 0x38, 0x9e, 0x8d, 0x05, 0x06, 0xdd, 0x82, 0xfc, 0x09, 0xa1, 0x07,
- 0xdc, 0x13, 0xb8, 0x6b, 0x7e, 0x39, 0xdd, 0x46, 0xdf, 0xe5, 0x2c, 0x8d, 0x22, 0x37, 0x4d, 0xfc,
- 0xc4, 0x52, 0x08, 0xaa, 0x03, 0xb0, 0x23, 0x9f, 0x06, 0x62, 0x79, 0xd5, 0xfc, 0x5a, 0xf6, 0x72,
- 0xb1, 0x31, 0xcf, 0xd7, 0xbb, 0x1f, 0x41, 0xb1, 0x46, 0xc1, 0xe9, 0x5b, 0x56, 0x40, 0xda, 0x3e,
- 0x75, 0x08, 0xab, 0xce, 0xc5, 0xf4, 0x9b, 0x11, 0x14, 0x6b, 0x14, 0xe8, 0x65, 0x40, 0x2c, 0xf0,
- 0xa9, 0xd5, 0x26, 0x6a, 0xa9, 0x2f, 0x59, 0xec, 0xa8, 0x0a, 0x62, 0x75, 0x2b, 0x6a, 0x75, 0x68,
- 0x7f, 0x84, 0x02, 0x8f, 0xe1, 0x32, 0x7f, 0x67, 0xc0, 0x82, 0xe6, 0x0b, 0xc2, 0xef, 0xae, 0x41,
- 0xb9, 0xad, 0xdd, 0x3a, 0xe5, 0x17, 0xd1, 0x69, 0xeb, 0x37, 0x12, 0x27, 0x28, 0x11, 0x81, 0x22,
- 0x55, 0x92, 0xc2, 0xe8, 0x72, 0x25, 0xb5, 0xd3, 0x86, 0x36, 0xc4, 0x9a, 0x34, 0x20, 0xc3, 0xb1,
- 0x64, 0xf3, 0x9f, 0x86, 0x70, 0xe0, 0x30, 0xde, 0xa0, 0xcb, 0x5a, 0x4c, 0x33, 0xc4, 0xf6, 0x95,
- 0x27, 0xc4, 0xa3, 0x73, 0x02, 0x41, 0xe6, 0xff, 0x22, 0x10, 0x5c, 0x2f, 0xfc, 0xf2, 0xbd, 0xda,
- 0xcc, 0xdb, 0x7f, 0x5f, 0x9b, 0x31, 0x7f, 0x61, 0x40, 0x79, 0xa3, 0xdb, 0x75, 0xfb, 0xbb, 0xdd,
- 0x40, 0x2c, 0xc0, 0x84, 0x59, 0x9b, 0xf6, 0x71, 0xcf, 0x53, 0x0b, 0x05, 0x7e, 0xbf, 0x9b, 0x02,
- 0x82, 0x15, 0x86, 0xdf, 0x9f, 0x43, 0x9f, 0xb6, 0x88, 0xba, 0x6e, 0xd1, 0xfd, 0xd9, 0xe2, 0x40,
- 0x2c, 0x71, 0xfc, 0x90, 0x0f, 0x1d, 0xe2, 0xda, 0x3b, 0x96, 0x67, 0xb5, 0x09, 0x55, 0x97, 0x23,
- 0xda, 0xfa, 0x2d, 0x0d, 0x87, 0x13, 0x94, 0xe6, 0x7f, 0x32, 0x50, 0xdc, 0xf4, 0x3d, 0xdb, 0x09,
- 0xd4, 0xe5, 0x0a, 0xfa, 0xdd, 0x91, 0xe0, 0x71, 0xbb, 0xdf, 0x25, 0x58, 0x60, 0xd0, 0x73, 0x30,
- 0xcb, 0x02, 0x2b, 0xe8, 0x31, 0x61, 0x4f, 0xb1, 0xf1, 0x48, 0x18, 0x96, 0xf6, 0x05, 0xf4, 0x6c,
- 0x50, 0x5b, 0x88, 0xc4, 0x49, 0x10, 0x56, 0x0c, 0xdc, 0xd3, 0xfd, 0x03, 0xb1, 0x51, 0xf6, 0x4d,
- 0x99, 0xf6, 0xc2, 0xfc, 0x91, 0x8d, 0x3d, 0x7d, 0x77, 0x84, 0x02, 0x8f, 0xe1, 0x42, 0x27, 0x80,
- 0x5c, 0x8b, 0x05, 0xb7, 0xa9, 0xe5, 0x31, 0xa1, 0xeb, 0xb6, 0xd3, 0x21, 0xea, 0xc2, 0x7f, 0x29,
- 0xdd, 0x89, 0x73, 0x8e, 0x58, 0xef, 0xad, 0x11, 0x69, 0x78, 0x8c, 0x06, 0xf4, 0x38, 0xcc, 0x52,
- 0x62, 0x31, 0xdf, 0xab, 0xe6, 0xc5, 0xf2, 0xa3, 0xa8, 0x8c, 0x05, 0x14, 0x2b, 0x2c, 0x0f, 0x68,
- 0x1d, 0xc2, 0x98, 0xd5, 0x0e, 0xc3, 0x6b, 0x14, 0xd0, 0x76, 0x24, 0x18, 0x87, 0x78, 0xf3, 0xb7,
- 0x06, 0x54, 0x36, 0x29, 0xb1, 0x02, 0x32, 0x8d, 0x5b, 0x7c, 0xea, 0x13, 0x47, 0x1b, 0xb0, 0x20,
- 0xbe, 0xef, 0x5a, 0xae, 0x63, 0xcb, 0x33, 0xc8, 0x09, 0xe6, 0xcf, 0x2b, 0xe6, 0x85, 0xad, 0x24,
- 0x1a, 0x0f, 0xd3, 0x9b, 0x3f, 0xc9, 0x42, 0xa5, 0x49, 0x5c, 0x12, 0x9b, 0xbc, 0x05, 0xa8, 0x4d,
- 0xad, 0x16, 0xd9, 0x23, 0xd4, 0xf1, 0xed, 0x7d, 0xd2, 0xf2, 0x3d, 0x9b, 0x09, 0x37, 0xca, 0x36,
- 0x3e, 0xc7, 0xf7, 0xf7, 0xe6, 0x08, 0x16, 0x8f, 0xe1, 0x40, 0x2e, 0x54, 0xba, 0x54, 0xfc, 0x16,
- 0x7b, 0x2e, 0xbd, 0xac, 0x74, 0xf5, 0x2b, 0xe9, 0x8e, 0x74, 0x4f, 0x67, 0x6d, 0x2c, 0x9d, 0x0e,
- 0x6a, 0x95, 0x04, 0x08, 0x27, 0x85, 0xa3, 0x6f, 0xc0, 0xa2, 0x4f, 0xbb, 0x47, 0x96, 0xd7, 0x24,
- 0x5d, 0xe2, 0xd9, 0xc4, 0x0b, 0x98, 0xd8, 0xc8, 0x42, 0x63, 0x99, 0xd7, 0x22, 0xbb, 0x43, 0x38,
- 0x3c, 0x42, 0x8d, 0x5e, 0x83, 0xa5, 0x2e, 0xf5, 0xbb, 0x56, 0x5b, 0x6c, 0xcc, 0x9e, 0xef, 0x3a,
- 0xad, 0xbe, 0xda, 0xce, 0x27, 0x4f, 0x07, 0xb5, 0xa5, 0xbd, 0x61, 0xe4, 0xd9, 0xa0, 0x76, 0x41,
- 0x6c, 0x1d, 0x87, 0xc4, 0x48, 0x3c, 0x2a, 0x46, 0x73, 0x83, 0xfc, 0x24, 0x37, 0x30, 0xb7, 0xa1,
- 0xd0, 0xec, 0xa9, 0x3b, 0xf1, 0x02, 0x14, 0x6c, 0xf5, 0x5b, 0xed, 0x7c, 0x78, 0x39, 0x23, 0x9a,
- 0xb3, 0x41, 0xad, 0xc2, 0xcb, 0xcf, 0x7a, 0x08, 0xc0, 0x11, 0x8b, 0xf9, 0x38, 0x14, 0xc4, 0xc1,
- 0xb3, 0xbb, 0x57, 0xd0, 0x22, 0x64, 0xb1, 0x75, 0x4f, 0x48, 0x29, 0x63, 0xfe, 0x53, 0x8b, 0x62,
- 0xbb, 0x00, 0x37, 0x49, 0x10, 0x1e, 0xfc, 0x06, 0x2c, 0x84, 0xa1, 0x3c, 0x99, 0x61, 0x22, 0x6f,
- 0xc2, 0x49, 0x34, 0x1e, 0xa6, 0x37, 0x5f, 0x87, 0xa2, 0xc8, 0x42, 0x3c, 0x85, 0xc7, 0xe5, 0x82,
- 0x71, 0x9f, 0x72, 0x21, 0xac, 0x01, 0x32, 0x93, 0x6a, 0x00, 0xcd, 0x5c, 0x17, 0x2a, 0x92, 0x37,
- 0x2c, 0x90, 0x52, 0x69, 0x78, 0x12, 0x0a, 0xa1, 0x99, 0x4a, 0x4b, 0x54, 0x18, 0x87, 0x82, 0x70,
- 0x44, 0xa1, 0x69, 0x3b, 0x82, 0x44, 0x46, 0x4d, 0xa7, 0x4c, 0xab, 0x7e, 0x32, 0xf7, 0xaf, 0x7e,
- 0x34, 0x4d, 0x3f, 0x84, 0xea, 0xa4, 0x6a, 0xfa, 0x01, 0x72, 0x7e, 0x7a, 0x53, 0xcc, 0x77, 0x0c,
- 0x58, 0xd4, 0x25, 0xa5, 0x3f, 0xbe, 0xf4, 0x4a, 0xce, 0xaf, 0xf6, 0xb4, 0x1d, 0xf9, 0x95, 0x01,
- 0xcb, 0x89, 0xa5, 0x4d, 0x75, 0xe2, 0x53, 0x18, 0xa5, 0x3b, 0x47, 0x76, 0x0a, 0xe7, 0xf8, 0x6b,
- 0x06, 0x2a, 0xb7, 0xac, 0x03, 0xe2, 0xee, 0x13, 0x97, 0xb4, 0x02, 0x9f, 0xa2, 0x1f, 0x40, 0xa9,
- 0x63, 0x05, 0xad, 0x23, 0x01, 0x0d, 0x3b, 0x83, 0x66, 0xba, 0x60, 0x97, 0x90, 0x54, 0xdf, 0x89,
- 0xc5, 0xdc, 0xf0, 0x02, 0xda, 0x6f, 0x5c, 0x50, 0x26, 0x95, 0x34, 0x0c, 0xd6, 0xb5, 0x89, 0x76,
- 0x4e, 0x7c, 0xdf, 0x78, 0xab, 0xcb, 0xcb, 0x96, 0xe9, 0xbb, 0xc8, 0x84, 0x09, 0x98, 0xbc, 0xd9,
- 0x73, 0x28, 0xe9, 0x10, 0x2f, 0x88, 0xdb, 0xb9, 0x9d, 0x21, 0xf9, 0x78, 0x44, 0xe3, 0xca, 0x8b,
- 0xb0, 0x38, 0x6c, 0x3c, 0x8f, 0x3f, 0xc7, 0xa4, 0x2f, 0xcf, 0x0b, 0xf3, 0x9f, 0x68, 0x19, 0xf2,
- 0x27, 0x96, 0xdb, 0x53, 0xb7, 0x11, 0xcb, 0x8f, 0xeb, 0x99, 0x6b, 0x86, 0xf9, 0x1b, 0x03, 0xaa,
- 0x93, 0x0c, 0x41, 0x5f, 0xd4, 0x04, 0x35, 0x4a, 0xca, 0xaa, 0xec, 0x2b, 0xa4, 0x2f, 0xa5, 0xde,
- 0x80, 0x82, 0xdf, 0xe5, 0x35, 0x85, 0x4f, 0xd5, 0xa9, 0x3f, 0x11, 0x9e, 0xe4, 0xae, 0x82, 0x9f,
- 0x0d, 0x6a, 0x17, 0x13, 0xe2, 0x43, 0x04, 0x8e, 0x58, 0x79, 0xa4, 0x16, 0xf6, 0xf0, 0xec, 0x11,
- 0x45, 0xea, 0xbb, 0x02, 0x82, 0x15, 0xc6, 0xfc, 0x83, 0x01, 0x39, 0x51, 0x90, 0xbf, 0x0e, 0x05,
- 0xbe, 0x7f, 0xb6, 0x15, 0x58, 0xc2, 0xae, 0xd4, 0xad, 0x20, 0xe7, 0xde, 0x21, 0x81, 0x15, 0x7b,
- 0x5b, 0x08, 0xc1, 0x91, 0x44, 0x84, 0x21, 0xef, 0x04, 0xa4, 0x13, 0x1e, 0xe4, 0x53, 0x13, 0x45,
- 0xab, 0x87, 0x88, 0x3a, 0xb6, 0xee, 0xdd, 0x78, 0x2b, 0x20, 0x1e, 0x3f, 0x8c, 0xf8, 0x6a, 0x6c,
- 0x73, 0x19, 0x58, 0x8a, 0x32, 0xff, 0x6d, 0x40, 0xa4, 0x8a, 0x3b, 0x3f, 0x23, 0xee, 0xe1, 0x2d,
- 0xc7, 0x3b, 0x56, 0xdb, 0x1a, 0x99, 0xb3, 0xaf, 0xe0, 0x38, 0xa2, 0x18, 0x97, 0x1e, 0x32, 0xd3,
- 0xa5, 0x07, 0xae, 0xb0, 0xe5, 0x7b, 0x81, 0xe3, 0xf5, 0x46, 0x6e, 0xdb, 0xa6, 0x82, 0xe3, 0x88,
- 0x82, 0x17, 0x22, 0x94, 0x74, 0x2c, 0xc7, 0x73, 0xbc, 0x36, 0x5f, 0xc4, 0xa6, 0xdf, 0xf3, 0x02,
- 0x91, 0x91, 0x55, 0x21, 0x82, 0x47, 0xb0, 0x78, 0x0c, 0x87, 0xf9, 0xfb, 0x1c, 0x94, 0xf8, 0x9a,
- 0xc3, 0x3c, 0xf7, 0x3c, 0x54, 0x5c, 0xdd, 0x0b, 0xd4, 0xda, 0x2f, 0x2a, 0x53, 0x92, 0xf7, 0x1a,
- 0x27, 0x69, 0x39, 0xb3, 0x28, 0xa1, 0x22, 0xe6, 0x4c, 0x92, 0x79, 0x4b, 0x47, 0xe2, 0x24, 0x2d,
- 0x8f, 0x5e, 0xf7, 0xf8, 0xfd, 0x50, 0x95, 0x49, 0x74, 0x44, 0xdf, 0xe4, 0x40, 0x2c, 0x71, 0x68,
- 0x07, 0x2e, 0x58, 0xae, 0xeb, 0xdf, 0x13, 0xc0, 0x86, 0xef, 0x1f, 0x77, 0x2c, 0x7a, 0xcc, 0x44,
- 0x33, 0x5d, 0x68, 0x7c, 0x41, 0xb1, 0x5c, 0xd8, 0x18, 0x25, 0xc1, 0xe3, 0xf8, 0xc6, 0x1d, 0x5b,
- 0x6e, 0xca, 0x63, 0x3b, 0x82, 0xe5, 0x21, 0x90, 0xb8, 0xe5, 0xaa, 0xb3, 0x7d, 0x46, 0xc9, 0x59,
- 0xc6, 0x63, 0x68, 0xce, 0x26, 0xc0, 0xf1, 0x58, 0x89, 0xe8, 0x3a, 0xcc, 0x73, 0x4f, 0xf6, 0x7b,
- 0x41, 0x58, 0x77, 0xe6, 0xc5, 0x71, 0xa3, 0xd3, 0x41, 0x6d, 0xfe, 0x76, 0x02, 0x83, 0x87, 0x28,
- 0xf9, 0xe6, 0xba, 0x4e, 0xc7, 0x09, 0xaa, 0x73, 0x82, 0x25, 0xda, 0xdc, 0x5b, 0x1c, 0x88, 0x25,
- 0x2e, 0xe1, 0x81, 0x85, 0xf3, 0x3c, 0xd0, 0xfc, 0x4b, 0x16, 0x90, 0xac, 0xb5, 0x6d, 0x59, 0x4f,
- 0xc9, 0x90, 0xc6, 0x3b, 0x02, 0x55, 0xab, 0x1b, 0x43, 0x1d, 0x81, 0x2a, 0xd3, 0x43, 0x3c, 0xda,
- 0x81, 0xa2, 0x0c, 0x2d, 0xf1, 0x75, 0x59, 0x57, 0xc4, 0xc5, 0xdd, 0x10, 0x71, 0x36, 0xa8, 0xad,
- 0x24, 0xd4, 0x44, 0x18, 0xd1, 0xad, 0xc5, 0x12, 0xd0, 0x55, 0x00, 0xab, 0xeb, 0xe8, 0xef, 0x75,
- 0xc5, 0xf8, 0xd5, 0x26, 0xee, 0xbc, 0xb1, 0x46, 0x85, 0x5e, 0x82, 0x5c, 0xf0, 0xe9, 0x3a, 0xaa,
- 0x82, 0x68, 0x18, 0x79, 0xff, 0x24, 0x24, 0x70, 0xed, 0xc2, 0x9f, 0x19, 0x37, 0x4b, 0x35, 0x43,
- 0x91, 0xf6, 0xad, 0x08, 0x83, 0x35, 0x2a, 0xf4, 0x2d, 0x28, 0x1c, 0xaa, 0x52, 0x54, 0x1c, 0x4c,
- 0xea, 0x10, 0x19, 0x16, 0xb0, 0xf2, 0xc9, 0x20, 0xfc, 0xc2, 0x91, 0x34, 0xf4, 0x55, 0x28, 0xb1,
- 0xde, 0x41, 0x94, 0xbd, 0xe5, 0x69, 0x46, 0xa9, 0x72, 0x3f, 0x46, 0x61, 0x9d, 0xce, 0x7c, 0x13,
- 0x8a, 0x3b, 0x4e, 0x8b, 0xfa, 0xa2, 0x07, 0x7c, 0x02, 0xe6, 0x58, 0xa2, 0xc1, 0x89, 0x4e, 0x32,
- 0xf4, 0xb2, 0x10, 0xcf, 0xdd, 0xcb, 0xb3, 0x3c, 0x5f, 0xb6, 0x31, 0xf9, 0xd8, 0xbd, 0x5e, 0xe5,
- 0x40, 0x2c, 0x71, 0xd7, 0x97, 0x79, 0x81, 0xf0, 0xd3, 0xf7, 0x6b, 0x33, 0xef, 0xbe, 0x5f, 0x9b,
- 0x79, 0xef, 0x7d, 0x55, 0x2c, 0xfc, 0x11, 0x00, 0x76, 0x0f, 0xbe, 0x47, 0x5a, 0x32, 0xec, 0xa6,
- 0x7a, 0xd6, 0x0b, 0x5f, 0x93, 0xc5, 0xb3, 0x5e, 0x66, 0xa8, 0xe8, 0xd3, 0x70, 0x38, 0x41, 0x89,
- 0xd6, 0xa1, 0x18, 0x3d, 0xd8, 0x29, 0xff, 0x58, 0x0a, 0xfd, 0x2d, 0x7a, 0xd5, 0xc3, 0x31, 0x4d,
- 0x22, 0x07, 0xe4, 0xce, 0xcd, 0x01, 0x0d, 0xc8, 0xf6, 0x1c, 0x5b, 0x35, 0xcc, 0x4f, 0x87, 0x39,
- 0xf8, 0xce, 0x76, 0xf3, 0x6c, 0x50, 0x7b, 0x64, 0xd2, 0x3b, 0x79, 0xd0, 0xef, 0x12, 0x56, 0xbf,
- 0xb3, 0xdd, 0xc4, 0x9c, 0x79, 0x5c, 0x40, 0x9a, 0x9d, 0x32, 0x20, 0x5d, 0x05, 0x68, 0xc7, 0xcf,
- 0x0e, 0xf2, 0xbe, 0x47, 0x8e, 0xa8, 0x3d, 0x37, 0x68, 0x54, 0x88, 0xc1, 0x52, 0x8b, 0xb7, 0xe6,
- 0xaa, 0xfd, 0x67, 0x81, 0xd5, 0x91, 0x0f, 0x99, 0xd3, 0xdd, 0x89, 0x4b, 0x4a, 0xcd, 0xd2, 0xe6,
- 0xb0, 0x30, 0x3c, 0x2a, 0x1f, 0xf9, 0xb0, 0x64, 0xab, 0x0e, 0x31, 0x56, 0x5a, 0x9c, 0x5a, 0xe9,
- 0x45, 0xae, 0xb0, 0x39, 0x2c, 0x08, 0x8f, 0xca, 0x46, 0xdf, 0x85, 0x95, 0x10, 0x38, 0xda, 0xa6,
- 0x8b, 0x80, 0x9d, 0x6d, 0xac, 0x9e, 0x0e, 0x6a, 0x2b, 0xcd, 0x89, 0x54, 0xf8, 0x3e, 0x12, 0x90,
- 0x0d, 0xb3, 0xae, 0x2c, 0x70, 0x4b, 0xa2, 0x28, 0xf9, 0x5a, 0xba, 0x55, 0xc4, 0xde, 0x5f, 0xd7,
- 0x0b, 0xdb, 0xe8, 0xc9, 0x45, 0xd5, 0xb4, 0x4a, 0x36, 0x7a, 0x0b, 0x4a, 0x96, 0xe7, 0xf9, 0x81,
- 0x25, 0x1f, 0x0e, 0xca, 0x42, 0xd5, 0xc6, 0xd4, 0xaa, 0x36, 0x62, 0x19, 0x43, 0x85, 0xb4, 0x86,
- 0xc1, 0xba, 0x2a, 0x74, 0x0f, 0x16, 0xfc, 0x7b, 0x1e, 0xa1, 0x98, 0x1c, 0x12, 0x4a, 0xbc, 0x16,
- 0x61, 0xd5, 0x8a, 0xd0, 0xfe, 0x4c, 0x4a, 0xed, 0x09, 0xe6, 0xd8, 0xa5, 0x93, 0x70, 0x86, 0x87,
- 0xb5, 0xa0, 0x3a, 0x8f, 0xad, 0x9e, 0xe5, 0x3a, 0xdf, 0x27, 0x94, 0x55, 0xe7, 0xe3, 0xb7, 0xe6,
- 0xad, 0x08, 0x8a, 0x35, 0x0a, 0xd4, 0x83, 0x4a, 0x47, 0x4f, 0x19, 0xd5, 0x25, 0x61, 0xe6, 0xb5,
- 0x74, 0x66, 0x8e, 0x26, 0xb5, 0xb8, 0x82, 0x49, 0xe0, 0x70, 0x52, 0xcb, 0xca, 0x73, 0x50, 0xfa,
- 0x94, 0xc5, 0x3d, 0x6f, 0x0e, 0x86, 0x0f, 0x64, 0xaa, 0xe6, 0xe0, 0x4f, 0x19, 0x98, 0x4f, 0x6e,
- 0xe3, 0x50, 0x3a, 0xcc, 0xa7, 0x4a, 0x87, 0x61, 0x1b, 0x6a, 0x4c, 0x1c, 0x3a, 0x84, 0xf1, 0x39,
- 0x3b, 0x31, 0x3e, 0xab, 0x30, 0x98, 0x7b, 0x90, 0x30, 0x58, 0x07, 0xe0, 0x75, 0x06, 0xf5, 0x5d,
- 0x97, 0x50, 0x11, 0x01, 0x0b, 0x6a, 0xb8, 0x10, 0x41, 0xb1, 0x46, 0xc1, 0xab, 0xe1, 0x03, 0xd7,
- 0x6f, 0x1d, 0x8b, 0x2d, 0x08, 0x6f, 0xaf, 0x88, 0x7d, 0x05, 0x59, 0x0d, 0x37, 0x46, 0xb0, 0x78,
- 0x0c, 0x87, 0xd9, 0x87, 0x8b, 0x7b, 0x16, 0x0d, 0x1c, 0xcb, 0x8d, 0x6f, 0x8a, 0x68, 0x37, 0xde,
- 0x18, 0x69, 0x66, 0x9e, 0x9e, 0xf6, 0xc6, 0xc5, 0x9b, 0x1f, 0xc3, 0xe2, 0x86, 0xc6, 0xfc, 0x9b,
- 0x01, 0x97, 0xc6, 0xea, 0xfe, 0x0c, 0x9a, 0xa9, 0x37, 0x92, 0xcd, 0xd4, 0xf3, 0x29, 0x5f, 0x21,
- 0xc7, 0x59, 0x3b, 0xa1, 0xb5, 0x9a, 0x83, 0xfc, 0x1e, 0x2f, 0x62, 0xcd, 0x0f, 0x0d, 0x28, 0x8b,
- 0x5f, 0xd3, 0x3c, 0x02, 0xd7, 0x92, 0xb3, 0x81, 0xe2, 0xc3, 0x9b, 0x0b, 0x3c, 0x8c, 0x57, 0xe2,
- 0x77, 0x0c, 0x48, 0x3e, 0xbf, 0xa2, 0x17, 0xe5, 0x15, 0x30, 0xa2, 0xf7, 0xd1, 0x29, 0xdd, 0xff,
- 0x85, 0x49, 0xdd, 0xe4, 0x85, 0x54, 0x0f, 0x8d, 0x4f, 0x42, 0x11, 0xfb, 0x7e, 0xb0, 0x67, 0x05,
- 0x47, 0x8c, 0xef, 0x5d, 0x97, 0xff, 0x50, 0xdb, 0x2b, 0xf6, 0x4e, 0x60, 0xb0, 0x84, 0x9b, 0x3f,
- 0x37, 0xe0, 0xd2, 0xc4, 0x91, 0x0f, 0x8f, 0x22, 0xad, 0xe8, 0x4b, 0xad, 0x28, 0x72, 0xe4, 0x98,
- 0x0e, 0x6b, 0x54, 0xbc, 0x0d, 0x4c, 0xcc, 0x89, 0x86, 0xdb, 0xc0, 0x84, 0x36, 0x9c, 0xa4, 0x35,
- 0xff, 0x95, 0x01, 0x35, 0x63, 0xf9, 0x1f, 0x3b, 0xfd, 0xe3, 0x43, 0x13, 0x9e, 0xf9, 0xe4, 0x84,
- 0x27, 0x1a, 0xe7, 0x68, 0x23, 0x8e, 0xec, 0xfd, 0x47, 0x1c, 0xe8, 0xd9, 0x68, 0x6a, 0x22, 0x7d,
- 0x68, 0x35, 0x39, 0x35, 0x39, 0x1b, 0xd4, 0xca, 0x4a, 0x78, 0x72, 0x8a, 0xf2, 0x1a, 0xcc, 0xd9,
- 0x24, 0xb0, 0x1c, 0x57, 0xb6, 0x74, 0xa9, 0xe7, 0x00, 0x52, 0x58, 0x53, 0xb2, 0x36, 0x4a, 0xdc,
- 0x26, 0xf5, 0x81, 0x43, 0x81, 0x3c, 0x60, 0xb7, 0x7c, 0x5b, 0x76, 0x24, 0xf9, 0x38, 0x60, 0x6f,
- 0xfa, 0x36, 0xc1, 0x02, 0x63, 0xbe, 0x6b, 0x40, 0x49, 0x4a, 0xda, 0xb4, 0x7a, 0x8c, 0xa0, 0x2b,
- 0xd1, 0x2a, 0xe4, 0x71, 0x5f, 0xd2, 0xc7, 0x63, 0x67, 0x83, 0x5a, 0x51, 0x90, 0x89, 0x66, 0x66,
- 0xcc, 0x18, 0x28, 0x73, 0xce, 0x1e, 0x3d, 0x0a, 0x79, 0x71, 0x81, 0xd4, 0x66, 0xc6, 0x73, 0x3e,
- 0x0e, 0xc4, 0x12, 0x67, 0x7e, 0x9c, 0x81, 0x4a, 0x62, 0x71, 0x29, 0xfa, 0x82, 0xe8, 0xf5, 0x33,
- 0x93, 0xe2, 0x45, 0x7d, 0xf2, 0x54, 0x5d, 0xa5, 0xaf, 0xd9, 0x07, 0x49, 0x5f, 0xdf, 0x86, 0xd9,
- 0x16, 0xdf, 0xa3, 0xf0, 0x4f, 0x1a, 0x57, 0xa6, 0x39, 0x4e, 0xb1, 0xbb, 0xb1, 0x37, 0x8a, 0x4f,
- 0x86, 0x95, 0x40, 0x74, 0x13, 0x96, 0x28, 0x09, 0x68, 0x7f, 0xe3, 0x30, 0x20, 0x54, 0x7f, 0x07,
- 0xc8, 0xc7, 0xd5, 0x37, 0x1e, 0x26, 0xc0, 0xa3, 0x3c, 0xe6, 0x01, 0x94, 0x6f, 0x5b, 0x07, 0x6e,
- 0x34, 0xd9, 0xc2, 0x50, 0x71, 0xbc, 0x96, 0xdb, 0xb3, 0x89, 0x0c, 0xe8, 0x61, 0xf4, 0x0a, 0x2f,
- 0xed, 0xb6, 0x8e, 0x3c, 0x1b, 0xd4, 0x2e, 0x24, 0x00, 0x72, 0x94, 0x83, 0x93, 0x22, 0x4c, 0x17,
- 0x72, 0x9f, 0x61, 0x27, 0xf9, 0x1d, 0x28, 0xc6, 0xb5, 0xfe, 0x43, 0x56, 0x69, 0xbe, 0x01, 0x05,
- 0xee, 0xf1, 0x61, 0x8f, 0x7a, 0x4e, 0x95, 0x94, 0xac, 0xbd, 0x32, 0x69, 0x6a, 0x2f, 0x31, 0x1f,
- 0xbd, 0xd3, 0xb5, 0x1f, 0x70, 0x3e, 0x9a, 0x79, 0x90, 0xcc, 0x97, 0x9d, 0x32, 0xf3, 0x5d, 0x05,
- 0xf9, 0x1f, 0x12, 0x9e, 0x64, 0x64, 0x01, 0xa1, 0x25, 0x19, 0x3d, 0xff, 0x6b, 0xc3, 0x81, 0x1f,
- 0x1b, 0x00, 0xe2, 0x15, 0xee, 0xc6, 0x09, 0xf1, 0x82, 0x14, 0x93, 0xf8, 0x3b, 0x30, 0xeb, 0x4b,
- 0x8f, 0x94, 0x33, 0xd2, 0x29, 0x9f, 0x7a, 0xa3, 0x8b, 0x24, 0x7d, 0x12, 0x2b, 0x61, 0x8d, 0x97,
- 0x3f, 0xf8, 0x64, 0x75, 0xe6, 0xc3, 0x4f, 0x56, 0x67, 0x3e, 0xfa, 0x64, 0x75, 0xe6, 0xed, 0xd3,
- 0x55, 0xe3, 0x83, 0xd3, 0x55, 0xe3, 0xc3, 0xd3, 0x55, 0xe3, 0xa3, 0xd3, 0x55, 0xe3, 0xe3, 0xd3,
- 0x55, 0xe3, 0xdd, 0x7f, 0xac, 0xce, 0xbc, 0xf6, 0x58, 0x9a, 0xff, 0xe6, 0xfd, 0x37, 0x00, 0x00,
- 0xff, 0xff, 0x0b, 0x4d, 0x51, 0xc5, 0xdb, 0x27, 0x00, 0x00,
+ 0x13, 0x77, 0x90, 0xc8, 0x31, 0x88, 0x4b, 0x24, 0xd0, 0x28, 0x31, 0x07, 0x8e, 0x88, 0xab, 0x85,
+ 0x04, 0xaa, 0x47, 0x77, 0x57, 0xcf, 0x63, 0xdd, 0x93, 0x5d, 0x22, 0x6e, 0xd3, 0xdf, 0xbb, 0xaa,
+ 0xbe, 0xfa, 0xea, 0x7b, 0x0c, 0xec, 0x1c, 0x5f, 0x63, 0x75, 0xc7, 0x5f, 0x3f, 0xee, 0x1d, 0x10,
+ 0xea, 0x91, 0x80, 0xb0, 0xf5, 0x13, 0xe2, 0xd9, 0x3e, 0x5d, 0x57, 0x08, 0xab, 0xeb, 0x74, 0xac,
+ 0xd6, 0x91, 0xe3, 0x11, 0xda, 0x5f, 0xef, 0x1e, 0xb7, 0x39, 0x80, 0xad, 0x77, 0x48, 0x60, 0xad,
+ 0x9f, 0x5c, 0x59, 0x6f, 0x13, 0x8f, 0x50, 0x2b, 0x20, 0x76, 0xbd, 0x4b, 0xfd, 0xc0, 0x47, 0x8f,
+ 0x49, 0xae, 0xba, 0xce, 0x55, 0xef, 0x1e, 0xb7, 0x39, 0x80, 0xd5, 0x39, 0x57, 0xfd, 0xe4, 0xca,
+ 0xca, 0x53, 0x6d, 0x27, 0x38, 0xea, 0x1d, 0xd4, 0x5b, 0x7e, 0x67, 0xbd, 0xed, 0xb7, 0xfd, 0x75,
+ 0xc1, 0x7c, 0xd0, 0x3b, 0x14, 0x5f, 0xe2, 0x43, 0xfc, 0x92, 0x42, 0x57, 0x26, 0x9a, 0x42, 0x7b,
+ 0x5e, 0xe0, 0x74, 0xc8, 0xb0, 0x15, 0x2b, 0xcf, 0x9e, 0xc7, 0xc0, 0x5a, 0x47, 0xa4, 0x63, 0x0d,
+ 0xf3, 0x99, 0x7f, 0xca, 0x42, 0x61, 0x63, 0x6f, 0xfb, 0x26, 0xf5, 0x7b, 0x5d, 0xb4, 0x06, 0x39,
+ 0xcf, 0xea, 0x90, 0xaa, 0xb1, 0x66, 0x5c, 0x2e, 0x36, 0xca, 0x1f, 0x0c, 0x6a, 0x33, 0xa7, 0x83,
+ 0x5a, 0xee, 0x55, 0xab, 0x43, 0xb0, 0xc0, 0x20, 0x17, 0x0a, 0x27, 0x84, 0x32, 0xc7, 0xf7, 0x58,
+ 0x35, 0xb3, 0x96, 0xbd, 0x5c, 0xba, 0xfa, 0x62, 0x3d, 0xcd, 0xfa, 0xeb, 0x42, 0xc1, 0x5d, 0xc9,
+ 0xba, 0xe5, 0xd3, 0xa6, 0xc3, 0x5a, 0xfe, 0x09, 0xa1, 0xfd, 0xc6, 0xa2, 0xd2, 0x52, 0x50, 0x48,
+ 0x86, 0x23, 0x0d, 0xe8, 0x47, 0x06, 0x2c, 0x76, 0x29, 0x39, 0x24, 0x94, 0x12, 0x5b, 0xe1, 0xab,
+ 0xd9, 0x35, 0xe3, 0x21, 0xa8, 0xad, 0x2a, 0xb5, 0x8b, 0x7b, 0x43, 0xf2, 0xf1, 0x88, 0x46, 0xf4,
+ 0x6b, 0x03, 0x56, 0x18, 0xa1, 0x27, 0x84, 0x6e, 0xd8, 0x36, 0x25, 0x8c, 0x35, 0xfa, 0x9b, 0xae,
+ 0x43, 0xbc, 0x60, 0x73, 0xbb, 0x89, 0x59, 0x35, 0x27, 0xf6, 0xe1, 0xeb, 0xe9, 0x0c, 0xda, 0x9f,
+ 0x24, 0xa7, 0x61, 0x2a, 0x8b, 0x56, 0x26, 0x92, 0x30, 0x7c, 0x1f, 0x33, 0xcc, 0x43, 0x28, 0x87,
+ 0x07, 0x79, 0xcb, 0x61, 0x01, 0xba, 0x0b, 0xb3, 0x6d, 0xfe, 0xc1, 0xaa, 0x86, 0x30, 0xb0, 0x9e,
+ 0xce, 0xc0, 0x50, 0x46, 0x63, 0x5e, 0xd9, 0x33, 0x2b, 0x3e, 0x19, 0x56, 0xd2, 0xcc, 0x9f, 0xe5,
+ 0xa0, 0xb4, 0xb1, 0xb7, 0x8d, 0x09, 0xf3, 0x7b, 0xb4, 0x45, 0x52, 0x38, 0xcd, 0x35, 0x28, 0x33,
+ 0xc7, 0x6b, 0xf7, 0x5c, 0x8b, 0x72, 0x68, 0x75, 0x56, 0x50, 0x2e, 0x2b, 0xca, 0xf2, 0xbe, 0x86,
+ 0xc3, 0x09, 0x4a, 0x74, 0x15, 0x80, 0x4b, 0x60, 0x5d, 0xab, 0x45, 0xec, 0x6a, 0x66, 0xcd, 0xb8,
+ 0x5c, 0x68, 0x20, 0xc5, 0x07, 0xaf, 0x46, 0x18, 0xac, 0x51, 0xa1, 0x47, 0x21, 0x2f, 0x2c, 0xad,
+ 0x16, 0x84, 0x9a, 0x8a, 0x22, 0xcf, 0x8b, 0x65, 0x60, 0x89, 0x43, 0x4f, 0xc0, 0x9c, 0xf2, 0xb2,
+ 0x6a, 0x51, 0x90, 0x2d, 0x28, 0xb2, 0xb9, 0xd0, 0x0d, 0x42, 0x3c, 0x5f, 0xdf, 0xb1, 0xe3, 0xd9,
+ 0xc2, 0xef, 0xb4, 0xf5, 0xbd, 0xe2, 0x78, 0x36, 0x16, 0x18, 0x74, 0x0b, 0xf2, 0x27, 0x84, 0x1e,
+ 0x70, 0x4f, 0xe0, 0xae, 0xf9, 0xe5, 0x74, 0x1b, 0x7d, 0x97, 0xb3, 0x34, 0x8a, 0xdc, 0x34, 0xf1,
+ 0x13, 0x4b, 0x21, 0xa8, 0x0e, 0xc0, 0x8e, 0x7c, 0x1a, 0x88, 0xe5, 0x55, 0xf3, 0x6b, 0xd9, 0xcb,
+ 0xc5, 0xc6, 0x3c, 0x5f, 0xef, 0x7e, 0x04, 0xc5, 0x1a, 0x05, 0xa7, 0x6f, 0x59, 0x01, 0x69, 0xfb,
+ 0xd4, 0x21, 0xac, 0x3a, 0x17, 0xd3, 0x6f, 0x46, 0x50, 0xac, 0x51, 0xa0, 0x97, 0x01, 0xb1, 0xc0,
+ 0xa7, 0x56, 0x9b, 0xa8, 0xa5, 0xbe, 0x64, 0xb1, 0xa3, 0x2a, 0x88, 0xd5, 0xad, 0xa8, 0xd5, 0xa1,
+ 0xfd, 0x11, 0x0a, 0x3c, 0x86, 0xcb, 0xfc, 0x9d, 0x01, 0x0b, 0x9a, 0x2f, 0x08, 0xbf, 0xbb, 0x06,
+ 0xe5, 0xb6, 0x76, 0xeb, 0x94, 0x5f, 0x44, 0xa7, 0xad, 0xdf, 0x48, 0x9c, 0xa0, 0x44, 0x04, 0x8a,
+ 0x54, 0x49, 0x0a, 0xa3, 0xcb, 0x95, 0xd4, 0x4e, 0x1b, 0xda, 0x10, 0x6b, 0xd2, 0x80, 0x0c, 0xc7,
+ 0x92, 0xcd, 0x7f, 0x18, 0xc2, 0x81, 0xc3, 0x78, 0x83, 0x2e, 0x6b, 0x31, 0xcd, 0x10, 0xdb, 0x57,
+ 0x9e, 0x10, 0x8f, 0xce, 0x09, 0x04, 0x99, 0xff, 0x8b, 0x40, 0x70, 0xbd, 0xf0, 0xcb, 0xf7, 0x6a,
+ 0x33, 0x6f, 0xff, 0x6d, 0x6d, 0xc6, 0xfc, 0x85, 0x01, 0xe5, 0x8d, 0x6e, 0xd7, 0xed, 0xef, 0x76,
+ 0x03, 0xb1, 0x00, 0x13, 0x66, 0x6d, 0xda, 0xc7, 0x3d, 0x4f, 0x2d, 0x14, 0xf8, 0xfd, 0x6e, 0x0a,
+ 0x08, 0x56, 0x18, 0x7e, 0x7f, 0x0e, 0x7d, 0xda, 0x22, 0xea, 0xba, 0x45, 0xf7, 0x67, 0x8b, 0x03,
+ 0xb1, 0xc4, 0xf1, 0x43, 0x3e, 0x74, 0x88, 0x6b, 0xef, 0x58, 0x9e, 0xd5, 0x26, 0x54, 0x5d, 0x8e,
+ 0x68, 0xeb, 0xb7, 0x34, 0x1c, 0x4e, 0x50, 0x9a, 0xff, 0xc9, 0x40, 0x71, 0xd3, 0xf7, 0x6c, 0x27,
+ 0x50, 0x97, 0x2b, 0xe8, 0x77, 0x47, 0x82, 0xc7, 0xed, 0x7e, 0x97, 0x60, 0x81, 0x41, 0xcf, 0xc1,
+ 0x2c, 0x0b, 0xac, 0xa0, 0xc7, 0x84, 0x3d, 0xc5, 0xc6, 0x23, 0x61, 0x58, 0xda, 0x17, 0xd0, 0xb3,
+ 0x41, 0x6d, 0x21, 0x12, 0x27, 0x41, 0x58, 0x31, 0x70, 0x4f, 0xf7, 0x0f, 0xc4, 0x46, 0xd9, 0x37,
+ 0xe5, 0xb3, 0x17, 0xbe, 0x1f, 0xd9, 0xd8, 0xd3, 0x77, 0x47, 0x28, 0xf0, 0x18, 0x2e, 0x74, 0x02,
+ 0xc8, 0xb5, 0x58, 0x70, 0x9b, 0x5a, 0x1e, 0x13, 0xba, 0x6e, 0x3b, 0x1d, 0xa2, 0x2e, 0xfc, 0x97,
+ 0xd2, 0x9d, 0x38, 0xe7, 0x88, 0xf5, 0xde, 0x1a, 0x91, 0x86, 0xc7, 0x68, 0x40, 0x8f, 0xc3, 0x2c,
+ 0x25, 0x16, 0xf3, 0xbd, 0x6a, 0x5e, 0x2c, 0x3f, 0x8a, 0xca, 0x58, 0x40, 0xb1, 0xc2, 0xf2, 0x80,
+ 0xd6, 0x21, 0x8c, 0x59, 0xed, 0x30, 0xbc, 0x46, 0x01, 0x6d, 0x47, 0x82, 0x71, 0x88, 0x37, 0x7f,
+ 0x6b, 0x40, 0x65, 0x93, 0x12, 0x2b, 0x20, 0xd3, 0xb8, 0xc5, 0xa7, 0x3e, 0x71, 0xb4, 0x01, 0x0b,
+ 0xe2, 0xfb, 0xae, 0xe5, 0x3a, 0xb6, 0x3c, 0x83, 0x9c, 0x60, 0xfe, 0xbc, 0x62, 0x5e, 0xd8, 0x4a,
+ 0xa2, 0xf1, 0x30, 0xbd, 0xf9, 0x93, 0x2c, 0x54, 0x9a, 0xc4, 0x25, 0xb1, 0xc9, 0x5b, 0x80, 0xda,
+ 0xd4, 0x6a, 0x91, 0x3d, 0x42, 0x1d, 0xdf, 0xde, 0x27, 0x2d, 0xdf, 0xb3, 0x99, 0x70, 0xa3, 0x6c,
+ 0xe3, 0x73, 0x7c, 0x7f, 0x6f, 0x8e, 0x60, 0xf1, 0x18, 0x0e, 0xe4, 0x42, 0xa5, 0x4b, 0xc5, 0x6f,
+ 0xb1, 0xe7, 0xd2, 0xcb, 0x4a, 0x57, 0xbf, 0x92, 0xee, 0x48, 0xf7, 0x74, 0xd6, 0xc6, 0xd2, 0xe9,
+ 0xa0, 0x56, 0x49, 0x80, 0x70, 0x52, 0x38, 0xfa, 0x06, 0x2c, 0xfa, 0xb4, 0x7b, 0x64, 0x79, 0x4d,
+ 0xd2, 0x25, 0x9e, 0x4d, 0xbc, 0x80, 0x89, 0x8d, 0x2c, 0x34, 0x96, 0x79, 0x2e, 0xb2, 0x3b, 0x84,
+ 0xc3, 0x23, 0xd4, 0xe8, 0x35, 0x58, 0xea, 0x52, 0xbf, 0x6b, 0xb5, 0xc5, 0xc6, 0xec, 0xf9, 0xae,
+ 0xd3, 0xea, 0xab, 0xed, 0x7c, 0xf2, 0x74, 0x50, 0x5b, 0xda, 0x1b, 0x46, 0x9e, 0x0d, 0x6a, 0x17,
+ 0xc4, 0xd6, 0x71, 0x48, 0x8c, 0xc4, 0xa3, 0x62, 0x34, 0x37, 0xc8, 0x4f, 0x72, 0x03, 0x73, 0x1b,
+ 0x0a, 0xcd, 0x9e, 0xba, 0x13, 0x2f, 0x40, 0xc1, 0x56, 0xbf, 0xd5, 0xce, 0x87, 0x97, 0x33, 0xa2,
+ 0x39, 0x1b, 0xd4, 0x2a, 0x3c, 0xfd, 0xac, 0x87, 0x00, 0x1c, 0xb1, 0x98, 0x8f, 0x43, 0x41, 0x1c,
+ 0x3c, 0xbb, 0x7b, 0x05, 0x2d, 0x42, 0x16, 0x5b, 0xf7, 0x84, 0x94, 0x32, 0xe6, 0x3f, 0xb5, 0x28,
+ 0xb6, 0x0b, 0x70, 0x93, 0x04, 0xe1, 0xc1, 0x6f, 0xc0, 0x42, 0x18, 0xca, 0x93, 0x2f, 0x4c, 0xe4,
+ 0x4d, 0x38, 0x89, 0xc6, 0xc3, 0xf4, 0xe6, 0xeb, 0x50, 0x14, 0xaf, 0x10, 0x7f, 0xc2, 0xe3, 0x74,
+ 0xc1, 0xb8, 0x4f, 0xba, 0x10, 0xe6, 0x00, 0x99, 0x49, 0x39, 0x80, 0x66, 0xae, 0x0b, 0x15, 0xc9,
+ 0x1b, 0x26, 0x48, 0xa9, 0x34, 0x3c, 0x09, 0x85, 0xd0, 0x4c, 0xa5, 0x25, 0x4a, 0x8c, 0x43, 0x41,
+ 0x38, 0xa2, 0xd0, 0xb4, 0x1d, 0x41, 0xe2, 0x45, 0x4d, 0xa7, 0x4c, 0xcb, 0x7e, 0x32, 0xf7, 0xcf,
+ 0x7e, 0x34, 0x4d, 0x3f, 0x84, 0xea, 0xa4, 0x6c, 0xfa, 0x01, 0xde, 0xfc, 0xf4, 0xa6, 0x98, 0xef,
+ 0x18, 0xb0, 0xa8, 0x4b, 0x4a, 0x7f, 0x7c, 0xe9, 0x95, 0x9c, 0x9f, 0xed, 0x69, 0x3b, 0xf2, 0x2b,
+ 0x03, 0x96, 0x13, 0x4b, 0x9b, 0xea, 0xc4, 0xa7, 0x30, 0x4a, 0x77, 0x8e, 0xec, 0x14, 0xce, 0xf1,
+ 0x97, 0x0c, 0x54, 0x6e, 0x59, 0x07, 0xc4, 0xdd, 0x27, 0x2e, 0x69, 0x05, 0x3e, 0x45, 0x3f, 0x80,
+ 0x52, 0xc7, 0x0a, 0x5a, 0x47, 0x02, 0x1a, 0x56, 0x06, 0xcd, 0x74, 0xc1, 0x2e, 0x21, 0xa9, 0xbe,
+ 0x13, 0x8b, 0xb9, 0xe1, 0x05, 0xb4, 0xdf, 0xb8, 0xa0, 0x4c, 0x2a, 0x69, 0x18, 0xac, 0x6b, 0x13,
+ 0xe5, 0x9c, 0xf8, 0xbe, 0xf1, 0x56, 0x97, 0xa7, 0x2d, 0xd3, 0x57, 0x91, 0x09, 0x13, 0x30, 0x79,
+ 0xb3, 0xe7, 0x50, 0xd2, 0x21, 0x5e, 0x10, 0x97, 0x73, 0x3b, 0x43, 0xf2, 0xf1, 0x88, 0xc6, 0x95,
+ 0x17, 0x61, 0x71, 0xd8, 0x78, 0x1e, 0x7f, 0x8e, 0x49, 0x5f, 0x9e, 0x17, 0xe6, 0x3f, 0xd1, 0x32,
+ 0xe4, 0x4f, 0x2c, 0xb7, 0xa7, 0x6e, 0x23, 0x96, 0x1f, 0xd7, 0x33, 0xd7, 0x0c, 0xf3, 0x37, 0x06,
+ 0x54, 0x27, 0x19, 0x82, 0xbe, 0xa8, 0x09, 0x6a, 0x94, 0x94, 0x55, 0xd9, 0x57, 0x48, 0x5f, 0x4a,
+ 0xbd, 0x01, 0x05, 0xbf, 0xcb, 0x73, 0x0a, 0x9f, 0xaa, 0x53, 0x7f, 0x22, 0x3c, 0xc9, 0x5d, 0x05,
+ 0x3f, 0x1b, 0xd4, 0x2e, 0x26, 0xc4, 0x87, 0x08, 0x1c, 0xb1, 0xf2, 0x48, 0x2d, 0xec, 0xe1, 0xaf,
+ 0x47, 0x14, 0xa9, 0xef, 0x0a, 0x08, 0x56, 0x18, 0xf3, 0xf7, 0x06, 0xe4, 0x44, 0x42, 0xfe, 0x3a,
+ 0x14, 0xf8, 0xfe, 0xd9, 0x56, 0x60, 0x09, 0xbb, 0x52, 0x97, 0x82, 0x9c, 0x7b, 0x87, 0x04, 0x56,
+ 0xec, 0x6d, 0x21, 0x04, 0x47, 0x12, 0x11, 0x86, 0xbc, 0x13, 0x90, 0x4e, 0x78, 0x90, 0x4f, 0x4d,
+ 0x14, 0xad, 0x1a, 0x11, 0x75, 0x6c, 0xdd, 0xbb, 0xf1, 0x56, 0x40, 0x3c, 0x7e, 0x18, 0xf1, 0xd5,
+ 0xd8, 0xe6, 0x32, 0xb0, 0x14, 0x65, 0xfe, 0xcb, 0x80, 0x48, 0x15, 0x77, 0x7e, 0x46, 0xdc, 0xc3,
+ 0x5b, 0x8e, 0x77, 0xac, 0xb6, 0x35, 0x32, 0x67, 0x5f, 0xc1, 0x71, 0x44, 0x31, 0xee, 0x79, 0xc8,
+ 0x4c, 0xf7, 0x3c, 0x70, 0x85, 0x2d, 0xdf, 0x0b, 0x1c, 0xaf, 0x37, 0x72, 0xdb, 0x36, 0x15, 0x1c,
+ 0x47, 0x14, 0x3c, 0x11, 0xa1, 0xa4, 0x63, 0x39, 0x9e, 0xe3, 0xb5, 0xf9, 0x22, 0x36, 0xfd, 0x9e,
+ 0x17, 0x88, 0x17, 0x59, 0x25, 0x22, 0x78, 0x04, 0x8b, 0xc7, 0x70, 0x98, 0xff, 0xce, 0x41, 0x89,
+ 0xaf, 0x39, 0x7c, 0xe7, 0x9e, 0x87, 0x8a, 0xab, 0x7b, 0x81, 0x5a, 0xfb, 0x45, 0x65, 0x4a, 0xf2,
+ 0x5e, 0xe3, 0x24, 0x2d, 0x67, 0x16, 0x29, 0x54, 0xc4, 0x9c, 0x49, 0x32, 0x6f, 0xe9, 0x48, 0x9c,
+ 0xa4, 0xe5, 0xd1, 0xeb, 0x1e, 0xbf, 0x1f, 0x2a, 0x33, 0x89, 0x8e, 0xe8, 0x9b, 0x1c, 0x88, 0x25,
+ 0x0e, 0xed, 0xc0, 0x05, 0xcb, 0x75, 0xfd, 0x7b, 0x02, 0xd8, 0xf0, 0xfd, 0xe3, 0x8e, 0x45, 0x8f,
+ 0x99, 0x28, 0xa6, 0x0b, 0x8d, 0x2f, 0x28, 0x96, 0x0b, 0x1b, 0xa3, 0x24, 0x78, 0x1c, 0xdf, 0xb8,
+ 0x63, 0xcb, 0x4d, 0x79, 0x6c, 0x47, 0xb0, 0x3c, 0x04, 0x12, 0xb7, 0x5c, 0x55, 0xb6, 0xcf, 0x28,
+ 0x39, 0xcb, 0x78, 0x0c, 0xcd, 0xd9, 0x04, 0x38, 0x1e, 0x2b, 0x11, 0x5d, 0x87, 0x79, 0xee, 0xc9,
+ 0x7e, 0x2f, 0x08, 0xf3, 0xce, 0xbc, 0x38, 0x6e, 0x74, 0x3a, 0xa8, 0xcd, 0xdf, 0x4e, 0x60, 0xf0,
+ 0x10, 0x25, 0xdf, 0x5c, 0xd7, 0xe9, 0x38, 0x41, 0x75, 0x4e, 0xb0, 0x44, 0x9b, 0x7b, 0x8b, 0x03,
+ 0xb1, 0xc4, 0x25, 0x3c, 0xb0, 0x70, 0xae, 0x07, 0x6e, 0xc2, 0x12, 0x23, 0x9e, 0xbd, 0xed, 0x39,
+ 0x81, 0x63, 0xb9, 0x37, 0x4e, 0x44, 0x56, 0x59, 0x12, 0x07, 0x71, 0x91, 0xa7, 0x84, 0xfb, 0xc3,
+ 0x48, 0x3c, 0x4a, 0x6f, 0xfe, 0x39, 0x0b, 0x48, 0x26, 0xec, 0xb6, 0x4c, 0xca, 0x64, 0x5c, 0xe4,
+ 0x65, 0x85, 0x4a, 0xf8, 0x8d, 0xa1, 0xb2, 0x42, 0xe5, 0xfa, 0x21, 0x1e, 0xed, 0x40, 0x51, 0xc6,
+ 0xa7, 0xf8, 0xce, 0xad, 0x2b, 0xe2, 0xe2, 0x6e, 0x88, 0x38, 0x1b, 0xd4, 0x56, 0x12, 0x6a, 0x22,
+ 0x8c, 0x28, 0xf9, 0x62, 0x09, 0xe8, 0x2a, 0x80, 0xd5, 0x75, 0xf4, 0xa6, 0x5f, 0x31, 0x6e, 0xfd,
+ 0xc4, 0xe5, 0x3b, 0xd6, 0xa8, 0xd0, 0x4b, 0x90, 0x0b, 0x3e, 0x5d, 0x59, 0x56, 0x10, 0x55, 0x27,
+ 0x2f, 0xc2, 0x84, 0x04, 0xae, 0x5d, 0x5c, 0x0a, 0xc6, 0xcd, 0x52, 0x15, 0x55, 0xa4, 0x7d, 0x2b,
+ 0xc2, 0x60, 0x8d, 0x0a, 0x7d, 0x0b, 0x0a, 0x87, 0x2a, 0x9f, 0x15, 0xa7, 0x9b, 0x3a, 0xce, 0x86,
+ 0x59, 0xb0, 0xec, 0x3b, 0x84, 0x5f, 0x38, 0x92, 0x86, 0xbe, 0x0a, 0x25, 0xd6, 0x3b, 0x88, 0x52,
+ 0x00, 0xe9, 0x12, 0xd1, 0x7b, 0xbb, 0x1f, 0xa3, 0xb0, 0x4e, 0x67, 0xbe, 0x09, 0xc5, 0x1d, 0xa7,
+ 0x45, 0x7d, 0x51, 0x48, 0x3e, 0x01, 0x73, 0x2c, 0x51, 0x25, 0x45, 0x27, 0x19, 0xba, 0x6a, 0x88,
+ 0xe7, 0x3e, 0xea, 0x59, 0x9e, 0x2f, 0x6b, 0xa1, 0x7c, 0xec, 0xa3, 0xaf, 0x72, 0x20, 0x96, 0xb8,
+ 0xeb, 0xcb, 0x3c, 0xcb, 0xf8, 0xe9, 0xfb, 0xb5, 0x99, 0x77, 0xdf, 0xaf, 0xcd, 0xbc, 0xf7, 0xbe,
+ 0xca, 0x38, 0xfe, 0x00, 0x00, 0xbb, 0x07, 0xdf, 0x23, 0x2d, 0x19, 0xbb, 0x53, 0xf5, 0x06, 0xc3,
+ 0x96, 0xb4, 0xe8, 0x0d, 0x66, 0x86, 0x32, 0x47, 0x0d, 0x87, 0x13, 0x94, 0x68, 0x1d, 0x8a, 0x51,
+ 0xd7, 0x4f, 0xf9, 0xc7, 0x52, 0xe8, 0x6f, 0x51, 0x6b, 0x10, 0xc7, 0x34, 0x89, 0x87, 0x24, 0x77,
+ 0xee, 0x43, 0xd2, 0x80, 0x6c, 0xcf, 0xb1, 0x55, 0xd5, 0xfd, 0x74, 0xf8, 0x90, 0xdf, 0xd9, 0x6e,
+ 0x9e, 0x0d, 0x6a, 0x8f, 0x4c, 0x6a, 0xb6, 0x07, 0xfd, 0x2e, 0x61, 0xf5, 0x3b, 0xdb, 0x4d, 0xcc,
+ 0x99, 0xc7, 0x45, 0xb5, 0xd9, 0x29, 0xa3, 0xda, 0x55, 0x80, 0x76, 0xdc, 0xbb, 0x90, 0x41, 0x23,
+ 0x72, 0x44, 0xad, 0x67, 0xa1, 0x51, 0x21, 0x06, 0x4b, 0x2d, 0x5e, 0xdf, 0xab, 0x1e, 0x02, 0x0b,
+ 0xac, 0x8e, 0xec, 0x86, 0x4e, 0x77, 0x27, 0x2e, 0x29, 0x35, 0x4b, 0x9b, 0xc3, 0xc2, 0xf0, 0xa8,
+ 0x7c, 0xe4, 0xc3, 0x92, 0xad, 0xca, 0xcc, 0x58, 0x69, 0x71, 0x6a, 0xa5, 0x22, 0x62, 0x35, 0x87,
+ 0x05, 0xe1, 0x51, 0xd9, 0xe8, 0xbb, 0xb0, 0x12, 0x02, 0x47, 0x6b, 0x7d, 0x11, 0xf5, 0xb3, 0x8d,
+ 0xd5, 0xd3, 0x41, 0x6d, 0xa5, 0x39, 0x91, 0x0a, 0xdf, 0x47, 0x02, 0xb2, 0x61, 0xd6, 0x95, 0x59,
+ 0x72, 0x49, 0x64, 0x36, 0x5f, 0x4b, 0xb7, 0x8a, 0xd8, 0xfb, 0xeb, 0x7a, 0x76, 0x1c, 0xf5, 0x6d,
+ 0x54, 0x62, 0xac, 0x64, 0xa3, 0xb7, 0xa0, 0x64, 0x79, 0x9e, 0x1f, 0x58, 0xb2, 0xfb, 0x50, 0x16,
+ 0xaa, 0x36, 0xa6, 0x56, 0xb5, 0x11, 0xcb, 0x18, 0xca, 0xc6, 0x35, 0x0c, 0xd6, 0x55, 0xa1, 0x7b,
+ 0xb0, 0xe0, 0xdf, 0xf3, 0x08, 0xc5, 0xe4, 0x90, 0x50, 0xe2, 0xb5, 0x08, 0xab, 0x56, 0x84, 0xf6,
+ 0x67, 0x52, 0x6a, 0x4f, 0x30, 0xc7, 0x2e, 0x9d, 0x84, 0x33, 0x3c, 0xac, 0x05, 0xd5, 0x79, 0x6c,
+ 0xf5, 0x2c, 0xd7, 0xf9, 0x3e, 0xa1, 0xac, 0x3a, 0x1f, 0x37, 0xac, 0xb7, 0x22, 0x28, 0xd6, 0x28,
+ 0x50, 0x0f, 0x2a, 0x1d, 0xfd, 0xc9, 0xa8, 0x2e, 0x09, 0x33, 0xaf, 0xa5, 0x33, 0x73, 0xf4, 0x51,
+ 0x8b, 0xd3, 0xa0, 0x04, 0x0e, 0x27, 0xb5, 0xac, 0x3c, 0x07, 0xa5, 0x4f, 0x59, 0x21, 0xf0, 0x0a,
+ 0x63, 0xf8, 0x40, 0xa6, 0xaa, 0x30, 0xfe, 0x98, 0x81, 0xf9, 0xe4, 0x36, 0x0e, 0x3d, 0x87, 0xf9,
+ 0x54, 0xcf, 0x61, 0x58, 0xcb, 0x1a, 0x13, 0x27, 0x17, 0x61, 0x7c, 0xce, 0x4e, 0x8c, 0xcf, 0x2a,
+ 0x0c, 0xe6, 0x1e, 0x24, 0x0c, 0xd6, 0x01, 0x78, 0xb2, 0x42, 0x7d, 0xd7, 0x25, 0x54, 0x44, 0xc0,
+ 0x82, 0x9a, 0x50, 0x44, 0x50, 0xac, 0x51, 0xf0, 0x94, 0xfa, 0xc0, 0xf5, 0x5b, 0xc7, 0x62, 0x0b,
+ 0xc2, 0xdb, 0x2b, 0x62, 0x5f, 0x41, 0xa6, 0xd4, 0x8d, 0x11, 0x2c, 0x1e, 0xc3, 0x61, 0xf6, 0xe1,
+ 0xe2, 0x9e, 0x45, 0x79, 0x92, 0x13, 0xdf, 0x14, 0x51, 0xb3, 0xbc, 0x31, 0x52, 0x11, 0x3d, 0x3d,
+ 0xed, 0x8d, 0x8b, 0x37, 0x3f, 0x86, 0xc5, 0x55, 0x91, 0xf9, 0x57, 0x03, 0x2e, 0x8d, 0xd5, 0xfd,
+ 0x19, 0x54, 0x64, 0x6f, 0x24, 0x2b, 0xb2, 0xe7, 0x53, 0xb6, 0x32, 0xc7, 0x59, 0x3b, 0xa1, 0x3e,
+ 0x9b, 0x83, 0xfc, 0x1e, 0xcf, 0x84, 0xcd, 0x0f, 0x0d, 0x28, 0x8b, 0x5f, 0xd3, 0x74, 0x92, 0x6b,
+ 0xc9, 0x01, 0x43, 0xf1, 0xe1, 0x0d, 0x17, 0x1e, 0x46, 0xab, 0xf9, 0x1d, 0x03, 0x92, 0x3d, 0x5c,
+ 0xf4, 0xa2, 0xbc, 0x02, 0x46, 0xd4, 0x64, 0x9d, 0xd2, 0xfd, 0x5f, 0x98, 0x54, 0x92, 0x5e, 0x48,
+ 0xd5, 0xad, 0x7c, 0x12, 0x8a, 0xd8, 0xf7, 0x83, 0x3d, 0x2b, 0x38, 0x62, 0x7c, 0xef, 0xba, 0xfc,
+ 0x87, 0xda, 0x5e, 0xb1, 0x77, 0x02, 0x83, 0x25, 0xdc, 0xfc, 0xb9, 0x01, 0x97, 0x26, 0xce, 0x8d,
+ 0x78, 0x14, 0x69, 0x45, 0x5f, 0x6a, 0x45, 0x91, 0x23, 0xc7, 0x74, 0x58, 0xa3, 0xe2, 0xb5, 0x64,
+ 0x62, 0xd8, 0x34, 0x5c, 0x4b, 0x26, 0xb4, 0xe1, 0x24, 0xad, 0xf9, 0xcf, 0x0c, 0xa8, 0x41, 0xcd,
+ 0xff, 0xd8, 0xe9, 0x1f, 0x1f, 0x1a, 0x13, 0xcd, 0x27, 0xc7, 0x44, 0xd1, 0x4c, 0x48, 0x9b, 0x93,
+ 0x64, 0xef, 0x3f, 0x27, 0x41, 0xcf, 0x46, 0xa3, 0x17, 0xe9, 0x43, 0xab, 0xc9, 0xd1, 0xcb, 0xd9,
+ 0xa0, 0x56, 0x56, 0xc2, 0x93, 0xa3, 0x98, 0xd7, 0x60, 0xce, 0x26, 0x81, 0xe5, 0xb8, 0xb2, 0x2e,
+ 0x4c, 0x3d, 0x4c, 0x90, 0xc2, 0x9a, 0x92, 0xb5, 0x51, 0xe2, 0x36, 0xa9, 0x0f, 0x1c, 0x0a, 0xe4,
+ 0x01, 0xbb, 0xe5, 0xdb, 0xb2, 0x22, 0xc9, 0xc7, 0x01, 0x7b, 0xd3, 0xb7, 0x09, 0x16, 0x18, 0xf3,
+ 0x5d, 0x03, 0x4a, 0x52, 0xd2, 0xa6, 0xd5, 0x63, 0x04, 0x5d, 0x89, 0x56, 0x21, 0x8f, 0xfb, 0x92,
+ 0x3e, 0x63, 0x3b, 0x1b, 0xd4, 0x8a, 0x82, 0x4c, 0x14, 0x33, 0x63, 0x66, 0x49, 0x99, 0x73, 0xf6,
+ 0xe8, 0x51, 0xc8, 0x8b, 0x0b, 0xa4, 0x36, 0x33, 0x1e, 0x16, 0x72, 0x20, 0x96, 0x38, 0xf3, 0xe3,
+ 0x0c, 0x54, 0x12, 0x8b, 0x4b, 0x51, 0x17, 0x44, 0x2d, 0xd4, 0x4c, 0x8a, 0xb6, 0xfc, 0xe4, 0xd1,
+ 0xbc, 0x7a, 0xbe, 0x66, 0x1f, 0xe4, 0xf9, 0xfa, 0x36, 0xcc, 0xb6, 0xf8, 0x1e, 0x85, 0xff, 0xf4,
+ 0xb8, 0x32, 0xcd, 0x71, 0x8a, 0xdd, 0x8d, 0xbd, 0x51, 0x7c, 0x32, 0xac, 0x04, 0xa2, 0x9b, 0xb0,
+ 0x44, 0x49, 0x40, 0xfb, 0x1b, 0x87, 0x01, 0xa1, 0x7a, 0x33, 0x21, 0x1f, 0x67, 0xdf, 0x78, 0x98,
+ 0x00, 0x8f, 0xf2, 0x98, 0x07, 0x50, 0xbe, 0x6d, 0x1d, 0xb8, 0xd1, 0x78, 0x0c, 0x43, 0xc5, 0xf1,
+ 0x5a, 0x6e, 0xcf, 0x26, 0x32, 0xa0, 0x87, 0xd1, 0x2b, 0xbc, 0xb4, 0xdb, 0x3a, 0xf2, 0x6c, 0x50,
+ 0xbb, 0x90, 0x00, 0xc8, 0x79, 0x10, 0x4e, 0x8a, 0x30, 0x5d, 0xc8, 0x7d, 0x86, 0x95, 0xe4, 0x77,
+ 0xa0, 0x18, 0xe7, 0xfa, 0x0f, 0x59, 0xa5, 0xf9, 0x06, 0x14, 0xb8, 0xc7, 0x87, 0x35, 0xea, 0x39,
+ 0x59, 0x52, 0x32, 0xf7, 0xca, 0xa4, 0xc9, 0xbd, 0xc4, 0x90, 0xf5, 0x4e, 0xd7, 0x7e, 0xc0, 0x21,
+ 0x6b, 0xe6, 0x41, 0x5e, 0xbe, 0xec, 0x94, 0x2f, 0xdf, 0x55, 0x90, 0x7f, 0x44, 0xe1, 0x8f, 0x8c,
+ 0x4c, 0x20, 0xb4, 0x47, 0x46, 0x7f, 0xff, 0xb5, 0x09, 0xc3, 0x8f, 0x0d, 0x00, 0xd1, 0xca, 0x13,
+ 0x6d, 0xa4, 0x14, 0xe3, 0xfc, 0x3b, 0x30, 0xeb, 0x4b, 0x8f, 0x94, 0x83, 0xd6, 0x29, 0xfb, 0xc5,
+ 0xd1, 0x45, 0x92, 0x3e, 0x89, 0x95, 0xb0, 0xc6, 0xcb, 0x1f, 0x7c, 0xb2, 0x3a, 0xf3, 0xe1, 0x27,
+ 0xab, 0x33, 0x1f, 0x7d, 0xb2, 0x3a, 0xf3, 0xf6, 0xe9, 0xaa, 0xf1, 0xc1, 0xe9, 0xaa, 0xf1, 0xe1,
+ 0xe9, 0xaa, 0xf1, 0xd1, 0xe9, 0xaa, 0xf1, 0xf1, 0xe9, 0xaa, 0xf1, 0xee, 0xdf, 0x57, 0x67, 0x5e,
+ 0x7b, 0x2c, 0xcd, 0x1f, 0xfc, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x28, 0x27, 0x65, 0xab, 0x20,
+ 0x28, 0x00, 0x00,
}
func (m *APIGroup) Marshal() (dAtA []byte, err error) {
@@ -2503,6 +2505,16 @@ func (m *ListOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.SendInitialEvents != nil {
+ i--
+ if *m.SendInitialEvents {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x58
+ }
i -= len(m.ResourceVersionMatch)
copy(dAtA[i:], m.ResourceVersionMatch)
i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceVersionMatch)))
@@ -3908,6 +3920,9 @@ func (m *ListOptions) Size() (n int) {
n += 2
l = len(m.ResourceVersionMatch)
n += 1 + l + sovGenerated(uint64(l))
+ if m.SendInitialEvents != nil {
+ n += 2
+ }
return n
}
@@ -4517,6 +4532,7 @@ func (this *ListOptions) String() string {
`Continue:` + fmt.Sprintf("%v", this.Continue) + `,`,
`AllowWatchBookmarks:` + fmt.Sprintf("%v", this.AllowWatchBookmarks) + `,`,
`ResourceVersionMatch:` + fmt.Sprintf("%v", this.ResourceVersionMatch) + `,`,
+ `SendInitialEvents:` + valueToStringGenerated(this.SendInitialEvents) + `,`,
`}`,
}, "")
return s
@@ -8250,6 +8266,27 @@ func (m *ListOptions) Unmarshal(dAtA []byte) error {
}
m.ResourceVersionMatch = ResourceVersionMatch(dAtA[iNdEx:postIndex])
iNdEx = postIndex
+ case 11:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SendInitialEvents", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowGenerated
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ b := bool(v != 0)
+ m.SendInitialEvents = &b
default:
iNdEx = preIndex
skippy, err := skipGenerated(dAtA[iNdEx:])
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
index 2be188a6a..48955dca8 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto
@@ -246,19 +246,16 @@ message CreateOptions {
// fieldValidation instructs the server on how to handle
// objects in the request (POST/PUT/PATCH) containing unknown
- // or duplicate fields, provided that the `ServerSideFieldValidation`
- // feature gate is also enabled. Valid values are:
+ // or duplicate fields. Valid values are:
// - Ignore: This will ignore any unknown fields that are silently
// dropped from the object, and will ignore all but the last duplicate
// field that the decoder encounters. This is the default behavior
- // prior to v1.23 and is the default behavior when the
- // `ServerSideFieldValidation` feature gate is disabled.
+ // prior to v1.23.
// - Warn: This will send a warning via the standard warning response
// header for each unknown field that is dropped from the object, and
// for each duplicate field that is encountered. The request will
// still succeed if there are no other errors, and will only persist
- // the last of any duplicate fields. This is the default when the
- // `ServerSideFieldValidation` feature gate is enabled.
+ // the last of any duplicate fields. This is the default in v1.23+
// - Strict: This will fail the request with a BadRequest error if
// any unknown fields would be dropped from the object, or if any
// duplicate fields are present. The error returned from the server
@@ -575,6 +572,32 @@ message ListOptions {
// This field is not supported when watch is true. Clients may start a watch from the last
// resourceVersion value returned by the server and not miss any modifications.
optional string continue = 8;
+
+ // `sendInitialEvents=true` may be set together with `watch=true`.
+ // In that case, the watch stream will begin with synthetic events to
+ // produce the current state of objects in the collection. Once all such
+ // events have been sent, a synthetic "Bookmark" event will be sent.
+ // The bookmark will report the ResourceVersion (RV) corresponding to the
+ // set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation.
+ // Afterwards, the watch stream will proceed as usual, sending watch events
+ // corresponding to changes (subsequent to the RV) to objects watched.
+ //
+ // When `sendInitialEvents` option is set, we require `resourceVersionMatch`
+ // option to also be set. The semantic of the watch request is as following:
+ // - `resourceVersionMatch` = NotOlderThan
+ // is interpreted as "data at least as new as the provided `resourceVersion`"
+ // and the bookmark event is send when the state is synced
+ // to a `resourceVersion` at least as fresh as the one provided by the ListOptions.
+ // If `resourceVersion` is unset, this is interpreted as "consistent read" and the
+ // bookmark event is send when the state is synced at least to the moment
+ // when request started being processed.
+ // - `resourceVersionMatch` set to any other value or unset
+ // Invalid error is returned.
+ //
+ // Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward
+ // compatibility reasons) and to false otherwise.
+ // +optional
+ optional bool sendInitialEvents = 11;
}
// ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource
@@ -645,7 +668,7 @@ message ObjectMeta {
// automatically. Name is primarily intended for creation idempotence and configuration
// definition.
// Cannot be updated.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
// +optional
optional string name = 1;
@@ -671,7 +694,7 @@ message ObjectMeta {
//
// Must be a DNS_LABEL.
// Cannot be updated.
- // More info: http://kubernetes.io/docs/user-guide/namespaces
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
// +optional
optional string namespace = 3;
@@ -685,7 +708,7 @@ message ObjectMeta {
//
// Populated by the system.
// Read-only.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
// +optional
optional string uid = 5;
@@ -749,14 +772,14 @@ message ObjectMeta {
// Map of string keys and values that can be used to organize and categorize
// (scope and select) objects. May match selectors of replication controllers
// and services.
- // More info: http://kubernetes.io/docs/user-guide/labels
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
// +optional
map labels = 11;
// Annotations is an unstructured key value map stored with a resource that may be
// set by external tools to store and retrieve arbitrary metadata. They are not
// queryable and should be preserved when modifying objects.
- // More info: http://kubernetes.io/docs/user-guide/annotations
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
// +optional
map annotations = 12;
@@ -811,11 +834,11 @@ message OwnerReference {
optional string kind = 1;
// Name of the referent.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
optional string name = 3;
// UID of the referent.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
optional string uid = 4;
// If true, this reference points to the managing controller.
@@ -889,19 +912,16 @@ message PatchOptions {
// fieldValidation instructs the server on how to handle
// objects in the request (POST/PUT/PATCH) containing unknown
- // or duplicate fields, provided that the `ServerSideFieldValidation`
- // feature gate is also enabled. Valid values are:
+ // or duplicate fields. Valid values are:
// - Ignore: This will ignore any unknown fields that are silently
// dropped from the object, and will ignore all but the last duplicate
// field that the decoder encounters. This is the default behavior
- // prior to v1.23 and is the default behavior when the
- // `ServerSideFieldValidation` feature gate is disabled.
+ // prior to v1.23.
// - Warn: This will send a warning via the standard warning response
// header for each unknown field that is dropped from the object, and
// for each duplicate field that is encountered. The request will
// still succeed if there are no other errors, and will only persist
- // the last of any duplicate fields. This is the default when the
- // `ServerSideFieldValidation` feature gate is enabled.
+ // the last of any duplicate fields. This is the default in v1.23+
// - Strict: This will fail the request with a BadRequest error if
// any unknown fields would be dropped from the object, or if any
// duplicate fields are present. The error returned from the server
@@ -1024,7 +1044,7 @@ message StatusDetails {
// UID of the resource.
// (when there is a single resource which can be described).
- // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
// +optional
optional string uid = 6;
@@ -1128,19 +1148,16 @@ message UpdateOptions {
// fieldValidation instructs the server on how to handle
// objects in the request (POST/PUT/PATCH) containing unknown
- // or duplicate fields, provided that the `ServerSideFieldValidation`
- // feature gate is also enabled. Valid values are:
+ // or duplicate fields. Valid values are:
// - Ignore: This will ignore any unknown fields that are silently
// dropped from the object, and will ignore all but the last duplicate
// field that the decoder encounters. This is the default behavior
- // prior to v1.23 and is the default behavior when the
- // `ServerSideFieldValidation` feature gate is disabled.
+ // prior to v1.23.
// - Warn: This will send a warning via the standard warning response
// header for each unknown field that is dropped from the object, and
// for each duplicate field that is encountered. The request will
// still succeed if there are no other errors, and will only persist
- // the last of any duplicate fields. This is the default when the
- // `ServerSideFieldValidation` feature gate is enabled.
+ // the last of any duplicate fields. This is the default in v1.23+
// - Strict: This will fail the request with a BadRequest error if
// any unknown fields would be dropped from the object, or if any
// duplicate fields are present. The error returned from the server
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
index 152f99296..352d58ebc 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
@@ -114,7 +114,7 @@ type ObjectMeta struct {
// automatically. Name is primarily intended for creation idempotence and configuration
// definition.
// Cannot be updated.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
// +optional
Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`
@@ -140,7 +140,7 @@ type ObjectMeta struct {
//
// Must be a DNS_LABEL.
// Cannot be updated.
- // More info: http://kubernetes.io/docs/user-guide/namespaces
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
// +optional
Namespace string `json:"namespace,omitempty" protobuf:"bytes,3,opt,name=namespace"`
@@ -154,7 +154,7 @@ type ObjectMeta struct {
//
// Populated by the system.
// Read-only.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
// +optional
UID types.UID `json:"uid,omitempty" protobuf:"bytes,5,opt,name=uid,casttype=k8s.io/kubernetes/pkg/types.UID"`
@@ -218,14 +218,14 @@ type ObjectMeta struct {
// Map of string keys and values that can be used to organize and categorize
// (scope and select) objects. May match selectors of replication controllers
// and services.
- // More info: http://kubernetes.io/docs/user-guide/labels
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
// +optional
Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`
// Annotations is an unstructured key value map stored with a resource that may be
// set by external tools to store and retrieve arbitrary metadata. They are not
// queryable and should be preserved when modifying objects.
- // More info: http://kubernetes.io/docs/user-guide/annotations
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
// +optional
Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
@@ -295,10 +295,10 @@ type OwnerReference struct {
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"`
// Name of the referent.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#names
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
Name string `json:"name" protobuf:"bytes,3,opt,name=name"`
// UID of the referent.
- // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
UID types.UID `json:"uid" protobuf:"bytes,4,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
// If true, this reference points to the managing controller.
// +optional
@@ -400,6 +400,32 @@ type ListOptions struct {
// This field is not supported when watch is true. Clients may start a watch from the last
// resourceVersion value returned by the server and not miss any modifications.
Continue string `json:"continue,omitempty" protobuf:"bytes,8,opt,name=continue"`
+
+ // `sendInitialEvents=true` may be set together with `watch=true`.
+ // In that case, the watch stream will begin with synthetic events to
+ // produce the current state of objects in the collection. Once all such
+ // events have been sent, a synthetic "Bookmark" event will be sent.
+ // The bookmark will report the ResourceVersion (RV) corresponding to the
+ // set of objects, and be marked with `"k8s.io/initial-events-end": "true"` annotation.
+ // Afterwards, the watch stream will proceed as usual, sending watch events
+ // corresponding to changes (subsequent to the RV) to objects watched.
+ //
+ // When `sendInitialEvents` option is set, we require `resourceVersionMatch`
+ // option to also be set. The semantic of the watch request is as following:
+ // - `resourceVersionMatch` = NotOlderThan
+ // is interpreted as "data at least as new as the provided `resourceVersion`"
+ // and the bookmark event is send when the state is synced
+ // to a `resourceVersion` at least as fresh as the one provided by the ListOptions.
+ // If `resourceVersion` is unset, this is interpreted as "consistent read" and the
+ // bookmark event is send when the state is synced at least to the moment
+ // when request started being processed.
+ // - `resourceVersionMatch` set to any other value or unset
+ // Invalid error is returned.
+ //
+ // Defaults to true if `resourceVersion=""` or `resourceVersion="0"` (for backward
+ // compatibility reasons) and to false otherwise.
+ // +optional
+ SendInitialEvents *bool `json:"sendInitialEvents,omitempty" protobuf:"varint,11,opt,name=sendInitialEvents"`
}
// resourceVersionMatch specifies how the resourceVersion parameter is applied. resourceVersionMatch
@@ -542,19 +568,16 @@ type CreateOptions struct {
// fieldValidation instructs the server on how to handle
// objects in the request (POST/PUT/PATCH) containing unknown
- // or duplicate fields, provided that the `ServerSideFieldValidation`
- // feature gate is also enabled. Valid values are:
+ // or duplicate fields. Valid values are:
// - Ignore: This will ignore any unknown fields that are silently
// dropped from the object, and will ignore all but the last duplicate
// field that the decoder encounters. This is the default behavior
- // prior to v1.23 and is the default behavior when the
- // `ServerSideFieldValidation` feature gate is disabled.
+ // prior to v1.23.
// - Warn: This will send a warning via the standard warning response
// header for each unknown field that is dropped from the object, and
// for each duplicate field that is encountered. The request will
// still succeed if there are no other errors, and will only persist
- // the last of any duplicate fields. This is the default when the
- // `ServerSideFieldValidation` feature gate is enabled.
+ // the last of any duplicate fields. This is the default in v1.23+
// - Strict: This will fail the request with a BadRequest error if
// any unknown fields would be dropped from the object, or if any
// duplicate fields are present. The error returned from the server
@@ -597,19 +620,16 @@ type PatchOptions struct {
// fieldValidation instructs the server on how to handle
// objects in the request (POST/PUT/PATCH) containing unknown
- // or duplicate fields, provided that the `ServerSideFieldValidation`
- // feature gate is also enabled. Valid values are:
+ // or duplicate fields. Valid values are:
// - Ignore: This will ignore any unknown fields that are silently
// dropped from the object, and will ignore all but the last duplicate
// field that the decoder encounters. This is the default behavior
- // prior to v1.23 and is the default behavior when the
- // `ServerSideFieldValidation` feature gate is disabled.
+ // prior to v1.23.
// - Warn: This will send a warning via the standard warning response
// header for each unknown field that is dropped from the object, and
// for each duplicate field that is encountered. The request will
// still succeed if there are no other errors, and will only persist
- // the last of any duplicate fields. This is the default when the
- // `ServerSideFieldValidation` feature gate is enabled.
+ // the last of any duplicate fields. This is the default in v1.23+
// - Strict: This will fail the request with a BadRequest error if
// any unknown fields would be dropped from the object, or if any
// duplicate fields are present. The error returned from the server
@@ -674,19 +694,16 @@ type UpdateOptions struct {
// fieldValidation instructs the server on how to handle
// objects in the request (POST/PUT/PATCH) containing unknown
- // or duplicate fields, provided that the `ServerSideFieldValidation`
- // feature gate is also enabled. Valid values are:
+ // or duplicate fields. Valid values are:
// - Ignore: This will ignore any unknown fields that are silently
// dropped from the object, and will ignore all but the last duplicate
// field that the decoder encounters. This is the default behavior
- // prior to v1.23 and is the default behavior when the
- // `ServerSideFieldValidation` feature gate is disabled.
+ // prior to v1.23.
// - Warn: This will send a warning via the standard warning response
// header for each unknown field that is dropped from the object, and
// for each duplicate field that is encountered. The request will
// still succeed if there are no other errors, and will only persist
- // the last of any duplicate fields. This is the default when the
- // `ServerSideFieldValidation` feature gate is enabled.
+ // the last of any duplicate fields. This is the default in v1.23+
// - Strict: This will fail the request with a BadRequest error if
// any unknown fields would be dropped from the object, or if any
// duplicate fields are present. The error returned from the server
@@ -761,7 +778,7 @@ type StatusDetails struct {
Kind string `json:"kind,omitempty" protobuf:"bytes,3,opt,name=kind"`
// UID of the resource.
// (when there is a single resource which can be described).
- // More info: http://kubernetes.io/docs/user-guide/identifiers#uids
+ // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
// +optional
UID types.UID `json:"uid,omitempty" protobuf:"bytes,6,opt,name=uid,casttype=k8s.io/apimachinery/pkg/types.UID"`
// The Causes array includes more details associated with the StatusReason
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go
index 9570726a0..b736e8371 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types_swagger_doc_generated.go
@@ -24,7 +24,7 @@ package v1
// they are on one line! For multiple line or blocks that you want to ignore use ---.
// Any context after a --- is ignored.
//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+// Those methods can be generated by using hack/update-codegen.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_APIGroup = map[string]string{
@@ -115,7 +115,7 @@ var map_CreateOptions = map[string]string{
"": "CreateOptions may be provided when creating an API object.",
"dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed",
"fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.",
- "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.",
+ "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.",
}
func (CreateOptions) SwaggerDoc() map[string]string {
@@ -216,6 +216,7 @@ var map_ListOptions = map[string]string{
"timeoutSeconds": "Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.",
"limit": "limit is a maximum number of responses to return for a list call. If more items exist, the server will set the `continue` field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.\n\nThe server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.",
"continue": "The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\".\n\nThis field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.",
+ "sendInitialEvents": "`sendInitialEvents=true` may be set together with `watch=true`. In that case, the watch stream will begin with synthetic events to produce the current state of objects in the collection. Once all such events have been sent, a synthetic \"Bookmark\" event will be sent. The bookmark will report the ResourceVersion (RV) corresponding to the set of objects, and be marked with `\"k8s.io/initial-events-end\": \"true\"` annotation. Afterwards, the watch stream will proceed as usual, sending watch events corresponding to changes (subsequent to the RV) to objects watched.\n\nWhen `sendInitialEvents` option is set, we require `resourceVersionMatch` option to also be set. The semantic of the watch request is as following: - `resourceVersionMatch` = NotOlderThan\n is interpreted as \"data at least as new as the provided `resourceVersion`\"\n and the bookmark event is send when the state is synced\n to a `resourceVersion` at least as fresh as the one provided by the ListOptions.\n If `resourceVersion` is unset, this is interpreted as \"consistent read\" and the\n bookmark event is send when the state is synced at least to the moment\n when request started being processed.\n- `resourceVersionMatch` set to any other value or unset\n Invalid error is returned.\n\nDefaults to true if `resourceVersion=\"\"` or `resourceVersion=\"0\"` (for backward compatibility reasons) and to false otherwise.",
}
func (ListOptions) SwaggerDoc() map[string]string {
@@ -239,18 +240,18 @@ func (ManagedFieldsEntry) SwaggerDoc() map[string]string {
var map_ObjectMeta = map[string]string{
"": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.",
- "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names",
+ "name": "Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names",
"generateName": "GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency",
- "namespace": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces",
+ "namespace": "Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces",
"selfLink": "Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.",
- "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
+ "uid": "UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids",
"resourceVersion": "An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency",
"generation": "A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.",
"creationTimestamp": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"deletionTimestamp": "DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.\n\nPopulated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata",
"deletionGracePeriodSeconds": "Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.",
- "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels",
- "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations",
+ "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels",
+ "annotations": "Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations",
"ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.",
"finalizers": "Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.",
"managedFields": "ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object.",
@@ -264,8 +265,8 @@ var map_OwnerReference = map[string]string{
"": "OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.",
"apiVersion": "API version of the referent.",
"kind": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- "name": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names",
- "uid": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
+ "name": "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names",
+ "uid": "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids",
"controller": "If true, this reference points to the managing controller.",
"blockOwnerDeletion": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.",
}
@@ -306,7 +307,7 @@ var map_PatchOptions = map[string]string{
"dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed",
"force": "Force is going to \"force\" Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.",
"fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).",
- "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.",
+ "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.",
}
func (PatchOptions) SwaggerDoc() map[string]string {
@@ -372,7 +373,7 @@ var map_StatusDetails = map[string]string{
"name": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).",
"group": "The group attribute of the resource associated with the status StatusReason.",
"kind": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
- "uid": "UID of the resource. (when there is a single resource which can be described). More info: http://kubernetes.io/docs/user-guide/identifiers#uids",
+ "uid": "UID of the resource. (when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids",
"causes": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.",
"retryAfterSeconds": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.",
}
@@ -451,7 +452,7 @@ var map_UpdateOptions = map[string]string{
"": "UpdateOptions may be provided when updating an API object. All fields in UpdateOptions should also be present in PatchOptions.",
"dryRun": "When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed",
"fieldManager": "fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.",
- "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields, provided that the `ServerSideFieldValidation` feature gate is also enabled. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23 and is the default behavior when the `ServerSideFieldValidation` feature gate is disabled. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default when the `ServerSideFieldValidation` feature gate is enabled. - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.",
+ "fieldValidation": "fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.",
}
func (UpdateOptions) SwaggerDoc() map[string]string {
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go
index b7590f0b3..afe01ed5a 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.conversion.go
@@ -426,6 +426,13 @@ func autoConvert_url_Values_To_v1_ListOptions(in *url.Values, out *ListOptions,
} else {
out.Continue = ""
}
+ if values, ok := map[string][]string(*in)["sendInitialEvents"]; ok && len(values) > 0 {
+ if err := runtime.Convert_Slice_string_To_Pointer_bool(&values, &out.SendInitialEvents, s); err != nil {
+ return err
+ }
+ } else {
+ out.SendInitialEvents = nil
+ }
return nil
}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
index 418e6099f..7d29c504a 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/zz_generated.deepcopy.go
@@ -602,6 +602,11 @@ func (in *ListOptions) DeepCopyInto(out *ListOptions) {
*out = new(int64)
**out = **in
}
+ if in.SendInitialEvents != nil {
+ in, out := &in.SendInitialEvents, &out.SendInitialEvents
+ *out = new(bool)
+ **out = **in
+ }
return
}
diff --git a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go
index ef7e7c1e9..dff735dcf 100644
--- a/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go
+++ b/vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1/types_swagger_doc_generated.go
@@ -24,7 +24,7 @@ package v1beta1
// they are on one line! For multiple line or blocks that you want to ignore use ---.
// Any context after a --- is ignored.
//
-// Those methods can be generated by using hack/update-generated-swagger-docs.sh
+// Those methods can be generated by using hack/update-codegen.sh
// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT.
var map_PartialObjectMetadataList = map[string]string{
diff --git a/vendor/k8s.io/apimachinery/pkg/labels/labels.go b/vendor/k8s.io/apimachinery/pkg/labels/labels.go
index 8360d842b..19d823cef 100644
--- a/vendor/k8s.io/apimachinery/pkg/labels/labels.go
+++ b/vendor/k8s.io/apimachinery/pkg/labels/labels.go
@@ -77,6 +77,8 @@ func (ls Set) AsValidatedSelector() (Selector, error) {
// perform any validation.
// According to our measurements this is significantly faster
// in codepaths that matter at high scale.
+// Note: this method copies the Set; if the Set is immutable, consider wrapping it with ValidatedSetSelector
+// instead, which does not copy.
func (ls Set) AsSelectorPreValidated() Selector {
return SelectorFromValidatedSet(ls)
}
diff --git a/vendor/k8s.io/apimachinery/pkg/labels/selector.go b/vendor/k8s.io/apimachinery/pkg/labels/selector.go
index 891004389..5e6014240 100644
--- a/vendor/k8s.io/apimachinery/pkg/labels/selector.go
+++ b/vendor/k8s.io/apimachinery/pkg/labels/selector.go
@@ -149,14 +149,12 @@ type Requirement struct {
// NewRequirement is the constructor for a Requirement.
// If any of these rules is violated, an error is returned:
-// (1) The operator can only be In, NotIn, Equals, DoubleEquals, Gt, Lt, NotEquals, Exists, or DoesNotExist.
-// (2) If the operator is In or NotIn, the values set must be non-empty.
-// (3) If the operator is Equals, DoubleEquals, or NotEquals, the values set must contain one value.
-// (4) If the operator is Exists or DoesNotExist, the value set must be empty.
-// (5) If the operator is Gt or Lt, the values set must contain only one value, which will be interpreted as an integer.
-// (6) The key is invalid due to its length, or sequence
-//
-// of characters. See validateLabelKey for more details.
+// 1. The operator can only be In, NotIn, Equals, DoubleEquals, Gt, Lt, NotEquals, Exists, or DoesNotExist.
+// 2. If the operator is In or NotIn, the values set must be non-empty.
+// 3. If the operator is Equals, DoubleEquals, or NotEquals, the values set must contain one value.
+// 4. If the operator is Exists or DoesNotExist, the value set must be empty.
+// 5. If the operator is Gt or Lt, the values set must contain only one value, which will be interpreted as an integer.
+// 6. The key is invalid due to its length, or sequence of characters. See validateLabelKey for more details.
//
// The empty string is a valid value in the input values set.
// Returned error, if not nil, is guaranteed to be an aggregated field.ErrorList
@@ -213,22 +211,15 @@ func (r *Requirement) hasValue(value string) bool {
// Matches returns true if the Requirement matches the input Labels.
// There is a match in the following cases:
-// (1) The operator is Exists and Labels has the Requirement's key.
-// (2) The operator is In, Labels has the Requirement's key and Labels'
-//
-// value for that key is in Requirement's value set.
-//
-// (3) The operator is NotIn, Labels has the Requirement's key and
-//
-// Labels' value for that key is not in Requirement's value set.
-//
-// (4) The operator is DoesNotExist or NotIn and Labels does not have the
-//
-// Requirement's key.
-//
-// (5) The operator is GreaterThanOperator or LessThanOperator, and Labels has
-//
-// the Requirement's key and the corresponding value satisfies mathematical inequality.
+// 1. The operator is Exists and Labels has the Requirement's key.
+// 2. The operator is In, Labels has the Requirement's key and Labels'
+// value for that key is in Requirement's value set.
+// 3. The operator is NotIn, Labels has the Requirement's key and
+// Labels' value for that key is not in Requirement's value set.
+// 4. The operator is DoesNotExist or NotIn and Labels does not have the
+// Requirement's key.
+// 5. The operator is GreaterThanOperator or LessThanOperator, and Labels has
+// the Requirement's key and the corresponding value satisfies mathematical inequality.
func (r *Requirement) Matches(ls Labels) bool {
switch r.operator {
case selection.In, selection.Equals, selection.DoubleEquals:
@@ -872,15 +863,14 @@ func (p *Parser) parseExactValue() (sets.String, error) {
// "x in (foo,,baz),y,z notin ()"
//
// Note:
-//
-// (1) Inclusion - " in " - denotes that the KEY exists and is equal to any of the
-// VALUEs in its requirement
-// (2) Exclusion - " notin " - denotes that the KEY is not equal to any
-// of the VALUEs in its requirement or does not exist
-// (3) The empty string is a valid VALUE
-// (4) A requirement with just a KEY - as in "y" above - denotes that
-// the KEY exists and can be any VALUE.
-// (5) A requirement with just !KEY requires that the KEY not exist.
+// 1. Inclusion - " in " - denotes that the KEY exists and is equal to any of the
+// VALUEs in its requirement
+// 2. Exclusion - " notin " - denotes that the KEY is not equal to any
+// of the VALUEs in its requirement or does not exist
+// 3. The empty string is a valid VALUE
+// 4. A requirement with just a KEY - as in "y" above - denotes that
+// the KEY exists and can be any VALUE.
+// 5. A requirement with just !KEY requires that the KEY not exist.
func Parse(selector string, opts ...field.PathOption) (Selector, error) {
parsedSelector, err := parse(selector, field.ToPath(opts...))
if err == nil {
@@ -948,6 +938,8 @@ func ValidatedSelectorFromSet(ls Set) (Selector, error) {
// SelectorFromValidatedSet returns a Selector which will match exactly the given Set.
// A nil and empty Sets are considered equivalent to Everything().
// It assumes that Set is already validated and doesn't do any validation.
+// Note: this method copies the Set; if the Set is immutable, consider wrapping it with ValidatedSetSelector
+// instead, which does not copy.
func SelectorFromValidatedSet(ls Set) Selector {
if ls == nil || len(ls) == 0 {
return internalSelector{}
@@ -969,3 +961,76 @@ func SelectorFromValidatedSet(ls Set) Selector {
func ParseToRequirements(selector string, opts ...field.PathOption) ([]Requirement, error) {
return parse(selector, field.ToPath(opts...))
}
+
+// ValidatedSetSelector wraps a Set, allowing it to implement the Selector interface. Unlike
+// Set.AsSelectorPreValidated (which copies the input Set), this type simply wraps the underlying
+// Set. As a result, it is substantially more efficient. A nil and empty Sets are considered
+// equivalent to Everything().
+//
+// Callers MUST ensure the underlying Set is not mutated, and that it is already validated. If these
+// constraints are not met, Set.AsValidatedSelector should be preferred
+//
+// None of the Selector methods mutate the underlying Set, but Add() and Requirements() convert to
+// the less optimized version.
+type ValidatedSetSelector Set
+
+func (s ValidatedSetSelector) Matches(labels Labels) bool {
+ for k, v := range s {
+ if !labels.Has(k) || v != labels.Get(k) {
+ return false
+ }
+ }
+ return true
+}
+
+func (s ValidatedSetSelector) Empty() bool {
+ return len(s) == 0
+}
+
+func (s ValidatedSetSelector) String() string {
+ keys := make([]string, 0, len(s))
+ for k := range s {
+ keys = append(keys, k)
+ }
+ // Ensure deterministic output
+ sort.Strings(keys)
+ b := strings.Builder{}
+ for i, key := range keys {
+ v := s[key]
+ b.Grow(len(key) + 2 + len(v))
+ if i != 0 {
+ b.WriteString(",")
+ }
+ b.WriteString(key)
+ b.WriteString("=")
+ b.WriteString(v)
+ }
+ return b.String()
+}
+
+func (s ValidatedSetSelector) Add(r ...Requirement) Selector {
+ return s.toFullSelector().Add(r...)
+}
+
+func (s ValidatedSetSelector) Requirements() (requirements Requirements, selectable bool) {
+ return s.toFullSelector().Requirements()
+}
+
+func (s ValidatedSetSelector) DeepCopySelector() Selector {
+ res := make(ValidatedSetSelector, len(s))
+ for k, v := range s {
+ res[k] = v
+ }
+ return res
+}
+
+func (s ValidatedSetSelector) RequiresExactMatch(label string) (value string, found bool) {
+ v, f := s[label]
+ return v, f
+}
+
+func (s ValidatedSetSelector) toFullSelector() Selector {
+ return SelectorFromValidatedSet(Set(s))
+}
+
+var _ Selector = ValidatedSetSelector{}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
index b21eb664e..54ccb7a74 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/schema/group_version.go
@@ -191,8 +191,7 @@ func (gv GroupVersion) Identifier() string {
// if none of the options match the group. It prefers a match to group and version over just group.
// TODO: Move GroupVersion to a package under pkg/runtime, since it's used by scheme.
// TODO: Introduce an adapter type between GroupVersion and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
-//
-// in fewer places.
+// in fewer places.
func (gv GroupVersion) KindForGroupVersionKinds(kinds []GroupVersionKind) (target GroupVersionKind, ok bool) {
for _, gvk := range kinds {
if gvk.Group == gv.Group && gvk.Version == gv.Version {
@@ -240,8 +239,7 @@ func (gv GroupVersion) WithResource(resource string) GroupVersionResource {
// GroupVersions can be used to represent a set of desired group versions.
// TODO: Move GroupVersions to a package under pkg/runtime, since it's used by scheme.
// TODO: Introduce an adapter type between GroupVersions and runtime.GroupVersioner, and use LegacyCodec(GroupVersion)
-//
-// in fewer places.
+// in fewer places.
type GroupVersions []GroupVersion
// Identifier implements runtime.GroupVersioner interface.
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
index 18b25a994..a5b116718 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/scheme.go
@@ -118,8 +118,7 @@ func (s *Scheme) Converter() *conversion.Converter {
// API group and version that would never be updated.
//
// TODO: there is discussion about removing unversioned and replacing it with objects that are manifest into
-//
-// every version with particular schemas. Resolve this method at that point.
+// every version with particular schemas. Resolve this method at that point.
func (s *Scheme) AddUnversionedTypes(version schema.GroupVersion, types ...Object) {
s.addObservedVersion(version)
s.AddKnownTypes(version, types...)
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go
index 21944f2d8..ff9820842 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/codec_factory.go
@@ -259,8 +259,7 @@ func (f CodecFactory) SupportedMediaTypes() []runtime.SerializerInfo {
// invoke CodecForVersions. Callers that need only to read data should use UniversalDecoder().
//
// TODO: make this call exist only in pkg/api, and initialize it with the set of default versions.
-//
-// All other callers will be forced to request a Codec directly.
+// All other callers will be forced to request a Codec directly.
func (f CodecFactory) LegacyCodec(version ...schema.GroupVersion) runtime.Codec {
return versioning.NewDefaultingCodecForScheme(f.scheme, f.legacySerializer, f.universal, schema.GroupVersions(version), runtime.InternalGroupVersioner)
}
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go
index 446633182..25f955ed7 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/serializer/versioning/versioning.go
@@ -147,7 +147,7 @@ func (c *codec) Decode(data []byte, defaultGVK *schema.GroupVersionKind, into ru
}
if d, ok := obj.(runtime.NestedObjectDecoder); ok {
- if err := d.DecodeNestedObjects(runtime.WithoutVersionDecoder{c.decoder}); err != nil {
+ if err := d.DecodeNestedObjects(runtime.WithoutVersionDecoder{Decoder: c.decoder}); err != nil {
if strictErr, ok := runtime.AsStrictDecodingError(err); ok {
// save the strictDecodingError let and the caller decide what to do with it
strictDecodingErrs = append(strictDecodingErrs, strictErr.Errors()...)
diff --git a/vendor/k8s.io/apimachinery/pkg/runtime/types.go b/vendor/k8s.io/apimachinery/pkg/runtime/types.go
index 3dc9a5a2f..ce77c7910 100644
--- a/vendor/k8s.io/apimachinery/pkg/runtime/types.go
+++ b/vendor/k8s.io/apimachinery/pkg/runtime/types.go
@@ -123,7 +123,7 @@ type Unknown struct {
// Raw will hold the complete serialized object which couldn't be matched
// with a registered type. Most likely, nothing should be done with this
// except for passing it through the system.
- Raw []byte `protobuf:"bytes,2,opt,name=raw"`
+ Raw []byte `json:"-" protobuf:"bytes,2,opt,name=raw"`
// ContentEncoding is encoding used to encode 'Raw' data.
// Unspecified means no encoding.
ContentEncoding string `protobuf:"bytes,3,opt,name=contentEncoding"`
diff --git a/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
index b19750f3a..29fb4f950 100644
--- a/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
+++ b/vendor/k8s.io/apimachinery/pkg/types/namespacedname.go
@@ -37,3 +37,13 @@ const (
func (n NamespacedName) String() string {
return n.Namespace + string(Separator) + n.Name
}
+
+// MarshalLog emits a struct containing required key/value pair
+func (n NamespacedName) MarshalLog() interface{} {
+ return struct {
+ Name, Namespace string
+ }{
+ Name: n.Name,
+ Namespace: n.Namespace,
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go
index 1f5a04fd4..1b60d145c 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/errors/errors.go
@@ -214,7 +214,7 @@ func CreateAggregateFromMessageCountMap(m MessageCountMap) Aggregate {
return NewAggregate(result)
}
-// Reduce will return err or, if err is an Aggregate and only has one item,
+// Reduce will return err or nil, if err is an Aggregate and only has one item,
// the first item in the aggregate.
func Reduce(err error) error {
if agg, ok := err.(Aggregate); ok && err != nil {
diff --git a/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go b/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go
index ca08f8561..9b3c9c8d5 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/framer/framer.go
@@ -32,7 +32,7 @@ func NewLengthDelimitedFrameWriter(w io.Writer) io.Writer {
return &lengthDelimitedFrameWriter{w: w}
}
-// Write writes a single frame to the nested writer, prepending it with the length in
+// Write writes a single frame to the nested writer, prepending it with the length
// in bytes of data (as a 4 byte, bigendian uint32).
func (w *lengthDelimitedFrameWriter) Write(data []byte) (int, error) {
binary.BigEndian.PutUint32(w.h[:], uint32(len(data)))
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/endpoints.yaml b/vendor/k8s.io/apimachinery/pkg/util/managedfields/endpoints.yaml
new file mode 100644
index 000000000..a667e9834
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/endpoints.yaml
@@ -0,0 +1,7018 @@
+apiVersion: v1
+kind: Endpoints
+metadata:
+ creationTimestamp: '2016-10-04T17:45:58Z'
+ labels:
+ app: my-app
+ name: app-server
+ namespace: default
+ resourceVersion: '184597135'
+ selfLink: /self/link
+ uid: 6826f086-8a5a-11e6-8d09-42010a800005
+subsets:
+- addresses:
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0000
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0001
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0002
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0003
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0004
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0005
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0006
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0007
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0008
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0009
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0010
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0011
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0012
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0013
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0014
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0015
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0016
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0017
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0018
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0019
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0020
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0021
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0022
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0023
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0024
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0025
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0026
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0027
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0028
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0029
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0030
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0031
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0032
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0033
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0034
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0035
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0036
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0037
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0038
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0039
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0040
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0041
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0042
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0043
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0044
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0045
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0046
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0047
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0048
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0049
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0050
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0051
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0052
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0053
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0054
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0055
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0056
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0057
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0058
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0059
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0060
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0061
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0062
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0063
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0064
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0065
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0066
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0067
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0068
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0069
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0070
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0071
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0072
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0073
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0074
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0075
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0076
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0077
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0078
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0079
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0080
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0081
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0082
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0083
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0084
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0085
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0086
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0087
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0088
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0089
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0090
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0091
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0092
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0093
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0094
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0095
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0096
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0097
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0098
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0099
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0100
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0101
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0102
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0103
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0104
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0105
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0106
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0107
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0108
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0109
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0110
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0111
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0112
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0113
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0114
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0115
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0116
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0117
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0118
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0119
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0120
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0121
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0122
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0123
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0124
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0125
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0126
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0127
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0128
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0129
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0130
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0131
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0132
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0133
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0134
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0135
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0136
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0137
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0138
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0139
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0140
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0141
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0142
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0143
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0144
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0145
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0146
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0147
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0148
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0149
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0150
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0151
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0152
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0153
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0154
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0155
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0156
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0157
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0158
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0159
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0160
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0161
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0162
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0163
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0164
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0165
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0166
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0167
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0168
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0169
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0170
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0171
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0172
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0173
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0174
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0175
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0176
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0177
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0178
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0179
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0180
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0181
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0182
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0183
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0184
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0185
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0186
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0187
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0188
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0189
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0190
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0191
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0192
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0193
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0194
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0195
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0196
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0197
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0198
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0199
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0200
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0201
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0202
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0203
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0204
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0205
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0206
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0207
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0208
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0209
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0210
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0211
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0212
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0213
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0214
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0215
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0216
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0217
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0218
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0219
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0220
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0221
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0222
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0223
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0224
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0225
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0226
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0227
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0228
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0229
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0230
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0231
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0232
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0233
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0234
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0235
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0236
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0237
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0238
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0239
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0240
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0241
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0242
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0243
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0244
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0245
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0246
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0247
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0248
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0249
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0250
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0251
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0252
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0253
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0254
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0255
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0256
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0257
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0258
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0259
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0260
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0261
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0262
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0263
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0264
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0265
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0266
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0267
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0268
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0269
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0270
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0271
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0272
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0273
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0274
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0275
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0276
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0277
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0278
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0279
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0280
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0281
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0282
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0283
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0284
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0285
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0286
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0287
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0288
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0289
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0290
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0291
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0292
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0293
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0294
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0295
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0296
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0297
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0298
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0299
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0300
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0301
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0302
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0303
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0304
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0305
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0306
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0307
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0308
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0309
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0310
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0311
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0312
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0313
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0314
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0315
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0316
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0317
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0318
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0319
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0320
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0321
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0322
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0323
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0324
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0325
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0326
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0327
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0328
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0329
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0330
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0331
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0332
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0333
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0334
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0335
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0336
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0337
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0338
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0339
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0340
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0341
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0342
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0343
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0344
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0345
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0346
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0347
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0348
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0349
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0350
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0351
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0352
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0353
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0354
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0355
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0356
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0357
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0358
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0359
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0360
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0361
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0362
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0363
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0364
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0365
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0366
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0367
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0368
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0369
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0370
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0371
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0372
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0373
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0374
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0375
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0376
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0377
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0378
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0379
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0380
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0381
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0382
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0383
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0384
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0385
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0386
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0387
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0388
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0389
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0390
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0391
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0392
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0393
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0394
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0395
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0396
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0397
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0398
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0399
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0400
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0401
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0402
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0403
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0404
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0405
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0406
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0407
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0408
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0409
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0410
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0411
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0412
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0413
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0414
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0415
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0416
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0417
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0418
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0419
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0420
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0421
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0422
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0423
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0424
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0425
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0426
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0427
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0428
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0429
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0430
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0431
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0432
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0433
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0434
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0435
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0436
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0437
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0438
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0439
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0440
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0441
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0442
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0443
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0444
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0445
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0446
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0447
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0448
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0449
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0450
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0451
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0452
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0453
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0454
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0455
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0456
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0457
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0458
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0459
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0460
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0461
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0462
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0463
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0464
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0465
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0466
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0467
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0468
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0469
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0470
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0471
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0472
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0473
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0474
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0475
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0476
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0477
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0478
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0479
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0480
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0481
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0482
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0483
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0484
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0485
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0486
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0487
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0488
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0489
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0490
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0491
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0492
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0493
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0494
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0495
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0496
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0497
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0498
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0499
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0500
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0501
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0502
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0503
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0504
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0505
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0506
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0507
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0508
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0509
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0510
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0511
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0512
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0513
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0514
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0515
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0516
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0517
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0518
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0519
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0520
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0521
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0522
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0523
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0524
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0525
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0526
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0527
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0528
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0529
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0530
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0531
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0532
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0533
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0534
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0535
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0536
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0537
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0538
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0539
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0540
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0541
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0542
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0543
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0544
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0545
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0546
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0547
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0548
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0549
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0550
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0551
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0552
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0553
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0554
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0555
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0556
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0557
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0558
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0559
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0560
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0561
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0562
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0563
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0564
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0565
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0566
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0567
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0568
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0569
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0570
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0571
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0572
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0573
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0574
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0575
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0576
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0577
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0578
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0579
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0580
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0581
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0582
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0583
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0584
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0585
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0586
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0587
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0588
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0589
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0590
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0591
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0592
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0593
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0594
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0595
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0596
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0597
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0598
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0599
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0600
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0601
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0602
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0603
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0604
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0605
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0606
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0607
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0608
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0609
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0610
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0611
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0612
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0613
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0614
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0615
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0616
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0617
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0618
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0619
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0620
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0621
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0622
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0623
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0624
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0625
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0626
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0627
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0628
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0629
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0630
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0631
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0632
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0633
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0634
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0635
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0636
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0637
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0638
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0639
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0640
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0641
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0642
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0643
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0644
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0645
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0646
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0647
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0648
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0649
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0650
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0651
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0652
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0653
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0654
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0655
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0656
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0657
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0658
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0659
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0660
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0661
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0662
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0663
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0664
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0665
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0666
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0667
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0668
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0669
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0670
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0671
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0672
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0673
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0674
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0675
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0676
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0677
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0678
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0679
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0680
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0681
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0682
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0683
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0684
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0685
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0686
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0687
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0688
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0689
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0690
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0691
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0692
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0693
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0694
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0695
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0696
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0697
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0698
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0699
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0700
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0701
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0702
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0703
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0704
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0705
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0706
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0707
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0708
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0709
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0710
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0711
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0712
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0713
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0714
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0715
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0716
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0717
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0718
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0719
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0720
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0721
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0722
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0723
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0724
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0725
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0726
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0727
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0728
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0729
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0730
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0731
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0732
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0733
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0734
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0735
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0736
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0737
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0738
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0739
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0740
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0741
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0742
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0743
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0744
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0745
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0746
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0747
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0748
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0749
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0750
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0751
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0752
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0753
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0754
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0755
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0756
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0757
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0758
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0759
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0760
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0761
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0762
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0763
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0764
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0765
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0766
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0767
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0768
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0769
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0770
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0771
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0772
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0773
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0774
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0775
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0776
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0777
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0778
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0779
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0780
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0781
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0782
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0783
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0784
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0785
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0786
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0787
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0788
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0789
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0790
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0791
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0792
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0793
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0794
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0795
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0796
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0797
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0798
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0799
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0800
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0801
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0802
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0803
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0804
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0805
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0806
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0807
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0808
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0809
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0810
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0811
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0812
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0813
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0814
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0815
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0816
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0817
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0818
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0819
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0820
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0821
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0822
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0823
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0824
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0825
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0826
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0827
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0828
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0829
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0830
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0831
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0832
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0833
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0834
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0835
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0836
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0837
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0838
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0839
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0840
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0841
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0842
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0843
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0844
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0845
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0846
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0847
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0848
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0849
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0850
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0851
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0852
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0853
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0854
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0855
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0856
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0857
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0858
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0859
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0860
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0861
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0862
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0863
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0864
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0865
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0866
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0867
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0868
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0869
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0870
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0871
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0872
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0873
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0874
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0875
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0876
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0877
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0878
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0879
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0880
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0881
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0882
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0883
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0884
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0885
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0886
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0887
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0888
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0889
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0890
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0891
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0892
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0893
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0894
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0895
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0896
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0897
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0898
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0899
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0900
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0901
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0902
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0903
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0904
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0905
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0906
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0907
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0908
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0909
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0910
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0911
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0912
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0913
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0914
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0915
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0916
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0917
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0918
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0919
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0920
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0921
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0922
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0923
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0924
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0925
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0926
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0927
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0928
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0929
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0930
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0931
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0932
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0933
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0934
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0935
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0936
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0937
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0938
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0939
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0940
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0941
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0942
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0943
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0944
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0945
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0946
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0947
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0948
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0949
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0950
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0951
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0952
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0953
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0954
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0955
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0956
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0957
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0958
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0959
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0960
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0961
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0962
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0963
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0964
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0965
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0966
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0967
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0968
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0969
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0970
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0971
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0972
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0973
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0974
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0975
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0976
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0977
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0978
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0979
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0980
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0981
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0982
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0983
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0984
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0985
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0986
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0987
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0988
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0989
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0990
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0991
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0992
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0993
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0994
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0995
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0996
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0997
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0998
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ - ip: 10.0.0.1
+ targetRef:
+ kind: Pod
+ name: pod-name-1234-0999
+ namespace: default
+ resourceVersion: '1234567890'
+ uid: 11111111-2222-3333-4444-555555555555
+ ports:
+ - name: port-name
+ port: 8080
+ protocol: TCP
+
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go
new file mode 100644
index 000000000..978ffb3c3
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/fieldmanager.go
@@ -0,0 +1,57 @@
+/*
+Copyright 2018 The Kubernetes 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 managedfields
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/managedfields/internal"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+// FieldManager updates the managed fields and merges applied
+// configurations.
+type FieldManager = internal.FieldManager
+
+// NewDefaultFieldManager creates a new FieldManager that merges apply requests
+// and update managed fields for other types of requests.
+func NewDefaultFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (*FieldManager, error) {
+ f, err := internal.NewStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub, resetFields)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create field manager: %v", err)
+ }
+ return internal.NewDefaultFieldManager(f, typeConverter, objectConverter, objectCreater, kind, subresource), nil
+}
+
+// NewDefaultCRDFieldManager creates a new FieldManager specifically for
+// CRDs. This allows for the possibility of fields which are not defined
+// in models, as well as having no models defined at all.
+func NewDefaultCRDFieldManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, hub schema.GroupVersion, subresource string, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (_ *FieldManager, err error) {
+ f, err := internal.NewCRDStructuredMergeManager(typeConverter, objectConverter, objectDefaulter, kind.GroupVersion(), hub, resetFields)
+ if err != nil {
+ return nil, fmt.Errorf("failed to create field manager: %v", err)
+ }
+ return internal.NewDefaultFieldManager(f, typeConverter, objectConverter, objectCreater, kind, subresource), nil
+}
+
+func ValidateManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) error {
+ _, err := internal.DecodeManagedFields(encodedManagedFields)
+ return err
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/atmostevery.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/atmostevery.go
new file mode 100644
index 000000000..b75ef7416
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/atmostevery.go
@@ -0,0 +1,60 @@
+/*
+Copyright 2020 The Kubernetes 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 internal
+
+import (
+ "sync"
+ "time"
+)
+
+// AtMostEvery will never run the method more than once every specified
+// duration.
+type AtMostEvery struct {
+ delay time.Duration
+ lastCall time.Time
+ mutex sync.Mutex
+}
+
+// NewAtMostEvery creates a new AtMostEvery, that will run the method at
+// most every given duration.
+func NewAtMostEvery(delay time.Duration) *AtMostEvery {
+ return &AtMostEvery{
+ delay: delay,
+ }
+}
+
+// updateLastCall returns true if the lastCall time has been updated,
+// false if it was too early.
+func (s *AtMostEvery) updateLastCall() bool {
+ s.mutex.Lock()
+ defer s.mutex.Unlock()
+ if time.Since(s.lastCall) < s.delay {
+ return false
+ }
+ s.lastCall = time.Now()
+ return true
+}
+
+// Do will run the method if enough time has passed, and return true.
+// Otherwise, it does nothing and returns false.
+func (s *AtMostEvery) Do(fn func()) bool {
+ if !s.updateLastCall() {
+ return false
+ }
+ fn()
+ return true
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/buildmanagerinfo.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/buildmanagerinfo.go
new file mode 100644
index 000000000..fa342ca13
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/buildmanagerinfo.go
@@ -0,0 +1,74 @@
+/*
+Copyright 2019 The Kubernetes 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 internal
+
+import (
+ "fmt"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+type buildManagerInfoManager struct {
+ fieldManager Manager
+ groupVersion schema.GroupVersion
+ subresource string
+}
+
+var _ Manager = &buildManagerInfoManager{}
+
+// NewBuildManagerInfoManager creates a new Manager that converts the manager name into a unique identifier
+// combining operation and version for update requests, and just operation for apply requests.
+func NewBuildManagerInfoManager(f Manager, gv schema.GroupVersion, subresource string) Manager {
+ return &buildManagerInfoManager{
+ fieldManager: f,
+ groupVersion: gv,
+ subresource: subresource,
+ }
+}
+
+// Update implements Manager.
+func (f *buildManagerInfoManager) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ manager, err := f.buildManagerInfo(manager, metav1.ManagedFieldsOperationUpdate)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to build manager identifier: %v", err)
+ }
+ return f.fieldManager.Update(liveObj, newObj, managed, manager)
+}
+
+// Apply implements Manager.
+func (f *buildManagerInfoManager) Apply(liveObj, appliedObj runtime.Object, managed Managed, manager string, force bool) (runtime.Object, Managed, error) {
+ manager, err := f.buildManagerInfo(manager, metav1.ManagedFieldsOperationApply)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to build manager identifier: %v", err)
+ }
+ return f.fieldManager.Apply(liveObj, appliedObj, managed, manager, force)
+}
+
+func (f *buildManagerInfoManager) buildManagerInfo(prefix string, operation metav1.ManagedFieldsOperationType) (string, error) {
+ managerInfo := metav1.ManagedFieldsEntry{
+ Manager: prefix,
+ Operation: operation,
+ APIVersion: f.groupVersion.String(),
+ Subresource: f.subresource,
+ }
+ if managerInfo.Manager == "" {
+ managerInfo.Manager = "unknown"
+ }
+ return BuildManagerIdentifier(&managerInfo)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/capmanagers.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/capmanagers.go
new file mode 100644
index 000000000..8951932ba
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/capmanagers.go
@@ -0,0 +1,133 @@
+/*
+Copyright 2019 The Kubernetes 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 internal
+
+import (
+ "fmt"
+ "sort"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+type capManagersManager struct {
+ fieldManager Manager
+ maxUpdateManagers int
+ oldUpdatesManagerName string
+}
+
+var _ Manager = &capManagersManager{}
+
+// NewCapManagersManager creates a new wrapped FieldManager which ensures that the number of managers from updates
+// does not exceed maxUpdateManagers, by merging some of the oldest entries on each update.
+func NewCapManagersManager(fieldManager Manager, maxUpdateManagers int) Manager {
+ return &capManagersManager{
+ fieldManager: fieldManager,
+ maxUpdateManagers: maxUpdateManagers,
+ oldUpdatesManagerName: "ancient-changes",
+ }
+}
+
+// Update implements Manager.
+func (f *capManagersManager) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ object, managed, err := f.fieldManager.Update(liveObj, newObj, managed, manager)
+ if err != nil {
+ return object, managed, err
+ }
+ if managed, err = f.capUpdateManagers(managed); err != nil {
+ return nil, nil, fmt.Errorf("failed to cap update managers: %v", err)
+ }
+ return object, managed, nil
+}
+
+// Apply implements Manager.
+func (f *capManagersManager) Apply(liveObj, appliedObj runtime.Object, managed Managed, fieldManager string, force bool) (runtime.Object, Managed, error) {
+ return f.fieldManager.Apply(liveObj, appliedObj, managed, fieldManager, force)
+}
+
+// capUpdateManagers merges a number of the oldest update entries into versioned buckets,
+// such that the number of entries from updates does not exceed f.maxUpdateManagers.
+func (f *capManagersManager) capUpdateManagers(managed Managed) (newManaged Managed, err error) {
+ // Gather all entries from updates
+ updaters := []string{}
+ for manager, fields := range managed.Fields() {
+ if !fields.Applied() {
+ updaters = append(updaters, manager)
+ }
+ }
+ if len(updaters) <= f.maxUpdateManagers {
+ return managed, nil
+ }
+
+ // If we have more than the maximum, sort the update entries by time, oldest first.
+ sort.Slice(updaters, func(i, j int) bool {
+ iTime, jTime, iSeconds, jSeconds := managed.Times()[updaters[i]], managed.Times()[updaters[j]], int64(0), int64(0)
+ if iTime != nil {
+ iSeconds = iTime.Unix()
+ }
+ if jTime != nil {
+ jSeconds = jTime.Unix()
+ }
+ if iSeconds != jSeconds {
+ return iSeconds < jSeconds
+ }
+ return updaters[i] < updaters[j]
+ })
+
+ // Merge the oldest updaters with versioned bucket managers until the number of updaters is under the cap
+ versionToFirstManager := map[string]string{}
+ for i, length := 0, len(updaters); i < len(updaters) && length > f.maxUpdateManagers; i++ {
+ manager := updaters[i]
+ vs := managed.Fields()[manager]
+ time := managed.Times()[manager]
+ version := string(vs.APIVersion())
+
+ // Create a new manager identifier for the versioned bucket entry.
+ // The version for this manager comes from the version of the update being merged into the bucket.
+ bucket, err := BuildManagerIdentifier(&metav1.ManagedFieldsEntry{
+ Manager: f.oldUpdatesManagerName,
+ Operation: metav1.ManagedFieldsOperationUpdate,
+ APIVersion: version,
+ })
+ if err != nil {
+ return managed, fmt.Errorf("failed to create bucket manager for version %v: %v", version, err)
+ }
+
+ // Merge the fieldets if this is not the first time the version was seen.
+ // Otherwise just record the manager name in versionToFirstManager
+ if first, ok := versionToFirstManager[version]; ok {
+ // If the bucket doesn't exists yet, create one.
+ if _, ok := managed.Fields()[bucket]; !ok {
+ s := managed.Fields()[first]
+ delete(managed.Fields(), first)
+ managed.Fields()[bucket] = s
+ }
+
+ managed.Fields()[bucket] = fieldpath.NewVersionedSet(vs.Set().Union(managed.Fields()[bucket].Set()), vs.APIVersion(), vs.Applied())
+ delete(managed.Fields(), manager)
+ length--
+
+ // Use the time from the update being merged into the bucket, since it is more recent.
+ managed.Times()[bucket] = time
+ } else {
+ versionToFirstManager[version] = manager
+ }
+ }
+
+ return managed, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/conflict.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/conflict.go
new file mode 100644
index 000000000..8c044c915
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/conflict.go
@@ -0,0 +1,89 @@
+/*
+Copyright 2019 The Kubernetes 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 internal
+
+import (
+ "encoding/json"
+ "fmt"
+ "sort"
+ "strings"
+ "time"
+
+ "k8s.io/apimachinery/pkg/api/errors"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+ "sigs.k8s.io/structured-merge-diff/v4/merge"
+)
+
+// NewConflictError returns an error including details on the requests apply conflicts
+func NewConflictError(conflicts merge.Conflicts) *errors.StatusError {
+ causes := []metav1.StatusCause{}
+ for _, conflict := range conflicts {
+ causes = append(causes, metav1.StatusCause{
+ Type: metav1.CauseTypeFieldManagerConflict,
+ Message: fmt.Sprintf("conflict with %v", printManager(conflict.Manager)),
+ Field: conflict.Path.String(),
+ })
+ }
+ return errors.NewApplyConflict(causes, getConflictMessage(conflicts))
+}
+
+func getConflictMessage(conflicts merge.Conflicts) string {
+ if len(conflicts) == 1 {
+ return fmt.Sprintf("Apply failed with 1 conflict: conflict with %v: %v", printManager(conflicts[0].Manager), conflicts[0].Path)
+ }
+
+ m := map[string][]fieldpath.Path{}
+ for _, conflict := range conflicts {
+ m[conflict.Manager] = append(m[conflict.Manager], conflict.Path)
+ }
+
+ uniqueManagers := []string{}
+ for manager := range m {
+ uniqueManagers = append(uniqueManagers, manager)
+ }
+
+ // Print conflicts by sorted managers.
+ sort.Strings(uniqueManagers)
+
+ messages := []string{}
+ for _, manager := range uniqueManagers {
+ messages = append(messages, fmt.Sprintf("conflicts with %v:", printManager(manager)))
+ for _, path := range m[manager] {
+ messages = append(messages, fmt.Sprintf("- %v", path))
+ }
+ }
+ return fmt.Sprintf("Apply failed with %d conflicts: %s", len(conflicts), strings.Join(messages, "\n"))
+}
+
+func printManager(manager string) string {
+ encodedManager := &metav1.ManagedFieldsEntry{}
+ if err := json.Unmarshal([]byte(manager), encodedManager); err != nil {
+ return fmt.Sprintf("%q", manager)
+ }
+ managerStr := fmt.Sprintf("%q", encodedManager.Manager)
+ if encodedManager.Subresource != "" {
+ managerStr = fmt.Sprintf("%s with subresource %q", managerStr, encodedManager.Subresource)
+ }
+ if encodedManager.Operation == metav1.ManagedFieldsOperationUpdate {
+ if encodedManager.Time == nil {
+ return fmt.Sprintf("%s using %v", managerStr, encodedManager.APIVersion)
+ }
+ return fmt.Sprintf("%s using %v at %v", managerStr, encodedManager.APIVersion, encodedManager.Time.UTC().Format(time.RFC3339))
+ }
+ return managerStr
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/fieldmanager.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/fieldmanager.go
new file mode 100644
index 000000000..f3111d4bc
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/fieldmanager.go
@@ -0,0 +1,206 @@
+/*
+Copyright 2022 The Kubernetes 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 internal
+
+import (
+ "fmt"
+ "reflect"
+ "time"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/klog/v2"
+ "sigs.k8s.io/structured-merge-diff/v4/merge"
+)
+
+// DefaultMaxUpdateManagers defines the default maximum retained number of managedFields entries from updates
+// if the number of update managers exceeds this, the oldest entries will be merged until the number is below the maximum.
+// TODO(jennybuckley): Determine if this is really the best value. Ideally we wouldn't unnecessarily merge too many entries.
+const DefaultMaxUpdateManagers int = 10
+
+// DefaultTrackOnCreateProbability defines the default probability that the field management of an object
+// starts being tracked from the object's creation, instead of from the first time the object is applied to.
+const DefaultTrackOnCreateProbability float32 = 1
+
+var atMostEverySecond = NewAtMostEvery(time.Second)
+
+// FieldManager updates the managed fields and merges applied
+// configurations.
+type FieldManager struct {
+ fieldManager Manager
+ subresource string
+}
+
+// NewFieldManager creates a new FieldManager that decodes, manages, then re-encodes managedFields
+// on update and apply requests.
+func NewFieldManager(f Manager, subresource string) *FieldManager {
+ return &FieldManager{fieldManager: f, subresource: subresource}
+}
+
+// newDefaultFieldManager is a helper function which wraps a Manager with certain default logic.
+func NewDefaultFieldManager(f Manager, typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectCreater runtime.ObjectCreater, kind schema.GroupVersionKind, subresource string) *FieldManager {
+ return NewFieldManager(
+ NewLastAppliedUpdater(
+ NewLastAppliedManager(
+ NewProbabilisticSkipNonAppliedManager(
+ NewCapManagersManager(
+ NewBuildManagerInfoManager(
+ NewManagedFieldsUpdater(
+ NewStripMetaManager(f),
+ ), kind.GroupVersion(), subresource,
+ ), DefaultMaxUpdateManagers,
+ ), objectCreater, kind, DefaultTrackOnCreateProbability,
+ ), typeConverter, objectConverter, kind.GroupVersion()),
+ ), subresource,
+ )
+}
+
+func decodeLiveOrNew(liveObj, newObj runtime.Object, ignoreManagedFieldsFromRequestObject bool) (Managed, error) {
+ liveAccessor, err := meta.Accessor(liveObj)
+ if err != nil {
+ return nil, err
+ }
+
+ // We take the managedFields of the live object in case the request tries to
+ // manually set managedFields via a subresource.
+ if ignoreManagedFieldsFromRequestObject {
+ return emptyManagedFieldsOnErr(DecodeManagedFields(liveAccessor.GetManagedFields()))
+ }
+
+ // If the object doesn't have metadata, we should just return without trying to
+ // set the managedFields at all, so creates/updates/patches will work normally.
+ newAccessor, err := meta.Accessor(newObj)
+ if err != nil {
+ return nil, err
+ }
+
+ if isResetManagedFields(newAccessor.GetManagedFields()) {
+ return NewEmptyManaged(), nil
+ }
+
+ // If the managed field is empty or we failed to decode it,
+ // let's try the live object. This is to prevent clients who
+ // don't understand managedFields from deleting it accidentally.
+ managed, err := DecodeManagedFields(newAccessor.GetManagedFields())
+ if err != nil || len(managed.Fields()) == 0 {
+ return emptyManagedFieldsOnErr(DecodeManagedFields(liveAccessor.GetManagedFields()))
+ }
+ return managed, nil
+}
+
+func emptyManagedFieldsOnErr(managed Managed, err error) (Managed, error) {
+ if err != nil {
+ return NewEmptyManaged(), nil
+ }
+ return managed, nil
+}
+
+// Update is used when the object has already been merged (non-apply
+// use-case), and simply updates the managed fields in the output
+// object.
+func (f *FieldManager) Update(liveObj, newObj runtime.Object, manager string) (object runtime.Object, err error) {
+ // First try to decode the managed fields provided in the update,
+ // This is necessary to allow directly updating managed fields.
+ isSubresource := f.subresource != ""
+ managed, err := decodeLiveOrNew(liveObj, newObj, isSubresource)
+ if err != nil {
+ return newObj, nil
+ }
+
+ RemoveObjectManagedFields(newObj)
+
+ if object, managed, err = f.fieldManager.Update(liveObj, newObj, managed, manager); err != nil {
+ return nil, err
+ }
+
+ if err = EncodeObjectManagedFields(object, managed); err != nil {
+ return nil, fmt.Errorf("failed to encode managed fields: %v", err)
+ }
+
+ return object, nil
+}
+
+// UpdateNoErrors is the same as Update, but it will not return
+// errors. If an error happens, the object is returned with
+// managedFields cleared.
+func (f *FieldManager) UpdateNoErrors(liveObj, newObj runtime.Object, manager string) runtime.Object {
+ obj, err := f.Update(liveObj, newObj, manager)
+ if err != nil {
+ atMostEverySecond.Do(func() {
+ ns, name := "unknown", "unknown"
+ if accessor, err := meta.Accessor(newObj); err == nil {
+ ns = accessor.GetNamespace()
+ name = accessor.GetName()
+ }
+
+ klog.ErrorS(err, "[SHOULD NOT HAPPEN] failed to update managedFields", "versionKind",
+ newObj.GetObjectKind().GroupVersionKind(), "namespace", ns, "name", name)
+ })
+ // Explicitly remove managedFields on failure, so that
+ // we can't have garbage in it.
+ RemoveObjectManagedFields(newObj)
+ return newObj
+ }
+ return obj
+}
+
+// Returns true if the managedFields indicate that the user is trying to
+// reset the managedFields, i.e. if the list is non-nil but empty, or if
+// the list has one empty item.
+func isResetManagedFields(managedFields []metav1.ManagedFieldsEntry) bool {
+ if len(managedFields) == 0 {
+ return managedFields != nil
+ }
+
+ if len(managedFields) == 1 {
+ return reflect.DeepEqual(managedFields[0], metav1.ManagedFieldsEntry{})
+ }
+
+ return false
+}
+
+// Apply is used when server-side apply is called, as it merges the
+// object and updates the managed fields.
+func (f *FieldManager) Apply(liveObj, appliedObj runtime.Object, manager string, force bool) (object runtime.Object, err error) {
+ // If the object doesn't have metadata, apply isn't allowed.
+ accessor, err := meta.Accessor(liveObj)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't get accessor: %v", err)
+ }
+
+ // Decode the managed fields in the live object, since it isn't allowed in the patch.
+ managed, err := DecodeManagedFields(accessor.GetManagedFields())
+ if err != nil {
+ return nil, fmt.Errorf("failed to decode managed fields: %v", err)
+ }
+
+ object, managed, err = f.fieldManager.Apply(liveObj, appliedObj, managed, manager, force)
+ if err != nil {
+ if conflicts, ok := err.(merge.Conflicts); ok {
+ return nil, NewConflictError(conflicts)
+ }
+ return nil, err
+ }
+
+ if err = EncodeObjectManagedFields(object, managed); err != nil {
+ return nil, fmt.Errorf("failed to encode managed fields: %v", err)
+ }
+
+ return object, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/fields.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/fields.go
new file mode 100644
index 000000000..08186191a
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/fields.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2018 The Kubernetes 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 internal
+
+import (
+ "bytes"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+// EmptyFields represents a set with no paths
+// It looks like metav1.Fields{Raw: []byte("{}")}
+var EmptyFields = func() metav1.FieldsV1 {
+ f, err := SetToFields(*fieldpath.NewSet())
+ if err != nil {
+ panic("should never happen")
+ }
+ return f
+}()
+
+// FieldsToSet creates a set paths from an input trie of fields
+func FieldsToSet(f metav1.FieldsV1) (s fieldpath.Set, err error) {
+ err = s.FromJSON(bytes.NewReader(f.Raw))
+ return s, err
+}
+
+// SetToFields creates a trie of fields from an input set of paths
+func SetToFields(s fieldpath.Set) (f metav1.FieldsV1, err error) {
+ f.Raw, err = s.ToJSON()
+ return f, err
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastapplied.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastapplied.go
new file mode 100644
index 000000000..b00b6b829
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastapplied.go
@@ -0,0 +1,50 @@
+/*
+Copyright 2022 The Kubernetes 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 internal
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation"
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+// LastAppliedConfigAnnotation is the annotation used to store the previous
+// configuration of a resource for use in a three way diff by UpdateApplyAnnotation.
+//
+// This is a copy of the corev1 annotation since we don't want to depend on the whole package.
+const LastAppliedConfigAnnotation = "kubectl.kubernetes.io/last-applied-configuration"
+
+// SetLastApplied sets the last-applied annotation the given value in
+// the object.
+func SetLastApplied(obj runtime.Object, value string) error {
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't get accessor: %v", err))
+ }
+ var annotations = accessor.GetAnnotations()
+ if annotations == nil {
+ annotations = map[string]string{}
+ }
+ annotations[LastAppliedConfigAnnotation] = value
+ if err := apimachineryvalidation.ValidateAnnotationsSize(annotations); err != nil {
+ delete(annotations, LastAppliedConfigAnnotation)
+ }
+ accessor.SetAnnotations(annotations)
+ return nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedmanager.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedmanager.go
new file mode 100644
index 000000000..3f6cf8821
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedmanager.go
@@ -0,0 +1,171 @@
+/*
+Copyright 2020 The Kubernetes 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 internal
+
+import (
+ "encoding/json"
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+ "sigs.k8s.io/structured-merge-diff/v4/merge"
+)
+
+type lastAppliedManager struct {
+ fieldManager Manager
+ typeConverter TypeConverter
+ objectConverter runtime.ObjectConvertor
+ groupVersion schema.GroupVersion
+}
+
+var _ Manager = &lastAppliedManager{}
+
+// NewLastAppliedManager converts the client-side apply annotation to
+// server-side apply managed fields
+func NewLastAppliedManager(fieldManager Manager, typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, groupVersion schema.GroupVersion) Manager {
+ return &lastAppliedManager{
+ fieldManager: fieldManager,
+ typeConverter: typeConverter,
+ objectConverter: objectConverter,
+ groupVersion: groupVersion,
+ }
+}
+
+// Update implements Manager.
+func (f *lastAppliedManager) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ return f.fieldManager.Update(liveObj, newObj, managed, manager)
+}
+
+// Apply will consider the last-applied annotation
+// for upgrading an object managed by client-side apply to server-side apply
+// without conflicts.
+func (f *lastAppliedManager) Apply(liveObj, newObj runtime.Object, managed Managed, manager string, force bool) (runtime.Object, Managed, error) {
+ newLiveObj, newManaged, newErr := f.fieldManager.Apply(liveObj, newObj, managed, manager, force)
+ // Upgrade the client-side apply annotation only from kubectl server-side-apply.
+ // To opt-out of this behavior, users may specify a different field manager.
+ if manager != "kubectl" {
+ return newLiveObj, newManaged, newErr
+ }
+
+ // Check if we have conflicts
+ if newErr == nil {
+ return newLiveObj, newManaged, newErr
+ }
+ conflicts, ok := newErr.(merge.Conflicts)
+ if !ok {
+ return newLiveObj, newManaged, newErr
+ }
+ conflictSet := conflictsToSet(conflicts)
+
+ // Check if conflicts are allowed due to client-side apply,
+ // and if so, then force apply
+ allowedConflictSet, err := f.allowedConflictsFromLastApplied(liveObj)
+ if err != nil {
+ return newLiveObj, newManaged, newErr
+ }
+ if !conflictSet.Difference(allowedConflictSet).Empty() {
+ newConflicts := conflictsDifference(conflicts, allowedConflictSet)
+ return newLiveObj, newManaged, newConflicts
+ }
+
+ return f.fieldManager.Apply(liveObj, newObj, managed, manager, true)
+}
+
+func (f *lastAppliedManager) allowedConflictsFromLastApplied(liveObj runtime.Object) (*fieldpath.Set, error) {
+ var accessor, err = meta.Accessor(liveObj)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't get accessor: %v", err))
+ }
+
+ // If there is no client-side apply annotation, then there is nothing to do
+ var annotations = accessor.GetAnnotations()
+ if annotations == nil {
+ return nil, fmt.Errorf("no last applied annotation")
+ }
+ var lastApplied, ok = annotations[LastAppliedConfigAnnotation]
+ if !ok || lastApplied == "" {
+ return nil, fmt.Errorf("no last applied annotation")
+ }
+
+ liveObjVersioned, err := f.objectConverter.ConvertToVersion(liveObj, f.groupVersion)
+ if err != nil {
+ return nil, fmt.Errorf("failed to convert live obj to versioned: %v", err)
+ }
+
+ liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned)
+ if err != nil {
+ return nil, fmt.Errorf("failed to convert live obj to typed: %v", err)
+ }
+
+ var lastAppliedObj = &unstructured.Unstructured{Object: map[string]interface{}{}}
+ err = json.Unmarshal([]byte(lastApplied), lastAppliedObj)
+ if err != nil {
+ return nil, fmt.Errorf("failed to decode last applied obj: %v in '%s'", err, lastApplied)
+ }
+
+ if lastAppliedObj.GetAPIVersion() != f.groupVersion.String() {
+ return nil, fmt.Errorf("expected version of last applied to match live object '%s', but got '%s': %v", f.groupVersion.String(), lastAppliedObj.GetAPIVersion(), err)
+ }
+
+ lastAppliedObjTyped, err := f.typeConverter.ObjectToTyped(lastAppliedObj)
+ if err != nil {
+ return nil, fmt.Errorf("failed to convert last applied to typed: %v", err)
+ }
+
+ lastAppliedObjFieldSet, err := lastAppliedObjTyped.ToFieldSet()
+ if err != nil {
+ return nil, fmt.Errorf("failed to create fieldset for last applied object: %v", err)
+ }
+
+ comparison, err := lastAppliedObjTyped.Compare(liveObjTyped)
+ if err != nil {
+ return nil, fmt.Errorf("failed to compare last applied object and live object: %v", err)
+ }
+
+ // Remove fields in last applied that are different, added, or missing in
+ // the live object.
+ // Because last-applied fields don't match the live object fields,
+ // then we don't own these fields.
+ lastAppliedObjFieldSet = lastAppliedObjFieldSet.
+ Difference(comparison.Modified).
+ Difference(comparison.Added).
+ Difference(comparison.Removed)
+
+ return lastAppliedObjFieldSet, nil
+}
+
+// TODO: replace with merge.Conflicts.ToSet()
+func conflictsToSet(conflicts merge.Conflicts) *fieldpath.Set {
+ conflictSet := fieldpath.NewSet()
+ for _, conflict := range []merge.Conflict(conflicts) {
+ conflictSet.Insert(conflict.Path)
+ }
+ return conflictSet
+}
+
+func conflictsDifference(conflicts merge.Conflicts, s *fieldpath.Set) merge.Conflicts {
+ newConflicts := []merge.Conflict{}
+ for _, conflict := range []merge.Conflict(conflicts) {
+ if !s.Has(conflict.Path) {
+ newConflicts = append(newConflicts, conflict)
+ }
+ }
+ return newConflicts
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedupdater.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedupdater.go
new file mode 100644
index 000000000..06e6c5d8c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/lastappliedupdater.go
@@ -0,0 +1,102 @@
+/*
+Copyright 2020 The Kubernetes 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 internal
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+)
+
+type lastAppliedUpdater struct {
+ fieldManager Manager
+}
+
+var _ Manager = &lastAppliedUpdater{}
+
+// NewLastAppliedUpdater sets the client-side apply annotation up to date with
+// server-side apply managed fields
+func NewLastAppliedUpdater(fieldManager Manager) Manager {
+ return &lastAppliedUpdater{
+ fieldManager: fieldManager,
+ }
+}
+
+// Update implements Manager.
+func (f *lastAppliedUpdater) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ return f.fieldManager.Update(liveObj, newObj, managed, manager)
+}
+
+// server-side apply managed fields
+func (f *lastAppliedUpdater) Apply(liveObj, newObj runtime.Object, managed Managed, manager string, force bool) (runtime.Object, Managed, error) {
+ liveObj, managed, err := f.fieldManager.Apply(liveObj, newObj, managed, manager, force)
+ if err != nil {
+ return liveObj, managed, err
+ }
+
+ // Sync the client-side apply annotation only from kubectl server-side apply.
+ // To opt-out of this behavior, users may specify a different field manager.
+ //
+ // If the client-side apply annotation doesn't exist,
+ // then continue because we have no annotation to update
+ if manager == "kubectl" && hasLastApplied(liveObj) {
+ lastAppliedValue, err := buildLastApplied(newObj)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to build last-applied annotation: %v", err)
+ }
+ err = SetLastApplied(liveObj, lastAppliedValue)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to set last-applied annotation: %v", err)
+ }
+ }
+ return liveObj, managed, err
+}
+
+func hasLastApplied(obj runtime.Object) bool {
+ var accessor, err = meta.Accessor(obj)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't get accessor: %v", err))
+ }
+ var annotations = accessor.GetAnnotations()
+ if annotations == nil {
+ return false
+ }
+ lastApplied, ok := annotations[LastAppliedConfigAnnotation]
+ return ok && len(lastApplied) > 0
+}
+
+func buildLastApplied(obj runtime.Object) (string, error) {
+ obj = obj.DeepCopyObject()
+
+ var accessor, err = meta.Accessor(obj)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't get accessor: %v", err))
+ }
+
+ // Remove the annotation from the object before encoding the object
+ var annotations = accessor.GetAnnotations()
+ delete(annotations, LastAppliedConfigAnnotation)
+ accessor.SetAnnotations(annotations)
+
+ lastApplied, err := runtime.Encode(unstructured.UnstructuredJSONScheme, obj)
+ if err != nil {
+ return "", fmt.Errorf("couldn't encode object into last applied annotation: %v", err)
+ }
+ return string(lastApplied), nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfields.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfields.go
new file mode 100644
index 000000000..9b4c20326
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfields.go
@@ -0,0 +1,248 @@
+/*
+Copyright 2018 The Kubernetes 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 internal
+
+import (
+ "encoding/json"
+ "fmt"
+ "sort"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+// ManagedInterface groups a fieldpath.ManagedFields together with the timestamps associated with each operation.
+type ManagedInterface interface {
+ // Fields gets the fieldpath.ManagedFields.
+ Fields() fieldpath.ManagedFields
+
+ // Times gets the timestamps associated with each operation.
+ Times() map[string]*metav1.Time
+}
+
+type managedStruct struct {
+ fields fieldpath.ManagedFields
+ times map[string]*metav1.Time
+}
+
+var _ ManagedInterface = &managedStruct{}
+
+// Fields implements ManagedInterface.
+func (m *managedStruct) Fields() fieldpath.ManagedFields {
+ return m.fields
+}
+
+// Times implements ManagedInterface.
+func (m *managedStruct) Times() map[string]*metav1.Time {
+ return m.times
+}
+
+// NewEmptyManaged creates an empty ManagedInterface.
+func NewEmptyManaged() ManagedInterface {
+ return NewManaged(fieldpath.ManagedFields{}, map[string]*metav1.Time{})
+}
+
+// NewManaged creates a ManagedInterface from a fieldpath.ManagedFields and the timestamps associated with each operation.
+func NewManaged(f fieldpath.ManagedFields, t map[string]*metav1.Time) ManagedInterface {
+ return &managedStruct{
+ fields: f,
+ times: t,
+ }
+}
+
+// RemoveObjectManagedFields removes the ManagedFields from the object
+// before we merge so that it doesn't appear in the ManagedFields
+// recursively.
+func RemoveObjectManagedFields(obj runtime.Object) {
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't get accessor: %v", err))
+ }
+ accessor.SetManagedFields(nil)
+}
+
+// EncodeObjectManagedFields converts and stores the fieldpathManagedFields into the objects ManagedFields
+func EncodeObjectManagedFields(obj runtime.Object, managed ManagedInterface) error {
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't get accessor: %v", err))
+ }
+
+ encodedManagedFields, err := encodeManagedFields(managed)
+ if err != nil {
+ return fmt.Errorf("failed to convert back managed fields to API: %v", err)
+ }
+ accessor.SetManagedFields(encodedManagedFields)
+
+ return nil
+}
+
+// DecodeManagedFields converts ManagedFields from the wire format (api format)
+// to the format used by sigs.k8s.io/structured-merge-diff
+func DecodeManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (ManagedInterface, error) {
+ managed := managedStruct{}
+ managed.fields = make(fieldpath.ManagedFields, len(encodedManagedFields))
+ managed.times = make(map[string]*metav1.Time, len(encodedManagedFields))
+
+ for i, encodedVersionedSet := range encodedManagedFields {
+ switch encodedVersionedSet.Operation {
+ case metav1.ManagedFieldsOperationApply, metav1.ManagedFieldsOperationUpdate:
+ default:
+ return nil, fmt.Errorf("operation must be `Apply` or `Update`")
+ }
+ if len(encodedVersionedSet.APIVersion) < 1 {
+ return nil, fmt.Errorf("apiVersion must not be empty")
+ }
+ switch encodedVersionedSet.FieldsType {
+ case "FieldsV1":
+ // Valid case.
+ case "":
+ return nil, fmt.Errorf("missing fieldsType in managed fields entry %d", i)
+ default:
+ return nil, fmt.Errorf("invalid fieldsType %q in managed fields entry %d", encodedVersionedSet.FieldsType, i)
+ }
+ manager, err := BuildManagerIdentifier(&encodedVersionedSet)
+ if err != nil {
+ return nil, fmt.Errorf("error decoding manager from %v: %v", encodedVersionedSet, err)
+ }
+ managed.fields[manager], err = decodeVersionedSet(&encodedVersionedSet)
+ if err != nil {
+ return nil, fmt.Errorf("error decoding versioned set from %v: %v", encodedVersionedSet, err)
+ }
+ managed.times[manager] = encodedVersionedSet.Time
+ }
+ return &managed, nil
+}
+
+// BuildManagerIdentifier creates a manager identifier string from a ManagedFieldsEntry
+func BuildManagerIdentifier(encodedManager *metav1.ManagedFieldsEntry) (manager string, err error) {
+ encodedManagerCopy := *encodedManager
+
+ // Never include fields type in the manager identifier
+ encodedManagerCopy.FieldsType = ""
+
+ // Never include the fields in the manager identifier
+ encodedManagerCopy.FieldsV1 = nil
+
+ // Never include the time in the manager identifier
+ encodedManagerCopy.Time = nil
+
+ // For appliers, don't include the APIVersion in the manager identifier,
+ // so it will always have the same manager identifier each time it applied.
+ if encodedManager.Operation == metav1.ManagedFieldsOperationApply {
+ encodedManagerCopy.APIVersion = ""
+ }
+
+ // Use the remaining fields to build the manager identifier
+ b, err := json.Marshal(&encodedManagerCopy)
+ if err != nil {
+ return "", fmt.Errorf("error marshalling manager identifier: %v", err)
+ }
+
+ return string(b), nil
+}
+
+func decodeVersionedSet(encodedVersionedSet *metav1.ManagedFieldsEntry) (versionedSet fieldpath.VersionedSet, err error) {
+ fields := EmptyFields
+ if encodedVersionedSet.FieldsV1 != nil {
+ fields = *encodedVersionedSet.FieldsV1
+ }
+ set, err := FieldsToSet(fields)
+ if err != nil {
+ return nil, fmt.Errorf("error decoding set: %v", err)
+ }
+ return fieldpath.NewVersionedSet(&set, fieldpath.APIVersion(encodedVersionedSet.APIVersion), encodedVersionedSet.Operation == metav1.ManagedFieldsOperationApply), nil
+}
+
+// encodeManagedFields converts ManagedFields from the format used by
+// sigs.k8s.io/structured-merge-diff to the wire format (api format)
+func encodeManagedFields(managed ManagedInterface) (encodedManagedFields []metav1.ManagedFieldsEntry, err error) {
+ if len(managed.Fields()) == 0 {
+ return nil, nil
+ }
+ encodedManagedFields = []metav1.ManagedFieldsEntry{}
+ for manager := range managed.Fields() {
+ versionedSet := managed.Fields()[manager]
+ v, err := encodeManagerVersionedSet(manager, versionedSet)
+ if err != nil {
+ return nil, fmt.Errorf("error encoding versioned set for %v: %v", manager, err)
+ }
+ if t, ok := managed.Times()[manager]; ok {
+ v.Time = t
+ }
+ encodedManagedFields = append(encodedManagedFields, *v)
+ }
+ return sortEncodedManagedFields(encodedManagedFields)
+}
+
+func sortEncodedManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (sortedManagedFields []metav1.ManagedFieldsEntry, err error) {
+ sort.Slice(encodedManagedFields, func(i, j int) bool {
+ p, q := encodedManagedFields[i], encodedManagedFields[j]
+
+ if p.Operation != q.Operation {
+ return p.Operation < q.Operation
+ }
+
+ pSeconds, qSeconds := int64(0), int64(0)
+ if p.Time != nil {
+ pSeconds = p.Time.Unix()
+ }
+ if q.Time != nil {
+ qSeconds = q.Time.Unix()
+ }
+ if pSeconds != qSeconds {
+ return pSeconds < qSeconds
+ }
+
+ if p.Manager != q.Manager {
+ return p.Manager < q.Manager
+ }
+
+ if p.APIVersion != q.APIVersion {
+ return p.APIVersion < q.APIVersion
+ }
+ return p.Subresource < q.Subresource
+ })
+
+ return encodedManagedFields, nil
+}
+
+func encodeManagerVersionedSet(manager string, versionedSet fieldpath.VersionedSet) (encodedVersionedSet *metav1.ManagedFieldsEntry, err error) {
+ encodedVersionedSet = &metav1.ManagedFieldsEntry{}
+
+ // Get as many fields as we can from the manager identifier
+ err = json.Unmarshal([]byte(manager), encodedVersionedSet)
+ if err != nil {
+ return nil, fmt.Errorf("error unmarshalling manager identifier %v: %v", manager, err)
+ }
+
+ // Get the APIVersion, Operation, and Fields from the VersionedSet
+ encodedVersionedSet.APIVersion = string(versionedSet.APIVersion())
+ if versionedSet.Applied() {
+ encodedVersionedSet.Operation = metav1.ManagedFieldsOperationApply
+ }
+ encodedVersionedSet.FieldsType = "FieldsV1"
+ fields, err := SetToFields(*versionedSet.Set())
+ if err != nil {
+ return nil, fmt.Errorf("error encoding set: %v", err)
+ }
+ encodedVersionedSet.FieldsV1 = &fields
+
+ return encodedVersionedSet, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfieldsupdater.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfieldsupdater.go
new file mode 100644
index 000000000..376eed6b2
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfieldsupdater.go
@@ -0,0 +1,82 @@
+/*
+Copyright 2020 The Kubernetes 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 internal
+
+import (
+ "time"
+
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+type managedFieldsUpdater struct {
+ fieldManager Manager
+}
+
+var _ Manager = &managedFieldsUpdater{}
+
+// NewManagedFieldsUpdater is responsible for updating the managedfields
+// in the object, updating the time of the operation as necessary. For
+// updates, it uses a hard-coded manager to detect if things have
+// changed, and swaps back the correct manager after the operation is
+// done.
+func NewManagedFieldsUpdater(fieldManager Manager) Manager {
+ return &managedFieldsUpdater{
+ fieldManager: fieldManager,
+ }
+}
+
+// Update implements Manager.
+func (f *managedFieldsUpdater) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ self := "current-operation"
+ object, managed, err := f.fieldManager.Update(liveObj, newObj, managed, self)
+ if err != nil {
+ return object, managed, err
+ }
+
+ // If the current operation took any fields from anything, it means the object changed,
+ // so update the timestamp of the managedFieldsEntry and merge with any previous updates from the same manager
+ if vs, ok := managed.Fields()[self]; ok {
+ delete(managed.Fields(), self)
+
+ if previous, ok := managed.Fields()[manager]; ok {
+ managed.Fields()[manager] = fieldpath.NewVersionedSet(vs.Set().Union(previous.Set()), vs.APIVersion(), vs.Applied())
+ } else {
+ managed.Fields()[manager] = vs
+ }
+
+ managed.Times()[manager] = &metav1.Time{Time: time.Now().UTC()}
+ }
+
+ return object, managed, nil
+}
+
+// Apply implements Manager.
+func (f *managedFieldsUpdater) Apply(liveObj, appliedObj runtime.Object, managed Managed, fieldManager string, force bool) (runtime.Object, Managed, error) {
+ object, managed, err := f.fieldManager.Apply(liveObj, appliedObj, managed, fieldManager, force)
+ if err != nil {
+ return object, managed, err
+ }
+ if object != nil {
+ managed.Times()[fieldManager] = &metav1.Time{Time: time.Now().UTC()}
+ } else {
+ object = liveObj.DeepCopyObject()
+ RemoveObjectManagedFields(object)
+ }
+ return object, managed, nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/manager.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/manager.go
new file mode 100644
index 000000000..053936103
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/manager.go
@@ -0,0 +1,52 @@
+/*
+Copyright 2022 The Kubernetes 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 internal
+
+import (
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/runtime"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+// Managed groups a fieldpath.ManagedFields together with the timestamps associated with each operation.
+type Managed interface {
+ // Fields gets the fieldpath.ManagedFields.
+ Fields() fieldpath.ManagedFields
+
+ // Times gets the timestamps associated with each operation.
+ Times() map[string]*metav1.Time
+}
+
+// Manager updates the managed fields and merges applied configurations.
+type Manager interface {
+ // Update is used when the object has already been merged (non-apply
+ // use-case), and simply updates the managed fields in the output
+ // object.
+ // * `liveObj` is not mutated by this function
+ // * `newObj` may be mutated by this function
+ // Returns the new object with managedFields removed, and the object's new
+ // proposed managedFields separately.
+ Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error)
+
+ // Apply is used when server-side apply is called, as it merges the
+ // object and updates the managed fields.
+ // * `liveObj` is not mutated by this function
+ // * `newObj` may be mutated by this function
+ // Returns the new object with managedFields removed, and the object's new
+ // proposed managedFields separately.
+ Apply(liveObj, appliedObj runtime.Object, managed Managed, fieldManager string, force bool) (runtime.Object, Managed, error)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/pathelement.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/pathelement.go
new file mode 100644
index 000000000..1954d65d3
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/pathelement.go
@@ -0,0 +1,140 @@
+/*
+Copyright 2018 The Kubernetes 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 internal
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+ "sigs.k8s.io/structured-merge-diff/v4/value"
+)
+
+const (
+ // Field indicates that the content of this path element is a field's name
+ Field = "f"
+
+ // Value indicates that the content of this path element is a field's value
+ Value = "v"
+
+ // Index indicates that the content of this path element is an index in an array
+ Index = "i"
+
+ // Key indicates that the content of this path element is a key value map
+ Key = "k"
+
+ // Separator separates the type of a path element from the contents
+ Separator = ":"
+)
+
+// NewPathElement parses a serialized path element
+func NewPathElement(s string) (fieldpath.PathElement, error) {
+ split := strings.SplitN(s, Separator, 2)
+ if len(split) < 2 {
+ return fieldpath.PathElement{}, fmt.Errorf("missing colon: %v", s)
+ }
+ switch split[0] {
+ case Field:
+ return fieldpath.PathElement{
+ FieldName: &split[1],
+ }, nil
+ case Value:
+ val, err := value.FromJSON([]byte(split[1]))
+ if err != nil {
+ return fieldpath.PathElement{}, err
+ }
+ return fieldpath.PathElement{
+ Value: &val,
+ }, nil
+ case Index:
+ i, err := strconv.Atoi(split[1])
+ if err != nil {
+ return fieldpath.PathElement{}, err
+ }
+ return fieldpath.PathElement{
+ Index: &i,
+ }, nil
+ case Key:
+ kv := map[string]json.RawMessage{}
+ err := json.Unmarshal([]byte(split[1]), &kv)
+ if err != nil {
+ return fieldpath.PathElement{}, err
+ }
+ fields := value.FieldList{}
+ for k, v := range kv {
+ b, err := json.Marshal(v)
+ if err != nil {
+ return fieldpath.PathElement{}, err
+ }
+ val, err := value.FromJSON(b)
+ if err != nil {
+ return fieldpath.PathElement{}, err
+ }
+
+ fields = append(fields, value.Field{
+ Name: k,
+ Value: val,
+ })
+ }
+ return fieldpath.PathElement{
+ Key: &fields,
+ }, nil
+ default:
+ // Ignore unknown key types
+ return fieldpath.PathElement{}, nil
+ }
+}
+
+// PathElementString serializes a path element
+func PathElementString(pe fieldpath.PathElement) (string, error) {
+ switch {
+ case pe.FieldName != nil:
+ return Field + Separator + *pe.FieldName, nil
+ case pe.Key != nil:
+ kv := map[string]json.RawMessage{}
+ for _, k := range *pe.Key {
+ b, err := value.ToJSON(k.Value)
+ if err != nil {
+ return "", err
+ }
+ m := json.RawMessage{}
+ err = json.Unmarshal(b, &m)
+ if err != nil {
+ return "", err
+ }
+ kv[k.Name] = m
+ }
+ b, err := json.Marshal(kv)
+ if err != nil {
+ return "", err
+ }
+ return Key + ":" + string(b), nil
+ case pe.Value != nil:
+ b, err := value.ToJSON(*pe.Value)
+ if err != nil {
+ return "", err
+ }
+ return Value + ":" + string(b), nil
+ case pe.Index != nil:
+ return Index + ":" + strconv.Itoa(*pe.Index), nil
+ default:
+ return "", errors.New("Invalid type of path element")
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/skipnonapplied.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/skipnonapplied.go
new file mode 100644
index 000000000..6b281ec1e
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/skipnonapplied.go
@@ -0,0 +1,91 @@
+/*
+Copyright 2019 The Kubernetes 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 internal
+
+import (
+ "fmt"
+ "math/rand"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+)
+
+type skipNonAppliedManager struct {
+ fieldManager Manager
+ objectCreater runtime.ObjectCreater
+ gvk schema.GroupVersionKind
+ beforeApplyManagerName string
+ probability float32
+}
+
+var _ Manager = &skipNonAppliedManager{}
+
+// NewSkipNonAppliedManager creates a new wrapped FieldManager that only starts tracking managers after the first apply.
+func NewSkipNonAppliedManager(fieldManager Manager, objectCreater runtime.ObjectCreater, gvk schema.GroupVersionKind) Manager {
+ return NewProbabilisticSkipNonAppliedManager(fieldManager, objectCreater, gvk, 0.0)
+}
+
+// NewProbabilisticSkipNonAppliedManager creates a new wrapped FieldManager that starts tracking managers after the first apply,
+// or starts tracking on create with p probability.
+func NewProbabilisticSkipNonAppliedManager(fieldManager Manager, objectCreater runtime.ObjectCreater, gvk schema.GroupVersionKind, p float32) Manager {
+ return &skipNonAppliedManager{
+ fieldManager: fieldManager,
+ objectCreater: objectCreater,
+ gvk: gvk,
+ beforeApplyManagerName: "before-first-apply",
+ probability: p,
+ }
+}
+
+// Update implements Manager.
+func (f *skipNonAppliedManager) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ accessor, err := meta.Accessor(liveObj)
+ if err != nil {
+ return newObj, managed, nil
+ }
+
+ // If managed fields is empty, we need to determine whether to skip tracking managed fields.
+ if len(managed.Fields()) == 0 {
+ // Check if the operation is a create, by checking whether lastObj's UID is empty.
+ // If the operation is create, P(tracking managed fields) = f.probability
+ // If the operation is update, skip tracking managed fields, since we already know managed fields is empty.
+ if len(accessor.GetUID()) == 0 {
+ if f.probability <= rand.Float32() {
+ return newObj, managed, nil
+ }
+ } else {
+ return newObj, managed, nil
+ }
+ }
+ return f.fieldManager.Update(liveObj, newObj, managed, manager)
+}
+
+// Apply implements Manager.
+func (f *skipNonAppliedManager) Apply(liveObj, appliedObj runtime.Object, managed Managed, fieldManager string, force bool) (runtime.Object, Managed, error) {
+ if len(managed.Fields()) == 0 {
+ emptyObj, err := f.objectCreater.New(f.gvk)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to create empty object of type %v: %v", f.gvk, err)
+ }
+ liveObj, managed, err = f.fieldManager.Update(emptyObj, liveObj, managed, f.beforeApplyManagerName)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to create manager for existing fields: %v", err)
+ }
+ }
+ return f.fieldManager.Apply(liveObj, appliedObj, managed, fieldManager, force)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/stripmeta.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/stripmeta.go
new file mode 100644
index 000000000..9b61f3a6f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/stripmeta.go
@@ -0,0 +1,90 @@
+/*
+Copyright 2019 The Kubernetes 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 internal
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+type stripMetaManager struct {
+ fieldManager Manager
+
+ // stripSet is the list of fields that should never be part of a mangedFields.
+ stripSet *fieldpath.Set
+}
+
+var _ Manager = &stripMetaManager{}
+
+// NewStripMetaManager creates a new Manager that strips metadata and typemeta fields from the manager's fieldset.
+func NewStripMetaManager(fieldManager Manager) Manager {
+ return &stripMetaManager{
+ fieldManager: fieldManager,
+ stripSet: fieldpath.NewSet(
+ fieldpath.MakePathOrDie("apiVersion"),
+ fieldpath.MakePathOrDie("kind"),
+ fieldpath.MakePathOrDie("metadata"),
+ fieldpath.MakePathOrDie("metadata", "name"),
+ fieldpath.MakePathOrDie("metadata", "namespace"),
+ fieldpath.MakePathOrDie("metadata", "creationTimestamp"),
+ fieldpath.MakePathOrDie("metadata", "selfLink"),
+ fieldpath.MakePathOrDie("metadata", "uid"),
+ fieldpath.MakePathOrDie("metadata", "clusterName"),
+ fieldpath.MakePathOrDie("metadata", "generation"),
+ fieldpath.MakePathOrDie("metadata", "managedFields"),
+ fieldpath.MakePathOrDie("metadata", "resourceVersion"),
+ ),
+ }
+}
+
+// Update implements Manager.
+func (f *stripMetaManager) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ newObj, managed, err := f.fieldManager.Update(liveObj, newObj, managed, manager)
+ if err != nil {
+ return nil, nil, err
+ }
+ f.stripFields(managed.Fields(), manager)
+ return newObj, managed, nil
+}
+
+// Apply implements Manager.
+func (f *stripMetaManager) Apply(liveObj, appliedObj runtime.Object, managed Managed, manager string, force bool) (runtime.Object, Managed, error) {
+ newObj, managed, err := f.fieldManager.Apply(liveObj, appliedObj, managed, manager, force)
+ if err != nil {
+ return nil, nil, err
+ }
+ f.stripFields(managed.Fields(), manager)
+ return newObj, managed, nil
+}
+
+// stripFields removes a predefined set of paths found in typed from managed
+func (f *stripMetaManager) stripFields(managed fieldpath.ManagedFields, manager string) {
+ vs, ok := managed[manager]
+ if ok {
+ if vs == nil {
+ panic(fmt.Sprintf("Found unexpected nil manager which should never happen: %s", manager))
+ }
+ newSet := vs.Set().Difference(f.stripSet)
+ if newSet.Empty() {
+ delete(managed, manager)
+ } else {
+ managed[manager] = fieldpath.NewVersionedSet(newSet, vs.APIVersion(), vs.Applied())
+ }
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go
new file mode 100644
index 000000000..eb5598ac3
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/structuredmerge.go
@@ -0,0 +1,183 @@
+/*
+Copyright 2019 The Kubernetes 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 internal
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/errors"
+ "k8s.io/apimachinery/pkg/api/meta"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+ "sigs.k8s.io/structured-merge-diff/v4/merge"
+)
+
+type structuredMergeManager struct {
+ typeConverter TypeConverter
+ objectConverter runtime.ObjectConvertor
+ objectDefaulter runtime.ObjectDefaulter
+ groupVersion schema.GroupVersion
+ hubVersion schema.GroupVersion
+ updater merge.Updater
+}
+
+var _ Manager = &structuredMergeManager{}
+
+// NewStructuredMergeManager creates a new Manager that merges apply requests
+// and update managed fields for other types of requests.
+func NewStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (Manager, error) {
+ return &structuredMergeManager{
+ typeConverter: typeConverter,
+ objectConverter: objectConverter,
+ objectDefaulter: objectDefaulter,
+ groupVersion: gv,
+ hubVersion: hub,
+ updater: merge.Updater{
+ Converter: newVersionConverter(typeConverter, objectConverter, hub), // This is the converter provided to SMD from k8s
+ IgnoredFields: resetFields,
+ },
+ }, nil
+}
+
+// NewCRDStructuredMergeManager creates a new Manager specifically for
+// CRDs. This allows for the possibility of fields which are not defined
+// in models, as well as having no models defined at all.
+func NewCRDStructuredMergeManager(typeConverter TypeConverter, objectConverter runtime.ObjectConvertor, objectDefaulter runtime.ObjectDefaulter, gv schema.GroupVersion, hub schema.GroupVersion, resetFields map[fieldpath.APIVersion]*fieldpath.Set) (_ Manager, err error) {
+ return &structuredMergeManager{
+ typeConverter: typeConverter,
+ objectConverter: objectConverter,
+ objectDefaulter: objectDefaulter,
+ groupVersion: gv,
+ hubVersion: hub,
+ updater: merge.Updater{
+ Converter: newCRDVersionConverter(typeConverter, objectConverter, hub),
+ IgnoredFields: resetFields,
+ },
+ }, nil
+}
+
+func objectGVKNN(obj runtime.Object) string {
+ name := ""
+ namespace := ""
+ if accessor, err := meta.Accessor(obj); err == nil {
+ name = accessor.GetName()
+ namespace = accessor.GetNamespace()
+ }
+
+ return fmt.Sprintf("%v/%v; %v", namespace, name, obj.GetObjectKind().GroupVersionKind())
+}
+
+// Update implements Manager.
+func (f *structuredMergeManager) Update(liveObj, newObj runtime.Object, managed Managed, manager string) (runtime.Object, Managed, error) {
+ newObjVersioned, err := f.toVersioned(newObj)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert new object (%v) to proper version (%v): %v", objectGVKNN(newObj), f.groupVersion, err)
+ }
+ liveObjVersioned, err := f.toVersioned(liveObj)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert live object (%v) to proper version: %v", objectGVKNN(liveObj), err)
+ }
+ newObjTyped, err := f.typeConverter.ObjectToTyped(newObjVersioned)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert new object (%v) to smd typed: %v", objectGVKNN(newObjVersioned), err)
+ }
+ liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert live object (%v) to smd typed: %v", objectGVKNN(liveObjVersioned), err)
+ }
+ apiVersion := fieldpath.APIVersion(f.groupVersion.String())
+
+ // TODO(apelisse) use the first return value when unions are implemented
+ _, managedFields, err := f.updater.Update(liveObjTyped, newObjTyped, apiVersion, managed.Fields(), manager)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to update ManagedFields (%v): %v", objectGVKNN(newObjVersioned), err)
+ }
+ managed = NewManaged(managedFields, managed.Times())
+
+ return newObj, managed, nil
+}
+
+// Apply implements Manager.
+func (f *structuredMergeManager) Apply(liveObj, patchObj runtime.Object, managed Managed, manager string, force bool) (runtime.Object, Managed, error) {
+ // Check that the patch object has the same version as the live object
+ if patchVersion := patchObj.GetObjectKind().GroupVersionKind().GroupVersion(); patchVersion != f.groupVersion {
+ return nil, nil,
+ errors.NewBadRequest(
+ fmt.Sprintf("Incorrect version specified in apply patch. "+
+ "Specified patch version: %s, expected: %s",
+ patchVersion, f.groupVersion))
+ }
+
+ patchObjMeta, err := meta.Accessor(patchObj)
+ if err != nil {
+ return nil, nil, fmt.Errorf("couldn't get accessor: %v", err)
+ }
+ if patchObjMeta.GetManagedFields() != nil {
+ return nil, nil, errors.NewBadRequest("metadata.managedFields must be nil")
+ }
+
+ liveObjVersioned, err := f.toVersioned(liveObj)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert live object (%v) to proper version: %v", objectGVKNN(liveObj), err)
+ }
+
+ patchObjTyped, err := f.typeConverter.ObjectToTyped(patchObj)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to create typed patch object (%v): %v", objectGVKNN(patchObj), err)
+ }
+ liveObjTyped, err := f.typeConverter.ObjectToTyped(liveObjVersioned)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to create typed live object (%v): %v", objectGVKNN(liveObjVersioned), err)
+ }
+
+ apiVersion := fieldpath.APIVersion(f.groupVersion.String())
+ newObjTyped, managedFields, err := f.updater.Apply(liveObjTyped, patchObjTyped, apiVersion, managed.Fields(), manager, force)
+ if err != nil {
+ return nil, nil, err
+ }
+ managed = NewManaged(managedFields, managed.Times())
+
+ if newObjTyped == nil {
+ return nil, managed, nil
+ }
+
+ newObj, err := f.typeConverter.TypedToObject(newObjTyped)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert new typed object (%v) to object: %v", objectGVKNN(patchObj), err)
+ }
+
+ newObjVersioned, err := f.toVersioned(newObj)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert new object (%v) to proper version: %v", objectGVKNN(patchObj), err)
+ }
+ f.objectDefaulter.Default(newObjVersioned)
+
+ newObjUnversioned, err := f.toUnversioned(newObjVersioned)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to convert to unversioned (%v): %v", objectGVKNN(patchObj), err)
+ }
+ return newObjUnversioned, managed, nil
+}
+
+func (f *structuredMergeManager) toVersioned(obj runtime.Object) (runtime.Object, error) {
+ return f.objectConverter.ConvertToVersion(obj, f.groupVersion)
+}
+
+func (f *structuredMergeManager) toUnversioned(obj runtime.Object) (runtime.Object, error) {
+ return f.objectConverter.ConvertToVersion(obj, f.hubVersion)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter.go
new file mode 100644
index 000000000..1ac96d7f7
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/typeconverter.go
@@ -0,0 +1,193 @@
+/*
+Copyright 2022 The Kubernetes 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 internal
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/kube-openapi/pkg/schemaconv"
+ "k8s.io/kube-openapi/pkg/validation/spec"
+ smdschema "sigs.k8s.io/structured-merge-diff/v4/schema"
+ "sigs.k8s.io/structured-merge-diff/v4/typed"
+ "sigs.k8s.io/structured-merge-diff/v4/value"
+)
+
+// TypeConverter allows you to convert from runtime.Object to
+// typed.TypedValue and the other way around.
+type TypeConverter interface {
+ ObjectToTyped(runtime.Object) (*typed.TypedValue, error)
+ TypedToObject(*typed.TypedValue) (runtime.Object, error)
+}
+
+type typeConverter struct {
+ parser map[schema.GroupVersionKind]*typed.ParseableType
+}
+
+var _ TypeConverter = &typeConverter{}
+
+func NewTypeConverter(openapiSpec map[string]*spec.Schema, preserveUnknownFields bool) (TypeConverter, error) {
+ typeSchema, err := schemaconv.ToSchemaFromOpenAPI(openapiSpec, preserveUnknownFields)
+ if err != nil {
+ return nil, fmt.Errorf("failed to convert models to schema: %v", err)
+ }
+
+ typeParser := typed.Parser{Schema: smdschema.Schema{Types: typeSchema.Types}}
+ tr := indexModels(&typeParser, openapiSpec)
+
+ return &typeConverter{parser: tr}, nil
+}
+
+func (c *typeConverter) ObjectToTyped(obj runtime.Object) (*typed.TypedValue, error) {
+ gvk := obj.GetObjectKind().GroupVersionKind()
+ t := c.parser[gvk]
+ if t == nil {
+ return nil, NewNoCorrespondingTypeError(gvk)
+ }
+ switch o := obj.(type) {
+ case *unstructured.Unstructured:
+ return t.FromUnstructured(o.UnstructuredContent())
+ default:
+ return t.FromStructured(obj)
+ }
+}
+
+func (c *typeConverter) TypedToObject(value *typed.TypedValue) (runtime.Object, error) {
+ return valueToObject(value.AsValue())
+}
+
+type deducedTypeConverter struct{}
+
+// DeducedTypeConverter is a TypeConverter for CRDs that don't have a
+// schema. It does implement the same interface though (and create the
+// same types of objects), so that everything can still work the same.
+// CRDs are merged with all their fields being "atomic" (lists
+// included).
+func NewDeducedTypeConverter() TypeConverter {
+ return deducedTypeConverter{}
+}
+
+// ObjectToTyped converts an object into a TypedValue with a "deduced type".
+func (deducedTypeConverter) ObjectToTyped(obj runtime.Object) (*typed.TypedValue, error) {
+ switch o := obj.(type) {
+ case *unstructured.Unstructured:
+ return typed.DeducedParseableType.FromUnstructured(o.UnstructuredContent())
+ default:
+ return typed.DeducedParseableType.FromStructured(obj)
+ }
+}
+
+// TypedToObject transforms the typed value into a runtime.Object. That
+// is not specific to deduced type.
+func (deducedTypeConverter) TypedToObject(value *typed.TypedValue) (runtime.Object, error) {
+ return valueToObject(value.AsValue())
+}
+
+func valueToObject(val value.Value) (runtime.Object, error) {
+ vu := val.Unstructured()
+ switch o := vu.(type) {
+ case map[string]interface{}:
+ return &unstructured.Unstructured{Object: o}, nil
+ default:
+ return nil, fmt.Errorf("failed to convert value to unstructured for type %T", vu)
+ }
+}
+
+func indexModels(
+ typeParser *typed.Parser,
+ openAPISchemas map[string]*spec.Schema,
+) map[schema.GroupVersionKind]*typed.ParseableType {
+ tr := map[schema.GroupVersionKind]*typed.ParseableType{}
+ for modelName, model := range openAPISchemas {
+ gvkList := parseGroupVersionKind(model.Extensions)
+ if len(gvkList) == 0 {
+ continue
+ }
+
+ parsedType := typeParser.Type(modelName)
+ for _, gvk := range gvkList {
+ if len(gvk.Kind) > 0 {
+ tr[schema.GroupVersionKind(gvk)] = &parsedType
+ }
+ }
+ }
+ return tr
+}
+
+// Get and parse GroupVersionKind from the extension. Returns empty if it doesn't have one.
+func parseGroupVersionKind(extensions map[string]interface{}) []schema.GroupVersionKind {
+ gvkListResult := []schema.GroupVersionKind{}
+
+ // Get the extensions
+ gvkExtension, ok := extensions["x-kubernetes-group-version-kind"]
+ if !ok {
+ return []schema.GroupVersionKind{}
+ }
+
+ // gvk extension must be a list of at least 1 element.
+ gvkList, ok := gvkExtension.([]interface{})
+ if !ok {
+ return []schema.GroupVersionKind{}
+ }
+
+ for _, gvk := range gvkList {
+ var group, version, kind string
+
+ // gvk extension list must be a map with group, version, and
+ // kind fields
+ if gvkMap, ok := gvk.(map[interface{}]interface{}); ok {
+ group, ok = gvkMap["group"].(string)
+ if !ok {
+ continue
+ }
+ version, ok = gvkMap["version"].(string)
+ if !ok {
+ continue
+ }
+ kind, ok = gvkMap["kind"].(string)
+ if !ok {
+ continue
+ }
+
+ } else if gvkMap, ok := gvk.(map[string]interface{}); ok {
+ group, ok = gvkMap["group"].(string)
+ if !ok {
+ continue
+ }
+ version, ok = gvkMap["version"].(string)
+ if !ok {
+ continue
+ }
+ kind, ok = gvkMap["kind"].(string)
+ if !ok {
+ continue
+ }
+ } else {
+ continue
+ }
+
+ gvkListResult = append(gvkListResult, schema.GroupVersionKind{
+ Group: group,
+ Version: version,
+ Kind: kind,
+ })
+ }
+
+ return gvkListResult
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/versionconverter.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/versionconverter.go
new file mode 100644
index 000000000..45855fa4c
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/internal/versionconverter.go
@@ -0,0 +1,123 @@
+/*
+Copyright 2018 The Kubernetes 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 internal
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/runtime"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+ "sigs.k8s.io/structured-merge-diff/v4/merge"
+ "sigs.k8s.io/structured-merge-diff/v4/typed"
+)
+
+// versionConverter is an implementation of
+// sigs.k8s.io/structured-merge-diff/merge.Converter
+type versionConverter struct {
+ typeConverter TypeConverter
+ objectConvertor runtime.ObjectConvertor
+ hubGetter func(from schema.GroupVersion) schema.GroupVersion
+}
+
+var _ merge.Converter = &versionConverter{}
+
+// NewVersionConverter builds a VersionConverter from a TypeConverter and an ObjectConvertor.
+func newVersionConverter(t TypeConverter, o runtime.ObjectConvertor, h schema.GroupVersion) merge.Converter {
+ return &versionConverter{
+ typeConverter: t,
+ objectConvertor: o,
+ hubGetter: func(from schema.GroupVersion) schema.GroupVersion {
+ return schema.GroupVersion{
+ Group: from.Group,
+ Version: h.Version,
+ }
+ },
+ }
+}
+
+// NewCRDVersionConverter builds a VersionConverter for CRDs from a TypeConverter and an ObjectConvertor.
+func newCRDVersionConverter(t TypeConverter, o runtime.ObjectConvertor, h schema.GroupVersion) merge.Converter {
+ return &versionConverter{
+ typeConverter: t,
+ objectConvertor: o,
+ hubGetter: func(from schema.GroupVersion) schema.GroupVersion {
+ return h
+ },
+ }
+}
+
+// Convert implements sigs.k8s.io/structured-merge-diff/merge.Converter
+func (v *versionConverter) Convert(object *typed.TypedValue, version fieldpath.APIVersion) (*typed.TypedValue, error) {
+ // Convert the smd typed value to a kubernetes object.
+ objectToConvert, err := v.typeConverter.TypedToObject(object)
+ if err != nil {
+ return object, err
+ }
+
+ // Parse the target groupVersion.
+ groupVersion, err := schema.ParseGroupVersion(string(version))
+ if err != nil {
+ return object, err
+ }
+
+ // If attempting to convert to the same version as we already have, just return it.
+ fromVersion := objectToConvert.GetObjectKind().GroupVersionKind().GroupVersion()
+ if fromVersion == groupVersion {
+ return object, nil
+ }
+
+ // Convert to internal
+ internalObject, err := v.objectConvertor.ConvertToVersion(objectToConvert, v.hubGetter(fromVersion))
+ if err != nil {
+ return object, err
+ }
+
+ // Convert the object into the target version
+ convertedObject, err := v.objectConvertor.ConvertToVersion(internalObject, groupVersion)
+ if err != nil {
+ return object, err
+ }
+
+ // Convert the object back to a smd typed value and return it.
+ return v.typeConverter.ObjectToTyped(convertedObject)
+}
+
+// IsMissingVersionError
+func (v *versionConverter) IsMissingVersionError(err error) bool {
+ return runtime.IsNotRegisteredError(err) || isNoCorrespondingTypeError(err)
+}
+
+type noCorrespondingTypeErr struct {
+ gvk schema.GroupVersionKind
+}
+
+func NewNoCorrespondingTypeError(gvk schema.GroupVersionKind) error {
+ return &noCorrespondingTypeErr{gvk: gvk}
+}
+
+func (k *noCorrespondingTypeErr) Error() string {
+ return fmt.Sprintf("no corresponding type for %v", k.gvk)
+}
+
+func isNoCorrespondingTypeError(err error) bool {
+ if err == nil {
+ return false
+ }
+ _, ok := err.(*noCorrespondingTypeErr)
+ return ok
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml b/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml
new file mode 100644
index 000000000..66e849f23
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/node.yaml
@@ -0,0 +1,261 @@
+apiVersion: v1
+kind: Node
+metadata:
+ annotations:
+ container.googleapis.com/instance_id: "123456789321654789"
+ node.alpha.kubernetes.io/ttl: "0"
+ volumes.kubernetes.io/controller-managed-attach-detach: "true"
+ creationTimestamp: "2019-07-09T16:17:29Z"
+ labels:
+ kubernetes.io/arch: amd64
+ beta.kubernetes.io/fluentd-ds-ready: "true"
+ beta.kubernetes.io/instance-type: n1-standard-4
+ kubernetes.io/os: linux
+ cloud.google.com/gke-nodepool: default-pool
+ cloud.google.com/gke-os-distribution: cos
+ failure-domain.beta.kubernetes.io/region: us-central1
+ failure-domain.beta.kubernetes.io/zone: us-central1-b
+ topology.kubernetes.io/region: us-central1
+ topology.kubernetes.io/zone: us-central1-b
+ kubernetes.io/hostname: node-default-pool-something
+ name: node-default-pool-something
+ resourceVersion: "211582541"
+ selfLink: /api/v1/nodes/node-default-pool-something
+ uid: 0c24d0e1-a265-11e9-abe4-42010a80026b
+spec:
+ podCIDR: 10.0.0.1/24
+ providerID: some-provider-id-of-some-sort
+status:
+ addresses:
+ - address: 10.0.0.1
+ type: InternalIP
+ - address: 192.168.0.1
+ type: ExternalIP
+ - address: node-default-pool-something
+ type: Hostname
+ allocatable:
+ cpu: 3920m
+ ephemeral-storage: "104638878617"
+ hugepages-2Mi: "0"
+ memory: 12700100Ki
+ pods: "110"
+ capacity:
+ cpu: "4"
+ ephemeral-storage: 202086868Ki
+ hugepages-2Mi: "0"
+ memory: 15399364Ki
+ pods: "110"
+ conditions:
+ - lastHeartbeatTime: "2019-09-20T19:32:08Z"
+ lastTransitionTime: "2019-07-09T16:22:08Z"
+ message: containerd is functioning properly
+ reason: FrequentContainerdRestart
+ status: "False"
+ type: FrequentContainerdRestart
+ - lastHeartbeatTime: "2019-09-20T19:32:08Z"
+ lastTransitionTime: "2019-07-09T16:22:06Z"
+ message: docker overlay2 is functioning properly
+ reason: CorruptDockerOverlay2
+ status: "False"
+ type: CorruptDockerOverlay2
+ - lastHeartbeatTime: "2019-09-20T19:32:08Z"
+ lastTransitionTime: "2019-07-09T16:22:06Z"
+ message: node is functioning properly
+ reason: UnregisterNetDevice
+ status: "False"
+ type: FrequentUnregisterNetDevice
+ - lastHeartbeatTime: "2019-09-20T19:32:08Z"
+ lastTransitionTime: "2019-07-09T16:17:04Z"
+ message: kernel has no deadlock
+ reason: KernelHasNoDeadlock
+ status: "False"
+ type: KernelDeadlock
+ - lastHeartbeatTime: "2019-09-20T19:32:08Z"
+ lastTransitionTime: "2019-07-09T16:17:04Z"
+ message: Filesystem is not read-only
+ reason: FilesystemIsNotReadOnly
+ status: "False"
+ type: ReadonlyFilesystem
+ - lastHeartbeatTime: "2019-09-20T19:32:08Z"
+ lastTransitionTime: "2019-07-09T16:22:05Z"
+ message: kubelet is functioning properly
+ reason: FrequentKubeletRestart
+ status: "False"
+ type: FrequentKubeletRestart
+ - lastHeartbeatTime: "2019-09-20T19:32:08Z"
+ lastTransitionTime: "2019-07-09T16:22:06Z"
+ message: docker is functioning properly
+ reason: FrequentDockerRestart
+ status: "False"
+ type: FrequentDockerRestart
+ - lastHeartbeatTime: "2019-07-09T16:17:47Z"
+ lastTransitionTime: "2019-07-09T16:17:47Z"
+ message: RouteController created a route
+ reason: RouteCreated
+ status: "False"
+ type: NetworkUnavailable
+ - lastHeartbeatTime: "2019-09-20T19:32:50Z"
+ lastTransitionTime: "2019-07-09T16:17:29Z"
+ message: kubelet has sufficient disk space available
+ reason: KubeletHasSufficientDisk
+ status: "False"
+ type: OutOfDisk
+ - lastHeartbeatTime: "2019-09-20T19:32:50Z"
+ lastTransitionTime: "2019-07-09T16:17:29Z"
+ message: kubelet has sufficient memory available
+ reason: KubeletHasSufficientMemory
+ status: "False"
+ type: MemoryPressure
+ - lastHeartbeatTime: "2019-09-20T19:32:50Z"
+ lastTransitionTime: "2019-07-09T16:17:29Z"
+ message: kubelet has no disk pressure
+ reason: KubeletHasNoDiskPressure
+ status: "False"
+ type: DiskPressure
+ - lastHeartbeatTime: "2019-09-20T19:32:50Z"
+ lastTransitionTime: "2019-07-09T16:17:29Z"
+ message: kubelet has sufficient PID available
+ reason: KubeletHasSufficientPID
+ status: "False"
+ type: PIDPressure
+ - lastHeartbeatTime: "2019-09-20T19:32:50Z"
+ lastTransitionTime: "2019-07-09T16:17:49Z"
+ message: kubelet is posting ready status. AppArmor enabled
+ reason: KubeletReady
+ status: "True"
+ type: Ready
+ daemonEndpoints:
+ kubeletEndpoint:
+ Port: 10250
+ images:
+ - names:
+ - grafana/grafana@sha256:80e5e113a984d74836aa16f5b4524012099436b1a50df293f00ac6377fb512c8
+ - grafana/grafana:4.4.2
+ sizeBytes: 287008013
+ - names:
+ - registry.k8s.io/node-problem-detector@sha256:f95cab985c26b2f46e9bd43283e0bfa88860c14e0fb0649266babe8b65e9eb2b
+ - registry.k8s.io/node-problem-detector:v0.4.1
+ sizeBytes: 286572743
+ - names:
+ - grafana/grafana@sha256:7ff7f9b2501a5d55b55ce3f58d21771b1c5af1f2a4ab7dbf11bef7142aae7033
+ - grafana/grafana:4.2.0
+ sizeBytes: 277940263
+ - names:
+ - influxdb@sha256:7dddf03376348876ed4bdf33d6dfa3326f45a2bae0930dbd80781a374eb519bc
+ - influxdb:1.2.2
+ sizeBytes: 223948571
+ - names:
+ - gcr.io/stackdriver-agents/stackdriver-logging-agent@sha256:f8d5231b67b9c53f60068b535a11811d29d1b3efd53d2b79f2a2591ea338e4f2
+ - gcr.io/stackdriver-agents/stackdriver-logging-agent:0.6-1.6.0-1
+ sizeBytes: 223242132
+ - names:
+ - nginx@sha256:35779791c05d119df4fe476db8f47c0bee5943c83eba5656a15fc046db48178b
+ - nginx:1.10.1
+ sizeBytes: 180708613
+ - names:
+ - registry.k8s.io/fluentd-elasticsearch@sha256:b8c94527b489fb61d3d81ce5ad7f3ddbb7be71e9620a3a36e2bede2f2e487d73
+ - registry.k8s.io/fluentd-elasticsearch:v2.0.4
+ sizeBytes: 135716379
+ - names:
+ - nginx@sha256:00be67d6ba53d5318cd91c57771530f5251cfbe028b7be2c4b70526f988cfc9f
+ - nginx:latest
+ sizeBytes: 109357355
+ - names:
+ - registry.k8s.io/kubernetes-dashboard-amd64@sha256:dc4026c1b595435ef5527ca598e1e9c4343076926d7d62b365c44831395adbd0
+ - registry.k8s.io/kubernetes-dashboard-amd64:v1.8.3
+ sizeBytes: 102319441
+ - names:
+ - gcr.io/google_containers/kube-proxy:v1.11.10-gke.5
+ - registry.k8s.io/kube-proxy:v1.11.10-gke.5
+ sizeBytes: 102279340
+ - names:
+ - registry.k8s.io/event-exporter@sha256:7f9cd7cb04d6959b0aa960727d04fa86759008048c785397b7b0d9dff0007516
+ - registry.k8s.io/event-exporter:v0.2.3
+ sizeBytes: 94171943
+ - names:
+ - registry.k8s.io/prometheus-to-sd@sha256:6c0c742475363d537ff059136e5d5e4ab1f512ee0fd9b7ca42ea48bc309d1662
+ - registry.k8s.io/prometheus-to-sd:v0.3.1
+ sizeBytes: 88077694
+ - names:
+ - registry.k8s.io/fluentd-gcp-scaler@sha256:a5ace7506d393c4ed65eb2cbb6312c64ab357fcea16dff76b9055bc6e498e5ff
+ - registry.k8s.io/fluentd-gcp-scaler:0.5.1
+ sizeBytes: 86637208
+ - names:
+ - registry.k8s.io/heapster-amd64@sha256:9fae0af136ce0cf4f88393b3670f7139ffc464692060c374d2ae748e13144521
+ - registry.k8s.io/heapster-amd64:v1.6.0-beta.1
+ sizeBytes: 76016169
+ - names:
+ - registry.k8s.io/ingress-glbc-amd64@sha256:31d36bbd9c44caffa135fc78cf0737266fcf25e3cf0cd1c2fcbfbc4f7309cc52
+ - registry.k8s.io/ingress-glbc-amd64:v1.1.1
+ sizeBytes: 67801919
+ - names:
+ - registry.k8s.io/kube-addon-manager@sha256:d53486c3a0b49ebee019932878dc44232735d5622a51dbbdcec7124199020d09
+ - registry.k8s.io/kube-addon-manager:v8.7
+ sizeBytes: 63322109
+ - names:
+ - nginx@sha256:4aacdcf186934dcb02f642579314075910f1855590fd3039d8fa4c9f96e48315
+ - nginx:1.10-alpine
+ sizeBytes: 54042627
+ - names:
+ - registry.k8s.io/cpvpa-amd64@sha256:cfe7b0a11c9c8e18c87b1eb34fef9a7cbb8480a8da11fc2657f78dbf4739f869
+ - registry.k8s.io/cpvpa-amd64:v0.6.0
+ sizeBytes: 51785854
+ - names:
+ - registry.k8s.io/cluster-proportional-autoscaler-amd64@sha256:003f98d9f411ddfa6ff6d539196355e03ddd69fa4ed38c7ffb8fec6f729afe2d
+ - registry.k8s.io/cluster-proportional-autoscaler-amd64:1.1.2-r2
+ sizeBytes: 49648481
+ - names:
+ - registry.k8s.io/ip-masq-agent-amd64@sha256:1ffda57d87901bc01324c82ceb2145fe6a0448d3f0dd9cb65aa76a867cd62103
+ - registry.k8s.io/ip-masq-agent-amd64:v2.1.1
+ sizeBytes: 49612505
+ - names:
+ - registry.k8s.io/k8s-dns-kube-dns-amd64@sha256:b99fc3eee2a9f052f7eb4cc00f15eb12fc405fa41019baa2d6b79847ae7284a8
+ - registry.k8s.io/k8s-dns-kube-dns-amd64:1.14.10
+ sizeBytes: 49549457
+ - names:
+ - registry.k8s.io/rescheduler@sha256:156cfbfd05a5a815206fd2eeb6cbdaf1596d71ea4b415d3a6c43071dd7b99450
+ - registry.k8s.io/rescheduler:v0.4.0
+ sizeBytes: 48973149
+ - names:
+ - registry.k8s.io/event-exporter@sha256:16ca66e2b5dc7a1ce6a5aafcb21d0885828b75cdfc08135430480f7ad2364adc
+ - registry.k8s.io/event-exporter:v0.2.4
+ sizeBytes: 47261019
+ - names:
+ - registry.k8s.io/coredns@sha256:db2bf53126ed1c761d5a41f24a1b82a461c85f736ff6e90542e9522be4757848
+ - registry.k8s.io/coredns:1.1.3
+ sizeBytes: 45587362
+ - names:
+ - prom/prometheus@sha256:483f4c9d7733699ba79facca9f8bcce1cef1af43dfc3e7c5a1882aa85f53cb74
+ - prom/prometheus:v1.1.3
+ sizeBytes: 45493941
+ nodeInfo:
+ architecture: amd64
+ bootID: a32eca78-4ad4-4b76-9252-f143d6c2ae61
+ containerRuntimeVersion: docker://17.3.2
+ kernelVersion: 4.14.127+
+ kubeProxyVersion: v1.11.10-gke.5
+ kubeletVersion: v1.11.10-gke.5
+ machineID: 1739555e5b231057f0f9a0b5fa29511b
+ operatingSystem: linux
+ osImage: Container-Optimized OS from Google
+ systemUUID: 1739555E-5B23-1057-F0F9-A0B5FA29511B
+ volumesAttached:
+ - devicePath: /dev/disk/by-id/b9772-pvc-c787c67d-14d7-11e7-9baf-42010a800049
+ name: kubernetes.io/pd/some-random-clusterb9772-pvc-c787c67d-14d7-11e7-9baf-42010a800049
+ - devicePath: /dev/disk/by-id/b9772-pvc-8895a852-fd42-11e6-94d4-42010a800049
+ name: kubernetes.io/pd/some-random-clusterb9772-pvc-8895a852-fd42-11e6-94d4-42010a800049
+ - devicePath: /dev/disk/by-id/some-random-clusterb9772-pvc-72e1c7f1-fd41-11e6-94d4-42010a800049
+ name: kubernetes.io/pd/some-random-clusterb9772-pvc-72e1c7f1-fd41-11e6-94d4-42010a800049
+ - devicePath: /dev/disk/by-id/some-random-clusterb9772-pvc-c2435a06-14d7-11e7-9baf-42010a800049
+ name: kubernetes.io/pd/some-random-clusterb9772-pvc-c2435a06-14d7-11e7-9baf-42010a800049
+ - devicePath: /dev/disk/by-id/some-random-clusterb9772-pvc-8bf50554-fd42-11e6-94d4-42010a800049
+ name: kubernetes.io/pd/some-random-clusterb9772-pvc-8bf50554-fd42-11e6-94d4-42010a800049
+ - devicePath: /dev/disk/by-id/some-random-clusterb9772-pvc-8fb5e386-4641-11e7-a490-42010a800283
+ name: kubernetes.io/pd/some-random-clusterb9772-pvc-8fb5e386-4641-11e7-a490-42010a800283
+ volumesInUse:
+ - kubernetes.io/pd/some-random-clusterb9772-pvc-72e1c7f1-fd41-11e6-94d4-42010a800049
+ - kubernetes.io/pd/some-random-clusterb9772-pvc-8895a852-fd42-11e6-94d4-42010a800049
+ - kubernetes.io/pd/some-random-clusterb9772-pvc-8bf50554-fd42-11e6-94d4-42010a800049
+ - kubernetes.io/pd/some-random-clusterb9772-pvc-8fb5e386-4641-11e7-a490-42010a800283
+ - kubernetes.io/pd/some-random-clusterb9772-pvc-c2435a06-14d7-11e7-9baf-42010a800049
+ - kubernetes.io/pd/some-random-clusterb9772-pvc-c787c67d-14d7-11e7-9baf-42010a800049
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/pod.yaml b/vendor/k8s.io/apimachinery/pkg/util/managedfields/pod.yaml
new file mode 100644
index 000000000..3fb0877d6
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/pod.yaml
@@ -0,0 +1,121 @@
+apiVersion: v1
+kind: Pod
+metadata:
+ labels:
+ app: some-app
+ plugin1: some-value
+ plugin2: some-value
+ plugin3: some-value
+ plugin4: some-value
+ name: some-name
+ namespace: default
+ ownerReferences:
+ - apiVersion: apps/v1
+ blockOwnerDeletion: true
+ controller: true
+ kind: ReplicaSet
+ name: some-name
+ uid: 0a9d2b9e-779e-11e7-b422-42010a8001be
+spec:
+ containers:
+ - args:
+ - one
+ - two
+ - three
+ - four
+ - five
+ - six
+ - seven
+ - eight
+ - nine
+ env:
+ - name: VAR_3
+ valueFrom:
+ secretKeyRef:
+ key: some-other-key
+ name: some-oher-name
+ - name: VAR_2
+ valueFrom:
+ secretKeyRef:
+ key: other-key
+ name: other-name
+ - name: VAR_1
+ valueFrom:
+ secretKeyRef:
+ key: some-key
+ name: some-name
+ image: some-image-name
+ imagePullPolicy: IfNotPresent
+ name: some-name
+ resources:
+ requests:
+ cpu: '0'
+ terminationMessagePath: /dev/termination-log
+ terminationMessagePolicy: File
+ volumeMounts:
+ - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
+ name: default-token-hu5jz
+ readOnly: true
+ dnsPolicy: ClusterFirst
+ nodeName: node-name
+ priority: 0
+ restartPolicy: Always
+ schedulerName: default-scheduler
+ securityContext: {}
+ serviceAccount: default
+ serviceAccountName: default
+ terminationGracePeriodSeconds: 30
+ tolerations:
+ - effect: NoExecute
+ key: node.kubernetes.io/not-ready
+ operator: Exists
+ tolerationSeconds: 300
+ - effect: NoExecute
+ key: node.kubernetes.io/unreachable
+ operator: Exists
+ tolerationSeconds: 300
+ volumes:
+ - name: default-token-hu5jz
+ secret:
+ defaultMode: 420
+ secretName: default-token-hu5jz
+status:
+ conditions:
+ - lastProbeTime: null
+ lastTransitionTime: '2019-07-08T09:31:18Z'
+ status: 'True'
+ type: Initialized
+ - lastProbeTime: null
+ lastTransitionTime: '2019-07-08T09:41:59Z'
+ status: 'True'
+ type: Ready
+ - lastProbeTime: null
+ lastTransitionTime: null
+ status: 'True'
+ type: ContainersReady
+ - lastProbeTime: null
+ lastTransitionTime: '2019-07-08T09:31:18Z'
+ status: 'True'
+ type: PodScheduled
+ containerStatuses:
+ - containerID: docker://885e82a1ed0b7356541bb410a0126921ac42439607c09875cd8097dd5d7b5376
+ image: some-image-name
+ imageID: docker-pullable://some-image-id
+ lastState:
+ terminated:
+ containerID: docker://d57290f9e00fad626b20d2dd87a3cf69bbc22edae07985374f86a8b2b4e39565
+ exitCode: 255
+ finishedAt: '2019-07-08T09:39:09Z'
+ reason: Error
+ startedAt: '2019-07-08T09:38:54Z'
+ name: name
+ ready: true
+ restartCount: 6
+ state:
+ running:
+ startedAt: '2019-07-08T09:41:59Z'
+ hostIP: 10.0.0.1
+ phase: Running
+ podIP: 10.0.0.1
+ qosClass: BestEffort
+ startTime: '2019-07-08T09:31:18Z'
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/scalehandler.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/scalehandler.go
new file mode 100644
index 000000000..48b774cec
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/scalehandler.go
@@ -0,0 +1,174 @@
+/*
+Copyright 2021 The Kubernetes 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 managedfields
+
+import (
+ "fmt"
+
+ "k8s.io/apimachinery/pkg/api/meta"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/apimachinery/pkg/util/managedfields/internal"
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+var (
+ scaleGroupVersion = schema.GroupVersion{Group: "autoscaling", Version: "v1"}
+ replicasPathInScale = fieldpath.MakePathOrDie("spec", "replicas")
+)
+
+// ResourcePathMappings maps a group/version to its replicas path. The
+// assumption is that all the paths correspond to leaf fields.
+type ResourcePathMappings map[string]fieldpath.Path
+
+// ScaleHandler manages the conversion of managed fields between a main
+// resource and the scale subresource
+type ScaleHandler struct {
+ parentEntries []metav1.ManagedFieldsEntry
+ groupVersion schema.GroupVersion
+ mappings ResourcePathMappings
+}
+
+// NewScaleHandler creates a new ScaleHandler
+func NewScaleHandler(parentEntries []metav1.ManagedFieldsEntry, groupVersion schema.GroupVersion, mappings ResourcePathMappings) *ScaleHandler {
+ return &ScaleHandler{
+ parentEntries: parentEntries,
+ groupVersion: groupVersion,
+ mappings: mappings,
+ }
+}
+
+// ToSubresource filter the managed fields of the main resource and convert
+// them so that they can be handled by scale.
+// For the managed fields that have a replicas path it performs two changes:
+// 1. APIVersion is changed to the APIVersion of the scale subresource
+// 2. Replicas path of the main resource is transformed to the replicas path of
+// the scale subresource
+func (h *ScaleHandler) ToSubresource() ([]metav1.ManagedFieldsEntry, error) {
+ managed, err := internal.DecodeManagedFields(h.parentEntries)
+ if err != nil {
+ return nil, err
+ }
+
+ f := fieldpath.ManagedFields{}
+ t := map[string]*metav1.Time{}
+ for manager, versionedSet := range managed.Fields() {
+ path, ok := h.mappings[string(versionedSet.APIVersion())]
+ // Skip the entry if the APIVersion is unknown
+ if !ok || path == nil {
+ continue
+ }
+
+ if versionedSet.Set().Has(path) {
+ newVersionedSet := fieldpath.NewVersionedSet(
+ fieldpath.NewSet(replicasPathInScale),
+ fieldpath.APIVersion(scaleGroupVersion.String()),
+ versionedSet.Applied(),
+ )
+
+ f[manager] = newVersionedSet
+ t[manager] = managed.Times()[manager]
+ }
+ }
+
+ return managedFieldsEntries(internal.NewManaged(f, t))
+}
+
+// ToParent merges `scaleEntries` with the entries of the main resource and
+// transforms them accordingly
+func (h *ScaleHandler) ToParent(scaleEntries []metav1.ManagedFieldsEntry) ([]metav1.ManagedFieldsEntry, error) {
+ decodedParentEntries, err := internal.DecodeManagedFields(h.parentEntries)
+ if err != nil {
+ return nil, err
+ }
+ parentFields := decodedParentEntries.Fields()
+
+ decodedScaleEntries, err := internal.DecodeManagedFields(scaleEntries)
+ if err != nil {
+ return nil, err
+ }
+ scaleFields := decodedScaleEntries.Fields()
+
+ f := fieldpath.ManagedFields{}
+ t := map[string]*metav1.Time{}
+
+ for manager, versionedSet := range parentFields {
+ // Get the main resource "replicas" path
+ path, ok := h.mappings[string(versionedSet.APIVersion())]
+ // Drop the entry if the APIVersion is unknown.
+ if !ok {
+ continue
+ }
+
+ // If the parent entry does not have the replicas path or it is nil, just
+ // keep it as it is. The path is nil for Custom Resources without scale
+ // subresource.
+ if path == nil || !versionedSet.Set().Has(path) {
+ f[manager] = versionedSet
+ t[manager] = decodedParentEntries.Times()[manager]
+ continue
+ }
+
+ if _, ok := scaleFields[manager]; !ok {
+ // "Steal" the replicas path from the main resource entry
+ newSet := versionedSet.Set().Difference(fieldpath.NewSet(path))
+
+ if !newSet.Empty() {
+ newVersionedSet := fieldpath.NewVersionedSet(
+ newSet,
+ versionedSet.APIVersion(),
+ versionedSet.Applied(),
+ )
+ f[manager] = newVersionedSet
+ t[manager] = decodedParentEntries.Times()[manager]
+ }
+ } else {
+ // Field wasn't stolen, let's keep the entry as it is.
+ f[manager] = versionedSet
+ t[manager] = decodedParentEntries.Times()[manager]
+ delete(scaleFields, manager)
+ }
+ }
+
+ for manager, versionedSet := range scaleFields {
+ if !versionedSet.Set().Has(replicasPathInScale) {
+ continue
+ }
+ newVersionedSet := fieldpath.NewVersionedSet(
+ fieldpath.NewSet(h.mappings[h.groupVersion.String()]),
+ fieldpath.APIVersion(h.groupVersion.String()),
+ versionedSet.Applied(),
+ )
+ f[manager] = newVersionedSet
+ t[manager] = decodedParentEntries.Times()[manager]
+ }
+
+ return managedFieldsEntries(internal.NewManaged(f, t))
+}
+
+func managedFieldsEntries(entries internal.ManagedInterface) ([]metav1.ManagedFieldsEntry, error) {
+ obj := &unstructured.Unstructured{Object: map[string]interface{}{}}
+ if err := internal.EncodeObjectManagedFields(obj, entries); err != nil {
+ return nil, err
+ }
+ accessor, err := meta.Accessor(obj)
+ if err != nil {
+ panic(fmt.Sprintf("couldn't get accessor: %v", err))
+ }
+ return accessor.GetManagedFields(), nil
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/managedfields/typeconverter.go b/vendor/k8s.io/apimachinery/pkg/util/managedfields/typeconverter.go
new file mode 100644
index 000000000..d031eefaa
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/managedfields/typeconverter.go
@@ -0,0 +1,47 @@
+/*
+Copyright 2018 The Kubernetes 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 managedfields
+
+import (
+ "k8s.io/apimachinery/pkg/util/managedfields/internal"
+ "k8s.io/kube-openapi/pkg/validation/spec"
+)
+
+// TypeConverter allows you to convert from runtime.Object to
+// typed.TypedValue and the other way around.
+type TypeConverter = internal.TypeConverter
+
+// NewDeducedTypeConverter creates a TypeConverter for CRDs that don't
+// have a schema. It does implement the same interface though (and
+// create the same types of objects), so that everything can still work
+// the same. CRDs are merged with all their fields being "atomic" (lists
+// included).
+func NewDeducedTypeConverter() TypeConverter {
+ return internal.NewDeducedTypeConverter()
+}
+
+// NewTypeConverter builds a TypeConverter from a map of OpenAPIV3 schemas.
+// This will automatically find the proper version of the object, and the
+// corresponding schema information.
+// The keys to the map must be consistent with the names
+// used by Refs within the schemas.
+// The schemas should conform to the Kubernetes Structural Schema OpenAPI
+// restrictions found in docs:
+// https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#specifying-a-structural-schema
+func NewTypeConverter(openapiSpec map[string]*spec.Schema, preserveUnknownFields bool) (TypeConverter, error) {
+ return internal.NewTypeConverter(openapiSpec, preserveUnknownFields)
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go
index e39627568..a20efd187 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/mergepatch/util.go
@@ -88,8 +88,7 @@ func toYAML(v interface{}) (string, error) {
// supports JSON merge patch semantics.
//
// NOTE: Numbers with different types (e.g. int(0) vs int64(0)) will be detected as conflicts.
-//
-// Make sure the unmarshaling of left and right are consistent (e.g. use the same library).
+// Make sure the unmarshaling of left and right are consistent (e.g. use the same library).
func HasConflicts(left, right interface{}) (bool, error) {
switch typedLeft := left.(type) {
case map[string]interface{}:
diff --git a/vendor/k8s.io/apimachinery/pkg/util/sets/set.go b/vendor/k8s.io/apimachinery/pkg/util/sets/set.go
index 99c292fed..d50526f42 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/sets/set.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/sets/set.go
@@ -64,6 +64,20 @@ func (s Set[T]) Delete(items ...T) Set[T] {
return s
}
+// Clear empties the set.
+// It is preferable to replace the set with a newly constructed set,
+// but not all callers can do that (when there are other references to the map).
+// In some cases the set *won't* be fully cleared, e.g. a Set[float32] containing NaN
+// can't be cleared because NaN can't be removed.
+// For sets containing items of a type that is reflexive for ==,
+// this is optimized to a single call to runtime.mapclear().
+func (s Set[T]) Clear() Set[T] {
+ for key := range s {
+ delete(s, key)
+ }
+ return s
+}
+
// Has returns true if and only if item is contained in the set.
func (s Set[T]) Has(item T) bool {
_, contained := s[item]
diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS
index 4443bafd1..73244449f 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS
+++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/OWNERS
@@ -1,6 +1,7 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
+ - apelisse
- pwittrock
reviewers:
- apelisse
diff --git a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
index 6fb369732..3ee683b99 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go
@@ -1106,7 +1106,7 @@ func applyRetainKeysDirective(original, patch map[string]interface{}, options Me
// Then, sort them by the relative order in setElementOrder, patch list and live list.
// The precedence is $setElementOrder > order in patch list > order in live list.
// This function will delete the item after merging it to prevent process it again in the future.
-// Ref: https://git.k8s.io/community/contributors/design-proposals/cli/preserve-order-in-strategic-merge-patch.md
+// Ref: https://git.k8s.io/design-proposals-archive/cli/preserve-order-in-strategic-merge-patch.md
func mergePatchIntoOriginal(original, patch map[string]interface{}, schema LookupPatchMeta, mergeOptions MergeOptions) error {
for key, patchV := range patch {
// Do nothing if there is no ordering directive
diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go
index e767092dd..0b8a6cb35 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/validation/validation.go
@@ -191,7 +191,13 @@ func IsDNS1123Label(value string) []string {
errs = append(errs, MaxLenError(DNS1123LabelMaxLength))
}
if !dns1123LabelRegexp.MatchString(value) {
- errs = append(errs, RegexError(dns1123LabelErrMsg, dns1123LabelFmt, "my-name", "123-abc"))
+ if dns1123SubdomainRegexp.MatchString(value) {
+ // It was a valid subdomain and not a valid label. Since we
+ // already checked length, it must be dots.
+ errs = append(errs, "must not contain dots")
+ } else {
+ errs = append(errs, RegexError(dns1123LabelErrMsg, dns1123LabelFmt, "my-name", "123-abc"))
+ }
}
return errs
}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go b/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go
new file mode 100644
index 000000000..418761925
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/backoff.go
@@ -0,0 +1,502 @@
+/*
+Copyright 2023 The Kubernetes 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 wait
+
+import (
+ "context"
+ "math"
+ "sync"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+ "k8s.io/utils/clock"
+)
+
+// Backoff holds parameters applied to a Backoff function.
+type Backoff struct {
+ // The initial duration.
+ Duration time.Duration
+ // Duration is multiplied by factor each iteration, if factor is not zero
+ // and the limits imposed by Steps and Cap have not been reached.
+ // Should not be negative.
+ // The jitter does not contribute to the updates to the duration parameter.
+ Factor float64
+ // The sleep at each iteration is the duration plus an additional
+ // amount chosen uniformly at random from the interval between
+ // zero and `jitter*duration`.
+ Jitter float64
+ // The remaining number of iterations in which the duration
+ // parameter may change (but progress can be stopped earlier by
+ // hitting the cap). If not positive, the duration is not
+ // changed. Used for exponential backoff in combination with
+ // Factor and Cap.
+ Steps int
+ // A limit on revised values of the duration parameter. If a
+ // multiplication by the factor parameter would make the duration
+ // exceed the cap then the duration is set to the cap and the
+ // steps parameter is set to zero.
+ Cap time.Duration
+}
+
+// Step returns an amount of time to sleep determined by the original
+// Duration and Jitter. The backoff is mutated to update its Steps and
+// Duration. A nil Backoff always has a zero-duration step.
+func (b *Backoff) Step() time.Duration {
+ if b == nil {
+ return 0
+ }
+ var nextDuration time.Duration
+ nextDuration, b.Duration, b.Steps = delay(b.Steps, b.Duration, b.Cap, b.Factor, b.Jitter)
+ return nextDuration
+}
+
+// DelayFunc returns a function that will compute the next interval to
+// wait given the arguments in b. It does not mutate the original backoff
+// but the function is safe to use only from a single goroutine.
+func (b Backoff) DelayFunc() DelayFunc {
+ steps := b.Steps
+ duration := b.Duration
+ cap := b.Cap
+ factor := b.Factor
+ jitter := b.Jitter
+
+ return func() time.Duration {
+ var nextDuration time.Duration
+ // jitter is applied per step and is not cumulative over multiple steps
+ nextDuration, duration, steps = delay(steps, duration, cap, factor, jitter)
+ return nextDuration
+ }
+}
+
+// Timer returns a timer implementation appropriate to this backoff's parameters
+// for use with wait functions.
+func (b Backoff) Timer() Timer {
+ if b.Steps > 1 || b.Jitter != 0 {
+ return &variableTimer{new: internalClock.NewTimer, fn: b.DelayFunc()}
+ }
+ if b.Duration > 0 {
+ return &fixedTimer{new: internalClock.NewTicker, interval: b.Duration}
+ }
+ return newNoopTimer()
+}
+
+// delay implements the core delay algorithm used in this package.
+func delay(steps int, duration, cap time.Duration, factor, jitter float64) (_ time.Duration, next time.Duration, nextSteps int) {
+ // when steps is non-positive, do not alter the base duration
+ if steps < 1 {
+ if jitter > 0 {
+ return Jitter(duration, jitter), duration, 0
+ }
+ return duration, duration, 0
+ }
+ steps--
+
+ // calculate the next step's interval
+ if factor != 0 {
+ next = time.Duration(float64(duration) * factor)
+ if cap > 0 && next > cap {
+ next = cap
+ steps = 0
+ }
+ } else {
+ next = duration
+ }
+
+ // add jitter for this step
+ if jitter > 0 {
+ duration = Jitter(duration, jitter)
+ }
+
+ return duration, next, steps
+
+}
+
+// DelayWithReset returns a DelayFunc that will return the appropriate next interval to
+// wait. Every resetInterval the backoff parameters are reset to their initial state.
+// This method is safe to invoke from multiple goroutines, but all calls will advance
+// the backoff state when Factor is set. If Factor is zero, this method is the same as
+// invoking b.DelayFunc() since Steps has no impact without Factor. If resetInterval is
+// zero no backoff will be performed as the same calling DelayFunc with a zero factor
+// and steps.
+func (b Backoff) DelayWithReset(c clock.Clock, resetInterval time.Duration) DelayFunc {
+ if b.Factor <= 0 {
+ return b.DelayFunc()
+ }
+ if resetInterval <= 0 {
+ b.Steps = 0
+ b.Factor = 0
+ return b.DelayFunc()
+ }
+ return (&backoffManager{
+ backoff: b,
+ initialBackoff: b,
+ resetInterval: resetInterval,
+
+ clock: c,
+ lastStart: c.Now(),
+ timer: nil,
+ }).Step
+}
+
+// Until loops until stop channel is closed, running f every period.
+//
+// Until is syntactic sugar on top of JitterUntil with zero jitter factor and
+// with sliding = true (which means the timer for period starts after the f
+// completes).
+func Until(f func(), period time.Duration, stopCh <-chan struct{}) {
+ JitterUntil(f, period, 0.0, true, stopCh)
+}
+
+// UntilWithContext loops until context is done, running f every period.
+//
+// UntilWithContext is syntactic sugar on top of JitterUntilWithContext
+// with zero jitter factor and with sliding = true (which means the timer
+// for period starts after the f completes).
+func UntilWithContext(ctx context.Context, f func(context.Context), period time.Duration) {
+ JitterUntilWithContext(ctx, f, period, 0.0, true)
+}
+
+// NonSlidingUntil loops until stop channel is closed, running f every
+// period.
+//
+// NonSlidingUntil is syntactic sugar on top of JitterUntil with zero jitter
+// factor, with sliding = false (meaning the timer for period starts at the same
+// time as the function starts).
+func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) {
+ JitterUntil(f, period, 0.0, false, stopCh)
+}
+
+// NonSlidingUntilWithContext loops until context is done, running f every
+// period.
+//
+// NonSlidingUntilWithContext is syntactic sugar on top of JitterUntilWithContext
+// with zero jitter factor, with sliding = false (meaning the timer for period
+// starts at the same time as the function starts).
+func NonSlidingUntilWithContext(ctx context.Context, f func(context.Context), period time.Duration) {
+ JitterUntilWithContext(ctx, f, period, 0.0, false)
+}
+
+// JitterUntil loops until stop channel is closed, running f every period.
+//
+// If jitterFactor is positive, the period is jittered before every run of f.
+// If jitterFactor is not positive, the period is unchanged and not jittered.
+//
+// If sliding is true, the period is computed after f runs. If it is false then
+// period includes the runtime for f.
+//
+// Close stopCh to stop. f may not be invoked if stop channel is already
+// closed. Pass NeverStop to if you don't want it stop.
+func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) {
+ BackoffUntil(f, NewJitteredBackoffManager(period, jitterFactor, &clock.RealClock{}), sliding, stopCh)
+}
+
+// BackoffUntil loops until stop channel is closed, run f every duration given by BackoffManager.
+//
+// If sliding is true, the period is computed after f runs. If it is false then
+// period includes the runtime for f.
+func BackoffUntil(f func(), backoff BackoffManager, sliding bool, stopCh <-chan struct{}) {
+ var t clock.Timer
+ for {
+ select {
+ case <-stopCh:
+ return
+ default:
+ }
+
+ if !sliding {
+ t = backoff.Backoff()
+ }
+
+ func() {
+ defer runtime.HandleCrash()
+ f()
+ }()
+
+ if sliding {
+ t = backoff.Backoff()
+ }
+
+ // NOTE: b/c there is no priority selection in golang
+ // it is possible for this to race, meaning we could
+ // trigger t.C and stopCh, and t.C select falls through.
+ // In order to mitigate we re-check stopCh at the beginning
+ // of every loop to prevent extra executions of f().
+ select {
+ case <-stopCh:
+ if !t.Stop() {
+ <-t.C()
+ }
+ return
+ case <-t.C():
+ }
+ }
+}
+
+// JitterUntilWithContext loops until context is done, running f every period.
+//
+// If jitterFactor is positive, the period is jittered before every run of f.
+// If jitterFactor is not positive, the period is unchanged and not jittered.
+//
+// If sliding is true, the period is computed after f runs. If it is false then
+// period includes the runtime for f.
+//
+// Cancel context to stop. f may not be invoked if context is already expired.
+func JitterUntilWithContext(ctx context.Context, f func(context.Context), period time.Duration, jitterFactor float64, sliding bool) {
+ JitterUntil(func() { f(ctx) }, period, jitterFactor, sliding, ctx.Done())
+}
+
+// backoffManager provides simple backoff behavior in a threadsafe manner to a caller.
+type backoffManager struct {
+ backoff Backoff
+ initialBackoff Backoff
+ resetInterval time.Duration
+
+ clock clock.Clock
+
+ lock sync.Mutex
+ lastStart time.Time
+ timer clock.Timer
+}
+
+// Step returns the expected next duration to wait.
+func (b *backoffManager) Step() time.Duration {
+ b.lock.Lock()
+ defer b.lock.Unlock()
+
+ switch {
+ case b.resetInterval == 0:
+ b.backoff = b.initialBackoff
+ case b.clock.Now().Sub(b.lastStart) > b.resetInterval:
+ b.backoff = b.initialBackoff
+ b.lastStart = b.clock.Now()
+ }
+ return b.backoff.Step()
+}
+
+// Backoff implements BackoffManager.Backoff, it returns a timer so caller can block on the timer
+// for exponential backoff. The returned timer must be drained before calling Backoff() the second
+// time.
+func (b *backoffManager) Backoff() clock.Timer {
+ b.lock.Lock()
+ defer b.lock.Unlock()
+ if b.timer == nil {
+ b.timer = b.clock.NewTimer(b.Step())
+ } else {
+ b.timer.Reset(b.Step())
+ }
+ return b.timer
+}
+
+// Timer returns a new Timer instance that shares the clock and the reset behavior with all other
+// timers.
+func (b *backoffManager) Timer() Timer {
+ return DelayFunc(b.Step).Timer(b.clock)
+}
+
+// BackoffManager manages backoff with a particular scheme based on its underlying implementation.
+type BackoffManager interface {
+ // Backoff returns a shared clock.Timer that is Reset on every invocation. This method is not
+ // safe for use from multiple threads. It returns a timer for backoff, and caller shall backoff
+ // until Timer.C() drains. If the second Backoff() is called before the timer from the first
+ // Backoff() call finishes, the first timer will NOT be drained and result in undetermined
+ // behavior.
+ Backoff() clock.Timer
+}
+
+// Deprecated: Will be removed when the legacy polling functions are removed.
+type exponentialBackoffManagerImpl struct {
+ backoff *Backoff
+ backoffTimer clock.Timer
+ lastBackoffStart time.Time
+ initialBackoff time.Duration
+ backoffResetDuration time.Duration
+ clock clock.Clock
+}
+
+// NewExponentialBackoffManager returns a manager for managing exponential backoff. Each backoff is jittered and
+// backoff will not exceed the given max. If the backoff is not called within resetDuration, the backoff is reset.
+// This backoff manager is used to reduce load during upstream unhealthiness.
+//
+// Deprecated: Will be removed when the legacy Poll methods are removed. Callers should construct a
+// Backoff struct, use DelayWithReset() to get a DelayFunc that periodically resets itself, and then
+// invoke Timer() when calling wait.BackoffUntil.
+//
+// Instead of:
+//
+// bm := wait.NewExponentialBackoffManager(init, max, reset, factor, jitter, clock)
+// ...
+// wait.BackoffUntil(..., bm.Backoff, ...)
+//
+// Use:
+//
+// delayFn := wait.Backoff{
+// Duration: init,
+// Cap: max,
+// Steps: int(math.Ceil(float64(max) / float64(init))), // now a required argument
+// Factor: factor,
+// Jitter: jitter,
+// }.DelayWithReset(reset, clock)
+// wait.BackoffUntil(..., delayFn.Timer(), ...)
+func NewExponentialBackoffManager(initBackoff, maxBackoff, resetDuration time.Duration, backoffFactor, jitter float64, c clock.Clock) BackoffManager {
+ return &exponentialBackoffManagerImpl{
+ backoff: &Backoff{
+ Duration: initBackoff,
+ Factor: backoffFactor,
+ Jitter: jitter,
+
+ // the current impl of wait.Backoff returns Backoff.Duration once steps are used up, which is not
+ // what we ideally need here, we set it to max int and assume we will never use up the steps
+ Steps: math.MaxInt32,
+ Cap: maxBackoff,
+ },
+ backoffTimer: nil,
+ initialBackoff: initBackoff,
+ lastBackoffStart: c.Now(),
+ backoffResetDuration: resetDuration,
+ clock: c,
+ }
+}
+
+func (b *exponentialBackoffManagerImpl) getNextBackoff() time.Duration {
+ if b.clock.Now().Sub(b.lastBackoffStart) > b.backoffResetDuration {
+ b.backoff.Steps = math.MaxInt32
+ b.backoff.Duration = b.initialBackoff
+ }
+ b.lastBackoffStart = b.clock.Now()
+ return b.backoff.Step()
+}
+
+// Backoff implements BackoffManager.Backoff, it returns a timer so caller can block on the timer for exponential backoff.
+// The returned timer must be drained before calling Backoff() the second time
+func (b *exponentialBackoffManagerImpl) Backoff() clock.Timer {
+ if b.backoffTimer == nil {
+ b.backoffTimer = b.clock.NewTimer(b.getNextBackoff())
+ } else {
+ b.backoffTimer.Reset(b.getNextBackoff())
+ }
+ return b.backoffTimer
+}
+
+// Deprecated: Will be removed when the legacy polling functions are removed.
+type jitteredBackoffManagerImpl struct {
+ clock clock.Clock
+ duration time.Duration
+ jitter float64
+ backoffTimer clock.Timer
+}
+
+// NewJitteredBackoffManager returns a BackoffManager that backoffs with given duration plus given jitter. If the jitter
+// is negative, backoff will not be jittered.
+//
+// Deprecated: Will be removed when the legacy Poll methods are removed. Callers should construct a
+// Backoff struct and invoke Timer() when calling wait.BackoffUntil.
+//
+// Instead of:
+//
+// bm := wait.NewJitteredBackoffManager(duration, jitter, clock)
+// ...
+// wait.BackoffUntil(..., bm.Backoff, ...)
+//
+// Use:
+//
+// wait.BackoffUntil(..., wait.Backoff{Duration: duration, Jitter: jitter}.Timer(), ...)
+func NewJitteredBackoffManager(duration time.Duration, jitter float64, c clock.Clock) BackoffManager {
+ return &jitteredBackoffManagerImpl{
+ clock: c,
+ duration: duration,
+ jitter: jitter,
+ backoffTimer: nil,
+ }
+}
+
+func (j *jitteredBackoffManagerImpl) getNextBackoff() time.Duration {
+ jitteredPeriod := j.duration
+ if j.jitter > 0.0 {
+ jitteredPeriod = Jitter(j.duration, j.jitter)
+ }
+ return jitteredPeriod
+}
+
+// Backoff implements BackoffManager.Backoff, it returns a timer so caller can block on the timer for jittered backoff.
+// The returned timer must be drained before calling Backoff() the second time
+func (j *jitteredBackoffManagerImpl) Backoff() clock.Timer {
+ backoff := j.getNextBackoff()
+ if j.backoffTimer == nil {
+ j.backoffTimer = j.clock.NewTimer(backoff)
+ } else {
+ j.backoffTimer.Reset(backoff)
+ }
+ return j.backoffTimer
+}
+
+// ExponentialBackoff repeats a condition check with exponential backoff.
+//
+// It repeatedly checks the condition and then sleeps, using `backoff.Step()`
+// to determine the length of the sleep and adjust Duration and Steps.
+// Stops and returns as soon as:
+// 1. the condition check returns true or an error,
+// 2. `backoff.Steps` checks of the condition have been done, or
+// 3. a sleep truncated by the cap on duration has been completed.
+// In case (1) the returned error is what the condition function returned.
+// In all other cases, ErrWaitTimeout is returned.
+//
+// Since backoffs are often subject to cancellation, we recommend using
+// ExponentialBackoffWithContext and passing a context to the method.
+func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
+ for backoff.Steps > 0 {
+ if ok, err := runConditionWithCrashProtection(condition); err != nil || ok {
+ return err
+ }
+ if backoff.Steps == 1 {
+ break
+ }
+ time.Sleep(backoff.Step())
+ }
+ return ErrWaitTimeout
+}
+
+// ExponentialBackoffWithContext repeats a condition check with exponential backoff.
+// It immediately returns an error if the condition returns an error, the context is cancelled
+// or hits the deadline, or if the maximum attempts defined in backoff is exceeded (ErrWaitTimeout).
+// If an error is returned by the condition the backoff stops immediately. The condition will
+// never be invoked more than backoff.Steps times.
+func ExponentialBackoffWithContext(ctx context.Context, backoff Backoff, condition ConditionWithContextFunc) error {
+ for backoff.Steps > 0 {
+ select {
+ case <-ctx.Done():
+ return ctx.Err()
+ default:
+ }
+
+ if ok, err := runConditionWithCrashProtectionWithContext(ctx, condition); err != nil || ok {
+ return err
+ }
+
+ if backoff.Steps == 1 {
+ break
+ }
+
+ waitBeforeRetry := backoff.Step()
+ select {
+ case <-ctx.Done():
+ return ctx.Err()
+ case <-time.After(waitBeforeRetry):
+ }
+ }
+
+ return ErrWaitTimeout
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/delay.go b/vendor/k8s.io/apimachinery/pkg/util/wait/delay.go
new file mode 100644
index 000000000..1d3dcaa74
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/delay.go
@@ -0,0 +1,51 @@
+/*
+Copyright 2023 The Kubernetes 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 wait
+
+import (
+ "context"
+ "sync"
+ "time"
+
+ "k8s.io/utils/clock"
+)
+
+// DelayFunc returns the next time interval to wait.
+type DelayFunc func() time.Duration
+
+// Timer takes an arbitrary delay function and returns a timer that can handle arbitrary interval changes.
+// Use Backoff{...}.Timer() for simple delays and more efficient timers.
+func (fn DelayFunc) Timer(c clock.Clock) Timer {
+ return &variableTimer{fn: fn, new: c.NewTimer}
+}
+
+// Until takes an arbitrary delay function and runs until cancelled or the condition indicates exit. This
+// offers all of the functionality of the methods in this package.
+func (fn DelayFunc) Until(ctx context.Context, immediate, sliding bool, condition ConditionWithContextFunc) error {
+ return loopConditionUntilContext(ctx, &variableTimer{fn: fn, new: internalClock.NewTimer}, immediate, sliding, condition)
+}
+
+// Concurrent returns a version of this DelayFunc that is safe for use by multiple goroutines that
+// wish to share a single delay timer.
+func (fn DelayFunc) Concurrent() DelayFunc {
+ var lock sync.Mutex
+ return func() time.Duration {
+ lock.Lock()
+ defer lock.Unlock()
+ return fn()
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/error.go b/vendor/k8s.io/apimachinery/pkg/util/wait/error.go
new file mode 100644
index 000000000..dd75801d8
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/error.go
@@ -0,0 +1,96 @@
+/*
+Copyright 2023 The Kubernetes 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 wait
+
+import (
+ "context"
+ "errors"
+)
+
+// ErrWaitTimeout is returned when the condition was not satisfied in time.
+//
+// Deprecated: This type will be made private in favor of Interrupted()
+// for checking errors or ErrorInterrupted(err) for returning a wrapped error.
+var ErrWaitTimeout = ErrorInterrupted(errors.New("timed out waiting for the condition"))
+
+// Interrupted returns true if the error indicates a Poll, ExponentialBackoff, or
+// Until loop exited for any reason besides the condition returning true or an
+// error. A loop is considered interrupted if the calling context is cancelled,
+// the context reaches its deadline, or a backoff reaches its maximum allowed
+// steps.
+//
+// Callers should use this method instead of comparing the error value directly to
+// ErrWaitTimeout, as methods that cancel a context may not return that error.
+//
+// Instead of:
+//
+// err := wait.Poll(...)
+// if err == wait.ErrWaitTimeout {
+// log.Infof("Wait for operation exceeded")
+// } else ...
+//
+// Use:
+//
+// err := wait.Poll(...)
+// if wait.Interrupted(err) {
+// log.Infof("Wait for operation exceeded")
+// } else ...
+func Interrupted(err error) bool {
+ switch {
+ case errors.Is(err, errWaitTimeout),
+ errors.Is(err, context.Canceled),
+ errors.Is(err, context.DeadlineExceeded):
+ return true
+ default:
+ return false
+ }
+}
+
+// errInterrupted
+type errInterrupted struct {
+ cause error
+}
+
+// ErrorInterrupted returns an error that indicates the wait was ended
+// early for a given reason. If no cause is provided a generic error
+// will be used but callers are encouraged to provide a real cause for
+// clarity in debugging.
+func ErrorInterrupted(cause error) error {
+ switch cause.(type) {
+ case errInterrupted:
+ // no need to wrap twice since errInterrupted is only needed
+ // once in a chain
+ return cause
+ default:
+ return errInterrupted{cause}
+ }
+}
+
+// errWaitTimeout is the private version of the previous ErrWaitTimeout
+// and is private to prevent direct comparison. Use ErrorInterrupted(err)
+// to get an error that will return true for Interrupted(err).
+var errWaitTimeout = errInterrupted{}
+
+func (e errInterrupted) Unwrap() error { return e.cause }
+func (e errInterrupted) Is(target error) bool { return target == errWaitTimeout }
+func (e errInterrupted) Error() string {
+ if e.cause == nil {
+ // returns the same error message as historical behavior
+ return "timed out waiting for the condition"
+ }
+ return e.cause.Error()
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go b/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go
new file mode 100644
index 000000000..51864d70f
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/loop.go
@@ -0,0 +1,86 @@
+/*
+Copyright 2023 The Kubernetes 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 wait
+
+import (
+ "context"
+ "time"
+
+ "k8s.io/apimachinery/pkg/util/runtime"
+)
+
+// loopConditionUntilContext executes the provided condition at intervals defined by
+// the provided timer until the provided context is cancelled, the condition returns
+// true, or the condition returns an error. If sliding is true, the period is computed
+// after condition runs. If it is false then period includes the runtime for condition.
+// If immediate is false the first delay happens before any call to condition. The
+// returned error is the error returned by the last condition or the context error if
+// the context was terminated.
+//
+// This is the common loop construct for all polling in the wait package.
+func loopConditionUntilContext(ctx context.Context, t Timer, immediate, sliding bool, condition ConditionWithContextFunc) error {
+ defer t.Stop()
+
+ var timeCh <-chan time.Time
+ doneCh := ctx.Done()
+
+ // if we haven't requested immediate execution, delay once
+ if !immediate {
+ timeCh = t.C()
+ select {
+ case <-doneCh:
+ return ctx.Err()
+ case <-timeCh:
+ }
+ }
+
+ for {
+ // checking ctx.Err() is slightly faster than checking a select
+ if err := ctx.Err(); err != nil {
+ return err
+ }
+
+ if !sliding {
+ t.Next()
+ }
+ if ok, err := func() (bool, error) {
+ defer runtime.HandleCrash()
+ return condition(ctx)
+ }(); err != nil || ok {
+ return err
+ }
+ if sliding {
+ t.Next()
+ }
+
+ if timeCh == nil {
+ timeCh = t.C()
+ }
+
+ // NOTE: b/c there is no priority selection in golang
+ // it is possible for this to race, meaning we could
+ // trigger t.C and doneCh, and t.C select falls through.
+ // In order to mitigate we re-check doneCh at the beginning
+ // of every loop to guarantee at-most one extra execution
+ // of condition.
+ select {
+ case <-doneCh:
+ return ctx.Err()
+ case <-timeCh:
+ }
+ }
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/poll.go b/vendor/k8s.io/apimachinery/pkg/util/wait/poll.go
new file mode 100644
index 000000000..32e8688ca
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/poll.go
@@ -0,0 +1,315 @@
+/*
+Copyright 2023 The Kubernetes 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 wait
+
+import (
+ "context"
+ "time"
+)
+
+// PollUntilContextCancel tries a condition func until it returns true, an error, or the context
+// is cancelled or hits a deadline. condition will be invoked after the first interval if the
+// context is not cancelled first. The returned error will be from ctx.Err(), the condition's
+// err return value, or nil. If invoking condition takes longer than interval the next condition
+// will be invoked immediately. When using very short intervals, condition may be invoked multiple
+// times before a context cancellation is detected. If immediate is true, condition will be
+// invoked before waiting and guarantees that condition is invoked at least once, regardless of
+// whether the context has been cancelled.
+func PollUntilContextCancel(ctx context.Context, interval time.Duration, immediate bool, condition ConditionWithContextFunc) error {
+ return loopConditionUntilContext(ctx, Backoff{Duration: interval}.Timer(), immediate, false, condition)
+}
+
+// PollUntilContextTimeout will terminate polling after timeout duration by setting a context
+// timeout. This is provided as a convenience function for callers not currently executing under
+// a deadline and is equivalent to:
+//
+// deadlineCtx, deadlineCancel := context.WithTimeout(ctx, timeout)
+// err := PollUntilContextCancel(ctx, interval, immediate, condition)
+//
+// The deadline context will be cancelled if the Poll succeeds before the timeout, simplifying
+// inline usage. All other behavior is identical to PollWithContextTimeout.
+func PollUntilContextTimeout(ctx context.Context, interval, timeout time.Duration, immediate bool, condition ConditionWithContextFunc) error {
+ deadlineCtx, deadlineCancel := context.WithTimeout(ctx, timeout)
+ defer deadlineCancel()
+ return loopConditionUntilContext(deadlineCtx, Backoff{Duration: interval}.Timer(), immediate, false, condition)
+}
+
+// Poll tries a condition func until it returns true, an error, or the timeout
+// is reached.
+//
+// Poll always waits the interval before the run of 'condition'.
+// 'condition' will always be invoked at least once.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// If you want to Poll something forever, see PollInfinite.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextTimeout.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func Poll(interval, timeout time.Duration, condition ConditionFunc) error {
+ return PollWithContext(context.Background(), interval, timeout, condition.WithContext())
+}
+
+// PollWithContext tries a condition func until it returns true, an error,
+// or when the context expires or the timeout is reached, whichever
+// happens first.
+//
+// PollWithContext always waits the interval before the run of 'condition'.
+// 'condition' will always be invoked at least once.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// If you want to Poll something forever, see PollInfinite.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextTimeout.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollWithContext(ctx context.Context, interval, timeout time.Duration, condition ConditionWithContextFunc) error {
+ return poll(ctx, false, poller(interval, timeout), condition)
+}
+
+// PollUntil tries a condition func until it returns true, an error or stopCh is
+// closed.
+//
+// PollUntil always waits interval before the first run of 'condition'.
+// 'condition' will always be invoked at least once.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
+ return PollUntilWithContext(ContextForChannel(stopCh), interval, condition.WithContext())
+}
+
+// PollUntilWithContext tries a condition func until it returns true,
+// an error or the specified context is cancelled or expired.
+//
+// PollUntilWithContext always waits interval before the first run of 'condition'.
+// 'condition' will always be invoked at least once.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollUntilWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
+ return poll(ctx, false, poller(interval, 0), condition)
+}
+
+// PollInfinite tries a condition func until it returns true or an error
+//
+// PollInfinite always waits the interval before the run of 'condition'.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollInfinite(interval time.Duration, condition ConditionFunc) error {
+ return PollInfiniteWithContext(context.Background(), interval, condition.WithContext())
+}
+
+// PollInfiniteWithContext tries a condition func until it returns true or an error
+//
+// PollInfiniteWithContext always waits the interval before the run of 'condition'.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollInfiniteWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
+ return poll(ctx, false, poller(interval, 0), condition)
+}
+
+// PollImmediate tries a condition func until it returns true, an error, or the timeout
+// is reached.
+//
+// PollImmediate always checks 'condition' before waiting for the interval. 'condition'
+// will always be invoked at least once.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// If you want to immediately Poll something forever, see PollImmediateInfinite.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextTimeout.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error {
+ return PollImmediateWithContext(context.Background(), interval, timeout, condition.WithContext())
+}
+
+// PollImmediateWithContext tries a condition func until it returns true, an error,
+// or the timeout is reached or the specified context expires, whichever happens first.
+//
+// PollImmediateWithContext always checks 'condition' before waiting for the interval.
+// 'condition' will always be invoked at least once.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// If you want to immediately Poll something forever, see PollImmediateInfinite.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextTimeout.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollImmediateWithContext(ctx context.Context, interval, timeout time.Duration, condition ConditionWithContextFunc) error {
+ return poll(ctx, true, poller(interval, timeout), condition)
+}
+
+// PollImmediateUntil tries a condition func until it returns true, an error or stopCh is closed.
+//
+// PollImmediateUntil runs the 'condition' before waiting for the interval.
+// 'condition' will always be invoked at least once.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollImmediateUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
+ return PollImmediateUntilWithContext(ContextForChannel(stopCh), interval, condition.WithContext())
+}
+
+// PollImmediateUntilWithContext tries a condition func until it returns true,
+// an error or the specified context is cancelled or expired.
+//
+// PollImmediateUntilWithContext runs the 'condition' before waiting for the interval.
+// 'condition' will always be invoked at least once.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollImmediateUntilWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
+ return poll(ctx, true, poller(interval, 0), condition)
+}
+
+// PollImmediateInfinite tries a condition func until it returns true or an error
+//
+// PollImmediateInfinite runs the 'condition' before waiting for the interval.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error {
+ return PollImmediateInfiniteWithContext(context.Background(), interval, condition.WithContext())
+}
+
+// PollImmediateInfiniteWithContext tries a condition func until it returns true
+// or an error or the specified context gets cancelled or expired.
+//
+// PollImmediateInfiniteWithContext runs the 'condition' before waiting for the interval.
+//
+// Some intervals may be missed if the condition takes too long or the time
+// window is too short.
+//
+// Deprecated: This method does not return errors from context, use PollWithContextCancel.
+// Note that the new method will no longer return ErrWaitTimeout and instead return errors
+// defined by the context package. Will be removed in a future release.
+func PollImmediateInfiniteWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
+ return poll(ctx, true, poller(interval, 0), condition)
+}
+
+// Internally used, each of the public 'Poll*' function defined in this
+// package should invoke this internal function with appropriate parameters.
+// ctx: the context specified by the caller, for infinite polling pass
+// a context that never gets cancelled or expired.
+// immediate: if true, the 'condition' will be invoked before waiting for the interval,
+// in this case 'condition' will always be invoked at least once.
+// wait: user specified WaitFunc function that controls at what interval the condition
+// function should be invoked periodically and whether it is bound by a timeout.
+// condition: user specified ConditionWithContextFunc function.
+//
+// Deprecated: will be removed in favor of loopConditionUntilContext.
+func poll(ctx context.Context, immediate bool, wait waitWithContextFunc, condition ConditionWithContextFunc) error {
+ if immediate {
+ done, err := runConditionWithCrashProtectionWithContext(ctx, condition)
+ if err != nil {
+ return err
+ }
+ if done {
+ return nil
+ }
+ }
+
+ select {
+ case <-ctx.Done():
+ // returning ctx.Err() will break backward compatibility, use new PollUntilContext*
+ // methods instead
+ return ErrWaitTimeout
+ default:
+ return waitForWithContext(ctx, wait, condition)
+ }
+}
+
+// poller returns a WaitFunc that will send to the channel every interval until
+// timeout has elapsed and then closes the channel.
+//
+// Over very short intervals you may receive no ticks before the channel is
+// closed. A timeout of 0 is interpreted as an infinity, and in such a case
+// it would be the caller's responsibility to close the done channel.
+// Failure to do so would result in a leaked goroutine.
+//
+// Output ticks are not buffered. If the channel is not ready to receive an
+// item, the tick is skipped.
+//
+// Deprecated: Will be removed in a future release.
+func poller(interval, timeout time.Duration) waitWithContextFunc {
+ return waitWithContextFunc(func(ctx context.Context) <-chan struct{} {
+ ch := make(chan struct{})
+
+ go func() {
+ defer close(ch)
+
+ tick := time.NewTicker(interval)
+ defer tick.Stop()
+
+ var after <-chan time.Time
+ if timeout != 0 {
+ // time.After is more convenient, but it
+ // potentially leaves timers around much longer
+ // than necessary if we exit early.
+ timer := time.NewTimer(timeout)
+ after = timer.C
+ defer timer.Stop()
+ }
+
+ for {
+ select {
+ case <-tick.C:
+ // If the consumer isn't ready for this signal drop it and
+ // check the other channels.
+ select {
+ case ch <- struct{}{}:
+ default:
+ }
+ case <-after:
+ return
+ case <-ctx.Done():
+ return
+ }
+ }
+ }()
+
+ return ch
+ })
+}
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/timer.go b/vendor/k8s.io/apimachinery/pkg/util/wait/timer.go
new file mode 100644
index 000000000..3efba3213
--- /dev/null
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/timer.go
@@ -0,0 +1,121 @@
+/*
+Copyright 2023 The Kubernetes 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 wait
+
+import (
+ "time"
+
+ "k8s.io/utils/clock"
+)
+
+// Timer abstracts how wait functions interact with time runtime efficiently. Test
+// code may implement this interface directly but package consumers are encouraged
+// to use the Backoff type as the primary mechanism for acquiring a Timer. The
+// interface is a simplification of clock.Timer to prevent misuse. Timers are not
+// expected to be safe for calls from multiple goroutines.
+type Timer interface {
+ // C returns a channel that will receive a struct{} each time the timer fires.
+ // The channel should not be waited on after Stop() is invoked. It is allowed
+ // to cache the returned value of C() for the lifetime of the Timer.
+ C() <-chan time.Time
+ // Next is invoked by wait functions to signal timers that the next interval
+ // should begin. You may only use Next() if you have drained the channel C().
+ // You should not call Next() after Stop() is invoked.
+ Next()
+ // Stop releases the timer. It is safe to invoke if no other methods have been
+ // called.
+ Stop()
+}
+
+type noopTimer struct {
+ closedCh <-chan time.Time
+}
+
+// newNoopTimer creates a timer with a unique channel to avoid contention
+// for the channel's lock across multiple unrelated timers.
+func newNoopTimer() noopTimer {
+ ch := make(chan time.Time)
+ close(ch)
+ return noopTimer{closedCh: ch}
+}
+
+func (t noopTimer) C() <-chan time.Time {
+ return t.closedCh
+}
+func (noopTimer) Next() {}
+func (noopTimer) Stop() {}
+
+type variableTimer struct {
+ fn DelayFunc
+ t clock.Timer
+ new func(time.Duration) clock.Timer
+}
+
+func (t *variableTimer) C() <-chan time.Time {
+ if t.t == nil {
+ d := t.fn()
+ t.t = t.new(d)
+ }
+ return t.t.C()
+}
+func (t *variableTimer) Next() {
+ if t.t == nil {
+ return
+ }
+ d := t.fn()
+ t.t.Reset(d)
+}
+func (t *variableTimer) Stop() {
+ if t.t == nil {
+ return
+ }
+ t.t.Stop()
+ t.t = nil
+}
+
+type fixedTimer struct {
+ interval time.Duration
+ t clock.Ticker
+ new func(time.Duration) clock.Ticker
+}
+
+func (t *fixedTimer) C() <-chan time.Time {
+ if t.t == nil {
+ t.t = t.new(t.interval)
+ }
+ return t.t.C()
+}
+func (t *fixedTimer) Next() {
+ // no-op for fixed timers
+}
+func (t *fixedTimer) Stop() {
+ if t.t == nil {
+ return
+ }
+ t.t.Stop()
+ t.t = nil
+}
+
+var (
+ // RealTimer can be passed to methods that need a clock.Timer.
+ RealTimer = clock.RealClock{}.NewTimer
+)
+
+var (
+ // internalClock is used for test injection of clocks
+ internalClock = clock.RealClock{}
+)
diff --git a/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go
index 137627b40..6805e8cf9 100644
--- a/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go
+++ b/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go
@@ -18,14 +18,11 @@ package wait
import (
"context"
- "errors"
- "math"
"math/rand"
"sync"
"time"
"k8s.io/apimachinery/pkg/util/runtime"
- "k8s.io/utils/clock"
)
// For any test of the style:
@@ -83,113 +80,6 @@ func Forever(f func(), period time.Duration) {
Until(f, period, NeverStop)
}
-// Until loops until stop channel is closed, running f every period.
-//
-// Until is syntactic sugar on top of JitterUntil with zero jitter factor and
-// with sliding = true (which means the timer for period starts after the f
-// completes).
-func Until(f func(), period time.Duration, stopCh <-chan struct{}) {
- JitterUntil(f, period, 0.0, true, stopCh)
-}
-
-// UntilWithContext loops until context is done, running f every period.
-//
-// UntilWithContext is syntactic sugar on top of JitterUntilWithContext
-// with zero jitter factor and with sliding = true (which means the timer
-// for period starts after the f completes).
-func UntilWithContext(ctx context.Context, f func(context.Context), period time.Duration) {
- JitterUntilWithContext(ctx, f, period, 0.0, true)
-}
-
-// NonSlidingUntil loops until stop channel is closed, running f every
-// period.
-//
-// NonSlidingUntil is syntactic sugar on top of JitterUntil with zero jitter
-// factor, with sliding = false (meaning the timer for period starts at the same
-// time as the function starts).
-func NonSlidingUntil(f func(), period time.Duration, stopCh <-chan struct{}) {
- JitterUntil(f, period, 0.0, false, stopCh)
-}
-
-// NonSlidingUntilWithContext loops until context is done, running f every
-// period.
-//
-// NonSlidingUntilWithContext is syntactic sugar on top of JitterUntilWithContext
-// with zero jitter factor, with sliding = false (meaning the timer for period
-// starts at the same time as the function starts).
-func NonSlidingUntilWithContext(ctx context.Context, f func(context.Context), period time.Duration) {
- JitterUntilWithContext(ctx, f, period, 0.0, false)
-}
-
-// JitterUntil loops until stop channel is closed, running f every period.
-//
-// If jitterFactor is positive, the period is jittered before every run of f.
-// If jitterFactor is not positive, the period is unchanged and not jittered.
-//
-// If sliding is true, the period is computed after f runs. If it is false then
-// period includes the runtime for f.
-//
-// Close stopCh to stop. f may not be invoked if stop channel is already
-// closed. Pass NeverStop to if you don't want it stop.
-func JitterUntil(f func(), period time.Duration, jitterFactor float64, sliding bool, stopCh <-chan struct{}) {
- BackoffUntil(f, NewJitteredBackoffManager(period, jitterFactor, &clock.RealClock{}), sliding, stopCh)
-}
-
-// BackoffUntil loops until stop channel is closed, run f every duration given by BackoffManager.
-//
-// If sliding is true, the period is computed after f runs. If it is false then
-// period includes the runtime for f.
-func BackoffUntil(f func(), backoff BackoffManager, sliding bool, stopCh <-chan struct{}) {
- var t clock.Timer
- for {
- select {
- case <-stopCh:
- return
- default:
- }
-
- if !sliding {
- t = backoff.Backoff()
- }
-
- func() {
- defer runtime.HandleCrash()
- f()
- }()
-
- if sliding {
- t = backoff.Backoff()
- }
-
- // NOTE: b/c there is no priority selection in golang
- // it is possible for this to race, meaning we could
- // trigger t.C and stopCh, and t.C select falls through.
- // In order to mitigate we re-check stopCh at the beginning
- // of every loop to prevent extra executions of f().
- select {
- case <-stopCh:
- if !t.Stop() {
- <-t.C()
- }
- return
- case <-t.C():
- }
- }
-}
-
-// JitterUntilWithContext loops until context is done, running f every period.
-//
-// If jitterFactor is positive, the period is jittered before every run of f.
-// If jitterFactor is not positive, the period is unchanged and not jittered.
-//
-// If sliding is true, the period is computed after f runs. If it is false then
-// period includes the runtime for f.
-//
-// Cancel context to stop. f may not be invoked if context is already expired.
-func JitterUntilWithContext(ctx context.Context, f func(context.Context), period time.Duration, jitterFactor float64, sliding bool) {
- JitterUntil(func() { f(ctx) }, period, jitterFactor, sliding, ctx.Done())
-}
-
// Jitter returns a time.Duration between duration and duration + maxFactor *
// duration.
//
@@ -203,9 +93,6 @@ func Jitter(duration time.Duration, maxFactor float64) time.Duration {
return wait
}
-// ErrWaitTimeout is returned when the condition exited without success.
-var ErrWaitTimeout = errors.New("timed out waiting for the condition")
-
// ConditionFunc returns true if the condition is satisfied, or an error
// if the loop should be aborted.
type ConditionFunc func() (done bool, err error)
@@ -223,425 +110,80 @@ func (cf ConditionFunc) WithContext() ConditionWithContextFunc {
}
}
-// runConditionWithCrashProtection runs a ConditionFunc with crash protection
-func runConditionWithCrashProtection(condition ConditionFunc) (bool, error) {
- return runConditionWithCrashProtectionWithContext(context.TODO(), condition.WithContext())
-}
-
-// runConditionWithCrashProtectionWithContext runs a
-// ConditionWithContextFunc with crash protection.
-func runConditionWithCrashProtectionWithContext(ctx context.Context, condition ConditionWithContextFunc) (bool, error) {
- defer runtime.HandleCrash()
- return condition(ctx)
-}
-
-// Backoff holds parameters applied to a Backoff function.
-type Backoff struct {
- // The initial duration.
- Duration time.Duration
- // Duration is multiplied by factor each iteration, if factor is not zero
- // and the limits imposed by Steps and Cap have not been reached.
- // Should not be negative.
- // The jitter does not contribute to the updates to the duration parameter.
- Factor float64
- // The sleep at each iteration is the duration plus an additional
- // amount chosen uniformly at random from the interval between
- // zero and `jitter*duration`.
- Jitter float64
- // The remaining number of iterations in which the duration
- // parameter may change (but progress can be stopped earlier by
- // hitting the cap). If not positive, the duration is not
- // changed. Used for exponential backoff in combination with
- // Factor and Cap.
- Steps int
- // A limit on revised values of the duration parameter. If a
- // multiplication by the factor parameter would make the duration
- // exceed the cap then the duration is set to the cap and the
- // steps parameter is set to zero.
- Cap time.Duration
-}
-
-// Step (1) returns an amount of time to sleep determined by the
-// original Duration and Jitter and (2) mutates the provided Backoff
-// to update its Steps and Duration.
-func (b *Backoff) Step() time.Duration {
- if b.Steps < 1 {
- if b.Jitter > 0 {
- return Jitter(b.Duration, b.Jitter)
- }
- return b.Duration
- }
- b.Steps--
-
- duration := b.Duration
-
- // calculate the next step
- if b.Factor != 0 {
- b.Duration = time.Duration(float64(b.Duration) * b.Factor)
- if b.Cap > 0 && b.Duration > b.Cap {
- b.Duration = b.Cap
- b.Steps = 0
- }
- }
-
- if b.Jitter > 0 {
- duration = Jitter(duration, b.Jitter)
- }
- return duration
-}
-
-// ContextForChannel derives a child context from a parent channel.
-//
-// The derived context's Done channel is closed when the returned cancel function
-// is called or when the parent channel is closed, whichever happens first.
-//
-// Note the caller must *always* call the CancelFunc, otherwise resources may be leaked.
-func ContextForChannel(parentCh <-chan struct{}) (context.Context, context.CancelFunc) {
- ctx, cancel := context.WithCancel(context.Background())
-
- go func() {
- select {
- case <-parentCh:
- cancel()
- case <-ctx.Done():
- }
- }()
- return ctx, cancel
-}
-
-// BackoffManager manages backoff with a particular scheme based on its underlying implementation. It provides
-// an interface to return a timer for backoff, and caller shall backoff until Timer.C() drains. If the second Backoff()
-// is called before the timer from the first Backoff() call finishes, the first timer will NOT be drained and result in
-// undetermined behavior.
-// The BackoffManager is supposed to be called in a single-threaded environment.
-type BackoffManager interface {
- Backoff() clock.Timer
-}
-
-type exponentialBackoffManagerImpl struct {
- backoff *Backoff
- backoffTimer clock.Timer
- lastBackoffStart time.Time
- initialBackoff time.Duration
- backoffResetDuration time.Duration
- clock clock.Clock
-}
-
-// NewExponentialBackoffManager returns a manager for managing exponential backoff. Each backoff is jittered and
-// backoff will not exceed the given max. If the backoff is not called within resetDuration, the backoff is reset.
-// This backoff manager is used to reduce load during upstream unhealthiness.
-func NewExponentialBackoffManager(initBackoff, maxBackoff, resetDuration time.Duration, backoffFactor, jitter float64, c clock.Clock) BackoffManager {
- return &exponentialBackoffManagerImpl{
- backoff: &Backoff{
- Duration: initBackoff,
- Factor: backoffFactor,
- Jitter: jitter,
-
- // the current impl of wait.Backoff returns Backoff.Duration once steps are used up, which is not
- // what we ideally need here, we set it to max int and assume we will never use up the steps
- Steps: math.MaxInt32,
- Cap: maxBackoff,
- },
- backoffTimer: nil,
- initialBackoff: initBackoff,
- lastBackoffStart: c.Now(),
- backoffResetDuration: resetDuration,
- clock: c,
- }
-}
-
-func (b *exponentialBackoffManagerImpl) getNextBackoff() time.Duration {
- if b.clock.Now().Sub(b.lastBackoffStart) > b.backoffResetDuration {
- b.backoff.Steps = math.MaxInt32
- b.backoff.Duration = b.initialBackoff
- }
- b.lastBackoffStart = b.clock.Now()
- return b.backoff.Step()
-}
-
-// Backoff implements BackoffManager.Backoff, it returns a timer so caller can block on the timer for exponential backoff.
-// The returned timer must be drained before calling Backoff() the second time
-func (b *exponentialBackoffManagerImpl) Backoff() clock.Timer {
- if b.backoffTimer == nil {
- b.backoffTimer = b.clock.NewTimer(b.getNextBackoff())
- } else {
- b.backoffTimer.Reset(b.getNextBackoff())
- }
- return b.backoffTimer
-}
-
-type jitteredBackoffManagerImpl struct {
- clock clock.Clock
- duration time.Duration
- jitter float64
- backoffTimer clock.Timer
-}
-
-// NewJitteredBackoffManager returns a BackoffManager that backoffs with given duration plus given jitter. If the jitter
-// is negative, backoff will not be jittered.
-func NewJitteredBackoffManager(duration time.Duration, jitter float64, c clock.Clock) BackoffManager {
- return &jitteredBackoffManagerImpl{
- clock: c,
- duration: duration,
- jitter: jitter,
- backoffTimer: nil,
- }
-}
-
-func (j *jitteredBackoffManagerImpl) getNextBackoff() time.Duration {
- jitteredPeriod := j.duration
- if j.jitter > 0.0 {
- jitteredPeriod = Jitter(j.duration, j.jitter)
- }
- return jitteredPeriod
+// ContextForChannel provides a context that will be treated as cancelled
+// when the provided parentCh is closed. The implementation returns
+// context.Canceled for Err() if and only if the parentCh is closed.
+func ContextForChannel(parentCh <-chan struct{}) context.Context {
+ return channelContext{stopCh: parentCh}
}
-// Backoff implements BackoffManager.Backoff, it returns a timer so caller can block on the timer for jittered backoff.
-// The returned timer must be drained before calling Backoff() the second time
-func (j *jitteredBackoffManagerImpl) Backoff() clock.Timer {
- backoff := j.getNextBackoff()
- if j.backoffTimer == nil {
- j.backoffTimer = j.clock.NewTimer(backoff)
- } else {
- j.backoffTimer.Reset(backoff)
- }
- return j.backoffTimer
-}
+var _ context.Context = channelContext{}
-// ExponentialBackoff repeats a condition check with exponential backoff.
-//
-// It repeatedly checks the condition and then sleeps, using `backoff.Step()`
-// to determine the length of the sleep and adjust Duration and Steps.
-// Stops and returns as soon as:
-// 1. the condition check returns true or an error,
-// 2. `backoff.Steps` checks of the condition have been done, or
-// 3. a sleep truncated by the cap on duration has been completed.
-// In case (1) the returned error is what the condition function returned.
-// In all other cases, ErrWaitTimeout is returned.
-func ExponentialBackoff(backoff Backoff, condition ConditionFunc) error {
- for backoff.Steps > 0 {
- if ok, err := runConditionWithCrashProtection(condition); err != nil || ok {
- return err
- }
- if backoff.Steps == 1 {
- break
- }
- time.Sleep(backoff.Step())
- }
- return ErrWaitTimeout
-}
-
-// Poll tries a condition func until it returns true, an error, or the timeout
-// is reached.
-//
-// Poll always waits the interval before the run of 'condition'.
-// 'condition' will always be invoked at least once.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-//
-// If you want to Poll something forever, see PollInfinite.
-func Poll(interval, timeout time.Duration, condition ConditionFunc) error {
- return PollWithContext(context.Background(), interval, timeout, condition.WithContext())
-}
-
-// PollWithContext tries a condition func until it returns true, an error,
-// or when the context expires or the timeout is reached, whichever
-// happens first.
-//
-// PollWithContext always waits the interval before the run of 'condition'.
-// 'condition' will always be invoked at least once.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-//
-// If you want to Poll something forever, see PollInfinite.
-func PollWithContext(ctx context.Context, interval, timeout time.Duration, condition ConditionWithContextFunc) error {
- return poll(ctx, false, poller(interval, timeout), condition)
-}
-
-// PollUntil tries a condition func until it returns true, an error or stopCh is
+// channelContext will behave as if the context were cancelled when stopCh is
// closed.
-//
-// PollUntil always waits interval before the first run of 'condition'.
-// 'condition' will always be invoked at least once.
-func PollUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
- ctx, cancel := ContextForChannel(stopCh)
- defer cancel()
- return PollUntilWithContext(ctx, interval, condition.WithContext())
-}
-
-// PollUntilWithContext tries a condition func until it returns true,
-// an error or the specified context is cancelled or expired.
-//
-// PollUntilWithContext always waits interval before the first run of 'condition'.
-// 'condition' will always be invoked at least once.
-func PollUntilWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
- return poll(ctx, false, poller(interval, 0), condition)
-}
-
-// PollInfinite tries a condition func until it returns true or an error
-//
-// PollInfinite always waits the interval before the run of 'condition'.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-func PollInfinite(interval time.Duration, condition ConditionFunc) error {
- return PollInfiniteWithContext(context.Background(), interval, condition.WithContext())
-}
-
-// PollInfiniteWithContext tries a condition func until it returns true or an error
-//
-// PollInfiniteWithContext always waits the interval before the run of 'condition'.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-func PollInfiniteWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
- return poll(ctx, false, poller(interval, 0), condition)
+type channelContext struct {
+ stopCh <-chan struct{}
}
-// PollImmediate tries a condition func until it returns true, an error, or the timeout
-// is reached.
-//
-// PollImmediate always checks 'condition' before waiting for the interval. 'condition'
-// will always be invoked at least once.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-//
-// If you want to immediately Poll something forever, see PollImmediateInfinite.
-func PollImmediate(interval, timeout time.Duration, condition ConditionFunc) error {
- return PollImmediateWithContext(context.Background(), interval, timeout, condition.WithContext())
-}
-
-// PollImmediateWithContext tries a condition func until it returns true, an error,
-// or the timeout is reached or the specified context expires, whichever happens first.
-//
-// PollImmediateWithContext always checks 'condition' before waiting for the interval.
-// 'condition' will always be invoked at least once.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-//
-// If you want to immediately Poll something forever, see PollImmediateInfinite.
-func PollImmediateWithContext(ctx context.Context, interval, timeout time.Duration, condition ConditionWithContextFunc) error {
- return poll(ctx, true, poller(interval, timeout), condition)
-}
-
-// PollImmediateUntil tries a condition func until it returns true, an error or stopCh is closed.
-//
-// PollImmediateUntil runs the 'condition' before waiting for the interval.
-// 'condition' will always be invoked at least once.
-func PollImmediateUntil(interval time.Duration, condition ConditionFunc, stopCh <-chan struct{}) error {
- ctx, cancel := ContextForChannel(stopCh)
- defer cancel()
- return PollImmediateUntilWithContext(ctx, interval, condition.WithContext())
-}
-
-// PollImmediateUntilWithContext tries a condition func until it returns true,
-// an error or the specified context is cancelled or expired.
-//
-// PollImmediateUntilWithContext runs the 'condition' before waiting for the interval.
-// 'condition' will always be invoked at least once.
-func PollImmediateUntilWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
- return poll(ctx, true, poller(interval, 0), condition)
+func (c channelContext) Done() <-chan struct{} { return c.stopCh }
+func (c channelContext) Err() error {
+ select {
+ case <-c.stopCh:
+ return context.Canceled
+ default:
+ return nil
+ }
}
+func (c channelContext) Deadline() (time.Time, bool) { return time.Time{}, false }
+func (c channelContext) Value(key any) any { return nil }
-// PollImmediateInfinite tries a condition func until it returns true or an error
+// runConditionWithCrashProtection runs a ConditionFunc with crash protection.
//
-// PollImmediateInfinite runs the 'condition' before waiting for the interval.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-func PollImmediateInfinite(interval time.Duration, condition ConditionFunc) error {
- return PollImmediateInfiniteWithContext(context.Background(), interval, condition.WithContext())
+// Deprecated: Will be removed when the legacy polling methods are removed.
+func runConditionWithCrashProtection(condition ConditionFunc) (bool, error) {
+ defer runtime.HandleCrash()
+ return condition()
}
-// PollImmediateInfiniteWithContext tries a condition func until it returns true
-// or an error or the specified context gets cancelled or expired.
+// runConditionWithCrashProtectionWithContext runs a ConditionWithContextFunc
+// with crash protection.
//
-// PollImmediateInfiniteWithContext runs the 'condition' before waiting for the interval.
-//
-// Some intervals may be missed if the condition takes too long or the time
-// window is too short.
-func PollImmediateInfiniteWithContext(ctx context.Context, interval time.Duration, condition ConditionWithContextFunc) error {
- return poll(ctx, true, poller(interval, 0), condition)
-}
-
-// Internally used, each of the public 'Poll*' function defined in this
-// package should invoke this internal function with appropriate parameters.
-// ctx: the context specified by the caller, for infinite polling pass
-// a context that never gets cancelled or expired.
-// immediate: if true, the 'condition' will be invoked before waiting for the interval,
-// in this case 'condition' will always be invoked at least once.
-// wait: user specified WaitFunc function that controls at what interval the condition
-// function should be invoked periodically and whether it is bound by a timeout.
-// condition: user specified ConditionWithContextFunc function.
-func poll(ctx context.Context, immediate bool, wait WaitWithContextFunc, condition ConditionWithContextFunc) error {
- if immediate {
- done, err := runConditionWithCrashProtectionWithContext(ctx, condition)
- if err != nil {
- return err
- }
- if done {
- return nil
- }
- }
-
- select {
- case <-ctx.Done():
- // returning ctx.Err() will break backward compatibility
- return ErrWaitTimeout
- default:
- return WaitForWithContext(ctx, wait, condition)
- }
+// Deprecated: Will be removed when the legacy polling methods are removed.
+func runConditionWithCrashProtectionWithContext(ctx context.Context, condition ConditionWithContextFunc) (bool, error) {
+ defer runtime.HandleCrash()
+ return condition(ctx)
}
-// WaitFunc creates a channel that receives an item every time a test
+// waitFunc creates a channel that receives an item every time a test
// should be executed and is closed when the last test should be invoked.
-type WaitFunc func(done <-chan struct{}) <-chan struct{}
+//
+// Deprecated: Will be removed in a future release in favor of
+// loopConditionUntilContext.
+type waitFunc func(done <-chan struct{}) <-chan struct{}
// WithContext converts the WaitFunc to an equivalent WaitWithContextFunc
-func (w WaitFunc) WithContext() WaitWithContextFunc {
+func (w waitFunc) WithContext() waitWithContextFunc {
return func(ctx context.Context) <-chan struct{} {
return w(ctx.Done())
}
}
-// WaitWithContextFunc creates a channel that receives an item every time a test
+// waitWithContextFunc creates a channel that receives an item every time a test
// should be executed and is closed when the last test should be invoked.
//
// When the specified context gets cancelled or expires the function
// stops sending item and returns immediately.
-type WaitWithContextFunc func(ctx context.Context) <-chan struct{}
-
-// WaitFor continually checks 'fn' as driven by 'wait'.
//
-// WaitFor gets a channel from 'wait()”, and then invokes 'fn' once for every value
-// placed on the channel and once more when the channel is closed. If the channel is closed
-// and 'fn' returns false without error, WaitFor returns ErrWaitTimeout.
-//
-// If 'fn' returns an error the loop ends and that error is returned. If
-// 'fn' returns true the loop ends and nil is returned.
-//
-// ErrWaitTimeout will be returned if the 'done' channel is closed without fn ever
-// returning true.
-//
-// When the done channel is closed, because the golang `select` statement is
-// "uniform pseudo-random", the `fn` might still run one or multiple time,
-// though eventually `WaitFor` will return.
-func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error {
- ctx, cancel := ContextForChannel(done)
- defer cancel()
- return WaitForWithContext(ctx, wait.WithContext(), fn.WithContext())
-}
+// Deprecated: Will be removed in a future release in favor of
+// loopConditionUntilContext.
+type waitWithContextFunc func(ctx context.Context) <-chan struct{}
-// WaitForWithContext continually checks 'fn' as driven by 'wait'.
+// waitForWithContext continually checks 'fn' as driven by 'wait'.
//
-// WaitForWithContext gets a channel from 'wait()”, and then invokes 'fn'
+// waitForWithContext gets a channel from 'wait()”, and then invokes 'fn'
// once for every value placed on the channel and once more when the
// channel is closed. If the channel is closed and 'fn'
-// returns false without error, WaitForWithContext returns ErrWaitTimeout.
+// returns false without error, waitForWithContext returns ErrWaitTimeout.
//
// If 'fn' returns an error the loop ends and that error is returned. If
// 'fn' returns true the loop ends and nil is returned.
@@ -651,8 +193,11 @@ func WaitFor(wait WaitFunc, fn ConditionFunc, done <-chan struct{}) error {
//
// When the ctx.Done() channel is closed, because the golang `select` statement is
// "uniform pseudo-random", the `fn` might still run one or multiple times,
-// though eventually `WaitForWithContext` will return.
-func WaitForWithContext(ctx context.Context, wait WaitWithContextFunc, fn ConditionWithContextFunc) error {
+// though eventually `waitForWithContext` will return.
+//
+// Deprecated: Will be removed in a future release in favor of
+// loopConditionUntilContext.
+func waitForWithContext(ctx context.Context, wait waitWithContextFunc, fn ConditionWithContextFunc) error {
waitCtx, cancel := context.WithCancel(context.Background())
defer cancel()
c := wait(waitCtx)
@@ -670,88 +215,9 @@ func WaitForWithContext(ctx context.Context, wait WaitWithContextFunc, fn Condit
return ErrWaitTimeout
}
case <-ctx.Done():
- // returning ctx.Err() will break backward compatibility
+ // returning ctx.Err() will break backward compatibility, use new PollUntilContext*
+ // methods instead
return ErrWaitTimeout
}
}
}
-
-// poller returns a WaitFunc that will send to the channel every interval until
-// timeout has elapsed and then closes the channel.
-//
-// Over very short intervals you may receive no ticks before the channel is
-// closed. A timeout of 0 is interpreted as an infinity, and in such a case
-// it would be the caller's responsibility to close the done channel.
-// Failure to do so would result in a leaked goroutine.
-//
-// Output ticks are not buffered. If the channel is not ready to receive an
-// item, the tick is skipped.
-func poller(interval, timeout time.Duration) WaitWithContextFunc {
- return WaitWithContextFunc(func(ctx context.Context) <-chan struct{} {
- ch := make(chan struct{})
-
- go func() {
- defer close(ch)
-
- tick := time.NewTicker(interval)
- defer tick.Stop()
-
- var after <-chan time.Time
- if timeout != 0 {
- // time.After is more convenient, but it
- // potentially leaves timers around much longer
- // than necessary if we exit early.
- timer := time.NewTimer(timeout)
- after = timer.C
- defer timer.Stop()
- }
-
- for {
- select {
- case <-tick.C:
- // If the consumer isn't ready for this signal drop it and
- // check the other channels.
- select {
- case ch <- struct{}{}:
- default:
- }
- case <-after:
- return
- case <-ctx.Done():
- return
- }
- }
- }()
-
- return ch
- })
-}
-
-// ExponentialBackoffWithContext works with a request context and a Backoff. It ensures that the retry wait never
-// exceeds the deadline specified by the request context.
-func ExponentialBackoffWithContext(ctx context.Context, backoff Backoff, condition ConditionFunc) error {
- for backoff.Steps > 0 {
- select {
- case <-ctx.Done():
- return ctx.Err()
- default:
- }
-
- if ok, err := runConditionWithCrashProtection(condition); err != nil || ok {
- return err
- }
-
- if backoff.Steps == 1 {
- break
- }
-
- waitBeforeRetry := backoff.Step()
- select {
- case <-ctx.Done():
- return ctx.Err()
- case <-time.After(waitBeforeRetry):
- }
- }
-
- return ErrWaitTimeout
-}
diff --git a/vendor/k8s.io/klog/v2/format.go b/vendor/k8s.io/klog/v2/format.go
new file mode 100644
index 000000000..63995ca6d
--- /dev/null
+++ b/vendor/k8s.io/klog/v2/format.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2023 The Kubernetes 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 klog
+
+import (
+ "encoding/json"
+ "fmt"
+ "strings"
+
+ "github.com/go-logr/logr"
+)
+
+// Format wraps a value of an arbitrary type and implement fmt.Stringer and
+// logr.Marshaler for them. Stringer returns pretty-printed JSON. MarshalLog
+// returns the original value with a type that has no special methods, in
+// particular no MarshalLog or MarshalJSON.
+//
+// Wrapping values like that is useful when the value has a broken
+// implementation of these special functions (for example, a type which
+// inherits String from TypeMeta, but then doesn't re-implement String) or the
+// implementation produces output that is less readable or unstructured (for
+// example, the generated String functions for Kubernetes API types).
+func Format(obj interface{}) interface{} {
+ return formatAny{Object: obj}
+}
+
+type formatAny struct {
+ Object interface{}
+}
+
+func (f formatAny) String() string {
+ var buffer strings.Builder
+ encoder := json.NewEncoder(&buffer)
+ encoder.SetIndent("", " ")
+ if err := encoder.Encode(&f.Object); err != nil {
+ return fmt.Sprintf("error marshaling %T to JSON: %v", f, err)
+ }
+ return buffer.String()
+}
+
+func (f formatAny) MarshalLog() interface{} {
+ // Returning a pointer to a pointer ensures that zapr doesn't find a
+ // fmt.Stringer or logr.Marshaler when it checks the type of the
+ // value. It then falls back to reflection, which dumps the value being
+ // pointed to (JSON doesn't have pointers).
+ ptr := &f.Object
+ return &ptr
+}
+
+var _ fmt.Stringer = formatAny{}
+var _ logr.Marshaler = formatAny{}
diff --git a/vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go b/vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go
index 1dc81a15f..bcdf5f8ee 100644
--- a/vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go
+++ b/vendor/k8s.io/klog/v2/internal/serialize/keyvalues.go
@@ -18,6 +18,7 @@ package serialize
import (
"bytes"
+ "encoding/json"
"fmt"
"strconv"
@@ -196,11 +197,11 @@ func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
case textWriter:
writeTextWriterValue(b, v)
case fmt.Stringer:
- writeStringValue(b, true, StringerToString(v))
+ writeStringValue(b, StringerToString(v))
case string:
- writeStringValue(b, true, v)
+ writeStringValue(b, v)
case error:
- writeStringValue(b, true, ErrorToString(v))
+ writeStringValue(b, ErrorToString(v))
case logr.Marshaler:
value := MarshalerToValue(v)
// A marshaler that returns a string is useful for
@@ -215,9 +216,9 @@ func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
// value directly.
switch value := value.(type) {
case string:
- writeStringValue(b, true, value)
+ writeStringValue(b, value)
default:
- writeStringValue(b, false, f.AnyToString(value))
+ f.formatAny(b, value)
}
case []byte:
// In https://github.com/kubernetes/klog/pull/237 it was decided
@@ -234,7 +235,7 @@ func (f Formatter) KVFormat(b *bytes.Buffer, k, v interface{}) {
b.WriteByte('=')
b.WriteString(fmt.Sprintf("%+q", v))
default:
- writeStringValue(b, false, f.AnyToString(v))
+ f.formatAny(b, v)
}
}
@@ -242,12 +243,25 @@ func KVFormat(b *bytes.Buffer, k, v interface{}) {
Formatter{}.KVFormat(b, k, v)
}
-// AnyToString is the historic fallback formatter.
-func (f Formatter) AnyToString(v interface{}) string {
+// formatAny is the fallback formatter for a value. It supports a hook (for
+// example, for YAML encoding) and itself uses JSON encoding.
+func (f Formatter) formatAny(b *bytes.Buffer, v interface{}) {
+ b.WriteRune('=')
if f.AnyToStringHook != nil {
- return f.AnyToStringHook(v)
+ b.WriteString(f.AnyToStringHook(v))
+ return
+ }
+ encoder := json.NewEncoder(b)
+ l := b.Len()
+ if err := encoder.Encode(v); err != nil {
+ // This shouldn't happen. We discard whatever the encoder
+ // wrote and instead dump an error string.
+ b.Truncate(l)
+ b.WriteString(fmt.Sprintf(`""`, err))
+ return
}
- return fmt.Sprintf("%+v", v)
+ // Remove trailing newline.
+ b.Truncate(b.Len() - 1)
}
// StringerToString converts a Stringer to a string,
@@ -287,7 +301,7 @@ func ErrorToString(err error) (ret string) {
}
func writeTextWriterValue(b *bytes.Buffer, v textWriter) {
- b.WriteRune('=')
+ b.WriteByte('=')
defer func() {
if err := recover(); err != nil {
fmt.Fprintf(b, `""`, err)
@@ -296,18 +310,13 @@ func writeTextWriterValue(b *bytes.Buffer, v textWriter) {
v.WriteText(b)
}
-func writeStringValue(b *bytes.Buffer, quote bool, v string) {
+func writeStringValue(b *bytes.Buffer, v string) {
data := []byte(v)
index := bytes.IndexByte(data, '\n')
if index == -1 {
b.WriteByte('=')
- if quote {
- // Simple string, quote quotation marks and non-printable characters.
- b.WriteString(strconv.Quote(v))
- return
- }
- // Non-string with no line breaks.
- b.WriteString(v)
+ // Simple string, quote quotation marks and non-printable characters.
+ b.WriteString(strconv.Quote(v))
return
}
diff --git a/vendor/k8s.io/klog/v2/k8s_references.go b/vendor/k8s.io/klog/v2/k8s_references.go
index ecd3f8b69..786af74bf 100644
--- a/vendor/k8s.io/klog/v2/k8s_references.go
+++ b/vendor/k8s.io/klog/v2/k8s_references.go
@@ -178,14 +178,14 @@ func (ks kobjSlice) process() (objs []interface{}, err string) {
return objectRefs, ""
}
-var nilToken = []byte("")
+var nilToken = []byte("null")
func (ks kobjSlice) WriteText(out *bytes.Buffer) {
s := reflect.ValueOf(ks.arg)
switch s.Kind() {
case reflect.Invalid:
- // nil parameter, print as empty slice.
- out.WriteString("[]")
+ // nil parameter, print as null.
+ out.Write(nilToken)
return
case reflect.Slice:
// Okay, handle below.
@@ -197,15 +197,15 @@ func (ks kobjSlice) WriteText(out *bytes.Buffer) {
defer out.Write([]byte{']'})
for i := 0; i < s.Len(); i++ {
if i > 0 {
- out.Write([]byte{' '})
+ out.Write([]byte{','})
}
item := s.Index(i).Interface()
if item == nil {
out.Write(nilToken)
} else if v, ok := item.(KMetadata); ok {
- KObj(v).writeUnquoted(out)
+ KObj(v).WriteText(out)
} else {
- fmt.Fprintf(out, "", item)
+ fmt.Fprintf(out, `""`, item)
return
}
}
diff --git a/vendor/k8s.io/klog/v2/klog.go b/vendor/k8s.io/klog/v2/klog.go
index 466eeaf26..152f8a6bd 100644
--- a/vendor/k8s.io/klog/v2/klog.go
+++ b/vendor/k8s.io/klog/v2/klog.go
@@ -1228,6 +1228,19 @@ func CopyStandardLogTo(name string) {
stdLog.SetOutput(logBridge(sev))
}
+// NewStandardLogger returns a Logger that writes to the klog logs for the
+// named and lower severities.
+//
+// Valid names are "INFO", "WARNING", "ERROR", and "FATAL". If the name is not
+// recognized, NewStandardLogger panics.
+func NewStandardLogger(name string) *stdLog.Logger {
+ sev, ok := severity.ByName(name)
+ if !ok {
+ panic(fmt.Sprintf("klog.NewStandardLogger(%q): unknown severity", name))
+ }
+ return stdLog.New(logBridge(sev), "", stdLog.Lshortfile)
+}
+
// logBridge provides the Write method that enables CopyStandardLogTo to connect
// Go's standard logs to the logs provided by this package.
type logBridge severity.Severity
diff --git a/vendor/k8s.io/kube-openapi/pkg/cached/cache.go b/vendor/k8s.io/kube-openapi/pkg/cached/cache.go
new file mode 100644
index 000000000..16e34853a
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/cached/cache.go
@@ -0,0 +1,264 @@
+/*
+Copyright 2022 The Kubernetes 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 cache provides a cache mechanism based on etags to lazily
+// build, and/or cache results from expensive operation such that those
+// operations are not repeated unnecessarily. The operations can be
+// created as a tree, and replaced dynamically as needed.
+//
+// # Dependencies and types of caches
+//
+// This package uses a source/transform/sink model of caches to build
+// the dependency tree, and can be used as follows:
+// - [NewSource]: A source cache that recomputes the content every time.
+// - [NewStaticSource]: A source cache that always produces the
+// same content, it is only called once.
+// - [NewTransformer]: A cache that transforms data from one format to
+// another. It's only refreshed when the source changes.
+// - [NewMerger]: A cache that aggregates multiple caches into one.
+// It's only refreshed when the source changes.
+// - [Replaceable]: A cache adapter that can be atomically
+// replaced with a new one, and saves the previous results in case an
+// error pops-up.
+//
+// # Atomicity
+//
+// Most of the operations are not atomic/thread-safe, except for
+// [Replaceable.Replace] which can be performed while the objects
+// are being read.
+//
+// # Etags
+//
+// Etags in this library is a cache version identifier. It doesn't
+// necessarily strictly match to the semantics of http `etags`, but are
+// somewhat inspired from it and function with the same principles.
+// Hashing the content is a good way to guarantee that your function is
+// never going to be called spuriously. In Kubernetes world, this could
+// be a `resourceVersion`, this can be an actual etag, a hash, a UUID
+// (if the cache always changes), or even a made-up string when the
+// content of the cache never changes.
+package cached
+
+import (
+ "fmt"
+ "sync/atomic"
+)
+
+// Result is the content returned from a call to a cache. It can either
+// be created with [NewResultOK] if the call was a success, or
+// [NewResultErr] if the call resulted in an error.
+type Result[T any] struct {
+ Data T
+ Etag string
+ Err error
+}
+
+// NewResultOK creates a new [Result] for a successful operation.
+func NewResultOK[T any](data T, etag string) Result[T] {
+ return Result[T]{
+ Data: data,
+ Etag: etag,
+ }
+}
+
+// NewResultErr creates a new [Result] when an error has happened.
+func NewResultErr[T any](err error) Result[T] {
+ return Result[T]{
+ Err: err,
+ }
+}
+
+// Result can be treated as a [Data] if necessary.
+func (r Result[T]) Get() Result[T] {
+ return r
+}
+
+// Data is a cache that performs an action whose result data will be
+// cached. It also returns an "etag" identifier to version the cache, so
+// that the caller can know if they have the most recent version of the
+// cache (and can decide to cache some operation based on that).
+//
+// The [NewMerger] and [NewTransformer] automatically handle
+// that for you by checking if the etag is updated before calling the
+// merging or transforming function.
+type Data[T any] interface {
+ // Returns the cached data, as well as an "etag" to identify the
+ // version of the cache, or an error if something happened.
+ Get() Result[T]
+}
+
+// T is the source type, V is the destination type.
+type merger[K comparable, T, V any] struct {
+ mergeFn func(map[K]Result[T]) Result[V]
+ caches map[K]Data[T]
+ cacheResults map[K]Result[T]
+ result Result[V]
+}
+
+// NewMerger creates a new merge cache, a cache that merges the result
+// of other caches. The function only gets called if any of the
+// dependency has changed.
+//
+// If any of the dependency returned an error before, or any of the
+// dependency returned an error this time, or if the mergeFn failed
+// before, then the function is reran.
+//
+// The caches and results are mapped by K so that associated data can be
+// retrieved. The map of dependencies can not be modified after
+// creation, and a new merger should be created (and probably replaced
+// using a [Replaceable]).
+//
+// Note that this assumes there is no "partial" merge, the merge
+// function will remerge all the dependencies together everytime. Since
+// the list of dependencies is constant, there is no way to save some
+// partial merge information either.
+func NewMerger[K comparable, T, V any](mergeFn func(results map[K]Result[T]) Result[V], caches map[K]Data[T]) Data[V] {
+ return &merger[K, T, V]{
+ mergeFn: mergeFn,
+ caches: caches,
+ }
+}
+
+func (c *merger[K, T, V]) prepareResults() map[K]Result[T] {
+ cacheResults := make(map[K]Result[T], len(c.caches))
+ for key, cache := range c.caches {
+ cacheResults[key] = cache.Get()
+ }
+ return cacheResults
+}
+
+// Rerun if:
+// - The last run resulted in an error
+// - Any of the dependency previously returned an error
+// - Any of the dependency just returned an error
+// - Any of the dependency's etag changed
+func (c *merger[K, T, V]) needsRunning(results map[K]Result[T]) bool {
+ if c.cacheResults == nil {
+ return true
+ }
+ if c.result.Err != nil {
+ return true
+ }
+ if len(results) != len(c.cacheResults) {
+ panic(fmt.Errorf("invalid number of results: %v (expected %v)", len(results), len(c.cacheResults)))
+ }
+ for key, oldResult := range c.cacheResults {
+ newResult, ok := results[key]
+ if !ok {
+ panic(fmt.Errorf("unknown cache entry: %v", key))
+ }
+
+ if newResult.Etag != oldResult.Etag || newResult.Err != nil || oldResult.Err != nil {
+ return true
+ }
+ }
+ return false
+}
+
+func (c *merger[K, T, V]) Get() Result[V] {
+ cacheResults := c.prepareResults()
+ if c.needsRunning(cacheResults) {
+ c.cacheResults = cacheResults
+ c.result = c.mergeFn(c.cacheResults)
+ }
+ return c.result
+}
+
+type transformerCacheKeyType struct{}
+
+// NewTransformer creates a new cache that transforms the result of
+// another cache. The transformFn will only be called if the source
+// cache has updated the output, otherwise, the cached result will be
+// returned.
+//
+// If the dependency returned an error before, or it returns an error
+// this time, or if the transformerFn failed before, the function is
+// reran.
+func NewTransformer[T, V any](transformerFn func(Result[T]) Result[V], source Data[T]) Data[V] {
+ return NewMerger(func(caches map[transformerCacheKeyType]Result[T]) Result[V] {
+ cache, ok := caches[transformerCacheKeyType{}]
+ if len(caches) != 1 || !ok {
+ panic(fmt.Errorf("invalid cache for transformer cache: %v", caches))
+ }
+ return transformerFn(cache)
+ }, map[transformerCacheKeyType]Data[T]{
+ {}: source,
+ })
+}
+
+// NewSource creates a new cache that generates some data. This
+// will always be called since we don't know the origin of the data and
+// if it needs to be updated or not.
+func NewSource[T any](sourceFn func() Result[T]) Data[T] {
+ c := source[T](sourceFn)
+ return &c
+}
+
+type source[T any] func() Result[T]
+
+func (c *source[T]) Get() Result[T] {
+ return (*c)()
+}
+
+// NewStaticSource creates a new cache that always generates the
+// same data. This will only be called once (lazily).
+func NewStaticSource[T any](staticFn func() Result[T]) Data[T] {
+ return &static[T]{
+ fn: staticFn,
+ }
+}
+
+type static[T any] struct {
+ fn func() Result[T]
+ result *Result[T]
+}
+
+func (c *static[T]) Get() Result[T] {
+ if c.result == nil {
+ result := c.fn()
+ c.result = &result
+ }
+ return *c.result
+}
+
+// Replaceable is a cache that carries the result even when the
+// cache is replaced. The cache can be replaced atomically (without any
+// lock held). This is the type that should typically be stored in
+// structs.
+type Replaceable[T any] struct {
+ cache atomic.Pointer[Data[T]]
+ result *Result[T]
+}
+
+// Get retrieves the data from the underlying source. [Replaceable]
+// implements the [Data] interface itself. This is a pass-through
+// that calls the most recent underlying cache. If the cache fails but
+// previously had returned a success, that success will be returned
+// instead. If the cache fails but we never returned a success, that
+// failure is returned.
+func (c *Replaceable[T]) Get() Result[T] {
+ result := (*c.cache.Load()).Get()
+ if result.Err != nil && c.result != nil && c.result.Err == nil {
+ return *c.result
+ }
+ c.result = &result
+ return *c.result
+}
+
+// Replace changes the cache in a thread-safe way.
+func (c *Replaceable[T]) Replace(cache Data[T]) {
+ c.cache.Swap(&cache)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/common/common.go b/vendor/k8s.io/kube-openapi/pkg/common/common.go
index 24f2b0e88..1a6c12e17 100644
--- a/vendor/k8s.io/kube-openapi/pkg/common/common.go
+++ b/vendor/k8s.io/kube-openapi/pkg/common/common.go
@@ -246,38 +246,42 @@ var schemaTypeFormatMap = map[string]typeInfo{
// the spec does not need to be simple type,format) or can even return a simple type,format (e.g. IntOrString). For simple
// type formats, the benefit of adding OpenAPIDefinitionGetter interface is to keep both type and property documentation.
// Example:
-// type Sample struct {
-// ...
-// // port of the server
-// port IntOrString
-// ...
-// }
+//
+// type Sample struct {
+// ...
+// // port of the server
+// port IntOrString
+// ...
+// }
+//
// // IntOrString documentation...
// type IntOrString { ... }
//
// Adding IntOrString to this function:
-// "port" : {
-// format: "string",
-// type: "int-or-string",
-// Description: "port of the server"
-// }
+//
+// "port" : {
+// format: "string",
+// type: "int-or-string",
+// Description: "port of the server"
+// }
//
// Implement OpenAPIDefinitionGetter for IntOrString:
//
-// "port" : {
-// $Ref: "#/definitions/IntOrString"
-// Description: "port of the server"
-// }
+// "port" : {
+// $Ref: "#/definitions/IntOrString"
+// Description: "port of the server"
+// }
+//
// ...
// definitions:
-// {
-// "IntOrString": {
-// format: "string",
-// type: "int-or-string",
-// Description: "IntOrString documentation..." // new
-// }
-// }
//
+// {
+// "IntOrString": {
+// format: "string",
+// type: "int-or-string",
+// Description: "IntOrString documentation..." // new
+// }
+// }
func OpenAPITypeFormat(typeName string) (string, string) {
mapped, ok := schemaTypeFormatMap[typeName]
if !ok {
diff --git a/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go b/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go
index ec4adcdec..66b7a68da 100644
--- a/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go
+++ b/vendor/k8s.io/kube-openapi/pkg/handler3/handler.go
@@ -21,11 +21,9 @@ import (
"crypto/sha512"
"encoding/json"
"fmt"
- "mime"
"net/http"
"net/url"
"path"
- "sort"
"strconv"
"strings"
"sync"
@@ -33,23 +31,18 @@ import (
"github.com/golang/protobuf/proto"
openapi_v3 "github.com/google/gnostic/openapiv3"
+ "github.com/google/uuid"
"github.com/munnerz/goautoneg"
+ "k8s.io/klog/v2"
+ "k8s.io/kube-openapi/pkg/cached"
"k8s.io/kube-openapi/pkg/common"
- "k8s.io/kube-openapi/pkg/internal/handler"
"k8s.io/kube-openapi/pkg/spec3"
- "k8s.io/kube-openapi/pkg/validation/spec"
)
const (
- jsonExt = ".json"
-
- mimeJson = "application/json"
- // TODO(mehdy): change @68f4ded to a version tag when gnostic add version tags.
- mimePb = "application/com.github.googleapis.gnostic.OpenAPIv3@68f4ded+protobuf"
- mimePbGz = "application/x-gzip"
-
- subTypeProtobuf = "com.github.proto-openapi.spec.v3@v1.0+protobuf"
- subTypeJSON = "json"
+ subTypeProtobufDeprecated = "com.github.proto-openapi.spec.v3@v1.0+protobuf"
+ subTypeProtobuf = "com.github.proto-openapi.spec.v3.v1.0+protobuf"
+ subTypeJSON = "json"
)
// OpenAPIV3Discovery is the format of the Discovery document for OpenAPI V3
@@ -65,29 +58,63 @@ type OpenAPIV3DiscoveryGroupVersion struct {
ServerRelativeURL string `json:"serverRelativeURL"`
}
-// OpenAPIService is the service responsible for serving OpenAPI spec. It has
-// the ability to safely change the spec while serving it.
-type OpenAPIService struct {
- // rwMutex protects All members of this service.
- rwMutex sync.RWMutex
+func ToV3ProtoBinary(json []byte) ([]byte, error) {
+ document, err := openapi_v3.ParseDocument(json)
+ if err != nil {
+ return nil, err
+ }
+ return proto.Marshal(document)
+}
+
+type timedSpec struct {
+ spec []byte
lastModified time.Time
- v3Schema map[string]*OpenAPIV3Group
}
-type OpenAPIV3Group struct {
- rwMutex sync.RWMutex
+// This type is protected by the lock on OpenAPIService.
+type openAPIV3Group struct {
+ specCache cached.Replaceable[*spec3.OpenAPI]
+ pbCache cached.Data[timedSpec]
+ jsonCache cached.Data[timedSpec]
+}
- lastModified time.Time
+func newOpenAPIV3Group() *openAPIV3Group {
+ o := &openAPIV3Group{}
+ o.jsonCache = cached.NewTransformer[*spec3.OpenAPI](func(result cached.Result[*spec3.OpenAPI]) cached.Result[timedSpec] {
+ if result.Err != nil {
+ return cached.NewResultErr[timedSpec](result.Err)
+ }
+ json, err := json.Marshal(result.Data)
+ if err != nil {
+ return cached.NewResultErr[timedSpec](err)
+ }
+ return cached.NewResultOK(timedSpec{spec: json, lastModified: time.Now()}, computeETag(json))
+ }, &o.specCache)
+ o.pbCache = cached.NewTransformer(func(result cached.Result[timedSpec]) cached.Result[timedSpec] {
+ if result.Err != nil {
+ return cached.NewResultErr[timedSpec](result.Err)
+ }
+ proto, err := ToV3ProtoBinary(result.Data.spec)
+ if err != nil {
+ return cached.NewResultErr[timedSpec](err)
+ }
+ return cached.NewResultOK(timedSpec{spec: proto, lastModified: result.Data.lastModified}, result.Etag)
+ }, o.jsonCache)
+ return o
+}
- pbCache handler.HandlerCache
- jsonCache handler.HandlerCache
- etagCache handler.HandlerCache
+func (o *openAPIV3Group) UpdateSpec(openapi cached.Data[*spec3.OpenAPI]) {
+ o.specCache.Replace(openapi)
}
-func init() {
- mime.AddExtensionType(".json", mimeJson)
- mime.AddExtensionType(".pb-v1", mimePb)
- mime.AddExtensionType(".gz", mimePbGz)
+// OpenAPIService is the service responsible for serving OpenAPI spec. It has
+// the ability to safely change the spec while serving it.
+type OpenAPIService struct {
+ // Mutex protects the schema map.
+ mutex sync.Mutex
+ v3Schema map[string]*openAPIV3Group
+
+ discoveryCache cached.Replaceable[timedSpec]
}
func computeETag(data []byte) string {
@@ -106,92 +133,90 @@ func constructServerRelativeURL(gvString, etag string) string {
}
// NewOpenAPIService builds an OpenAPIService starting with the given spec.
-func NewOpenAPIService(spec *spec.Swagger) (*OpenAPIService, error) {
+func NewOpenAPIService() *OpenAPIService {
o := &OpenAPIService{}
- o.v3Schema = make(map[string]*OpenAPIV3Group)
- return o, nil
+ o.v3Schema = make(map[string]*openAPIV3Group)
+ // We're not locked because we haven't shared the structure yet.
+ o.discoveryCache.Replace(o.buildDiscoveryCacheLocked())
+ return o
}
-func (o *OpenAPIService) getGroupBytes() ([]byte, error) {
- o.rwMutex.RLock()
- defer o.rwMutex.RUnlock()
- keys := make([]string, len(o.v3Schema))
- i := 0
- for k := range o.v3Schema {
- keys[i] = k
- i++
+func (o *OpenAPIService) buildDiscoveryCacheLocked() cached.Data[timedSpec] {
+ caches := make(map[string]cached.Data[timedSpec], len(o.v3Schema))
+ for gvName, group := range o.v3Schema {
+ caches[gvName] = group.jsonCache
}
-
- sort.Strings(keys)
- discovery := &OpenAPIV3Discovery{Paths: make(map[string]OpenAPIV3DiscoveryGroupVersion)}
- for gvString, groupVersion := range o.v3Schema {
- etagBytes, err := groupVersion.etagCache.Get()
- if err != nil {
- return nil, err
+ return cached.NewMerger(func(results map[string]cached.Result[timedSpec]) cached.Result[timedSpec] {
+ discovery := &OpenAPIV3Discovery{Paths: make(map[string]OpenAPIV3DiscoveryGroupVersion)}
+ for gvName, result := range results {
+ if result.Err != nil {
+ return cached.NewResultErr[timedSpec](result.Err)
+ }
+ discovery.Paths[gvName] = OpenAPIV3DiscoveryGroupVersion{
+ ServerRelativeURL: constructServerRelativeURL(gvName, result.Etag),
+ }
}
- discovery.Paths[gvString] = OpenAPIV3DiscoveryGroupVersion{
- ServerRelativeURL: constructServerRelativeURL(gvString, string(etagBytes)),
+ j, err := json.Marshal(discovery)
+ if err != nil {
+ return cached.NewResultErr[timedSpec](err)
}
- }
- j, err := json.Marshal(discovery)
- if err != nil {
- return nil, err
- }
- return j, nil
+ return cached.NewResultOK(timedSpec{spec: j, lastModified: time.Now()}, computeETag(j))
+ }, caches)
}
func (o *OpenAPIService) getSingleGroupBytes(getType string, group string) ([]byte, string, time.Time, error) {
- o.rwMutex.RLock()
- defer o.rwMutex.RUnlock()
+ o.mutex.Lock()
+ defer o.mutex.Unlock()
v, ok := o.v3Schema[group]
if !ok {
return nil, "", time.Now(), fmt.Errorf("Cannot find CRD group %s", group)
}
- if getType == subTypeJSON {
- specBytes, err := v.jsonCache.Get()
- if err != nil {
- return nil, "", v.lastModified, err
- }
- etagBytes, err := v.etagCache.Get()
- return specBytes, string(etagBytes), v.lastModified, err
- } else if getType == subTypeProtobuf {
- specPb, err := v.pbCache.Get()
- if err != nil {
- return nil, "", v.lastModified, err
- }
- etagBytes, err := v.etagCache.Get()
- return specPb, string(etagBytes), v.lastModified, err
+ result := cached.Result[timedSpec]{}
+ switch getType {
+ case subTypeJSON:
+ result = v.jsonCache.Get()
+ case subTypeProtobuf, subTypeProtobufDeprecated:
+ result = v.pbCache.Get()
+ default:
+ return nil, "", time.Now(), fmt.Errorf("Invalid accept clause %s", getType)
}
- return nil, "", time.Now(), fmt.Errorf("Invalid accept clause %s", getType)
+ return result.Data.spec, result.Etag, result.Data.lastModified, result.Err
}
-func (o *OpenAPIService) UpdateGroupVersion(group string, openapi *spec3.OpenAPI) (err error) {
- o.rwMutex.Lock()
- defer o.rwMutex.Unlock()
-
+// UpdateGroupVersionLazy adds or updates an existing group with the new cached.
+func (o *OpenAPIService) UpdateGroupVersionLazy(group string, openapi cached.Data[*spec3.OpenAPI]) {
+ o.mutex.Lock()
+ defer o.mutex.Unlock()
if _, ok := o.v3Schema[group]; !ok {
- o.v3Schema[group] = &OpenAPIV3Group{}
+ o.v3Schema[group] = newOpenAPIV3Group()
+ // Since there is a new item, we need to re-build the cache map.
+ o.discoveryCache.Replace(o.buildDiscoveryCacheLocked())
}
- return o.v3Schema[group].UpdateSpec(openapi)
+ o.v3Schema[group].UpdateSpec(openapi)
}
-func (o *OpenAPIService) DeleteGroupVersion(group string) {
- o.rwMutex.Lock()
- defer o.rwMutex.Unlock()
- delete(o.v3Schema, group)
+func (o *OpenAPIService) UpdateGroupVersion(group string, openapi *spec3.OpenAPI) {
+ o.UpdateGroupVersionLazy(group, cached.NewResultOK(openapi, uuid.New().String()))
}
-func ToV3ProtoBinary(json []byte) ([]byte, error) {
- document, err := openapi_v3.ParseDocument(json)
- if err != nil {
- return nil, err
- }
- return proto.Marshal(document)
+func (o *OpenAPIService) DeleteGroupVersion(group string) {
+ o.mutex.Lock()
+ defer o.mutex.Unlock()
+ delete(o.v3Schema, group)
+ // Rebuild the merge cache map since the items have changed.
+ o.discoveryCache.Replace(o.buildDiscoveryCacheLocked())
}
func (o *OpenAPIService) HandleDiscovery(w http.ResponseWriter, r *http.Request) {
- data, _ := o.getGroupBytes()
- http.ServeContent(w, r, "/openapi/v3", time.Now(), bytes.NewReader(data))
+ result := o.discoveryCache.Get()
+ if result.Err != nil {
+ klog.Errorf("Error serving discovery: %s", result.Err)
+ w.WriteHeader(http.StatusInternalServerError)
+ return
+ }
+ w.Header().Set("Etag", strconv.Quote(result.Etag))
+ w.Header().Set("Content-Type", "application/json")
+ http.ServeContent(w, r, "/openapi/v3", result.Data.lastModified, bytes.NewReader(result.Data.spec))
}
func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Request) {
@@ -210,11 +235,13 @@ func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Reque
}
accepted := []struct {
- Type string
- SubType string
+ Type string
+ SubType string
+ ReturnedContentType string
}{
- {"application", subTypeJSON},
- {"application", subTypeProtobuf},
+ {"application", subTypeJSON, "application/" + subTypeJSON},
+ {"application", subTypeProtobuf, "application/" + subTypeProtobuf},
+ {"application", subTypeProtobufDeprecated, "application/" + subTypeProtobuf},
}
for _, clause := range clauses {
@@ -229,6 +256,9 @@ func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Reque
if err != nil {
return
}
+ // Set Content-Type header in the reponse
+ w.Header().Set("Content-Type", accepts.ReturnedContentType)
+
// ETag must be enclosed in double quotes: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
w.Header().Set("Etag", strconv.Quote(etag))
@@ -262,30 +292,3 @@ func (o *OpenAPIService) RegisterOpenAPIV3VersionedService(servePath string, han
handler.HandlePrefix(servePath+"/", http.HandlerFunc(o.HandleGroupVersion))
return nil
}
-
-func (o *OpenAPIV3Group) UpdateSpec(openapi *spec3.OpenAPI) (err error) {
- o.rwMutex.Lock()
- defer o.rwMutex.Unlock()
-
- o.jsonCache = o.jsonCache.New(func() ([]byte, error) {
- return json.Marshal(openapi)
- })
- o.pbCache = o.pbCache.New(func() ([]byte, error) {
- json, err := o.jsonCache.Get()
- if err != nil {
- return nil, err
- }
- return ToV3ProtoBinary(json)
- })
- // TODO: This forces a json marshal of corresponding group-versions.
- // We should look to replace this with a faster hashing mechanism.
- o.etagCache = o.etagCache.New(func() ([]byte, error) {
- json, err := o.jsonCache.Get()
- if err != nil {
- return nil, err
- }
- return []byte(computeETag(json)), nil
- })
- o.lastModified = time.Now()
- return nil
-}
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/flags.go b/vendor/k8s.io/kube-openapi/pkg/internal/flags.go
index 3ff3c8d89..bef603782 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/flags.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/flags.go
@@ -18,3 +18,7 @@ package internal
// Used by tests to selectively disable experimental JSON unmarshaler
var UseOptimizedJSONUnmarshaling bool = true
+var UseOptimizedJSONUnmarshalingV3 bool = true
+
+// Used by tests to selectively disable experimental JSON marshaler
+var UseOptimizedJSONMarshaling bool = true
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/handler/handler_cache.go b/vendor/k8s.io/kube-openapi/pkg/internal/handler/handler_cache.go
deleted file mode 100644
index e128c26eb..000000000
--- a/vendor/k8s.io/kube-openapi/pkg/internal/handler/handler_cache.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-Copyright 2021 The Kubernetes 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 handler
-
-import (
- "sync"
-)
-
-// HandlerCache represents a lazy cache for generating a byte array
-// It is used to lazily marshal OpenAPI v2/v3 and lazily generate the ETag
-type HandlerCache struct {
- BuildCache func() ([]byte, error)
- once sync.Once
- bytes []byte
- err error
-}
-
-// Get either returns the cached value or calls BuildCache() once before caching and returning
-// its results. If BuildCache returns an error, the last valid value for the cache (from prior
-// calls to New()) is used instead if possible.
-func (c *HandlerCache) Get() ([]byte, error) {
- c.once.Do(func() {
- bytes, err := c.BuildCache()
- // if there is an error updating the cache, there can be situations where
- // c.bytes contains a valid value (carried over from the previous update)
- // but c.err is also not nil; the cache user is expected to check for this
- c.err = err
- if c.err == nil {
- // don't override previous spec if we had an error
- c.bytes = bytes
- }
- })
- return c.bytes, c.err
-}
-
-// New creates a new HandlerCache for situations where a cache refresh is needed.
-// This function is not thread-safe and should not be called at the same time as Get().
-func (c *HandlerCache) New(cacheBuilder func() ([]byte, error)) HandlerCache {
- return HandlerCache{
- bytes: c.bytes,
- BuildCache: cacheBuilder,
- }
-}
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/serialization.go b/vendor/k8s.io/kube-openapi/pkg/internal/serialization.go
new file mode 100644
index 000000000..7393bacf7
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/serialization.go
@@ -0,0 +1,65 @@
+/*
+Copyright 2023 The Kubernetes 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 internal
+
+import (
+ "github.com/go-openapi/jsonreference"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+)
+
+// DeterministicMarshal calls the jsonv2 library with the deterministic
+// flag in order to have stable marshaling.
+func DeterministicMarshal(in any) ([]byte, error) {
+ return jsonv2.MarshalOptions{Deterministic: true}.Marshal(jsonv2.EncodeOptions{}, in)
+}
+
+// JSONRefFromMap populates a json reference object if the map v contains a $ref key.
+func JSONRefFromMap(jsonRef *jsonreference.Ref, v map[string]interface{}) error {
+ if v == nil {
+ return nil
+ }
+ if vv, ok := v["$ref"]; ok {
+ if str, ok := vv.(string); ok {
+ ref, err := jsonreference.New(str)
+ if err != nil {
+ return err
+ }
+ *jsonRef = ref
+ }
+ }
+ return nil
+}
+
+// SanitizeExtensions sanitizes the input map such that non extension
+// keys (non x-*, X-*) keys are dropped from the map. Returns the new
+// modified map, or nil if the map is now empty.
+func SanitizeExtensions(e map[string]interface{}) map[string]interface{} {
+ for k := range e {
+ if !IsExtensionKey(k) {
+ delete(e, k)
+ }
+ }
+ if len(e) == 0 {
+ e = nil
+ }
+ return e
+}
+
+// IsExtensionKey returns true if the input string is of format x-* or X-*
+func IsExtensionKey(k string) bool {
+ return len(k) > 1 && (k[0] == 'x' || k[0] == 'X') && k[1] == '-'
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go
index febde20f9..e6c6216ff 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal.go
@@ -34,6 +34,13 @@ type MarshalOptions struct {
// unknown JSON object members.
DiscardUnknownMembers bool
+ // Deterministic specifies that the same input value will be serialized
+ // as the exact same output bytes. Different processes of
+ // the same program will serialize equal values to the same bytes,
+ // but different versions of the same program are not guaranteed
+ // to produce the exact same sequence of bytes.
+ Deterministic bool
+
// formatDepth is the depth at which we respect the format flag.
formatDepth int
// format is custom formatting for the value at the specified depth.
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go
index 204d0648d..c62b1f320 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_any.go
@@ -62,7 +62,7 @@ func unmarshalValueAny(uo UnmarshalOptions, dec *Decoder) (any, error) {
}
return dec.stringCache.make(val), nil
case '0':
- fv, _ := parseFloat(val, 64) // ignore error since readValue gaurantees val is valid
+ fv, _ := parseFloat(val, 64) // ignore error since readValue guarantees val is valid
return fv, nil
default:
panic("BUG: invalid kind: " + k.String())
@@ -99,13 +99,32 @@ func marshalObjectAny(mo MarshalOptions, enc *Encoder, obj map[string]any) error
if !enc.options.AllowInvalidUTF8 {
enc.tokens.last.disableNamespace()
}
- for name, val := range obj {
- if err := enc.WriteToken(String(name)); err != nil {
- return err
+ if !mo.Deterministic || len(obj) <= 1 {
+ for name, val := range obj {
+ if err := enc.WriteToken(String(name)); err != nil {
+ return err
+ }
+ if err := marshalValueAny(mo, enc, val); err != nil {
+ return err
+ }
}
- if err := marshalValueAny(mo, enc, val); err != nil {
- return err
+ } else {
+ names := getStrings(len(obj))
+ var i int
+ for name := range obj {
+ (*names)[i] = name
+ i++
+ }
+ names.Sort()
+ for _, name := range *names {
+ if err := enc.WriteToken(String(name)); err != nil {
+ return err
+ }
+ if err := marshalValueAny(mo, enc, obj[name]); err != nil {
+ return err
+ }
}
+ putStrings(names)
}
if err := enc.WriteToken(ObjectEnd); err != nil {
return err
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go
index fcf3d5000..fd26eba35 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_default.go
@@ -5,6 +5,7 @@
package json
import (
+ "bytes"
"encoding/base32"
"encoding/base64"
"encoding/hex"
@@ -12,6 +13,7 @@ import (
"fmt"
"math"
"reflect"
+ "sort"
"strconv"
"sync"
)
@@ -228,13 +230,7 @@ func makeBytesArshaler(t reflect.Type, fncs *arshaler) *arshaler {
}
}
val := enc.UnusedBuffer()
- var b []byte
- if va.Kind() == reflect.Array {
- // TODO(https://go.dev/issue/47066): Avoid reflect.Value.Slice.
- b = va.Slice(0, va.Len()).Bytes()
- } else {
- b = va.Bytes()
- }
+ b := va.Bytes()
n := len(`"`) + encodedLen(len(b)) + len(`"`)
if cap(val) < n {
val = make([]byte, n)
@@ -248,19 +244,19 @@ func makeBytesArshaler(t reflect.Type, fncs *arshaler) *arshaler {
}
unmarshalDefault := fncs.unmarshal
fncs.unmarshal = func(uo UnmarshalOptions, dec *Decoder, va addressableValue) error {
- decode, decodedLen := decodeBase64, decodedLenBase64
+ decode, decodedLen, encodedLen := decodeBase64, decodedLenBase64, encodedLenBase64
if uo.format != "" && uo.formatDepth == dec.tokens.depth() {
switch uo.format {
case "base64":
- decode, decodedLen = decodeBase64, decodedLenBase64
+ decode, decodedLen, encodedLen = decodeBase64, decodedLenBase64, encodedLenBase64
case "base64url":
- decode, decodedLen = decodeBase64URL, decodedLenBase64URL
+ decode, decodedLen, encodedLen = decodeBase64URL, decodedLenBase64URL, encodedLenBase64URL
case "base32":
- decode, decodedLen = decodeBase32, decodedLenBase32
+ decode, decodedLen, encodedLen = decodeBase32, decodedLenBase32, encodedLenBase32
case "base32hex":
- decode, decodedLen = decodeBase32Hex, decodedLenBase32Hex
+ decode, decodedLen, encodedLen = decodeBase32Hex, decodedLenBase32Hex, encodedLenBase32Hex
case "base16", "hex":
- decode, decodedLen = decodeBase16, decodedLenBase16
+ decode, decodedLen, encodedLen = decodeBase16, decodedLenBase16, encodedLenBase16
case "array":
uo.format = ""
return unmarshalDefault(uo, dec, va)
@@ -290,23 +286,28 @@ func makeBytesArshaler(t reflect.Type, fncs *arshaler) *arshaler {
n--
}
n = decodedLen(n)
- var b []byte
+ b := va.Bytes()
if va.Kind() == reflect.Array {
- // TODO(https://go.dev/issue/47066): Avoid reflect.Value.Slice.
- b = va.Slice(0, va.Len()).Bytes()
if n != len(b) {
err := fmt.Errorf("decoded base64 length of %d mismatches array length of %d", n, len(b))
return &SemanticError{action: "unmarshal", JSONKind: k, GoType: t, Err: err}
}
} else {
- b = va.Bytes()
if b == nil || cap(b) < n {
b = make([]byte, n)
} else {
b = b[:n]
}
}
- if _, err := decode(b, val); err != nil {
+ n2, err := decode(b, val)
+ if err == nil && len(val) != encodedLen(n2) {
+ // TODO(https://go.dev/issue/53845): RFC 4648, section 3.3,
+ // specifies that non-alphabet characters must be rejected.
+ // Unfortunately, the "base32" and "base64" packages allow
+ // '\r' and '\n' characters by default.
+ err = errors.New("illegal data at input byte " + strconv.Itoa(bytes.IndexAny(val, "\r\n")))
+ }
+ if err != nil {
return &SemanticError{action: "unmarshal", JSONKind: k, GoType: t, Err: err}
}
if va.Kind() == reflect.Slice {
@@ -412,7 +413,7 @@ func makeUintArshaler(t reflect.Type) *arshaler {
return nil
}
- x := math.Float64frombits(uint64(va.Uint()))
+ x := math.Float64frombits(va.Uint())
return enc.writeNumber(x, rawUintNumber, mo.StringifyNumbers)
}
fncs.unmarshal = func(uo UnmarshalOptions, dec *Decoder, va addressableValue) error {
@@ -450,7 +451,7 @@ func makeUintArshaler(t reflect.Type) *arshaler {
err := fmt.Errorf("cannot parse %q as unsigned integer: %w", val, strconv.ErrRange)
return &SemanticError{action: "unmarshal", JSONKind: k, GoType: t, Err: err}
}
- va.SetUint(uint64(n))
+ va.SetUint(n)
return nil
}
return &SemanticError{action: "unmarshal", JSONKind: k, GoType: t}
@@ -549,23 +550,9 @@ func makeFloatArshaler(t reflect.Type) *arshaler {
return &fncs
}
-var mapIterPool = sync.Pool{
- New: func() any { return new(reflect.MapIter) },
-}
-
-func getMapIter(mv reflect.Value) *reflect.MapIter {
- iter := mapIterPool.Get().(*reflect.MapIter)
- iter.Reset(mv)
- return iter
-}
-func putMapIter(iter *reflect.MapIter) {
- iter.Reset(reflect.Value{}) // allow underlying map to be garbage collected
- mapIterPool.Put(iter)
-}
-
func makeMapArshaler(t reflect.Type) *arshaler {
// NOTE: The logic below disables namespaces for tracking duplicate names
- // when handling map keys with a unique represention.
+ // when handling map keys with a unique representation.
// NOTE: Values retrieved from a map are not addressable,
// so we shallow copy the values to make them addressable and
@@ -641,24 +628,76 @@ func makeMapArshaler(t reflect.Type) *arshaler {
enc.tokens.last.disableNamespace()
}
- // NOTE: Map entries are serialized in a non-deterministic order.
- // Users that need stable output should call RawValue.Canonicalize.
- // TODO(go1.19): Remove use of a sync.Pool with reflect.MapIter.
- // Calling reflect.Value.MapRange no longer allocates.
- // See https://go.dev/cl/400675.
- iter := getMapIter(va.Value)
- defer putMapIter(iter)
- for iter.Next() {
- k.SetIterKey(iter)
- if err := marshalKey(mko, enc, k); err != nil {
- // TODO: If err is errMissingName, then wrap it as a
- // SemanticError since this key type cannot be serialized
- // as a JSON string.
- return err
+ switch {
+ case !mo.Deterministic || n <= 1:
+ for iter := va.Value.MapRange(); iter.Next(); {
+ k.SetIterKey(iter)
+ if err := marshalKey(mko, enc, k); err != nil {
+ // TODO: If err is errMissingName, then wrap it as a
+ // SemanticError since this key type cannot be serialized
+ // as a JSON string.
+ return err
+ }
+ v.SetIterValue(iter)
+ if err := marshalVal(mo, enc, v); err != nil {
+ return err
+ }
}
- v.SetIterValue(iter)
- if err := marshalVal(mo, enc, v); err != nil {
- return err
+ case !nonDefaultKey && t.Key().Kind() == reflect.String:
+ names := getStrings(n)
+ for i, iter := 0, va.Value.MapRange(); i < n && iter.Next(); i++ {
+ k.SetIterKey(iter)
+ (*names)[i] = k.String()
+ }
+ names.Sort()
+ for _, name := range *names {
+ if err := enc.WriteToken(String(name)); err != nil {
+ return err
+ }
+ // TODO(https://go.dev/issue/57061): Use v.SetMapIndexOf.
+ k.SetString(name)
+ v.Set(va.MapIndex(k.Value))
+ if err := marshalVal(mo, enc, v); err != nil {
+ return err
+ }
+ }
+ putStrings(names)
+ default:
+ type member struct {
+ name string // unquoted name
+ key addressableValue
+ }
+ members := make([]member, n)
+ keys := reflect.MakeSlice(reflect.SliceOf(t.Key()), n, n)
+ for i, iter := 0, va.Value.MapRange(); i < n && iter.Next(); i++ {
+ // Marshal the member name.
+ k := addressableValue{keys.Index(i)} // indexed slice element is always addressable
+ k.SetIterKey(iter)
+ if err := marshalKey(mko, enc, k); err != nil {
+ // TODO: If err is errMissingName, then wrap it as a
+ // SemanticError since this key type cannot be serialized
+ // as a JSON string.
+ return err
+ }
+ name := enc.unwriteOnlyObjectMemberName()
+ members[i] = member{name, k}
+ }
+ // TODO: If AllowDuplicateNames is enabled, then sort according
+ // to reflect.Value as well if the names are equal.
+ // See internal/fmtsort.
+ // TODO(https://go.dev/issue/47619): Use slices.SortFunc instead.
+ sort.Slice(members, func(i, j int) bool {
+ return lessUTF16(members[i].name, members[j].name)
+ })
+ for _, member := range members {
+ if err := enc.WriteToken(String(member.name)); err != nil {
+ return err
+ }
+ // TODO(https://go.dev/issue/57061): Use v.SetMapIndexOf.
+ v.Set(va.MapIndex(member.key.Value))
+ if err := marshalVal(mo, enc, v); err != nil {
+ return err
+ }
}
}
}
@@ -856,7 +895,7 @@ func makeStructArshaler(t reflect.Type) *arshaler {
// 2. The object namespace is guaranteed to be disabled.
// 3. The object name is guaranteed to be valid and pre-escaped.
// 4. There is no need to flush the buffer (for unwrite purposes).
- // 5. There is no possibility of an error occuring.
+ // 5. There is no possibility of an error occurring.
if optimizeCommon {
// Append any delimiters or optional whitespace.
if enc.tokens.last.length() > 0 {
@@ -996,7 +1035,7 @@ func makeStructArshaler(t reflect.Type) *arshaler {
if fields.inlinedFallback == nil {
// Skip unknown value since we have no place to store it.
- if err := dec.skipValue(); err != nil {
+ if err := dec.SkipValue(); err != nil {
return err
}
} else {
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go
index 7476eda30..258a98247 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_inlined.go
@@ -5,6 +5,7 @@
package json
import (
+ "bytes"
"errors"
"reflect"
)
@@ -89,35 +90,61 @@ func marshalInlinedFallbackAll(mo MarshalOptions, enc *Encoder, va addressableVa
}
return nil
} else {
- if v.Len() == 0 {
+ m := v // must be a map[string]V
+ n := m.Len()
+ if n == 0 {
return nil
}
- m := v
+ mk := newAddressableValue(stringType)
mv := newAddressableValue(m.Type().Elem())
- for iter := m.MapRange(); iter.Next(); {
- b, err := appendString(enc.UnusedBuffer(), iter.Key().String(), !enc.options.AllowInvalidUTF8, nil)
+ marshalKey := func(mk addressableValue) error {
+ b, err := appendString(enc.UnusedBuffer(), mk.String(), !enc.options.AllowInvalidUTF8, nil)
if err != nil {
return err
}
if insertUnquotedName != nil {
- isVerbatim := consumeSimpleString(b) == len(b)
+ isVerbatim := bytes.IndexByte(b, '\\') < 0
name := unescapeStringMayCopy(b, isVerbatim)
if !insertUnquotedName(name) {
return &SyntacticError{str: "duplicate name " + string(b) + " in object"}
}
}
- if err := enc.WriteValue(b); err != nil {
- return err
+ return enc.WriteValue(b)
+ }
+ marshalVal := f.fncs.marshal
+ if mo.Marshalers != nil {
+ marshalVal, _ = mo.Marshalers.lookup(marshalVal, mv.Type())
+ }
+ if !mo.Deterministic || n <= 1 {
+ for iter := m.MapRange(); iter.Next(); {
+ mk.SetIterKey(iter)
+ if err := marshalKey(mk); err != nil {
+ return err
+ }
+ mv.Set(iter.Value())
+ if err := marshalVal(mo, enc, mv); err != nil {
+ return err
+ }
}
-
- mv.Set(iter.Value())
- marshal := f.fncs.marshal
- if mo.Marshalers != nil {
- marshal, _ = mo.Marshalers.lookup(marshal, mv.Type())
+ } else {
+ names := getStrings(n)
+ for i, iter := 0, m.Value.MapRange(); i < n && iter.Next(); i++ {
+ mk.SetIterKey(iter)
+ (*names)[i] = mk.String()
}
- if err := marshal(mo, enc, mv); err != nil {
- return err
+ names.Sort()
+ for _, name := range *names {
+ mk.SetString(name)
+ if err := marshalKey(mk); err != nil {
+ return err
+ }
+ // TODO(https://go.dev/issue/57061): Use mv.SetMapIndexOf.
+ mv.Set(m.MapIndex(mk.Value))
+ if err := marshalVal(mo, enc, mv); err != nil {
+ return err
+ }
}
+ putStrings(names)
}
return nil
}
@@ -162,7 +189,7 @@ func unmarshalInlinedFallbackNext(uo UnmarshalOptions, dec *Decoder, va addressa
} else {
name := string(unquotedName) // TODO: Intern this?
- m := v
+ m := v // must be a map[string]V
if m.IsNil() {
m.Set(reflect.MakeMap(m.Type()))
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go
index ef4e1f5e3..20899c868 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_methods.go
@@ -21,8 +21,8 @@ var (
)
// MarshalerV1 is implemented by types that can marshal themselves.
-// It is recommended that types implement MarshalerV2 unless
-// the implementation is trying to avoid a hard dependency on this package.
+// It is recommended that types implement MarshalerV2 unless the implementation
+// is trying to avoid a hard dependency on the "jsontext" package.
//
// It is recommended that implementations return a buffer that is safe
// for the caller to retain and potentially mutate.
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go
index 22e802221..fc8d5b007 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/arshal_time.go
@@ -5,6 +5,7 @@
package json
import (
+ "errors"
"fmt"
"reflect"
"strings"
@@ -85,25 +86,39 @@ func makeTimeArshaler(fncs *arshaler, t reflect.Type) *arshaler {
fncs.nonDefault = true
fncs.marshal = func(mo MarshalOptions, enc *Encoder, va addressableValue) error {
format := time.RFC3339Nano
+ isRFC3339 := true
if mo.format != "" && mo.formatDepth == enc.tokens.depth() {
var err error
- format, err = checkTimeFormat(mo.format)
+ format, isRFC3339, err = checkTimeFormat(mo.format)
if err != nil {
return &SemanticError{action: "marshal", GoType: t, Err: err}
}
}
tt := va.Interface().(time.Time)
- if y := tt.Year(); y < 0 || y >= 10000 {
- // RFC 3339 is clear that years are 4 digits exactly.
- // See https://go.dev/issue/4556#c15 for more discussion.
- err := fmt.Errorf("year %d outside of range [0,9999]", y)
- return &SemanticError{action: "marshal", GoType: t, Err: err}
- }
b := enc.UnusedBuffer()
b = append(b, '"')
b = tt.AppendFormat(b, format)
b = append(b, '"')
+ if isRFC3339 {
+ // Not all Go timestamps can be represented as valid RFC 3339.
+ // Explicitly check for these edge cases.
+ // See https://go.dev/issue/4556 and https://go.dev/issue/54580.
+ var err error
+ switch b := b[len(`"`) : len(b)-len(`"`)]; {
+ case b[len("9999")] != '-': // year must be exactly 4 digits wide
+ err = errors.New("year outside of range [0,9999]")
+ case b[len(b)-1] != 'Z':
+ c := b[len(b)-len("Z07:00")]
+ if ('0' <= c && c <= '9') || parseDec2(b[len(b)-len("07:00"):]) >= 24 {
+ err = errors.New("timezone hour outside of range [0,23]")
+ }
+ }
+ if err != nil {
+ return &SemanticError{action: "marshal", GoType: t, Err: err}
+ }
+ return enc.WriteValue(b) // RFC 3339 never needs JSON escaping
+ }
// The format may contain special characters that need escaping.
// Verify that the result is a valid JSON string (common case),
// otherwise escape the string correctly (slower case).
@@ -113,10 +128,11 @@ func makeTimeArshaler(fncs *arshaler, t reflect.Type) *arshaler {
return enc.WriteValue(b)
}
fncs.unmarshal = func(uo UnmarshalOptions, dec *Decoder, va addressableValue) error {
- format := time.RFC3339Nano
+ format := time.RFC3339
+ isRFC3339 := true
if uo.format != "" && uo.formatDepth == dec.tokens.depth() {
var err error
- format, err = checkTimeFormat(uo.format)
+ format, isRFC3339, err = checkTimeFormat(uo.format)
if err != nil {
return &SemanticError{action: "unmarshal", GoType: t, Err: err}
}
@@ -136,6 +152,29 @@ func makeTimeArshaler(fncs *arshaler, t reflect.Type) *arshaler {
case '"':
val = unescapeStringMayCopy(val, flags.isVerbatim())
tt2, err := time.Parse(format, string(val))
+ if isRFC3339 && err == nil {
+ // TODO(https://go.dev/issue/54580): RFC 3339 specifies
+ // the exact grammar of a valid timestamp. However,
+ // the parsing functionality in "time" is too loose and
+ // incorrectly accepts invalid timestamps as valid.
+ // Remove these manual checks when "time" checks it for us.
+ newParseError := func(layout, value, layoutElem, valueElem, message string) error {
+ return &time.ParseError{Layout: layout, Value: value, LayoutElem: layoutElem, ValueElem: valueElem, Message: message}
+ }
+ switch {
+ case val[len("2006-01-02T")+1] == ':': // hour must be two digits
+ err = newParseError(format, string(val), "15", string(val[len("2006-01-02T"):][:1]), "")
+ case val[len("2006-01-02T15:04:05")] == ',': // sub-second separator must be a period
+ err = newParseError(format, string(val), ".", ",", "")
+ case val[len(val)-1] != 'Z':
+ switch {
+ case parseDec2(val[len(val)-len("07:00"):]) >= 24: // timezone hour must be in range
+ err = newParseError(format, string(val), "Z07:00", string(val[len(val)-len("Z07:00"):]), ": timezone hour out of range")
+ case parseDec2(val[len(val)-len("00"):]) >= 60: // timezone minute must be in range
+ err = newParseError(format, string(val), "Z07:00", string(val[len(val)-len("Z07:00"):]), ": timezone minute out of range")
+ }
+ }
+ }
if err != nil {
return &SemanticError{action: "unmarshal", JSONKind: k, GoType: t, Err: err}
}
@@ -149,48 +188,54 @@ func makeTimeArshaler(fncs *arshaler, t reflect.Type) *arshaler {
return fncs
}
-func checkTimeFormat(format string) (string, error) {
+func checkTimeFormat(format string) (string, bool, error) {
// We assume that an exported constant in the time package will
// always start with an uppercase ASCII letter.
if len(format) > 0 && 'A' <= format[0] && format[0] <= 'Z' {
switch format {
case "ANSIC":
- return time.ANSIC, nil
+ return time.ANSIC, false, nil
case "UnixDate":
- return time.UnixDate, nil
+ return time.UnixDate, false, nil
case "RubyDate":
- return time.RubyDate, nil
+ return time.RubyDate, false, nil
case "RFC822":
- return time.RFC822, nil
+ return time.RFC822, false, nil
case "RFC822Z":
- return time.RFC822Z, nil
+ return time.RFC822Z, false, nil
case "RFC850":
- return time.RFC850, nil
+ return time.RFC850, false, nil
case "RFC1123":
- return time.RFC1123, nil
+ return time.RFC1123, false, nil
case "RFC1123Z":
- return time.RFC1123Z, nil
+ return time.RFC1123Z, false, nil
case "RFC3339":
- return time.RFC3339, nil
+ return time.RFC3339, true, nil
case "RFC3339Nano":
- return time.RFC3339Nano, nil
+ return time.RFC3339Nano, true, nil
case "Kitchen":
- return time.Kitchen, nil
+ return time.Kitchen, false, nil
case "Stamp":
- return time.Stamp, nil
+ return time.Stamp, false, nil
case "StampMilli":
- return time.StampMilli, nil
+ return time.StampMilli, false, nil
case "StampMicro":
- return time.StampMicro, nil
+ return time.StampMicro, false, nil
case "StampNano":
- return time.StampNano, nil
+ return time.StampNano, false, nil
default:
// Reject any format that is an exported Go identifier in case
// new format constants are added to the time package.
if strings.TrimFunc(format, isLetterOrDigit) == "" {
- return "", fmt.Errorf("undefined format layout: %v", format)
+ return "", false, fmt.Errorf("undefined format layout: %v", format)
}
}
}
- return format, nil
+ return format, false, nil
+}
+
+// parseDec2 parses b as an unsigned, base-10, 2-digit number.
+// It panics if len(b) < 2. The result is undefined if digits are not base-10.
+func parseDec2(b []byte) byte {
+ return 10*(b[0]-'0') + (b[1] - '0')
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/decode.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/decode.go
index 998ad68fc..0d68b3233 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/decode.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/decode.go
@@ -347,9 +347,9 @@ func (d *Decoder) PeekKind() Kind {
return next
}
-// skipValue is semantically equivalent to calling ReadValue and discarding
+// SkipValue is semantically equivalent to calling ReadValue and discarding
// the result except that memory is not wasted trying to hold the entire result.
-func (d *Decoder) skipValue() error {
+func (d *Decoder) SkipValue() error {
switch d.PeekKind() {
case '{', '[':
// For JSON objects and arrays, keep skipping all tokens
@@ -374,7 +374,7 @@ func (d *Decoder) skipValue() error {
}
// ReadToken reads the next Token, advancing the read offset.
-// The returned token is only valid until the next Peek or Read call.
+// The returned token is only valid until the next Peek, Read, or Skip call.
// It returns io.EOF if there are no more tokens.
func (d *Decoder) ReadToken() (Token, error) {
// Determine the next kind.
@@ -585,7 +585,7 @@ func (f valueFlags) isCanonical() bool { return f&stringNonCanonical == 0 }
// ReadValue returns the next raw JSON value, advancing the read offset.
// The value is stripped of any leading or trailing whitespace.
-// The returned value is only valid until the next Peek or Read call and
+// The returned value is only valid until the next Peek, Read, or Skip call and
// may not be mutated while the Decoder remains in use.
// If the decoder is currently at the end token for an object or array,
// then it reports a SyntacticError and the internal state remains unchanged.
@@ -1013,7 +1013,7 @@ func (d *Decoder) InputOffset() int64 {
// UnreadBuffer returns the data remaining in the unread buffer,
// which may contain zero or more bytes.
// The returned buffer must not be mutated while Decoder continues to be used.
-// The buffer contents are valid until the next Peek or Read call.
+// The buffer contents are valid until the next Peek, Read, or Skip call.
func (d *Decoder) UnreadBuffer() []byte {
return d.unreadBuffer()
}
@@ -1213,7 +1213,7 @@ func consumeStringResumable(flags *valueFlags, b []byte, resumeOffset int, valid
return n, &SyntacticError{str: "invalid escape sequence " + strconv.Quote(string(b[n:n+6])) + " within string"}
}
// Only certain control characters can use the \uFFFF notation
- // for canonical formating (per RFC 8785, section 3.2.2.2.).
+ // for canonical formatting (per RFC 8785, section 3.2.2.2.).
switch v1 {
// \uFFFF notation not permitted for these characters.
case '\b', '\f', '\n', '\r', '\t':
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go
index ba4af4b7b..e4eefa3de 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/doc.go
@@ -8,8 +8,7 @@
// primitive data types such as booleans, strings, and numbers,
// in addition to structured data types such as objects and arrays.
//
-//
-// Terminology
+// # Terminology
//
// This package uses the terms "encode" and "decode" for syntactic functionality
// that is concerned with processing JSON based on its grammar, and
@@ -32,8 +31,7 @@
//
// See RFC 8259 for more information.
//
-//
-// Specifications
+// # Specifications
//
// Relevant specifications include RFC 4627, RFC 7159, RFC 7493, RFC 8259,
// and RFC 8785. Each RFC is generally a stricter subset of another RFC.
@@ -60,8 +58,7 @@
// In particular, it makes specific choices about behavior that RFC 8259
// leaves as undefined in order to ensure greater interoperability.
//
-//
-// JSON Representation of Go structs
+// # JSON Representation of Go structs
//
// A Go struct is naturally represented as a JSON object,
// where each Go struct field corresponds with a JSON object member.
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/encode.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/encode.go
index 5f98a8409..5b81ca15a 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/encode.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/encode.go
@@ -347,6 +347,30 @@ func (e *Encoder) unwriteEmptyObjectMember(prevName *string) bool {
return true
}
+// unwriteOnlyObjectMemberName unwrites the only object member name
+// and returns the unquoted name.
+func (e *Encoder) unwriteOnlyObjectMemberName() string {
+ if last := e.tokens.last; !last.isObject() || last.length() != 1 {
+ panic("BUG: must be called on an object after writing first name")
+ }
+
+ // Unwrite the name and whitespace.
+ b := trimSuffixString(e.buf)
+ isVerbatim := bytes.IndexByte(e.buf[len(b):], '\\') < 0
+ name := string(unescapeStringMayCopy(e.buf[len(b):], isVerbatim))
+ e.buf = trimSuffixWhitespace(b)
+
+ // Undo state changes.
+ e.tokens.last.decrement()
+ if !e.options.AllowDuplicateNames {
+ if e.tokens.last.isActiveNamespace() {
+ e.namespaces.last().removeLast()
+ }
+ e.names.clearLast()
+ }
+ return name
+}
+
func trimSuffixWhitespace(b []byte) []byte {
// NOTE: The arguments and logic are kept simple to keep this inlineable.
n := len(b) - 1
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/pools.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/pools.go
index f72282211..60e93270f 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/pools.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/pools.go
@@ -8,6 +8,7 @@ import (
"bytes"
"io"
"math/bits"
+ "sort"
"sync"
)
@@ -148,3 +149,34 @@ func putStreamingDecoder(d *Decoder) {
streamingDecoderPool.Put(d)
}
}
+
+var stringsPools = &sync.Pool{New: func() any { return new(stringSlice) }}
+
+type stringSlice []string
+
+// getStrings returns a non-nil pointer to a slice with length n.
+func getStrings(n int) *stringSlice {
+ s := stringsPools.Get().(*stringSlice)
+ if cap(*s) < n {
+ *s = make([]string, n)
+ }
+ *s = (*s)[:n]
+ return s
+}
+
+func putStrings(s *stringSlice) {
+ if cap(*s) > 1<<10 {
+ *s = nil // avoid pinning arbitrarily large amounts of memory
+ }
+ stringsPools.Put(s)
+}
+
+// Sort sorts the string slice according to RFC 8785, section 3.2.3.
+func (ss *stringSlice) Sort() {
+ // TODO(https://go.dev/issue/47619): Use slices.SortFunc instead.
+ sort.Sort(ss)
+}
+
+func (ss *stringSlice) Len() int { return len(*ss) }
+func (ss *stringSlice) Less(i, j int) bool { return lessUTF16((*ss)[i], (*ss)[j]) }
+func (ss *stringSlice) Swap(i, j int) { (*ss)[i], (*ss)[j] = (*ss)[j], (*ss)[i] }
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/state.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/state.go
index d9c33f2b4..ee14c753f 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/state.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/state.go
@@ -721,7 +721,7 @@ func (s *uintSet) has(i uint) bool {
return s.lo.has(i)
} else {
i -= 64
- iHi, iLo := int(i/64), uint(i%64)
+ iHi, iLo := int(i/64), i%64
return iHi < len(s.hi) && s.hi[iHi].has(iLo)
}
}
@@ -735,7 +735,7 @@ func (s *uintSet) insert(i uint) bool {
return !has
} else {
i -= 64
- iHi, iLo := int(i/64), uint(i%64)
+ iHi, iLo := int(i/64), i%64
if iHi >= len(s.hi) {
s.hi = append(s.hi, make([]uintSet64, iHi+1-len(s.hi))...)
s.hi = s.hi[:cap(s.hi)]
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/token.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/token.go
index 08509c296..9acba7dad 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/token.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/token.go
@@ -112,7 +112,7 @@ func Bool(b bool) Token {
return False
}
-// String construct a Token representing a JSON string.
+// String constructs a Token representing a JSON string.
// The provided string should contain valid UTF-8, otherwise invalid characters
// may be mangled as the Unicode replacement character.
func String(s string) Token {
@@ -225,7 +225,7 @@ func (t Token) appendString(dst []byte, validateUTF8, preserveRaw bool, escapeRu
}
// String returns the unescaped string value for a JSON string.
-// For other JSON kinds, this returns the raw JSON represention.
+// For other JSON kinds, this returns the raw JSON representation.
func (t Token) String() string {
// This is inlinable to take advantage of "function outlining".
// This avoids an allocation for the string(b) conversion
@@ -373,10 +373,10 @@ func (t Token) Int() int64 {
case 'i':
return int64(t.num)
case 'u':
- if uint64(t.num) > maxInt64 {
+ if t.num > maxInt64 {
return maxInt64
}
- return int64(uint64(t.num))
+ return int64(t.num)
}
}
@@ -425,7 +425,7 @@ func (t Token) Uint() uint64 {
// Handle exact integer value.
switch t.str[0] {
case 'u':
- return uint64(t.num)
+ return t.num
case 'i':
if int64(t.num) < minUint64 {
return minUint64
diff --git a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/value.go b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/value.go
index fe88e4fb5..e0bd1b31d 100644
--- a/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/value.go
+++ b/vendor/k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json/value.go
@@ -263,7 +263,7 @@ func reorderObjects(d *Decoder, scratch *[]byte) {
afterValue := d.InputOffset()
if isSorted && len(*members) > 0 {
- isSorted = lessUTF16(prevName, name)
+ isSorted = lessUTF16(prevName, []byte(name))
}
*members = append(*members, memberName{name, beforeName, afterValue})
prevName = name
@@ -317,7 +317,7 @@ func reorderObjects(d *Decoder, scratch *[]byte) {
// to the UTF-16 codepoints of the UTF-8 encoded input strings.
// This implements the ordering specified in RFC 8785, section 3.2.3.
// The inputs must be valid UTF-8, otherwise this may panic.
-func lessUTF16(x, y []byte) bool {
+func lessUTF16[Bytes []byte | string](x, y Bytes) bool {
// NOTE: This is an optimized, allocation-free implementation
// of lessUTF16Simple in fuzz_test.go. FuzzLessUTF16 verifies that the
// two implementations agree on the result of comparing any two strings.
@@ -326,8 +326,13 @@ func lessUTF16(x, y []byte) bool {
return ('\u0000' <= r && r <= '\uD7FF') || ('\uE000' <= r && r <= '\uFFFF')
}
+ var invalidUTF8 bool
+ x0, y0 := x, y
for {
if len(x) == 0 || len(y) == 0 {
+ if len(x) == len(y) && invalidUTF8 {
+ return string(x0) < string(y0)
+ }
return len(x) < len(y)
}
@@ -341,35 +346,36 @@ func lessUTF16(x, y []byte) bool {
}
// Decode next pair of runes as UTF-8.
- rx, nx := utf8.DecodeRune(x)
- ry, ny := utf8.DecodeRune(y)
- switch {
-
- // Both runes encode as either a single or surrogate pair
- // of UTF-16 codepoints.
- case isUTF16Self(rx) == isUTF16Self(ry):
- if rx != ry {
- return rx < ry
- }
+ // TODO(https://go.dev/issue/56948): Use a generic implementation
+ // of utf8.DecodeRune, or rely on a compiler optimization to statically
+ // hide the cost of a type switch (https://go.dev/issue/57072).
+ var rx, ry rune
+ var nx, ny int
+ switch any(x).(type) {
+ case string:
+ rx, nx = utf8.DecodeRuneInString(string(x))
+ ry, ny = utf8.DecodeRuneInString(string(y))
+ case []byte:
+ rx, nx = utf8.DecodeRune([]byte(x))
+ ry, ny = utf8.DecodeRune([]byte(y))
+ }
+ selfx := isUTF16Self(rx)
+ selfy := isUTF16Self(ry)
+ switch {
// The x rune is a single UTF-16 codepoint, while
// the y rune is a surrogate pair of UTF-16 codepoints.
- case isUTF16Self(rx):
- ry, _ := utf16.EncodeRune(ry)
- if rx != ry {
- return rx < ry
- }
- panic("BUG: invalid UTF-8") // implies rx is an unpaired surrogate half
-
+ case selfx && !selfy:
+ ry, _ = utf16.EncodeRune(ry)
// The y rune is a single UTF-16 codepoint, while
// the x rune is a surrogate pair of UTF-16 codepoints.
- case isUTF16Self(ry):
- rx, _ := utf16.EncodeRune(rx)
- if rx != ry {
- return rx < ry
- }
- panic("BUG: invalid UTF-8") // implies ry is an unpaired surrogate half
+ case selfy && !selfx:
+ rx, _ = utf16.EncodeRune(rx)
+ }
+ if rx != ry {
+ return rx < ry
}
+ invalidUTF8 = invalidUTF8 || (rx == utf8.RuneError && nx == 1) || (ry == utf8.RuneError && ny == 1)
x, y = x[nx:], y[ny:]
}
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go
new file mode 100644
index 000000000..61141a500
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/openapi.go
@@ -0,0 +1,260 @@
+/*
+Copyright 2022 The Kubernetes 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 schemaconv
+
+import (
+ "errors"
+ "path"
+ "strings"
+
+ "k8s.io/kube-openapi/pkg/validation/spec"
+ "sigs.k8s.io/structured-merge-diff/v4/schema"
+)
+
+// ToSchemaFromOpenAPI converts a directory of OpenAPI schemas to an smd Schema.
+// - models: a map from definition name to OpenAPI V3 structural schema for each definition.
+// Key in map is used to resolve references in the schema.
+// - preserveUnknownFields: flag indicating whether unknown fields in all schemas should be preserved.
+// - returns: nil and an error if there is a parse error, or if schema does not satisfy a
+// required structural schema invariant for conversion. If no error, returns
+// a new smd schema.
+//
+// Schema should be validated as structural before using with this function, or
+// there may be information lost.
+func ToSchemaFromOpenAPI(models map[string]*spec.Schema, preserveUnknownFields bool) (*schema.Schema, error) {
+ c := convert{
+ preserveUnknownFields: preserveUnknownFields,
+ output: &schema.Schema{},
+ }
+
+ for name, spec := range models {
+ // Skip/Ignore top-level references
+ if len(spec.Ref.String()) > 0 {
+ continue
+ }
+
+ var a schema.Atom
+
+ // Hard-coded schemas for now as proto_models implementation functions.
+ // https://github.com/kubernetes/kube-openapi/issues/364
+ if name == quantityResource {
+ a = schema.Atom{
+ Scalar: untypedDef.Atom.Scalar,
+ }
+ } else if name == rawExtensionResource {
+ a = untypedDef.Atom
+ } else {
+ c2 := c.push(name, &a)
+ c2.visitSpec(spec)
+ c.pop(c2)
+ }
+
+ c.insertTypeDef(name, a)
+ }
+
+ if len(c.errorMessages) > 0 {
+ return nil, errors.New(strings.Join(c.errorMessages, "\n"))
+ }
+
+ c.addCommonTypes()
+ return c.output, nil
+}
+
+func (c *convert) visitSpec(m *spec.Schema) {
+ // Check if this schema opts its descendants into preserve-unknown-fields
+ if p, ok := m.Extensions["x-kubernetes-preserve-unknown-fields"]; ok && p == true {
+ c.preserveUnknownFields = true
+ }
+ a := c.top()
+ *a = c.parseSchema(m)
+}
+
+func (c *convert) parseSchema(m *spec.Schema) schema.Atom {
+ // k8s-generated OpenAPI specs have historically used only one value for
+ // type and starting with OpenAPIV3 it is only allowed to be
+ // a single string.
+ typ := ""
+ if len(m.Type) > 0 {
+ typ = m.Type[0]
+ }
+
+ // Structural Schemas produced by kubernetes follow very specific rules which
+ // we can use to infer the SMD type:
+ switch typ {
+ case "":
+ // According to Swagger docs:
+ // https://swagger.io/docs/specification/data-models/data-types/#any
+ //
+ // If no type is specified, it is equivalent to accepting any type.
+ return schema.Atom{
+ Scalar: ptr(schema.Scalar("untyped")),
+ List: c.parseList(m),
+ Map: c.parseObject(m),
+ }
+
+ case "object":
+ return schema.Atom{
+ Map: c.parseObject(m),
+ }
+ case "array":
+ return schema.Atom{
+ List: c.parseList(m),
+ }
+ case "integer", "boolean", "number", "string":
+ return convertPrimitive(typ, m.Format)
+ default:
+ c.reportError("unrecognized type: '%v'", typ)
+ return schema.Atom{
+ Scalar: ptr(schema.Scalar("untyped")),
+ }
+ }
+}
+
+func (c *convert) makeOpenAPIRef(specSchema *spec.Schema) schema.TypeRef {
+ refString := specSchema.Ref.String()
+
+ // Special-case handling for $ref stored inside a single-element allOf
+ if len(refString) == 0 && len(specSchema.AllOf) == 1 && len(specSchema.AllOf[0].Ref.String()) > 0 {
+ refString = specSchema.AllOf[0].Ref.String()
+ }
+
+ if _, n := path.Split(refString); len(n) > 0 {
+ //!TODO: Refactor the field ElementRelationship override
+ // we can generate the types with overrides ahead of time rather than
+ // requiring the hacky runtime support
+ // (could just create a normalized key struct containing all customizations
+ // to deduplicate)
+ mapRelationship, err := getMapElementRelationship(specSchema.Extensions)
+ if err != nil {
+ c.reportError(err.Error())
+ }
+
+ if len(mapRelationship) > 0 {
+ return schema.TypeRef{
+ NamedType: &n,
+ ElementRelationship: &mapRelationship,
+ }
+ }
+
+ return schema.TypeRef{
+ NamedType: &n,
+ }
+
+ }
+ var inlined schema.Atom
+
+ // compute the type inline
+ c2 := c.push("inlined in "+c.currentName, &inlined)
+ c2.preserveUnknownFields = c.preserveUnknownFields
+ c2.visitSpec(specSchema)
+ c.pop(c2)
+
+ return schema.TypeRef{
+ Inlined: inlined,
+ }
+}
+
+func (c *convert) parseObject(s *spec.Schema) *schema.Map {
+ var fields []schema.StructField
+ for name, member := range s.Properties {
+ fields = append(fields, schema.StructField{
+ Name: name,
+ Type: c.makeOpenAPIRef(&member),
+ Default: member.Default,
+ })
+ }
+
+ // AdditionalProperties informs the schema of any "unknown" keys
+ // Unknown keys are enforced by the ElementType field.
+ elementType := func() schema.TypeRef {
+ if s.AdditionalProperties == nil {
+ // According to openAPI spec, an object without properties and without
+ // additionalProperties is assumed to be a free-form object.
+ if c.preserveUnknownFields || len(s.Properties) == 0 {
+ return schema.TypeRef{
+ NamedType: &deducedName,
+ }
+ }
+
+ // If properties are specified, do not implicitly allow unknown
+ // fields
+ return schema.TypeRef{}
+ } else if s.AdditionalProperties.Schema != nil {
+ // Unknown fields use the referred schema
+ return c.makeOpenAPIRef(s.AdditionalProperties.Schema)
+
+ } else if s.AdditionalProperties.Allows {
+ // A boolean instead of a schema was provided. Deduce the
+ // type from the value provided at runtime.
+ return schema.TypeRef{
+ NamedType: &deducedName,
+ }
+ } else {
+ // Additional Properties are explicitly disallowed by the user.
+ // Ensure element type is empty.
+ return schema.TypeRef{}
+ }
+ }()
+
+ relationship, err := getMapElementRelationship(s.Extensions)
+ if err != nil {
+ c.reportError(err.Error())
+ }
+
+ return &schema.Map{
+ Fields: fields,
+ ElementRelationship: relationship,
+ ElementType: elementType,
+ }
+}
+
+func (c *convert) parseList(s *spec.Schema) *schema.List {
+ relationship, mapKeys, err := getListElementRelationship(s.Extensions)
+ if err != nil {
+ c.reportError(err.Error())
+ }
+ elementType := func() schema.TypeRef {
+ if s.Items != nil {
+ if s.Items.Schema == nil || s.Items.Len() != 1 {
+ c.reportError("structural schema arrays must have exactly one member subtype")
+ return schema.TypeRef{
+ NamedType: &deducedName,
+ }
+ }
+
+ subSchema := s.Items.Schema
+ if subSchema == nil {
+ subSchema = &s.Items.Schemas[0]
+ }
+ return c.makeOpenAPIRef(subSchema)
+ } else if len(s.Type) > 0 && len(s.Type[0]) > 0 {
+ c.reportError("`items` must be specified on arrays")
+ }
+
+ // A list with no items specified is treated as "untyped".
+ return schema.TypeRef{
+ NamedType: &untypedName,
+ }
+
+ }()
+
+ return &schema.List{
+ ElementRelationship: relationship,
+ Keys: mapKeys,
+ ElementType: elementType,
+ }
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go
new file mode 100644
index 000000000..2c6fd76a9
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/proto_models.go
@@ -0,0 +1,178 @@
+/*
+Copyright 2022 The Kubernetes 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 schemaconv
+
+import (
+ "errors"
+ "path"
+ "strings"
+
+ "k8s.io/kube-openapi/pkg/util/proto"
+ "sigs.k8s.io/structured-merge-diff/v4/schema"
+)
+
+// ToSchema converts openapi definitions into a schema suitable for structured
+// merge (i.e. kubectl apply v2).
+func ToSchema(models proto.Models) (*schema.Schema, error) {
+ return ToSchemaWithPreserveUnknownFields(models, false)
+}
+
+// ToSchemaWithPreserveUnknownFields converts openapi definitions into a schema suitable for structured
+// merge (i.e. kubectl apply v2), it will preserve unknown fields if specified.
+func ToSchemaWithPreserveUnknownFields(models proto.Models, preserveUnknownFields bool) (*schema.Schema, error) {
+ c := convert{
+ preserveUnknownFields: preserveUnknownFields,
+ output: &schema.Schema{},
+ }
+ for _, name := range models.ListModels() {
+ model := models.LookupModel(name)
+
+ var a schema.Atom
+ c2 := c.push(name, &a)
+ model.Accept(c2)
+ c.pop(c2)
+
+ c.insertTypeDef(name, a)
+ }
+
+ if len(c.errorMessages) > 0 {
+ return nil, errors.New(strings.Join(c.errorMessages, "\n"))
+ }
+
+ c.addCommonTypes()
+ return c.output, nil
+}
+
+func (c *convert) makeRef(model proto.Schema, preserveUnknownFields bool) schema.TypeRef {
+ var tr schema.TypeRef
+ if r, ok := model.(*proto.Ref); ok {
+ if r.Reference() == "io.k8s.apimachinery.pkg.runtime.RawExtension" {
+ return schema.TypeRef{
+ NamedType: &untypedName,
+ }
+ }
+ // reference a named type
+ _, n := path.Split(r.Reference())
+ tr.NamedType = &n
+
+ mapRelationship, err := getMapElementRelationship(model.GetExtensions())
+
+ if err != nil {
+ c.reportError(err.Error())
+ }
+
+ // empty string means unset.
+ if len(mapRelationship) > 0 {
+ tr.ElementRelationship = &mapRelationship
+ }
+ } else {
+ // compute the type inline
+ c2 := c.push("inlined in "+c.currentName, &tr.Inlined)
+ c2.preserveUnknownFields = preserveUnknownFields
+ model.Accept(c2)
+ c.pop(c2)
+
+ if tr == (schema.TypeRef{}) {
+ // emit warning?
+ tr.NamedType = &untypedName
+ }
+ }
+ return tr
+}
+
+func (c *convert) VisitKind(k *proto.Kind) {
+ preserveUnknownFields := c.preserveUnknownFields
+ if p, ok := k.GetExtensions()["x-kubernetes-preserve-unknown-fields"]; ok && p == true {
+ preserveUnknownFields = true
+ }
+
+ a := c.top()
+ a.Map = &schema.Map{}
+ for _, name := range k.FieldOrder {
+ member := k.Fields[name]
+ tr := c.makeRef(member, preserveUnknownFields)
+ a.Map.Fields = append(a.Map.Fields, schema.StructField{
+ Name: name,
+ Type: tr,
+ Default: member.GetDefault(),
+ })
+ }
+
+ unions, err := makeUnions(k.GetExtensions())
+ if err != nil {
+ c.reportError(err.Error())
+ return
+ }
+ // TODO: We should check that the fields and discriminator
+ // specified in the union are actual fields in the struct.
+ a.Map.Unions = unions
+
+ if preserveUnknownFields {
+ a.Map.ElementType = schema.TypeRef{
+ NamedType: &deducedName,
+ }
+ }
+
+ a.Map.ElementRelationship, err = getMapElementRelationship(k.GetExtensions())
+ if err != nil {
+ c.reportError(err.Error())
+ }
+}
+
+func (c *convert) VisitArray(a *proto.Array) {
+ relationship, mapKeys, err := getListElementRelationship(a.GetExtensions())
+ if err != nil {
+ c.reportError(err.Error())
+ }
+
+ atom := c.top()
+ atom.List = &schema.List{
+ ElementType: c.makeRef(a.SubType, c.preserveUnknownFields),
+ ElementRelationship: relationship,
+ Keys: mapKeys,
+ }
+}
+
+func (c *convert) VisitMap(m *proto.Map) {
+ relationship, err := getMapElementRelationship(m.GetExtensions())
+ if err != nil {
+ c.reportError(err.Error())
+ }
+
+ a := c.top()
+ a.Map = &schema.Map{
+ ElementType: c.makeRef(m.SubType, c.preserveUnknownFields),
+ ElementRelationship: relationship,
+ }
+}
+
+func (c *convert) VisitPrimitive(p *proto.Primitive) {
+ a := c.top()
+ if c.currentName == quantityResource {
+ a.Scalar = ptr(schema.Scalar("untyped"))
+ } else {
+ *a = convertPrimitive(p.Type, p.Format)
+ }
+}
+
+func (c *convert) VisitArbitrary(a *proto.Arbitrary) {
+ *c.top() = deducedDef.Atom
+}
+
+func (c *convert) VisitReference(proto.Reference) {
+ // Do nothing, we handle references specially
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go
index bec0e7809..799d866d5 100644
--- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go
+++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go
@@ -17,43 +17,18 @@ limitations under the License.
package schemaconv
import (
- "errors"
"fmt"
- "path"
"sort"
- "strings"
- "k8s.io/kube-openapi/pkg/util/proto"
"sigs.k8s.io/structured-merge-diff/v4/schema"
)
const (
- quantityResource = "io.k8s.apimachinery.pkg.api.resource.Quantity"
+ quantityResource = "io.k8s.apimachinery.pkg.api.resource.Quantity"
+ rawExtensionResource = "io.k8s.apimachinery.pkg.runtime.RawExtension"
)
-// ToSchema converts openapi definitions into a schema suitable for structured
-// merge (i.e. kubectl apply v2).
-func ToSchema(models proto.Models) (*schema.Schema, error) {
- return ToSchemaWithPreserveUnknownFields(models, false)
-}
-
-// ToSchemaWithPreserveUnknownFields converts openapi definitions into a schema suitable for structured
-// merge (i.e. kubectl apply v2), it will preserve unknown fields if specified.
-func ToSchemaWithPreserveUnknownFields(models proto.Models, preserveUnknownFields bool) (*schema.Schema, error) {
- c := convert{
- input: models,
- preserveUnknownFields: preserveUnknownFields,
- output: &schema.Schema{},
- }
- if err := c.convertAll(); err != nil {
- return nil, err
- }
- c.addCommonTypes()
- return c.output, nil
-}
-
type convert struct {
- input proto.Models
preserveUnknownFields bool
output *schema.Schema
@@ -64,7 +39,6 @@ type convert struct {
func (c *convert) push(name string, a *schema.Atom) *convert {
return &convert{
- input: c.input,
preserveUnknownFields: c.preserveUnknownFields,
output: c.output,
currentName: name,
@@ -78,30 +52,17 @@ func (c *convert) pop(c2 *convert) {
c.errorMessages = append(c.errorMessages, c2.errorMessages...)
}
-func (c *convert) convertAll() error {
- for _, name := range c.input.ListModels() {
- model := c.input.LookupModel(name)
- c.insertTypeDef(name, model)
- }
- if len(c.errorMessages) > 0 {
- return errors.New(strings.Join(c.errorMessages, "\n"))
- }
- return nil
-}
-
func (c *convert) reportError(format string, args ...interface{}) {
c.errorMessages = append(c.errorMessages,
c.currentName+": "+fmt.Sprintf(format, args...),
)
}
-func (c *convert) insertTypeDef(name string, model proto.Schema) {
+func (c *convert) insertTypeDef(name string, atom schema.Atom) {
def := schema.TypeDef{
Name: name,
+ Atom: atom,
}
- c2 := c.push(name, &def.Atom)
- model.Accept(c2)
- c.pop(c2)
if def.Atom == (schema.Atom{}) {
// This could happen if there were a top-level reference.
return
@@ -156,46 +117,6 @@ var deducedDef schema.TypeDef = schema.TypeDef{
},
}
-func (c *convert) makeRef(model proto.Schema, preserveUnknownFields bool) schema.TypeRef {
- var tr schema.TypeRef
- if r, ok := model.(*proto.Ref); ok {
- if r.Reference() == "io.k8s.apimachinery.pkg.runtime.RawExtension" {
- return schema.TypeRef{
- NamedType: &untypedName,
- }
- }
- // reference a named type
- _, n := path.Split(r.Reference())
- tr.NamedType = &n
-
- ext := model.GetExtensions()
- if val, ok := ext["x-kubernetes-map-type"]; ok {
- switch val {
- case "atomic":
- relationship := schema.Atomic
- tr.ElementRelationship = &relationship
- case "granular":
- relationship := schema.Separable
- tr.ElementRelationship = &relationship
- default:
- c.reportError("unknown map type %v", val)
- }
- }
- } else {
- // compute the type inline
- c2 := c.push("inlined in "+c.currentName, &tr.Inlined)
- c2.preserveUnknownFields = preserveUnknownFields
- model.Accept(c2)
- c.pop(c2)
-
- if tr == (schema.TypeRef{}) {
- // emit warning?
- tr.NamedType = &untypedName
- }
- }
- return tr
-}
-
func makeUnions(extensions map[string]interface{}) ([]schema.Union, error) {
schemaUnions := []schema.Union{}
if iunions, ok := extensions["x-kubernetes-unions"]; ok {
@@ -299,52 +220,6 @@ func makeUnion(extensions map[string]interface{}) (schema.Union, error) {
return union, nil
}
-func (c *convert) VisitKind(k *proto.Kind) {
- preserveUnknownFields := c.preserveUnknownFields
- if p, ok := k.GetExtensions()["x-kubernetes-preserve-unknown-fields"]; ok && p == true {
- preserveUnknownFields = true
- }
-
- a := c.top()
- a.Map = &schema.Map{}
- for _, name := range k.FieldOrder {
- member := k.Fields[name]
- tr := c.makeRef(member, preserveUnknownFields)
- a.Map.Fields = append(a.Map.Fields, schema.StructField{
- Name: name,
- Type: tr,
- Default: member.GetDefault(),
- })
- }
-
- unions, err := makeUnions(k.GetExtensions())
- if err != nil {
- c.reportError(err.Error())
- return
- }
- // TODO: We should check that the fields and discriminator
- // specified in the union are actual fields in the struct.
- a.Map.Unions = unions
-
- if preserveUnknownFields {
- a.Map.ElementType = schema.TypeRef{
- NamedType: &deducedName,
- }
- }
-
- ext := k.GetExtensions()
- if val, ok := ext["x-kubernetes-map-type"]; ok {
- switch val {
- case "atomic":
- a.Map.ElementRelationship = schema.Atomic
- case "granular":
- a.Map.ElementRelationship = schema.Separable
- default:
- c.reportError("unknown map type %v", val)
- }
- }
-}
-
func toStringSlice(o interface{}) (out []string, ok bool) {
switch t := o.(type) {
case []interface{}:
@@ -355,117 +230,108 @@ func toStringSlice(o interface{}) (out []string, ok bool) {
}
}
return out, true
+ case []string:
+ return t, true
}
return nil, false
}
-func (c *convert) VisitArray(a *proto.Array) {
- atom := c.top()
- atom.List = &schema.List{
- ElementRelationship: schema.Atomic,
- }
- l := atom.List
- l.ElementType = c.makeRef(a.SubType, c.preserveUnknownFields)
-
- ext := a.GetExtensions()
+func ptr(s schema.Scalar) *schema.Scalar { return &s }
- if val, ok := ext["x-kubernetes-list-type"]; ok {
- if val == "atomic" {
- l.ElementRelationship = schema.Atomic
- } else if val == "set" {
- l.ElementRelationship = schema.Associative
- } else if val == "map" {
- l.ElementRelationship = schema.Associative
- if keys, ok := ext["x-kubernetes-list-map-keys"]; ok {
- if keyNames, ok := toStringSlice(keys); ok {
- l.Keys = keyNames
- } else {
- c.reportError("uninterpreted map keys: %#v", keys)
- }
- } else {
- c.reportError("missing map keys")
- }
- } else {
- c.reportError("unknown list type %v", val)
- l.ElementRelationship = schema.Atomic
- }
- } else if val, ok := ext["x-kubernetes-patch-strategy"]; ok {
- if val == "merge" || val == "merge,retainKeys" {
- l.ElementRelationship = schema.Associative
- if key, ok := ext["x-kubernetes-patch-merge-key"]; ok {
- if keyName, ok := key.(string); ok {
- l.Keys = []string{keyName}
- } else {
- c.reportError("uninterpreted merge key: %#v", key)
- }
- } else {
- // It's not an error for this to be absent, it
- // means it's a set.
- }
- } else if val == "retainKeys" {
- } else {
- c.reportError("unknown patch strategy %v", val)
- l.ElementRelationship = schema.Atomic
+// Basic conversion functions to convert OpenAPI schema definitions to
+// SMD Schema atoms
+func convertPrimitive(typ string, format string) (a schema.Atom) {
+ switch typ {
+ case "integer":
+ a.Scalar = ptr(schema.Numeric)
+ case "number":
+ a.Scalar = ptr(schema.Numeric)
+ case "string":
+ switch format {
+ case "":
+ a.Scalar = ptr(schema.String)
+ case "byte":
+ // byte really means []byte and is encoded as a string.
+ a.Scalar = ptr(schema.String)
+ case "int-or-string":
+ a.Scalar = ptr(schema.Scalar("untyped"))
+ case "date-time":
+ a.Scalar = ptr(schema.Scalar("untyped"))
+ default:
+ a.Scalar = ptr(schema.Scalar("untyped"))
}
+ case "boolean":
+ a.Scalar = ptr(schema.Boolean)
+ default:
+ a.Scalar = ptr(schema.Scalar("untyped"))
}
-}
-func (c *convert) VisitMap(m *proto.Map) {
- a := c.top()
- a.Map = &schema.Map{}
- a.Map.ElementType = c.makeRef(m.SubType, c.preserveUnknownFields)
+ return a
+}
- ext := m.GetExtensions()
- if val, ok := ext["x-kubernetes-map-type"]; ok {
+func getListElementRelationship(ext map[string]any) (schema.ElementRelationship, []string, error) {
+ if val, ok := ext["x-kubernetes-list-type"]; ok {
switch val {
case "atomic":
- a.Map.ElementRelationship = schema.Atomic
- case "granular":
- a.Map.ElementRelationship = schema.Separable
+ return schema.Atomic, nil, nil
+ case "set":
+ return schema.Associative, nil, nil
+ case "map":
+ keys, ok := ext["x-kubernetes-list-map-keys"]
+
+ if !ok {
+ return schema.Associative, nil, fmt.Errorf("missing map keys")
+ }
+
+ keyNames, ok := toStringSlice(keys)
+ if !ok {
+ return schema.Associative, nil, fmt.Errorf("uninterpreted map keys: %#v", keys)
+ }
+
+ return schema.Associative, keyNames, nil
default:
- c.reportError("unknown map type %v", val)
+ return schema.Atomic, nil, fmt.Errorf("unknown list type %v", val)
}
- }
-}
+ } else if val, ok := ext["x-kubernetes-patch-strategy"]; ok {
+ switch val {
+ case "merge", "merge,retainKeys":
+ if key, ok := ext["x-kubernetes-patch-merge-key"]; ok {
+ keyName, ok := key.(string)
-func ptr(s schema.Scalar) *schema.Scalar { return &s }
+ if !ok {
+ return schema.Associative, nil, fmt.Errorf("uninterpreted merge key: %#v", key)
+ }
-func (c *convert) VisitPrimitive(p *proto.Primitive) {
- a := c.top()
- if c.currentName == quantityResource {
- a.Scalar = ptr(schema.Scalar("untyped"))
- } else {
- switch p.Type {
- case proto.Integer:
- a.Scalar = ptr(schema.Numeric)
- case proto.Number:
- a.Scalar = ptr(schema.Numeric)
- case proto.String:
- switch p.Format {
- case "":
- a.Scalar = ptr(schema.String)
- case "byte":
- // byte really means []byte and is encoded as a string.
- a.Scalar = ptr(schema.String)
- case "int-or-string":
- a.Scalar = ptr(schema.Scalar("untyped"))
- case "date-time":
- a.Scalar = ptr(schema.Scalar("untyped"))
- default:
- a.Scalar = ptr(schema.Scalar("untyped"))
+ return schema.Associative, []string{keyName}, nil
}
- case proto.Boolean:
- a.Scalar = ptr(schema.Boolean)
+ // It's not an error for x-kubernetes-patch-merge-key to be absent,
+ // it means it's a set
+ return schema.Associative, nil, nil
+ case "retainKeys":
+ return schema.Atomic, nil, nil
default:
- a.Scalar = ptr(schema.Scalar("untyped"))
+ return schema.Atomic, nil, fmt.Errorf("unknown patch strategy %v", val)
}
}
-}
-func (c *convert) VisitArbitrary(a *proto.Arbitrary) {
- *c.top() = deducedDef.Atom
+ // Treat as atomic by default
+ return schema.Atomic, nil, nil
}
-func (c *convert) VisitReference(proto.Reference) {
- // Do nothing, we handle references specially
+// Returns map element relationship if specified, or empty string if unspecified
+func getMapElementRelationship(ext map[string]any) (schema.ElementRelationship, error) {
+ val, ok := ext["x-kubernetes-map-type"]
+ if !ok {
+ // unset Map element relationship
+ return "", nil
+ }
+
+ switch val {
+ case "atomic":
+ return schema.Atomic, nil
+ case "granular":
+ return schema.Separable, nil
+ default:
+ return "", fmt.Errorf("unknown map type %v", val)
+ }
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go b/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go
index 51dac4bdf..699291f1d 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/encoding.go
@@ -18,7 +18,10 @@ package spec3
import (
"encoding/json"
+
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
"k8s.io/kube-openapi/pkg/validation/spec"
)
@@ -41,6 +44,9 @@ func (e *Encoding) MarshalJSON() ([]byte, error) {
}
func (e *Encoding) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, e)
+ }
if err := json.Unmarshal(data, &e.EncodingProps); err != nil {
return err
}
@@ -50,6 +56,20 @@ func (e *Encoding) UnmarshalJSON(data []byte) error {
return nil
}
+func (e *Encoding) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ EncodingProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+
+ e.Extensions = internal.SanitizeExtensions(x.Extensions)
+ e.EncodingProps = x.EncodingProps
+ return nil
+}
+
type EncodingProps struct {
// Content Type for encoding a specific property
ContentType string `json:"contentType,omitempty"`
@@ -58,7 +78,7 @@ type EncodingProps struct {
// Describes how a specific property value will be serialized depending on its type
Style string `json:"style,omitempty"`
// When this is true, property values of type array or object generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect
- Explode string `json:"explode,omitempty"`
+ Explode bool `json:"explode,omitempty"`
// AllowReserved determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986
AllowReserved bool `json:"allowReserved,omitempty"`
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/example.go b/vendor/k8s.io/kube-openapi/pkg/spec3/example.go
index 0f5ab983c..03b872717 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/example.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/example.go
@@ -19,8 +19,11 @@ package spec3
import (
"encoding/json"
- "k8s.io/kube-openapi/pkg/validation/spec"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
// Example https://swagger.io/specification/#example-object
@@ -49,6 +52,9 @@ func (e *Example) MarshalJSON() ([]byte, error) {
}
func (e *Example) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, e)
+ }
if err := json.Unmarshal(data, &e.Refable); err != nil {
return err
}
@@ -61,6 +67,23 @@ func (e *Example) UnmarshalJSON(data []byte) error {
return nil
}
+func (e *Example) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ ExampleProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ if err := internal.JSONRefFromMap(&e.Ref.Ref, x.Extensions); err != nil {
+ return err
+ }
+ e.Extensions = internal.SanitizeExtensions(x.Extensions)
+ e.ExampleProps = x.ExampleProps
+
+ return nil
+}
+
type ExampleProps struct {
// Summary holds a short description of the example
Summary string `json:"summary,omitempty"`
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go b/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go
index 117113e7a..e79956721 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/external_documentation.go
@@ -18,8 +18,11 @@ package spec3
import (
"encoding/json"
- "k8s.io/kube-openapi/pkg/validation/spec"
+
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
type ExternalDocumentation struct {
@@ -48,6 +51,9 @@ func (e *ExternalDocumentation) MarshalJSON() ([]byte, error) {
}
func (e *ExternalDocumentation) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, e)
+ }
if err := json.Unmarshal(data, &e.ExternalDocumentationProps); err != nil {
return err
}
@@ -56,3 +62,16 @@ func (e *ExternalDocumentation) UnmarshalJSON(data []byte) error {
}
return nil
}
+
+func (e *ExternalDocumentation) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ ExternalDocumentationProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ e.Extensions = internal.SanitizeExtensions(x.Extensions)
+ e.ExternalDocumentationProps = x.ExternalDocumentationProps
+ return nil
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go b/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go
new file mode 100644
index 000000000..bc19dd48e
--- /dev/null
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/fuzz.go
@@ -0,0 +1,254 @@
+package spec3
+
+import (
+ "math/rand"
+ "strings"
+
+ fuzz "github.com/google/gofuzz"
+
+ "k8s.io/kube-openapi/pkg/validation/spec"
+)
+
+// refChance is the chance that a particular component will use a $ref
+// instead of fuzzed. Expressed as a fraction 1/n, currently there is
+// a 1/3 chance that a ref will be used.
+const refChance = 3
+
+const alphaNumChars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
+
+func randAlphanumString() string {
+ arr := make([]string, rand.Intn(10)+5)
+ for i := 0; i < len(arr); i++ {
+ arr[i] = string(alphaNumChars[rand.Intn(len(alphaNumChars))])
+ }
+ return strings.Join(arr, "")
+}
+
+var OpenAPIV3FuzzFuncs []interface{} = []interface{}{
+ func(s *string, c fuzz.Continue) {
+ // All OpenAPI V3 map keys must follow the corresponding
+ // regex. Note that this restricts the range for all other
+ // string values as well.
+ str := randAlphanumString()
+ *s = str
+ },
+ func(o *OpenAPI, c fuzz.Continue) {
+ c.FuzzNoCustom(o)
+ o.Version = "3.0.0"
+ },
+ func(r *interface{}, c fuzz.Continue) {
+ switch c.Intn(3) {
+ case 0:
+ *r = nil
+ case 1:
+ n := c.RandString() + "x"
+ *r = n
+ case 2:
+ n := c.Float64()
+ *r = n
+ }
+ },
+ func(v **spec.Info, c fuzz.Continue) {
+ // Info is never nil
+ *v = &spec.Info{}
+ c.FuzzNoCustom(*v)
+ (*v).Title = c.RandString() + "x"
+ },
+ func(v *Paths, c fuzz.Continue) {
+ c.Fuzz(&v.VendorExtensible)
+ num := c.Intn(5)
+ if num > 0 {
+ v.Paths = make(map[string]*Path)
+ }
+ for i := 0; i < num; i++ {
+ val := Path{}
+ c.Fuzz(&val)
+ v.Paths["/"+c.RandString()] = &val
+ }
+ },
+ func(v *SecurityScheme, c fuzz.Continue) {
+ if c.Intn(refChance) == 0 {
+ c.Fuzz(&v.Refable)
+ return
+ }
+ switch c.Intn(4) {
+ case 0:
+ v.Type = "apiKey"
+ v.Name = c.RandString() + "x"
+ switch c.Intn(3) {
+ case 0:
+ v.In = "query"
+ case 1:
+ v.In = "header"
+ case 2:
+ v.In = "cookie"
+ }
+ case 1:
+ v.Type = "http"
+ case 2:
+ v.Type = "oauth2"
+ v.Flows = make(map[string]*OAuthFlow)
+ flow := OAuthFlow{}
+ flow.AuthorizationUrl = c.RandString() + "x"
+ v.Flows["implicit"] = &flow
+ flow.Scopes = make(map[string]string)
+ flow.Scopes["foo"] = "bar"
+ case 3:
+ v.Type = "openIdConnect"
+ v.OpenIdConnectUrl = "https://" + c.RandString()
+ }
+ v.Scheme = "basic"
+ },
+ func(v *spec.Ref, c fuzz.Continue) {
+ switch c.Intn(7) {
+ case 0:
+ *v = spec.MustCreateRef("#/components/schemas/" + randAlphanumString())
+ case 1:
+ *v = spec.MustCreateRef("#/components/responses/" + randAlphanumString())
+ case 2:
+ *v = spec.MustCreateRef("#/components/headers/" + randAlphanumString())
+ case 3:
+ *v = spec.MustCreateRef("#/components/securitySchemes/" + randAlphanumString())
+ case 5:
+ *v = spec.MustCreateRef("#/components/parameters/" + randAlphanumString())
+ case 6:
+ *v = spec.MustCreateRef("#/components/requestBodies/" + randAlphanumString())
+ }
+ },
+ func(v *Parameter, c fuzz.Continue) {
+ if c.Intn(refChance) == 0 {
+ c.Fuzz(&v.Refable)
+ return
+ }
+ c.Fuzz(&v.ParameterProps)
+ c.Fuzz(&v.VendorExtensible)
+
+ switch c.Intn(3) {
+ case 0:
+ // Header param
+ v.In = "query"
+ case 1:
+ v.In = "header"
+ case 2:
+ v.In = "cookie"
+ }
+ },
+ func(v *RequestBody, c fuzz.Continue) {
+ if c.Intn(refChance) == 0 {
+ c.Fuzz(&v.Refable)
+ return
+ }
+ c.Fuzz(&v.RequestBodyProps)
+ c.Fuzz(&v.VendorExtensible)
+ },
+ func(v *Header, c fuzz.Continue) {
+ if c.Intn(refChance) == 0 {
+ c.Fuzz(&v.Refable)
+ return
+ }
+ c.Fuzz(&v.HeaderProps)
+ c.Fuzz(&v.VendorExtensible)
+ },
+ func(v *ResponsesProps, c fuzz.Continue) {
+ c.Fuzz(&v.Default)
+ n := c.Intn(5)
+ for i := 0; i < n; i++ {
+ r2 := Response{}
+ c.Fuzz(&r2)
+ // HTTP Status code in 100-599 Range
+ code := c.Intn(500) + 100
+ v.StatusCodeResponses = make(map[int]*Response)
+ v.StatusCodeResponses[code] = &r2
+ }
+ },
+ func(v *Response, c fuzz.Continue) {
+ if c.Intn(refChance) == 0 {
+ c.Fuzz(&v.Refable)
+ return
+ }
+ c.Fuzz(&v.ResponseProps)
+ c.Fuzz(&v.VendorExtensible)
+ },
+ func(v *spec.Extensions, c fuzz.Continue) {
+ numChildren := c.Intn(5)
+ for i := 0; i < numChildren; i++ {
+ if *v == nil {
+ *v = spec.Extensions{}
+ }
+ (*v)["x-"+c.RandString()] = c.RandString()
+ }
+ },
+ func(v *spec.ExternalDocumentation, c fuzz.Continue) {
+ c.Fuzz(&v.Description)
+ v.URL = "https://" + randAlphanumString()
+ },
+ func(v *spec.SchemaURL, c fuzz.Continue) {
+ *v = spec.SchemaURL("https://" + randAlphanumString())
+ },
+ func(v *spec.SchemaOrBool, c fuzz.Continue) {
+ *v = spec.SchemaOrBool{}
+
+ if c.RandBool() {
+ v.Allows = c.RandBool()
+ } else {
+ v.Schema = &spec.Schema{}
+ v.Allows = true
+ c.Fuzz(&v.Schema)
+ }
+ },
+ func(v *spec.SchemaOrArray, c fuzz.Continue) {
+ *v = spec.SchemaOrArray{}
+ if c.RandBool() {
+ schema := spec.Schema{}
+ c.Fuzz(&schema)
+ v.Schema = &schema
+ } else {
+ v.Schemas = []spec.Schema{}
+ numChildren := c.Intn(5)
+ for i := 0; i < numChildren; i++ {
+ schema := spec.Schema{}
+ c.Fuzz(&schema)
+ v.Schemas = append(v.Schemas, schema)
+ }
+
+ }
+
+ },
+ func(v *spec.SchemaOrStringArray, c fuzz.Continue) {
+ if c.RandBool() {
+ *v = spec.SchemaOrStringArray{}
+ if c.RandBool() {
+ c.Fuzz(&v.Property)
+ } else {
+ c.Fuzz(&v.Schema)
+ }
+ }
+ },
+ func(v *spec.Schema, c fuzz.Continue) {
+ if c.Intn(refChance) == 0 {
+ c.Fuzz(&v.Ref)
+ return
+ }
+ if c.RandBool() {
+ // file schema
+ c.Fuzz(&v.Default)
+ c.Fuzz(&v.Description)
+ c.Fuzz(&v.Example)
+ c.Fuzz(&v.ExternalDocs)
+
+ c.Fuzz(&v.Format)
+ c.Fuzz(&v.ReadOnly)
+ c.Fuzz(&v.Required)
+ c.Fuzz(&v.Title)
+ v.Type = spec.StringOrArray{"file"}
+
+ } else {
+ // normal schema
+ c.Fuzz(&v.SchemaProps)
+ c.Fuzz(&v.SwaggerSchemaProps)
+ c.Fuzz(&v.VendorExtensible)
+ c.Fuzz(&v.ExtraProps)
+ }
+
+ },
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/header.go b/vendor/k8s.io/kube-openapi/pkg/spec3/header.go
index cead4b15d..ee5a30f79 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/header.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/header.go
@@ -20,6 +20,8 @@ import (
"encoding/json"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
"k8s.io/kube-openapi/pkg/validation/spec"
)
@@ -50,6 +52,9 @@ func (h *Header) MarshalJSON() ([]byte, error) {
}
func (h *Header) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, h)
+ }
if err := json.Unmarshal(data, &h.Refable); err != nil {
return err
}
@@ -63,6 +68,22 @@ func (h *Header) UnmarshalJSON(data []byte) error {
return nil
}
+func (h *Header) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ HeaderProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ if err := internal.JSONRefFromMap(&h.Ref.Ref, x.Extensions); err != nil {
+ return err
+ }
+ h.Extensions = internal.SanitizeExtensions(x.Extensions)
+ h.HeaderProps = x.HeaderProps
+ return nil
+}
+
// HeaderProps a struct that describes a header object
type HeaderProps struct {
// Description holds a brief description of the parameter
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go b/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go
index 828fd8dc5..d390e69bc 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/media_type.go
@@ -18,7 +18,10 @@ package spec3
import (
"encoding/json"
+
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
"k8s.io/kube-openapi/pkg/validation/spec"
)
@@ -44,6 +47,9 @@ func (m *MediaType) MarshalJSON() ([]byte, error) {
}
func (m *MediaType) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, m)
+ }
if err := json.Unmarshal(data, &m.MediaTypeProps); err != nil {
return err
}
@@ -53,10 +59,24 @@ func (m *MediaType) UnmarshalJSON(data []byte) error {
return nil
}
+func (m *MediaType) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ MediaTypeProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ m.Extensions = internal.SanitizeExtensions(x.Extensions)
+ m.MediaTypeProps = x.MediaTypeProps
+
+ return nil
+}
+
// MediaTypeProps a struct that allows you to specify content format, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#mediaTypeObject
type MediaTypeProps struct {
// Schema holds the schema defining the type used for the media type
- Schema *spec.Schema `json:"schema,omitempty"`
+ Schema *spec.Schema `json:"schema,omitempty"`
// Example of the media type
Example interface{} `json:"example,omitempty"`
// Examples of the media type. Each example object should match the media type and specific schema if present
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go b/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go
index de8aa4602..28230610b 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/operation.go
@@ -19,8 +19,10 @@ package spec3
import (
"encoding/json"
- "k8s.io/kube-openapi/pkg/validation/spec"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
// Operation describes a single API operation on a path, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#operationObject
@@ -46,12 +48,28 @@ func (o *Operation) MarshalJSON() ([]byte, error) {
// UnmarshalJSON hydrates this items instance with the data from JSON
func (o *Operation) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, o)
+ }
if err := json.Unmarshal(data, &o.OperationProps); err != nil {
return err
}
return json.Unmarshal(data, &o.VendorExtensible)
}
+func (o *Operation) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ OperationProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ o.Extensions = internal.SanitizeExtensions(x.Extensions)
+ o.OperationProps = x.OperationProps
+ return nil
+}
+
// OperationProps describes a single API operation on a path, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#operationObject
type OperationProps struct {
// Tags holds a list of tags for API documentation control
@@ -73,7 +91,7 @@ type OperationProps struct {
// Deprecated declares this operation to be deprecated
Deprecated bool `json:"deprecated,omitempty"`
// SecurityRequirement holds a declaration of which security mechanisms can be used for this operation
- SecurityRequirement []*SecurityRequirement `json:"security,omitempty"`
+ SecurityRequirement []map[string][]string `json:"security,omitempty"`
// Servers contains an alternative server array to service this operation
Servers []*Server `json:"servers,omitempty"`
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go b/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go
index 0d7180e50..613da71a6 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/parameter.go
@@ -20,6 +20,8 @@ import (
"encoding/json"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
"k8s.io/kube-openapi/pkg/validation/spec"
)
@@ -50,6 +52,10 @@ func (p *Parameter) MarshalJSON() ([]byte, error) {
}
func (p *Parameter) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, p)
+ }
+
if err := json.Unmarshal(data, &p.Refable); err != nil {
return err
}
@@ -63,6 +69,22 @@ func (p *Parameter) UnmarshalJSON(data []byte) error {
return nil
}
+func (p *Parameter) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ ParameterProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ if err := internal.JSONRefFromMap(&p.Ref.Ref, x.Extensions); err != nil {
+ return err
+ }
+ p.Extensions = internal.SanitizeExtensions(x.Extensions)
+ p.ParameterProps = x.ParameterProps
+ return nil
+}
+
// ParameterProps a struct that describes a single operation parameter, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#parameterObject
type ParameterProps struct {
// Name holds the name of the parameter
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/path.go b/vendor/k8s.io/kube-openapi/pkg/spec3/path.go
index bc48c504d..40d9061ac 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/path.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/path.go
@@ -18,10 +18,13 @@ package spec3
import (
"encoding/json"
+ "fmt"
"strings"
- "k8s.io/kube-openapi/pkg/validation/spec"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
// Paths describes the available paths and operations for the API, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#pathsObject
@@ -45,6 +48,9 @@ func (p *Paths) MarshalJSON() ([]byte, error) {
// UnmarshalJSON hydrates this items instance with the data from JSON
func (p *Paths) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, p)
+ }
var res map[string]json.RawMessage
if err := json.Unmarshal(data, &res); err != nil {
return err
@@ -74,6 +80,59 @@ func (p *Paths) UnmarshalJSON(data []byte) error {
return nil
}
+func (p *Paths) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ tok, err := dec.ReadToken()
+ if err != nil {
+ return err
+ }
+ switch k := tok.Kind(); k {
+ case 'n':
+ *p = Paths{}
+ return nil
+ case '{':
+ for {
+ tok, err := dec.ReadToken()
+ if err != nil {
+ return err
+ }
+
+ if tok.Kind() == '}' {
+ return nil
+ }
+
+ switch k := tok.String(); {
+ case internal.IsExtensionKey(k):
+ var ext any
+ if err := opts.UnmarshalNext(dec, &ext); err != nil {
+ return err
+ }
+
+ if p.Extensions == nil {
+ p.Extensions = make(map[string]any)
+ }
+ p.Extensions[k] = ext
+ case len(k) > 0 && k[0] == '/':
+ pi := Path{}
+ if err := opts.UnmarshalNext(dec, &pi); err != nil {
+ return err
+ }
+
+ if p.Paths == nil {
+ p.Paths = make(map[string]*Path)
+ }
+ p.Paths[k] = &pi
+ default:
+ _, err := dec.ReadValue() // skip value
+ if err != nil {
+ return err
+ }
+ }
+ }
+ default:
+ return fmt.Errorf("unknown JSON kind: %v", k)
+ }
+}
+
// Path describes the operations available on a single path, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#pathItemObject
//
// Note that this struct is actually a thin wrapper around PathProps to make it referable and extensible
@@ -101,6 +160,9 @@ func (p *Path) MarshalJSON() ([]byte, error) {
}
func (p *Path) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, p)
+ }
if err := json.Unmarshal(data, &p.Refable); err != nil {
return err
}
@@ -113,6 +175,24 @@ func (p *Path) UnmarshalJSON(data []byte) error {
return nil
}
+func (p *Path) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ PathProps
+ }
+
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ if err := internal.JSONRefFromMap(&p.Ref.Ref, x.Extensions); err != nil {
+ return err
+ }
+ p.Extensions = internal.SanitizeExtensions(x.Extensions)
+ p.PathProps = x.PathProps
+
+ return nil
+}
+
// PathProps describes the operations available on a single path, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#pathItemObject
type PathProps struct {
// Summary holds a summary for all operations in this path
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go b/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go
index 0adc62826..33267ce67 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/request_body.go
@@ -19,8 +19,10 @@ package spec3
import (
"encoding/json"
- "k8s.io/kube-openapi/pkg/validation/spec"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
// RequestBody describes a single request body, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#requestBodyObject
@@ -50,6 +52,9 @@ func (r *RequestBody) MarshalJSON() ([]byte, error) {
}
func (r *RequestBody) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, r)
+ }
if err := json.Unmarshal(data, &r.Refable); err != nil {
return err
}
@@ -71,3 +76,19 @@ type RequestBodyProps struct {
// Required determines if the request body is required in the request
Required bool `json:"required,omitempty"`
}
+
+func (r *RequestBody) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ RequestBodyProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ if err := internal.JSONRefFromMap(&r.Ref.Ref, x.Extensions); err != nil {
+ return err
+ }
+ r.Extensions = internal.SanitizeExtensions(x.Extensions)
+ r.RequestBodyProps = x.RequestBodyProps
+ return nil
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/response.go b/vendor/k8s.io/kube-openapi/pkg/spec3/response.go
index ccd73369f..95b388e6c 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/response.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/response.go
@@ -18,10 +18,13 @@ package spec3
import (
"encoding/json"
+ "fmt"
"strconv"
- "k8s.io/kube-openapi/pkg/validation/spec"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
// Responses holds the list of possible responses as they are returned from executing this operation
@@ -46,13 +49,15 @@ func (r *Responses) MarshalJSON() ([]byte, error) {
}
func (r *Responses) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, r)
+ }
if err := json.Unmarshal(data, &r.ResponsesProps); err != nil {
return err
}
if err := json.Unmarshal(data, &r.VendorExtensible); err != nil {
return err
}
-
return nil
}
@@ -78,25 +83,91 @@ func (r ResponsesProps) MarshalJSON() ([]byte, error) {
// UnmarshalJSON unmarshals responses from JSON
func (r *ResponsesProps) UnmarshalJSON(data []byte) error {
- var res map[string]*Response
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, r)
+ }
+ var res map[string]json.RawMessage
if err := json.Unmarshal(data, &res); err != nil {
- return nil
+ return err
}
if v, ok := res["default"]; ok {
- r.Default = v
+ value := Response{}
+ if err := json.Unmarshal(v, &value); err != nil {
+ return err
+ }
+ r.Default = &value
delete(res, "default")
}
for k, v := range res {
+ // Take all integral keys
if nk, err := strconv.Atoi(k); err == nil {
if r.StatusCodeResponses == nil {
r.StatusCodeResponses = map[int]*Response{}
}
- r.StatusCodeResponses[nk] = v
+ value := Response{}
+ if err := json.Unmarshal(v, &value); err != nil {
+ return err
+ }
+ r.StatusCodeResponses[nk] = &value
}
}
return nil
}
+func (r *Responses) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) (err error) {
+ tok, err := dec.ReadToken()
+ if err != nil {
+ return err
+ }
+ switch k := tok.Kind(); k {
+ case 'n':
+ *r = Responses{}
+ return nil
+ case '{':
+ for {
+ tok, err := dec.ReadToken()
+ if err != nil {
+ return err
+ }
+ if tok.Kind() == '}' {
+ return nil
+ }
+ switch k := tok.String(); {
+ case internal.IsExtensionKey(k):
+ var ext any
+ if err := opts.UnmarshalNext(dec, &ext); err != nil {
+ return err
+ }
+
+ if r.Extensions == nil {
+ r.Extensions = make(map[string]any)
+ }
+ r.Extensions[k] = ext
+ case k == "default":
+ resp := Response{}
+ if err := opts.UnmarshalNext(dec, &resp); err != nil {
+ return err
+ }
+ r.ResponsesProps.Default = &resp
+ default:
+ if nk, err := strconv.Atoi(k); err == nil {
+ resp := Response{}
+ if err := opts.UnmarshalNext(dec, &resp); err != nil {
+ return err
+ }
+
+ if r.StatusCodeResponses == nil {
+ r.StatusCodeResponses = map[int]*Response{}
+ }
+ r.StatusCodeResponses[nk] = &resp
+ }
+ }
+ }
+ default:
+ return fmt.Errorf("unknown JSON kind: %v", k)
+ }
+}
+
// Response describes a single response from an API Operation, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#responseObject
//
// Note that this struct is actually a thin wrapper around ResponseProps to make it referable and extensible
@@ -124,6 +195,9 @@ func (r *Response) MarshalJSON() ([]byte, error) {
}
func (r *Response) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, r)
+ }
if err := json.Unmarshal(data, &r.Refable); err != nil {
return err
}
@@ -133,7 +207,22 @@ func (r *Response) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &r.VendorExtensible); err != nil {
return err
}
+ return nil
+}
+func (r *Response) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ ResponseProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ if err := internal.JSONRefFromMap(&r.Ref.Ref, x.Extensions); err != nil {
+ return err
+ }
+ r.Extensions = internal.SanitizeExtensions(x.Extensions)
+ r.ResponseProps = x.ResponseProps
return nil
}
@@ -149,7 +238,6 @@ type ResponseProps struct {
Links map[string]*Link `json:"links,omitempty"`
}
-
// Link represents a possible design-time link for a response, more at https://swagger.io/specification/#link-object
type Link struct {
spec.Refable
@@ -175,6 +263,9 @@ func (r *Link) MarshalJSON() ([]byte, error) {
}
func (r *Link) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, r)
+ }
if err := json.Unmarshal(data, &r.Refable); err != nil {
return err
}
@@ -188,6 +279,22 @@ func (r *Link) UnmarshalJSON(data []byte) error {
return nil
}
+func (l *Link) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ LinkProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ if err := internal.JSONRefFromMap(&l.Ref.Ref, x.Extensions); err != nil {
+ return err
+ }
+ l.Extensions = internal.SanitizeExtensions(x.Extensions)
+ l.LinkProps = x.LinkProps
+ return nil
+}
+
// LinkProps describes a single response from an API Operation, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#responseObject
type LinkProps struct {
// OperationId is the name of an existing, resolvable OAS operation
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/security_requirement.go b/vendor/k8s.io/kube-openapi/pkg/spec3/security_requirement.go
deleted file mode 100644
index 0ce8924ef..000000000
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/security_requirement.go
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-Copyright 2021 The Kubernetes 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 spec3
-
-import (
- "encoding/json"
-
- "k8s.io/kube-openapi/pkg/validation/spec"
- "github.com/go-openapi/swag"
-)
-
-// SecurityRequirementProps describes the required security schemes to execute an operation, more at https://swagger.io/specification/#security-requirement-object
-//
-// Note that this struct is actually a thin wrapper around SecurityRequirementProps to make it referable and extensible
-type SecurityRequirement struct {
- SecurityRequirementProps
- spec.VendorExtensible
-}
-
-// MarshalJSON is a custom marshal function that knows how to encode SecurityRequirement as JSON
-func (s *SecurityRequirement) MarshalJSON() ([]byte, error) {
- b1, err := json.Marshal(s.SecurityRequirementProps)
- if err != nil {
- return nil, err
- }
- b2, err := json.Marshal(s.VendorExtensible)
- if err != nil {
- return nil, err
- }
- return swag.ConcatJSON(b1, b2), nil
-}
-
-// UnmarshalJSON hydrates this items instance with the data from JSON
-func (s *SecurityRequirement) UnmarshalJSON(data []byte) error {
- if err := json.Unmarshal(data, &s.SecurityRequirementProps); err != nil {
- return err
- }
- return json.Unmarshal(data, &s.VendorExtensible)
-}
-
-// SecurityRequirementProps describes the required security schemes to execute an operation, more at https://swagger.io/specification/#security-requirement-object
-type SecurityRequirementProps map[string][]string
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go b/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go
index 9b1352f4e..edf7e6de3 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/security_scheme.go
@@ -19,8 +19,8 @@ package spec3
import (
"encoding/json"
- "k8s.io/kube-openapi/pkg/validation/spec"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
// SecurityScheme defines reusable Security Scheme Object, more at https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#securitySchemeObject
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/server.go b/vendor/k8s.io/kube-openapi/pkg/spec3/server.go
index a505fb221..d5df0a781 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/server.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/server.go
@@ -18,9 +18,11 @@ package spec3
import (
"encoding/json"
- "k8s.io/kube-openapi/pkg/validation/spec"
- "github.com/go-openapi/swag"
+ "github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
+ "k8s.io/kube-openapi/pkg/validation/spec"
)
type Server struct {
@@ -51,6 +53,10 @@ func (s *Server) MarshalJSON() ([]byte, error) {
}
func (s *Server) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, s)
+ }
+
if err := json.Unmarshal(data, &s.ServerProps); err != nil {
return err
}
@@ -60,6 +66,20 @@ func (s *Server) UnmarshalJSON(data []byte) error {
return nil
}
+func (s *Server) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ ServerProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ s.Extensions = internal.SanitizeExtensions(x.Extensions)
+ s.ServerProps = x.ServerProps
+
+ return nil
+}
+
type ServerVariable struct {
ServerVariableProps
spec.VendorExtensible
@@ -88,6 +108,9 @@ func (s *ServerVariable) MarshalJSON() ([]byte, error) {
}
func (s *ServerVariable) UnmarshalJSON(data []byte) error {
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, s)
+ }
if err := json.Unmarshal(data, &s.ServerVariableProps); err != nil {
return err
}
@@ -96,3 +119,17 @@ func (s *ServerVariable) UnmarshalJSON(data []byte) error {
}
return nil
}
+
+func (s *ServerVariable) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decoder) error {
+ var x struct {
+ spec.Extensions
+ ServerVariableProps
+ }
+ if err := opts.UnmarshalNext(dec, &x); err != nil {
+ return err
+ }
+ s.Extensions = internal.SanitizeExtensions(x.Extensions)
+ s.ServerVariableProps = x.ServerVariableProps
+
+ return nil
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go b/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go
index 3ff48a3c3..bed096fb7 100644
--- a/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go
+++ b/vendor/k8s.io/kube-openapi/pkg/spec3/spec.go
@@ -17,6 +17,10 @@ limitations under the License.
package spec3
import (
+ "encoding/json"
+
+ "k8s.io/kube-openapi/pkg/internal"
+ jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
"k8s.io/kube-openapi/pkg/validation/spec"
)
@@ -35,3 +39,12 @@ type OpenAPI struct {
// ExternalDocs holds additional external documentation
ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty"`
}
+
+func (o *OpenAPI) UnmarshalJSON(data []byte) error {
+ type OpenAPIWithNoFunctions OpenAPI
+ p := (*OpenAPIWithNoFunctions)(o)
+ if internal.UseOptimizedJSONUnmarshalingV3 {
+ return jsonv2.Unmarshal(data, &p)
+ }
+ return json.Unmarshal(data, &p)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go b/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go
index a3f476d5d..519dcf2eb 100644
--- a/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go
+++ b/vendor/k8s.io/kube-openapi/pkg/util/proto/document_v3.go
@@ -120,7 +120,7 @@ func (d *Definitions) ParseSchemaV3(s *openapi_v3.Schema, path *Path) (Schema, e
switch s.GetType() {
case object:
for _, extension := range s.GetSpecificationExtension() {
- if extension.Name == "x-kuberentes-group-version-kind" {
+ if extension.Name == "x-kubernetes-group-version-kind" {
// Objects with x-kubernetes-group-version-kind are always top
// level types.
return d.parseV3Kind(s, path)
@@ -285,7 +285,7 @@ func parseV3Interface(def *yaml.Node) (interface{}, error) {
func (d *Definitions) parseV3BaseSchema(s *openapi_v3.Schema, path *Path) (*BaseSchema, error) {
if s == nil {
- return nil, fmt.Errorf("cannot initializae BaseSchema from nil")
+ return nil, fmt.Errorf("cannot initialize BaseSchema from nil")
}
def, err := parseV3Interface(s.GetDefault().ToRawInfo())
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go
index 9a2556306..05310c46b 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/header.go
@@ -43,6 +43,9 @@ type Header struct {
// MarshalJSON marshal this to JSON
func (h Header) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(h)
+ }
b1, err := json.Marshal(h.CommonValidations)
if err != nil {
return nil, err
@@ -62,6 +65,20 @@ func (h Header) MarshalJSON() ([]byte, error) {
return swag.ConcatJSON(b1, b2, b3, b4), nil
}
+func (h Header) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ CommonValidations commonValidationsOmitZero `json:",inline"`
+ SimpleSchema simpleSchemaOmitZero `json:",inline"`
+ Extensions
+ HeaderProps
+ }
+ x.CommonValidations = commonValidationsOmitZero(h.CommonValidations)
+ x.SimpleSchema = simpleSchemaOmitZero(h.SimpleSchema)
+ x.Extensions = internal.SanitizeExtensions(h.Extensions)
+ x.HeaderProps = h.HeaderProps
+ return opts.MarshalNext(enc, x)
+}
+
// UnmarshalJSON unmarshals this header from JSON
func (h *Header) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
@@ -94,12 +111,8 @@ func (h *Header) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Dec
h.CommonValidations = x.CommonValidations
h.SimpleSchema = x.SimpleSchema
- h.Extensions = x.Extensions
+ h.Extensions = internal.SanitizeExtensions(x.Extensions)
h.HeaderProps = x.HeaderProps
- h.Extensions.sanitize()
- if len(h.Extensions) == 0 {
- h.Extensions = nil
- }
return nil
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go
index 395ececae..d667b705b 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/info.go
@@ -89,17 +89,9 @@ func (e Extensions) GetObject(key string, out interface{}) error {
return nil
}
-func (e Extensions) sanitize() {
- for k := range e {
- if !isExtensionKey(k) {
- delete(e, k)
- }
- }
-}
-
func (e Extensions) sanitizeWithExtra() (extra map[string]any) {
for k, v := range e {
- if !isExtensionKey(k) {
+ if !internal.IsExtensionKey(k) {
if extra == nil {
extra = make(map[string]any)
}
@@ -110,10 +102,6 @@ func (e Extensions) sanitizeWithExtra() (extra map[string]any) {
return extra
}
-func isExtensionKey(k string) bool {
- return len(k) > 1 && (k[0] == 'x' || k[0] == 'X') && k[1] == '-'
-}
-
// VendorExtensible composition block.
type VendorExtensible struct {
Extensions Extensions
@@ -181,6 +169,9 @@ type Info struct {
// MarshalJSON marshal this to JSON
func (i Info) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(i)
+ }
b1, err := json.Marshal(i.InfoProps)
if err != nil {
return nil, err
@@ -192,6 +183,16 @@ func (i Info) MarshalJSON() ([]byte, error) {
return swag.ConcatJSON(b1, b2), nil
}
+func (i Info) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ Extensions
+ InfoProps
+ }
+ x.Extensions = i.Extensions
+ x.InfoProps = i.InfoProps
+ return opts.MarshalNext(enc, x)
+}
+
// UnmarshalJSON marshal this from JSON
func (i *Info) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
@@ -212,11 +213,7 @@ func (i *Info) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decod
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
- x.Extensions.sanitize()
- if len(x.Extensions) == 0 {
- x.Extensions = nil
- }
- i.VendorExtensible.Extensions = x.Extensions
+ i.Extensions = internal.SanitizeExtensions(x.Extensions)
i.InfoProps = x.InfoProps
return nil
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go
index 374f90d28..4132467d2 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/items.go
@@ -37,6 +37,18 @@ type SimpleSchema struct {
Example interface{} `json:"example,omitempty"`
}
+// Marshaling structure only, always edit along with corresponding
+// struct (or compilation will fail).
+type simpleSchemaOmitZero struct {
+ Type string `json:"type,omitempty"`
+ Nullable bool `json:"nullable,omitzero"`
+ Format string `json:"format,omitempty"`
+ Items *Items `json:"items,omitzero"`
+ CollectionFormat string `json:"collectionFormat,omitempty"`
+ Default interface{} `json:"default,omitempty"`
+ Example interface{} `json:"example,omitempty"`
+}
+
// CommonValidations describe common JSON-schema validations
type CommonValidations struct {
Maximum *float64 `json:"maximum,omitempty"`
@@ -53,6 +65,23 @@ type CommonValidations struct {
Enum []interface{} `json:"enum,omitempty"`
}
+// Marshaling structure only, always edit along with corresponding
+// struct (or compilation will fail).
+type commonValidationsOmitZero struct {
+ Maximum *float64 `json:"maximum,omitempty"`
+ ExclusiveMaximum bool `json:"exclusiveMaximum,omitzero"`
+ Minimum *float64 `json:"minimum,omitempty"`
+ ExclusiveMinimum bool `json:"exclusiveMinimum,omitzero"`
+ MaxLength *int64 `json:"maxLength,omitempty"`
+ MinLength *int64 `json:"minLength,omitempty"`
+ Pattern string `json:"pattern,omitempty"`
+ MaxItems *int64 `json:"maxItems,omitempty"`
+ MinItems *int64 `json:"minItems,omitempty"`
+ UniqueItems bool `json:"uniqueItems,omitzero"`
+ MultipleOf *float64 `json:"multipleOf,omitempty"`
+ Enum []interface{} `json:"enum,omitempty"`
+}
+
// Items a limited subset of JSON-Schema's items object.
// It is used by parameter definitions that are not located in "body".
//
@@ -105,18 +134,18 @@ func (i *Items) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Deco
if err := i.Refable.Ref.fromMap(x.Extensions); err != nil {
return err
}
- x.Extensions.sanitize()
- if len(x.Extensions) == 0 {
- x.Extensions = nil
- }
+
i.CommonValidations = x.CommonValidations
i.SimpleSchema = x.SimpleSchema
- i.VendorExtensible.Extensions = x.Extensions
+ i.Extensions = internal.SanitizeExtensions(x.Extensions)
return nil
}
// MarshalJSON converts this items object to JSON
func (i Items) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(i)
+ }
b1, err := json.Marshal(i.CommonValidations)
if err != nil {
return nil, err
@@ -135,3 +164,17 @@ func (i Items) MarshalJSON() ([]byte, error) {
}
return swag.ConcatJSON(b4, b3, b1, b2), nil
}
+
+func (i Items) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ CommonValidations commonValidationsOmitZero `json:",inline"`
+ SimpleSchema simpleSchemaOmitZero `json:",inline"`
+ Ref string `json:"$ref,omitempty"`
+ Extensions
+ }
+ x.CommonValidations = commonValidationsOmitZero(i.CommonValidations)
+ x.SimpleSchema = simpleSchemaOmitZero(i.SimpleSchema)
+ x.Ref = i.Refable.Ref.String()
+ x.Extensions = internal.SanitizeExtensions(i.Extensions)
+ return opts.MarshalNext(enc, x)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go
index 923769ae0..63eed3460 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/operation.go
@@ -42,6 +42,23 @@ type OperationProps struct {
Responses *Responses `json:"responses,omitempty"`
}
+// Marshaling structure only, always edit along with corresponding
+// struct (or compilation will fail).
+type operationPropsOmitZero struct {
+ Description string `json:"description,omitempty"`
+ Consumes []string `json:"consumes,omitempty"`
+ Produces []string `json:"produces,omitempty"`
+ Schemes []string `json:"schemes,omitempty"`
+ Tags []string `json:"tags,omitempty"`
+ Summary string `json:"summary,omitempty"`
+ ExternalDocs *ExternalDocumentation `json:"externalDocs,omitzero"`
+ ID string `json:"operationId,omitempty"`
+ Deprecated bool `json:"deprecated,omitempty,omitzero"`
+ Security []map[string][]string `json:"security,omitempty"`
+ Parameters []Parameter `json:"parameters,omitempty"`
+ Responses *Responses `json:"responses,omitzero"`
+}
+
// MarshalJSON takes care of serializing operation properties to JSON
//
// We use a custom marhaller here to handle a special cases related to
@@ -96,17 +113,16 @@ func (o *Operation) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
- x.Extensions.sanitize()
- if len(x.Extensions) == 0 {
- x.Extensions = nil
- }
- o.VendorExtensible.Extensions = x.Extensions
+ o.Extensions = internal.SanitizeExtensions(x.Extensions)
o.OperationProps = OperationProps(x.OperationPropsNoMethods)
return nil
}
// MarshalJSON converts this items object to JSON
func (o Operation) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(o)
+ }
b1, err := json.Marshal(o.OperationProps)
if err != nil {
return nil, err
@@ -118,3 +134,13 @@ func (o Operation) MarshalJSON() ([]byte, error) {
concated := swag.ConcatJSON(b1, b2)
return concated, nil
}
+
+func (o Operation) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ Extensions
+ OperationProps operationPropsOmitZero `json:",inline"`
+ }
+ x.Extensions = internal.SanitizeExtensions(o.Extensions)
+ x.OperationProps = operationPropsOmitZero(o.OperationProps)
+ return opts.MarshalNext(enc, x)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go
index 7cb229ac1..53d1e0aa9 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/parameter.go
@@ -36,6 +36,17 @@ type ParamProps struct {
AllowEmptyValue bool `json:"allowEmptyValue,omitempty"`
}
+// Marshaling structure only, always edit along with corresponding
+// struct (or compilation will fail).
+type paramPropsOmitZero struct {
+ Description string `json:"description,omitempty"`
+ Name string `json:"name,omitempty"`
+ In string `json:"in,omitempty"`
+ Required bool `json:"required,omitzero"`
+ Schema *Schema `json:"schema,omitzero"`
+ AllowEmptyValue bool `json:"allowEmptyValue,omitzero"`
+}
+
// Parameter a unique parameter is defined by a combination of a [name](#parameterName) and [location](#parameterIn).
//
// There are five possible parameter types.
@@ -109,19 +120,18 @@ func (p *Parameter) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.
if err := p.Refable.Ref.fromMap(x.Extensions); err != nil {
return err
}
- x.Extensions.sanitize()
- if len(x.Extensions) == 0 {
- x.Extensions = nil
- }
p.CommonValidations = x.CommonValidations
p.SimpleSchema = x.SimpleSchema
- p.VendorExtensible.Extensions = x.Extensions
+ p.Extensions = internal.SanitizeExtensions(x.Extensions)
p.ParamProps = x.ParamProps
return nil
}
// MarshalJSON converts this items object to JSON
func (p Parameter) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(p)
+ }
b1, err := json.Marshal(p.CommonValidations)
if err != nil {
return nil, err
@@ -144,3 +154,19 @@ func (p Parameter) MarshalJSON() ([]byte, error) {
}
return swag.ConcatJSON(b3, b1, b2, b4, b5), nil
}
+
+func (p Parameter) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ CommonValidations commonValidationsOmitZero `json:",inline"`
+ SimpleSchema simpleSchemaOmitZero `json:",inline"`
+ ParamProps paramPropsOmitZero `json:",inline"`
+ Ref string `json:"$ref,omitempty"`
+ Extensions
+ }
+ x.CommonValidations = commonValidationsOmitZero(p.CommonValidations)
+ x.SimpleSchema = simpleSchemaOmitZero(p.SimpleSchema)
+ x.Extensions = internal.SanitizeExtensions(p.Extensions)
+ x.ParamProps = paramPropsOmitZero(p.ParamProps)
+ x.Ref = p.Refable.Ref.String()
+ return opts.MarshalNext(enc, x)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go
index 03741fcfb..1d1588cb9 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/path_item.go
@@ -70,24 +70,20 @@ func (p *PathItem) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.D
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
-
- p.Extensions = x.Extensions
- p.PathItemProps = x.PathItemProps
-
- if err := p.Refable.Ref.fromMap(p.Extensions); err != nil {
+ if err := p.Refable.Ref.fromMap(x.Extensions); err != nil {
return err
}
-
- p.Extensions.sanitize()
- if len(p.Extensions) == 0 {
- p.Extensions = nil
- }
+ p.Extensions = internal.SanitizeExtensions(x.Extensions)
+ p.PathItemProps = x.PathItemProps
return nil
}
// MarshalJSON converts this items object to JSON
func (p PathItem) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(p)
+ }
b3, err := json.Marshal(p.Refable)
if err != nil {
return nil, err
@@ -103,3 +99,15 @@ func (p PathItem) MarshalJSON() ([]byte, error) {
concated := swag.ConcatJSON(b3, b4, b5)
return concated, nil
}
+
+func (p PathItem) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ Ref string `json:"$ref,omitempty"`
+ Extensions
+ PathItemProps
+ }
+ x.Ref = p.Refable.Ref.String()
+ x.Extensions = internal.SanitizeExtensions(p.Extensions)
+ x.PathItemProps = p.PathItemProps
+ return opts.MarshalNext(enc, x)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go
index 7c63d440a..18f6a9f42 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/paths.go
@@ -92,7 +92,7 @@ func (p *Paths) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Deco
}
switch k := tok.String(); {
- case isExtensionKey(k):
+ case internal.IsExtensionKey(k):
ext = nil
if err := opts.UnmarshalNext(dec, &ext); err != nil {
return err
@@ -114,7 +114,9 @@ func (p *Paths) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Deco
p.Paths[k] = pi
default:
_, err := dec.ReadValue() // skip value
- return err
+ if err != nil {
+ return err
+ }
}
}
default:
@@ -124,6 +126,9 @@ func (p *Paths) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Deco
// MarshalJSON converts this items object to JSON
func (p Paths) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(p)
+ }
b1, err := json.Marshal(p.VendorExtensible)
if err != nil {
return nil, err
@@ -142,3 +147,18 @@ func (p Paths) MarshalJSON() ([]byte, error) {
concated := swag.ConcatJSON(b1, b2)
return concated, nil
}
+
+func (p Paths) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ m := make(map[string]any, len(p.Extensions)+len(p.Paths))
+ for k, v := range p.Extensions {
+ if internal.IsExtensionKey(k) {
+ m[k] = v
+ }
+ }
+ for k, v := range p.Paths {
+ if strings.HasPrefix(k, "/") {
+ m[k] = v
+ }
+ }
+ return opts.MarshalNext(enc, m)
+}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/ref.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/ref.go
index 1405bfd8e..775b3b0c3 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/ref.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/ref.go
@@ -21,6 +21,8 @@ import (
"path/filepath"
"github.com/go-openapi/jsonreference"
+
+ "k8s.io/kube-openapi/pkg/internal"
)
// Refable is a struct for things that accept a $ref property
@@ -149,19 +151,5 @@ func (r *Ref) UnmarshalJSON(d []byte) error {
}
func (r *Ref) fromMap(v map[string]interface{}) error {
- if v == nil {
- return nil
- }
-
- if vv, ok := v["$ref"]; ok {
- if str, ok := vv.(string); ok {
- ref, err := jsonreference.New(str)
- if err != nil {
- return err
- }
- *r = Ref{Ref: ref}
- }
- }
-
- return nil
+ return internal.JSONRefFromMap(&r.Ref, v)
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go
index f01364b75..3ff1fe132 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/response.go
@@ -30,6 +30,15 @@ type ResponseProps struct {
Examples map[string]interface{} `json:"examples,omitempty"`
}
+// Marshaling structure only, always edit along with corresponding
+// struct (or compilation will fail).
+type responsePropsOmitZero struct {
+ Description string `json:"description,omitempty"`
+ Schema *Schema `json:"schema,omitzero"`
+ Headers map[string]Header `json:"headers,omitempty"`
+ Examples map[string]interface{} `json:"examples,omitempty"`
+}
+
// Response describes a single response from an API Operation.
//
// For more information: http://goo.gl/8us55a#responseObject
@@ -68,23 +77,20 @@ func (r *Response) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.D
return err
}
- r.Extensions = x.Extensions
- r.ResponseProps = x.ResponseProps
-
- if err := r.Refable.Ref.fromMap(r.Extensions); err != nil {
+ if err := r.Refable.Ref.fromMap(x.Extensions); err != nil {
return err
}
-
- r.Extensions.sanitize()
- if len(r.Extensions) == 0 {
- r.Extensions = nil
- }
+ r.Extensions = internal.SanitizeExtensions(x.Extensions)
+ r.ResponseProps = x.ResponseProps
return nil
}
// MarshalJSON converts this items object to JSON
func (r Response) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(r)
+ }
b1, err := json.Marshal(r.ResponseProps)
if err != nil {
return nil, err
@@ -100,6 +106,18 @@ func (r Response) MarshalJSON() ([]byte, error) {
return swag.ConcatJSON(b1, b2, b3), nil
}
+func (r Response) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ Ref string `json:"$ref,omitempty"`
+ Extensions
+ ResponseProps responsePropsOmitZero `json:",inline"`
+ }
+ x.Ref = r.Refable.Ref.String()
+ x.Extensions = internal.SanitizeExtensions(r.Extensions)
+ x.ResponseProps = responsePropsOmitZero(r.ResponseProps)
+ return opts.MarshalNext(enc, x)
+}
+
// NewResponse creates a new response instance
func NewResponse() *Response {
return new(Response)
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go
index c3fa68191..d9ad760a4 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/responses.go
@@ -63,6 +63,9 @@ func (r *Responses) UnmarshalJSON(data []byte) error {
// MarshalJSON converts this items object to JSON
func (r Responses) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(r)
+ }
b1, err := json.Marshal(r.ResponsesProps)
if err != nil {
return nil, err
@@ -75,6 +78,25 @@ func (r Responses) MarshalJSON() ([]byte, error) {
return concated, nil
}
+func (r Responses) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ type ArbitraryKeys map[string]interface{}
+ var x struct {
+ ArbitraryKeys
+ Default *Response `json:"default,omitempty"`
+ }
+ x.ArbitraryKeys = make(map[string]any, len(r.Extensions)+len(r.StatusCodeResponses))
+ for k, v := range r.Extensions {
+ if internal.IsExtensionKey(k) {
+ x.ArbitraryKeys[k] = v
+ }
+ }
+ for k, v := range r.StatusCodeResponses {
+ x.ArbitraryKeys[strconv.Itoa(k)] = v
+ }
+ x.Default = r.Default
+ return opts.MarshalNext(enc, x)
+}
+
// ResponsesProps describes all responses for an operation.
// It tells what is the default response and maps all responses with a
// HTTP status code.
@@ -148,7 +170,7 @@ func (r *Responses) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.
return nil
}
switch k := tok.String(); {
- case isExtensionKey(k):
+ case internal.IsExtensionKey(k):
ext = nil
if err := opts.UnmarshalNext(dec, &ext); err != nil {
return err
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go
index 9add0c163..dfbb2e05c 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/schema.go
@@ -196,6 +196,46 @@ type SchemaProps struct {
Definitions Definitions `json:"definitions,omitempty"`
}
+// Marshaling structure only, always edit along with corresponding
+// struct (or compilation will fail).
+type schemaPropsOmitZero struct {
+ ID string `json:"id,omitempty"`
+ Ref Ref `json:"-"`
+ Schema SchemaURL `json:"-"`
+ Description string `json:"description,omitempty"`
+ Type StringOrArray `json:"type,omitzero"`
+ Nullable bool `json:"nullable,omitzero"`
+ Format string `json:"format,omitempty"`
+ Title string `json:"title,omitempty"`
+ Default interface{} `json:"default,omitzero"`
+ Maximum *float64 `json:"maximum,omitempty"`
+ ExclusiveMaximum bool `json:"exclusiveMaximum,omitzero"`
+ Minimum *float64 `json:"minimum,omitempty"`
+ ExclusiveMinimum bool `json:"exclusiveMinimum,omitzero"`
+ MaxLength *int64 `json:"maxLength,omitempty"`
+ MinLength *int64 `json:"minLength,omitempty"`
+ Pattern string `json:"pattern,omitempty"`
+ MaxItems *int64 `json:"maxItems,omitempty"`
+ MinItems *int64 `json:"minItems,omitempty"`
+ UniqueItems bool `json:"uniqueItems,omitzero"`
+ MultipleOf *float64 `json:"multipleOf,omitempty"`
+ Enum []interface{} `json:"enum,omitempty"`
+ MaxProperties *int64 `json:"maxProperties,omitempty"`
+ MinProperties *int64 `json:"minProperties,omitempty"`
+ Required []string `json:"required,omitempty"`
+ Items *SchemaOrArray `json:"items,omitzero"`
+ AllOf []Schema `json:"allOf,omitempty"`
+ OneOf []Schema `json:"oneOf,omitempty"`
+ AnyOf []Schema `json:"anyOf,omitempty"`
+ Not *Schema `json:"not,omitzero"`
+ Properties map[string]Schema `json:"properties,omitempty"`
+ AdditionalProperties *SchemaOrBool `json:"additionalProperties,omitzero"`
+ PatternProperties map[string]Schema `json:"patternProperties,omitempty"`
+ Dependencies Dependencies `json:"dependencies,omitempty"`
+ AdditionalItems *SchemaOrBool `json:"additionalItems,omitzero"`
+ Definitions Definitions `json:"definitions,omitempty"`
+}
+
// SwaggerSchemaProps are additional properties supported by swagger schemas, but not JSON-schema (draft 4)
type SwaggerSchemaProps struct {
Discriminator string `json:"discriminator,omitempty"`
@@ -204,6 +244,15 @@ type SwaggerSchemaProps struct {
Example interface{} `json:"example,omitempty"`
}
+// Marshaling structure only, always edit along with corresponding
+// struct (or compilation will fail).
+type swaggerSchemaPropsOmitZero struct {
+ Discriminator string `json:"discriminator,omitempty"`
+ ReadOnly bool `json:"readOnly,omitzero"`
+ ExternalDocs *ExternalDocumentation `json:"externalDocs,omitzero"`
+ Example interface{} `json:"example,omitempty"`
+}
+
// Schema the schema object allows the definition of input and output data types.
// These types can be objects, but also primitives and arrays.
// This object is based on the [JSON Schema Specification Draft 4](http://json-schema.org/)
@@ -434,6 +483,9 @@ func (s *Schema) WithExternalDocs(description, url string) *Schema {
// MarshalJSON marshal this to JSON
func (s Schema) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(s)
+ }
b1, err := json.Marshal(s.SchemaProps)
if err != nil {
return nil, fmt.Errorf("schema props %v", err)
@@ -465,6 +517,31 @@ func (s Schema) MarshalJSON() ([]byte, error) {
return swag.ConcatJSON(b1, b2, b3, b4, b5, b6), nil
}
+func (s Schema) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ type ArbitraryKeys map[string]interface{}
+ var x struct {
+ ArbitraryKeys
+ SchemaProps schemaPropsOmitZero `json:",inline"`
+ SwaggerSchemaProps swaggerSchemaPropsOmitZero `json:",inline"`
+ Schema string `json:"$schema,omitempty"`
+ Ref string `json:"$ref,omitempty"`
+ }
+ x.ArbitraryKeys = make(map[string]any, len(s.Extensions)+len(s.ExtraProps))
+ for k, v := range s.Extensions {
+ if internal.IsExtensionKey(k) {
+ x.ArbitraryKeys[k] = v
+ }
+ }
+ for k, v := range s.ExtraProps {
+ x.ArbitraryKeys[k] = v
+ }
+ x.SchemaProps = schemaPropsOmitZero(s.SchemaProps)
+ x.SwaggerSchemaProps = swaggerSchemaPropsOmitZero(s.SwaggerSchemaProps)
+ x.Ref = s.Ref.String()
+ x.Schema = string(s.Schema)
+ return opts.MarshalNext(enc, x)
+}
+
// UnmarshalJSON marshal this from JSON
func (s *Schema) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
@@ -547,7 +624,7 @@ func (s *Schema) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Dec
}
s.ExtraProps = x.Extensions.sanitizeWithExtra()
- s.VendorExtensible.Extensions = x.Extensions
+ s.Extensions = internal.SanitizeExtensions(x.Extensions)
s.SchemaProps = x.SchemaProps
s.SwaggerSchemaProps = x.SwaggerSchemaProps
return nil
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go
index 34723fb71..e2b7da14c 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/security_scheme.go
@@ -18,6 +18,7 @@ import (
"encoding/json"
"github.com/go-openapi/swag"
+ "k8s.io/kube-openapi/pkg/internal"
jsonv2 "k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json"
)
@@ -45,6 +46,9 @@ type SecurityScheme struct {
// MarshalJSON marshal this to JSON
func (s SecurityScheme) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(s)
+ }
b1, err := json.Marshal(s.SecuritySchemeProps)
if err != nil {
return nil, err
@@ -56,6 +60,16 @@ func (s SecurityScheme) MarshalJSON() ([]byte, error) {
return swag.ConcatJSON(b1, b2), nil
}
+func (s SecurityScheme) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ Extensions
+ SecuritySchemeProps
+ }
+ x.Extensions = internal.SanitizeExtensions(s.Extensions)
+ x.SecuritySchemeProps = s.SecuritySchemeProps
+ return opts.MarshalNext(enc, x)
+}
+
// UnmarshalJSON marshal this from JSON
func (s *SecurityScheme) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, &s.SecuritySchemeProps); err != nil {
@@ -72,11 +86,7 @@ func (s *SecurityScheme) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *js
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
- x.Extensions.sanitize()
- if len(x.Extensions) == 0 {
- x.Extensions = nil
- }
- s.VendorExtensible.Extensions = x.Extensions
+ s.Extensions = internal.SanitizeExtensions(x.Extensions)
s.SecuritySchemeProps = x.SecuritySchemeProps
return nil
}
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go
index f6cb7da3f..c8f3beaa3 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/swagger.go
@@ -35,6 +35,9 @@ type Swagger struct {
// MarshalJSON marshals this swagger structure to json
func (s Swagger) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(s)
+ }
b1, err := json.Marshal(s.SwaggerProps)
if err != nil {
return nil, err
@@ -46,12 +49,22 @@ func (s Swagger) MarshalJSON() ([]byte, error) {
return swag.ConcatJSON(b1, b2), nil
}
+// MarshalJSON marshals this swagger structure to json
+func (s Swagger) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ Extensions
+ SwaggerProps
+ }
+ x.Extensions = internal.SanitizeExtensions(s.Extensions)
+ x.SwaggerProps = s.SwaggerProps
+ return opts.MarshalNext(enc, x)
+}
+
// UnmarshalJSON unmarshals a swagger spec from json
func (s *Swagger) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
return jsonv2.Unmarshal(data, s)
}
-
var sw Swagger
if err := json.Unmarshal(data, &sw.SwaggerProps); err != nil {
return err
@@ -75,15 +88,8 @@ func (s *Swagger) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.De
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
-
- s.Extensions = x.Extensions
+ s.Extensions = internal.SanitizeExtensions(x.Extensions)
s.SwaggerProps = x.SwaggerProps
-
- s.Extensions.sanitize()
- if len(s.Extensions) == 0 {
- s.Extensions = nil
- }
-
return nil
}
@@ -126,6 +132,9 @@ var jsFalse = []byte("false")
// MarshalJSON convert this object to JSON
func (s SchemaOrBool) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(s)
+ }
if s.Schema != nil {
return json.Marshal(s.Schema)
}
@@ -136,6 +145,18 @@ func (s SchemaOrBool) MarshalJSON() ([]byte, error) {
return jsTrue, nil
}
+// MarshalJSON convert this object to JSON
+func (s SchemaOrBool) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ if s.Schema != nil {
+ return opts.MarshalNext(enc, s.Schema)
+ }
+
+ if s.Schema == nil && !s.Allows {
+ return enc.WriteToken(jsonv2.False)
+ }
+ return enc.WriteToken(jsonv2.True)
+}
+
// UnmarshalJSON converts this bool or schema object from a JSON structure
func (s *SchemaOrBool) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
@@ -143,15 +164,15 @@ func (s *SchemaOrBool) UnmarshalJSON(data []byte) error {
}
var nw SchemaOrBool
- if len(data) >= 4 {
- if data[0] == '{' {
- var sch Schema
- if err := json.Unmarshal(data, &sch); err != nil {
- return err
- }
- nw.Schema = &sch
+ if len(data) > 0 && data[0] == '{' {
+ var sch Schema
+ if err := json.Unmarshal(data, &sch); err != nil {
+ return err
}
- nw.Allows = !(data[0] == 'f' && data[1] == 'a' && data[2] == 'l' && data[3] == 's' && data[4] == 'e')
+ nw.Schema = &sch
+ nw.Allows = true
+ } else {
+ json.Unmarshal(data, &nw.Allows)
}
*s = nw
return nil
@@ -185,6 +206,9 @@ type SchemaOrStringArray struct {
// MarshalJSON converts this schema object or array into JSON structure
func (s SchemaOrStringArray) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(s)
+ }
if len(s.Property) > 0 {
return json.Marshal(s.Property)
}
@@ -194,6 +218,17 @@ func (s SchemaOrStringArray) MarshalJSON() ([]byte, error) {
return []byte("null"), nil
}
+// MarshalJSON converts this schema object or array into JSON structure
+func (s SchemaOrStringArray) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ if len(s.Property) > 0 {
+ return opts.MarshalNext(enc, s.Property)
+ }
+ if s.Schema != nil {
+ return opts.MarshalNext(enc, s.Schema)
+ }
+ return enc.WriteToken(jsonv2.Null)
+}
+
// UnmarshalJSON converts this schema object or array from a JSON structure
func (s *SchemaOrStringArray) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
@@ -347,12 +382,23 @@ func (s *SchemaOrArray) ContainsType(name string) bool {
// MarshalJSON converts this schema object or array into JSON structure
func (s SchemaOrArray) MarshalJSON() ([]byte, error) {
- if len(s.Schemas) > 0 {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(s)
+ }
+ if s.Schemas != nil {
return json.Marshal(s.Schemas)
}
return json.Marshal(s.Schema)
}
+// MarshalJSON converts this schema object or array into JSON structure
+func (s SchemaOrArray) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ if s.Schemas != nil {
+ return opts.MarshalNext(enc, s.Schemas)
+ }
+ return opts.MarshalNext(enc, s.Schema)
+}
+
// UnmarshalJSON converts this schema object or array from a JSON structure
func (s *SchemaOrArray) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
diff --git a/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go b/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go
index 69e93b60b..d105d52ca 100644
--- a/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go
+++ b/vendor/k8s.io/kube-openapi/pkg/validation/spec/tag.go
@@ -41,6 +41,9 @@ type Tag struct {
// MarshalJSON marshal this to JSON
func (t Tag) MarshalJSON() ([]byte, error) {
+ if internal.UseOptimizedJSONMarshaling {
+ return internal.DeterministicMarshal(t)
+ }
b1, err := json.Marshal(t.TagProps)
if err != nil {
return nil, err
@@ -52,6 +55,16 @@ func (t Tag) MarshalJSON() ([]byte, error) {
return swag.ConcatJSON(b1, b2), nil
}
+func (t Tag) MarshalNextJSON(opts jsonv2.MarshalOptions, enc *jsonv2.Encoder) error {
+ var x struct {
+ Extensions
+ TagProps
+ }
+ x.Extensions = internal.SanitizeExtensions(t.Extensions)
+ x.TagProps = t.TagProps
+ return opts.MarshalNext(enc, x)
+}
+
// UnmarshalJSON marshal this from JSON
func (t *Tag) UnmarshalJSON(data []byte) error {
if internal.UseOptimizedJSONUnmarshaling {
@@ -72,11 +85,7 @@ func (t *Tag) UnmarshalNextJSON(opts jsonv2.UnmarshalOptions, dec *jsonv2.Decode
if err := opts.UnmarshalNext(dec, &x); err != nil {
return err
}
- x.Extensions.sanitize()
- if len(x.Extensions) == 0 {
- x.Extensions = nil
- }
- t.VendorExtensible.Extensions = x.Extensions
+ t.Extensions = internal.SanitizeExtensions(x.Extensions)
t.TagProps = x.TagProps
return nil
}
diff --git a/vendor/k8s.io/utils/trace/trace.go b/vendor/k8s.io/utils/trace/trace.go
index a0b07a6d7..187eb5d8c 100644
--- a/vendor/k8s.io/utils/trace/trace.go
+++ b/vendor/k8s.io/utils/trace/trace.go
@@ -65,6 +65,11 @@ func durationToMilliseconds(timeDuration time.Duration) int64 {
}
type traceItem interface {
+ // rLock must be called before invoking time or writeItem.
+ rLock()
+ // rUnlock must be called after processing the item is complete.
+ rUnlock()
+
// time returns when the trace was recorded as completed.
time() time.Time
// writeItem outputs the traceItem to the buffer. If stepThreshold is non-nil, only output the
@@ -79,6 +84,10 @@ type traceStep struct {
fields []Field
}
+// rLock doesn't need to do anything because traceStep instances are immutable.
+func (s traceStep) rLock() {}
+func (s traceStep) rUnlock() {}
+
func (s traceStep) time() time.Time {
return s.stepTime
}
@@ -106,6 +115,14 @@ type Trace struct {
traceItems []traceItem
}
+func (t *Trace) rLock() {
+ t.lock.RLock()
+}
+
+func (t *Trace) rUnlock() {
+ t.lock.RUnlock()
+}
+
func (t *Trace) time() time.Time {
if t.endTime != nil {
return *t.endTime
@@ -231,8 +248,10 @@ func (t *Trace) logTrace() {
func (t *Trace) writeTraceSteps(b *bytes.Buffer, formatter string, stepThreshold *time.Duration) {
lastStepTime := t.startTime
for _, stepOrTrace := range t.traceItems {
+ stepOrTrace.rLock()
stepOrTrace.writeItem(b, formatter, lastStepTime, stepThreshold)
lastStepTime = stepOrTrace.time()
+ stepOrTrace.rUnlock()
}
}
diff --git a/vendor/knative.dev/eventing/pkg/adapter/v2/cloudevents.go b/vendor/knative.dev/eventing/pkg/adapter/v2/cloudevents.go
index 6ecc37f53..dae960b5e 100644
--- a/vendor/knative.dev/eventing/pkg/adapter/v2/cloudevents.go
+++ b/vendor/knative.dev/eventing/pkg/adapter/v2/cloudevents.go
@@ -31,11 +31,11 @@ import (
"github.com/cloudevents/sdk-go/v2/protocol"
"github.com/cloudevents/sdk-go/v2/protocol/http"
"go.opencensus.io/plugin/ochttp"
-
duckv1 "knative.dev/pkg/apis/duck/v1"
"knative.dev/pkg/tracing/propagation/tracecontextb3"
"knative.dev/eventing/pkg/adapter/v2/util/crstatusevent"
+ "knative.dev/eventing/pkg/eventingtls"
"knative.dev/eventing/pkg/metrics/source"
obsclient "knative.dev/eventing/pkg/observability/client"
)
@@ -92,8 +92,25 @@ func newCloudEventsClientCRStatus(env EnvConfigAccessor, ceOverrides *duckv1.Clo
if sinkWait := env.GetSinktimeout(); sinkWait > 0 {
pOpts = append(pOpts, setTimeOut(time.Duration(sinkWait)*time.Second))
}
- var err error
+ if caCerts := env.GetCACerts(); (caCerts != nil && *caCerts != "") && eventingtls.IsHttpsSink(env.GetSink()) {
+ var err error
+
+ clientConfig := eventingtls.NewDefaultClientConfig()
+ clientConfig.CACerts = caCerts
+
+ transport := nethttp.DefaultTransport.(*nethttp.Transport).Clone()
+ transport.TLSClientConfig, err = eventingtls.GetTLSClientConfig(clientConfig)
+ if err != nil {
+ return nil, err
+ }
+
+ pOpts = append(pOpts, http.WithRoundTripper(&ochttp.Transport{
+ Base: transport,
+ Propagation: tracecontextb3.TraceContextEgress,
+ }))
+ }
if ceOverrides == nil {
+ var err error
ceOverrides, err = env.GetCloudEventOverrides()
if err != nil {
return nil, err
diff --git a/vendor/knative.dev/eventing/pkg/adapter/v2/config.go b/vendor/knative.dev/eventing/pkg/adapter/v2/config.go
index ba499be49..9cfafcd79 100644
--- a/vendor/knative.dev/eventing/pkg/adapter/v2/config.go
+++ b/vendor/knative.dev/eventing/pkg/adapter/v2/config.go
@@ -65,6 +65,11 @@ type EnvConfig struct {
// Sink is the URI messages will be sent.
Sink string `envconfig:"K_SINK"`
+ // CACerts are the Certification Authority (CA) certificates in PEM format
+ // according to https://www.rfc-editor.org/rfc/rfc7468.
+ // +optional
+ CACerts *string `envconfig:"K_CA_CERTS"`
+
// CEOverrides are the CloudEvents overrides to be applied to the outbound event.
CEOverrides string `envconfig:"K_CE_OVERRIDES"`
@@ -104,6 +109,9 @@ type EnvConfigAccessor interface {
// Get the URI where messages will be forwarded to.
GetSink() string
+ // GetCACerts gets the CACerts of the Sink.
+ GetCACerts() *string
+
// Get the namespace of the adapter.
GetNamespace() string
@@ -163,6 +171,10 @@ func (e *EnvConfig) GetSink() string {
return e.Sink
}
+func (e *EnvConfig) GetCACerts() *string {
+ return e.CACerts
+}
+
func (e *EnvConfig) GetNamespace() string {
return e.Namespace
}
diff --git a/vendor/knative.dev/eventing/pkg/apis/duck/v1/channelable_types.go b/vendor/knative.dev/eventing/pkg/apis/duck/v1/channelable_types.go
index 39784fcaf..fef82764d 100644
--- a/vendor/knative.dev/eventing/pkg/apis/duck/v1/channelable_types.go
+++ b/vendor/knative.dev/eventing/pkg/apis/duck/v1/channelable_types.go
@@ -67,11 +67,6 @@ type ChannelableStatus struct {
// resolved delivery options.
// +optional
DeliveryStatus `json:",inline"`
- // DeadLetterChannel is a KReference and is set by the channel when it supports native error handling via a channel
- // Failed messages are delivered here.
- // Deprecated in favor of DeliveryStatus, to be removed September 2022.
- // +optional
- DeadLetterChannel *duckv1.KReference `json:"deadLetterChannel,omitempty"`
}
var (
diff --git a/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go b/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go
index 1ba69456e..d91a3ff62 100644
--- a/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/eventing/pkg/apis/duck/v1/zz_generated.deepcopy.go
@@ -117,11 +117,6 @@ func (in *ChannelableStatus) DeepCopyInto(out *ChannelableStatus) {
in.AddressStatus.DeepCopyInto(&out.AddressStatus)
in.SubscribableStatus.DeepCopyInto(&out.SubscribableStatus)
in.DeliveryStatus.DeepCopyInto(&out.DeliveryStatus)
- if in.DeadLetterChannel != nil {
- in, out := &in.DeadLetterChannel, &out.DeadLetterChannel
- *out = new(duckv1.KReference)
- **out = **in
- }
return
}
diff --git a/vendor/knative.dev/eventing/pkg/apis/feature/features.go b/vendor/knative.dev/eventing/pkg/apis/feature/features.go
index b12355886..9f6946097 100644
--- a/vendor/knative.dev/eventing/pkg/apis/feature/features.go
+++ b/vendor/knative.dev/eventing/pkg/apis/feature/features.go
@@ -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)
}
diff --git a/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go b/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go
index 65a78d06f..d8dccea6d 100644
--- a/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go
+++ b/vendor/knative.dev/eventing/pkg/apis/feature/flag_names.go
@@ -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"
)
diff --git a/vendor/knative.dev/eventing/pkg/eventingtls/eventingtls.go b/vendor/knative.dev/eventing/pkg/eventingtls/eventingtls.go
new file mode 100644
index 000000000..4e394952a
--- /dev/null
+++ b/vendor/knative.dev/eventing/pkg/eventingtls/eventingtls.go
@@ -0,0 +1,197 @@
+/*
+Copyright 2023 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 eventingtls
+
+import (
+ "context"
+ "crypto/tls"
+ "crypto/x509"
+ "fmt"
+ "strings"
+ "sync/atomic"
+
+ "go.uber.org/zap"
+ corev1 "k8s.io/api/core/v1"
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/types"
+ coreinformersv1 "k8s.io/client-go/informers/core/v1"
+ "k8s.io/client-go/kubernetes"
+ "k8s.io/client-go/tools/cache"
+ "knative.dev/pkg/apis"
+ "knative.dev/pkg/controller"
+ "knative.dev/pkg/logging"
+)
+
+const (
+ // TLSKey is the key in the TLS secret for the private key of TLS servers
+ TLSKey = "tls.key"
+ // TLSCrt is the key in the TLS secret for the public key of TLS servers
+ TLSCrt = "tls.crt"
+ // DefaultMinTLSVersion is the default minimum TLS version for servers and clients.
+ DefaultMinTLSVersion = tls.VersionTLS12
+)
+
+type ClientConfig struct {
+ // CACerts are Certification Authority (CA) certificates in PEM format
+ // according to https://www.rfc-editor.org/rfc/rfc7468.
+ CACerts *string
+}
+
+type ServerConfig struct {
+ // GetCertificate returns a Certificate based on the given
+ // ClientHelloInfo. It will only be called if the client supplies SNI
+ // information or if Certificates is empty.
+ //
+ // If GetCertificate is nil or returns nil, then the certificate is
+ // retrieved from NameToCertificate. If NameToCertificate is nil, the
+ // best element of Certificates will be used.
+ GetCertificate func(*tls.ClientHelloInfo) (*tls.Certificate, error)
+}
+
+// GetCertificate returns a Certificate based on the given
+// ClientHelloInfo. It will only be called if the client supplies SNI
+// information or if Certificates is empty.
+//
+// If GetCertificate is nil or returns nil, then the certificate is
+// retrieved from NameToCertificate. If NameToCertificate is nil, the
+// best element of Certificates will be used.
+type GetCertificate func(*tls.ClientHelloInfo) (*tls.Certificate, error)
+
+// GetCertificateFromSecret returns a GetCertificate function that will automatically return
+// the latest certificate that is present in the provided secret.
+//
+// The secret is expected to have at least 2 keys in data: see TLSKey and TLSCrt constants for
+// knowing the key names.
+func GetCertificateFromSecret(ctx context.Context, informer coreinformersv1.SecretInformer, kube kubernetes.Interface, secret types.NamespacedName) GetCertificate {
+
+ certHolder := atomic.Value{}
+
+ logger := logging.FromContext(ctx).Desugar().
+ With(zap.String("tls.secret", secret.String()))
+
+ store := func(obj interface{}) {
+ s, ok := obj.(*corev1.Secret)
+ if !ok {
+ return
+ }
+ crt, crtOk := s.Data[TLSCrt]
+ key, keyOk := s.Data[TLSKey]
+ if !crtOk || !keyOk {
+ logger.Debug("Missing " + TLSCrt + " or " + TLSKey + " in the secret.data")
+ return
+ }
+
+ logger.Debug("Loading key pair")
+
+ certificate, err := tls.X509KeyPair(crt, key)
+ if err != nil {
+ logger.Error("Failed to create x.509 key pair", zap.Error(err))
+ return
+ }
+
+ logger.Debug("certificate stored")
+ certHolder.Store(&certificate)
+ }
+
+ informer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
+ FilterFunc: controller.FilterWithNameAndNamespace(secret.Namespace, secret.Name),
+ Handler: cache.ResourceEventHandlerFuncs{
+ AddFunc: store,
+ UpdateFunc: func(_, newObj interface{}) {
+ store(newObj)
+ },
+ DeleteFunc: nil,
+ },
+ })
+
+ // Store the current value so that we have certHolder initialized.
+ firstValue, err := informer.Lister().Secrets(secret.Namespace).Get(secret.Name)
+ if err != nil {
+ // Try to get the secret from the API Server when the lister failed.
+ firstValue, err = kube.CoreV1().Secrets(secret.Namespace).Get(ctx, secret.Name, metav1.GetOptions{})
+ if err != nil {
+ logger.Fatal(err.Error())
+ }
+ }
+ store(firstValue)
+
+ return func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
+ cert := certHolder.Load()
+ if cert == nil {
+ return nil, nil
+ }
+ return cert.(*tls.Certificate), nil
+ }
+}
+
+// NewDefaultClientConfig returns a default ClientConfig.
+func NewDefaultClientConfig() ClientConfig {
+ return ClientConfig{}
+}
+
+// GetTLSClientConfig returns tls.Config based on the given ClientConfig.
+func GetTLSClientConfig(config ClientConfig) (*tls.Config, error) {
+ pool, err := certPool(config.CACerts)
+ if err != nil {
+ return nil, err
+ }
+
+ return &tls.Config{
+ RootCAs: pool,
+ MinVersion: DefaultMinTLSVersion,
+ }, nil
+}
+
+func NewDefaultServerConfig() ServerConfig {
+ return ServerConfig{}
+}
+
+func GetTLSServerConfig(config ServerConfig) (*tls.Config, error) {
+ return &tls.Config{
+ MinVersion: DefaultMinTLSVersion,
+ GetCertificate: config.GetCertificate,
+ }, nil
+}
+
+// IsHttpsSink returns true if the sink has scheme equal to https.
+func IsHttpsSink(sink string) bool {
+ s, err := apis.ParseURL(sink)
+ if err != nil {
+ return false
+ }
+ return strings.EqualFold(s.Scheme, "https")
+}
+
+// certPool returns a x509.CertPool with the combined certs from:
+// - the system cert pool
+// - the given CA certificates
+func certPool(caCerts *string) (*x509.CertPool, error) {
+ p, err := x509.SystemCertPool()
+ if err != nil {
+ return nil, err
+ }
+
+ if caCerts == nil || *caCerts == "" {
+ return p, nil
+ }
+
+ if ok := p.AppendCertsFromPEM([]byte(*caCerts)); !ok {
+ return p, fmt.Errorf("failed to append CA certs from PEM")
+ }
+
+ return p, nil
+}
diff --git a/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go b/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go
index 9632d27bc..8916e4f2c 100644
--- a/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go
+++ b/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go
@@ -18,6 +18,7 @@ package kncloudevents
import (
"context"
+ "crypto/tls"
"fmt"
"net"
"net/http"
@@ -78,6 +79,17 @@ func WithDrainQuietPeriod(duration time.Duration) HTTPMessageReceiverOption {
}
}
+// WithTLSConfig configures the TLS config for the receiver.
+func WithTLSConfig(cfg *tls.Config) HTTPMessageReceiverOption {
+ return func(h *HTTPMessageReceiver) {
+ if h.server == nil {
+ h.server = newServer()
+ }
+
+ h.server.TLSConfig = cfg
+ }
+}
+
// WithWriteTimeout sets the HTTP server's WriteTimeout. It covers the time between end of reading
// Request Header to end of writing response.
func WithWriteTimeout(duration time.Duration) HTTPMessageReceiverOption {
@@ -123,7 +135,11 @@ func (recv *HTTPMessageReceiver) StartListen(ctx context.Context, handler http.H
errChan := make(chan error, 1)
go func() {
close(recv.Ready)
- errChan <- recv.server.Serve(recv.listener)
+ if recv.server.TLSConfig == nil {
+ errChan <- recv.server.Serve(recv.listener)
+ } else {
+ errChan <- recv.server.ServeTLS(recv.listener, "", "")
+ }
}()
// wait for the server to return or ctx.Done().
diff --git a/vendor/knative.dev/eventing/pkg/kncloudevents/message_sender.go b/vendor/knative.dev/eventing/pkg/kncloudevents/message_sender.go
index 2eeecef51..1940439ad 100644
--- a/vendor/knative.dev/eventing/pkg/kncloudevents/message_sender.go
+++ b/vendor/knative.dev/eventing/pkg/kncloudevents/message_sender.go
@@ -34,12 +34,6 @@ type HTTPMessageSender struct {
Target string
}
-// Deprecated: Don't use this anymore, now it has the same effect of NewHTTPMessageSenderWithTarget
-// If you need to modify the connection args, use ConfigureConnectionArgs sparingly.
-func NewHTTPMessageSender(ca *ConnectionArgs, target string) (*HTTPMessageSender, error) {
- return NewHTTPMessageSenderWithTarget(target)
-}
-
func NewHTTPMessageSenderWithTarget(target string) (*HTTPMessageSender, error) {
return &HTTPMessageSender{Client: getClient(), Target: target}, nil
}
diff --git a/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go b/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go
index c51ad6661..c8b30f913 100644
--- a/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go
+++ b/vendor/knative.dev/eventing/pkg/kncloudevents/retries.go
@@ -83,7 +83,7 @@ func RetryConfigFromDeliverySpec(spec v1.DeliverySpec) (RetryConfig, error) {
retryConfig := NoRetries()
- retryConfig.CheckRetry = RetryIfGreaterThan300
+ retryConfig.CheckRetry = SelectiveRetry
if spec.Retry != nil {
retryConfig.RetryMax = int(*spec.Retry)
@@ -131,11 +131,6 @@ func RetryConfigFromDeliverySpec(spec v1.DeliverySpec) (RetryConfig, error) {
return retryConfig, nil
}
-// RetryIfGreaterThan300 is a simple default implementation
-func RetryIfGreaterThan300(_ context.Context, response *http.Response, err error) (bool, error) {
- return !(response != nil && (response.StatusCode < 300 && response.StatusCode != -1)), err
-}
-
// SelectiveRetry is an alternative function to determine whether to retry based on response
//
// Note - Returning true indicates a retry should occur. Returning an error will result in that
diff --git a/vendor/knative.dev/pkg/apis/duck/v1/addressable_types.go b/vendor/knative.dev/pkg/apis/duck/v1/addressable_types.go
index 83e746a00..bdcb994fa 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1/addressable_types.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1/addressable_types.go
@@ -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",
diff --git a/vendor/knative.dev/pkg/apis/duck/v1/destination.go b/vendor/knative.dev/pkg/apis/duck/v1/destination.go
index c895e6d29..15638f401 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1/destination.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1/destination.go
@@ -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
diff --git a/vendor/knative.dev/pkg/apis/duck/v1/knative_reference.go b/vendor/knative.dev/pkg/apis/duck/v1/knative_reference.go
index a0b169d6f..4d03b6b97 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1/knative_reference.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1/knative_reference.go
@@ -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 {
@@ -124,3 +128,12 @@ func isKReferenceGroupAllowed(ctx context.Context) bool {
func KReferenceGroupAllowed(ctx context.Context) context.Context {
return context.WithValue(ctx, isGroupAllowed{}, struct{}{})
}
+
+func (kr *KReference) String() string {
+ address := ""
+ if kr.Address != nil {
+ address = *kr.Address
+ }
+ return fmt.Sprintf("Kind = %s, Namespace = %s, Name = %s, APIVersion = %s, Group = %s, Address = %s",
+ kr.Kind, kr.Namespace, kr.Name, kr.APIVersion, kr.Group, address)
+}
diff --git a/vendor/knative.dev/pkg/apis/duck/v1/source_types.go b/vendor/knative.dev/pkg/apis/duck/v1/source_types.go
index bed832f32..1f6740346 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1/source_types.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1/source_types.go
@@ -84,6 +84,11 @@ type SourceStatus struct {
// as part of its CloudEvents.
// +optional
CloudEventAttributes []CloudEventAttributes `json:"ceAttributes,omitempty"`
+
+ // SinkCACerts are Certification Authority (CA) certificates in PEM format
+ // according to https://www.rfc-editor.org/rfc/rfc7468.
+ // +optional
+ SinkCACerts *string `json:"sinkCACerts,omitempty"`
}
// CloudEventAttributes specifies the attributes that a Source
diff --git a/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go b/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go
index 96638e579..744a38bb0 100644
--- a/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go
+++ b/vendor/knative.dev/pkg/apis/duck/v1/zz_generated.deepcopy.go
@@ -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
}
@@ -603,6 +630,11 @@ func (in *SourceStatus) DeepCopyInto(out *SourceStatus) {
*out = make([]CloudEventAttributes, len(*in))
copy(*out, *in)
}
+ if in.SinkCACerts != nil {
+ in, out := &in.SinkCACerts, &out.SinkCACerts
+ *out = new(string)
+ **out = **in
+ }
return
}
diff --git a/vendor/knative.dev/pkg/injection/health_check.go b/vendor/knative.dev/pkg/injection/health_check.go
index 2899c7e35..d4eb7fd46 100644
--- a/vendor/knative.dev/pkg/injection/health_check.go
+++ b/vendor/knative.dev/pkg/injection/health_check.go
@@ -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
}
diff --git a/vendor/knative.dev/pkg/metrics/config.go b/vendor/knative.dev/pkg/metrics/config.go
index 3fe3c1737..ce5e7f875 100644
--- a/vendor/knative.dev/pkg/metrics/config.go
+++ b/vendor/knative.dev/pkg/metrics/config.go
@@ -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
diff --git a/vendor/knative.dev/pkg/metrics/config_observability.go b/vendor/knative.dev/pkg/metrics/config_observability.go
index b6affd293..e766b071b 100644
--- a/vendor/knative.dev/pkg/metrics/config_observability.go
+++ b/vendor/knative.dev/pkg/metrics/config_observability.go
@@ -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
+}
diff --git a/vendor/knative.dev/pkg/metrics/opencensus_exporter.go b/vendor/knative.dev/pkg/metrics/opencensus_exporter.go
index eaeac4a56..59e33ab09 100644
--- a/vendor/knative.dev/pkg/metrics/opencensus_exporter.go
+++ b/vendor/knative.dev/pkg/metrics/opencensus_exporter.go
@@ -99,7 +99,7 @@ func getCredentials(component string, secret *corev1.Secret, logger *zap.Sugared
return nil
}
return credentials.NewTLS(&tls.Config{
- MinVersion: tls.VersionTLS12,
+ MinVersion: tls.VersionTLS13,
GetClientCertificate: func(*tls.CertificateRequestInfo) (*tls.Certificate, error) {
cert, err := tls.X509KeyPair(secret.Data["client-cert.pem"], secret.Data["client-key.pem"])
if err != nil {
diff --git a/vendor/knative.dev/pkg/webhook/env.go b/vendor/knative.dev/pkg/webhook/env.go
index da8a1bd89..ffb757011 100644
--- a/vendor/knative.dev/pkg/webhook/env.go
+++ b/vendor/knative.dev/pkg/webhook/env.go
@@ -17,6 +17,7 @@ limitations under the License.
package webhook
import (
+ "crypto/tls"
"fmt"
"os"
"strconv"
@@ -29,6 +30,8 @@ const (
webhookNameEnvKey = "WEBHOOK_NAME"
secretNameEnvKey = "WEBHOOK_SECRET_NAME" //nolint:gosec // This is not a hardcoded credential
+
+ tlsMinVersionEnvKey = "WEBHOOK_TLS_MIN_VERSION"
)
// PortFromEnv returns the webhook port set by portEnvKey, or default port if env var is not set.
@@ -66,3 +69,16 @@ func SecretNameFromEnv(defaultSecretName string) string {
}
return secret
}
+
+func TLSMinVersionFromEnv(defaultTLSMinVersion uint16) uint16 {
+ switch tlsMinVersion := os.Getenv(tlsMinVersionEnvKey); tlsMinVersion {
+ case "1.2":
+ return tls.VersionTLS12
+ case "1.3":
+ return tls.VersionTLS13
+ case "":
+ return defaultTLSMinVersion
+ default:
+ panic(fmt.Sprintf("the environment variable %q has to be either '1.2' or '1.3'", tlsMinVersionEnvKey))
+ }
+}
diff --git a/vendor/knative.dev/pkg/webhook/webhook.go b/vendor/knative.dev/pkg/webhook/webhook.go
index 6099e6ac5..779d388d2 100644
--- a/vendor/knative.dev/pkg/webhook/webhook.go
+++ b/vendor/knative.dev/pkg/webhook/webhook.go
@@ -40,6 +40,10 @@ import (
// Options contains the configuration for the webhook
type Options struct {
+ // TLSMinVersion contains the minimum TLS version that is acceptable to communicate with the API server.
+ // TLS 1.3 is the minimum version if not specified otherwise.
+ TLSMinVersion uint16
+
// ServiceName is the service name of the webhook.
ServiceName string
@@ -119,6 +123,13 @@ func New(
opts.StatsReporter = reporter
}
+ defaultTLSMinVersion := uint16(tls.VersionTLS13)
+ if opts.TLSMinVersion == 0 {
+ opts.TLSMinVersion = TLSMinVersionFromEnv(defaultTLSMinVersion)
+ } else if opts.TLSMinVersion != tls.VersionTLS12 && opts.TLSMinVersion != tls.VersionTLS13 {
+ return nil, fmt.Errorf("unsupported TLS version: %d", opts.TLSMinVersion)
+ }
+
syncCtx, cancel := context.WithCancel(context.Background())
webhook = &Webhook{
@@ -136,7 +147,7 @@ func New(
secretInformer := kubeinformerfactory.Get(ctx).Core().V1().Secrets()
webhook.tlsConfig = &tls.Config{
- MinVersion: tls.VersionTLS12,
+ MinVersion: opts.TLSMinVersion,
// If we return (nil, error) the client sees - 'tls: internal error"
// If we return (nil, nil) the client sees - 'tls: no certificates configured'
diff --git a/vendor/modules.txt b/vendor/modules.txt
index a092581b0..f573d52fe 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -18,7 +18,7 @@ contrib.go.opencensus.io/exporter/zipkin
github.com/AlecAivazis/survey/v2
github.com/AlecAivazis/survey/v2/core
github.com/AlecAivazis/survey/v2/terminal
-# github.com/ProtonMail/go-crypto v0.0.0-20230320150741-8451524ecd7e
+# github.com/ProtonMail/go-crypto v0.0.0-20230426101702-58e86b294756
## explicit; go 1.13
github.com/ProtonMail/go-crypto/bitcurves
github.com/ProtonMail/go-crypto/brainpool
@@ -41,12 +41,12 @@ github.com/ProtonMail/go-crypto/openpgp/s2k
# github.com/PuerkitoBio/goquery v1.8.1
## explicit; go 1.13
github.com/PuerkitoBio/goquery
-# github.com/andybalholm/cascadia v1.3.1
+# github.com/andybalholm/cascadia v1.3.2
## explicit; go 1.16
github.com/andybalholm/cascadia
-# github.com/antlr/antlr4/runtime/Go/antlr v1.4.10
-## explicit; go 1.16
-github.com/antlr/antlr4/runtime/Go/antlr
+# github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230321174746-8dcc6526cfb1
+## explicit; go 1.18
+github.com/antlr/antlr4/runtime/Go/antlr/v4
# github.com/benbjohnson/clock v1.1.0
## explicit; go 1.15
github.com/benbjohnson/clock
@@ -59,7 +59,7 @@ github.com/blang/semver/v4
# github.com/blendle/zapdriver v1.3.1
## explicit; go 1.12
github.com/blendle/zapdriver
-# github.com/bradleyfalzon/ghinstallation/v2 v2.2.0
+# github.com/bradleyfalzon/ghinstallation/v2 v2.4.0
## explicit; go 1.13
github.com/bradleyfalzon/ghinstallation/v2
# github.com/census-instrumentation/opencensus-proto v0.4.1
@@ -73,11 +73,11 @@ github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1
# github.com/cespare/xxhash/v2 v2.2.0
## explicit; go 1.11
github.com/cespare/xxhash/v2
-# github.com/cloudevents/sdk-go/observability/opencensus/v2 v2.13.0
+# github.com/cloudevents/sdk-go/observability/opencensus/v2 v2.14.0
## explicit; go 1.17
github.com/cloudevents/sdk-go/observability/opencensus/v2/client
github.com/cloudevents/sdk-go/observability/opencensus/v2/http
-# github.com/cloudevents/sdk-go/v2 v2.13.0
+# github.com/cloudevents/sdk-go/v2 v2.14.0
## explicit; go 1.17
github.com/cloudevents/sdk-go/v2
github.com/cloudevents/sdk-go/v2/binding
@@ -94,8 +94,8 @@ github.com/cloudevents/sdk-go/v2/observability
github.com/cloudevents/sdk-go/v2/protocol
github.com/cloudevents/sdk-go/v2/protocol/http
github.com/cloudevents/sdk-go/v2/types
-# github.com/cloudflare/circl v1.3.2
-## explicit; go 1.17
+# github.com/cloudflare/circl v1.3.3
+## explicit; go 1.19
github.com/cloudflare/circl/dh/x25519
github.com/cloudflare/circl/dh/x448
github.com/cloudflare/circl/ecc/goldilocks
@@ -134,7 +134,7 @@ github.com/go-kit/log/level
# github.com/go-logfmt/logfmt v0.6.0
## explicit; go 1.17
github.com/go-logfmt/logfmt
-# github.com/go-logr/logr v1.2.3
+# github.com/go-logr/logr v1.2.4
## explicit; go 1.16
github.com/go-logr/logr
# github.com/go-openapi/jsonpointer v0.19.6
@@ -175,7 +175,7 @@ github.com/golang/protobuf/ptypes
github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/timestamp
-# github.com/google/cel-go v0.13.0
+# github.com/google/cel-go v0.15.1
## explicit; go 1.18
github.com/google/cel-go/cel
github.com/google/cel-go/checker
@@ -209,15 +209,15 @@ github.com/google/go-cmp/cmp/internal/diff
github.com/google/go-cmp/cmp/internal/flags
github.com/google/go-cmp/cmp/internal/function
github.com/google/go-cmp/cmp/internal/value
-# github.com/google/go-containerregistry v0.14.0
+# github.com/google/go-containerregistry v0.15.1
## explicit; go 1.18
github.com/google/go-containerregistry/pkg/name
-# github.com/google/go-github/scrape v0.0.0-20230320201353-31350112a17a
+# github.com/google/go-github/scrape v0.0.0-20230508205121-0b2f91c92505
## explicit; go 1.13
github.com/google/go-github/scrape
-# github.com/google/go-github/v50 v50.2.0
+# github.com/google/go-github/v52 v52.0.0
## explicit; go 1.17
-github.com/google/go-github/v50/github
+github.com/google/go-github/v52/github
# github.com/google/go-querystring v1.1.0
## explicit; go 1.10
github.com/google/go-querystring/query
@@ -255,14 +255,14 @@ github.com/hashicorp/go-version
## explicit; go 1.12
github.com/hashicorp/golang-lru
github.com/hashicorp/golang-lru/simplelru
-# github.com/imdario/mergo v0.3.14
+# github.com/imdario/mergo v0.3.15
## explicit; go 1.13
github.com/imdario/mergo
# github.com/inconshreveable/mousetrap v1.1.0
## explicit; go 1.18
github.com/inconshreveable/mousetrap
-# github.com/jonboulle/clockwork v0.3.0
-## explicit; go 1.13
+# github.com/jonboulle/clockwork v0.4.0
+## explicit; go 1.15
github.com/jonboulle/clockwork
# github.com/josharian/intern v1.0.0
## explicit; go 1.5
@@ -280,7 +280,7 @@ github.com/kballard/go-shellquote
# github.com/kelseyhightower/envconfig v1.4.0
## explicit
github.com/kelseyhightower/envconfig
-# github.com/ktrysmt/go-bitbucket v0.9.55
+# github.com/ktrysmt/go-bitbucket v0.9.56
## explicit; go 1.14
github.com/ktrysmt/go-bitbucket
# github.com/lunixbochs/vtclean v1.0.0
@@ -294,7 +294,7 @@ github.com/mailru/easyjson/jwriter
# github.com/mattn/go-colorable v0.1.13
## explicit; go 1.15
github.com/mattn/go-colorable
-# github.com/mattn/go-isatty v0.0.17
+# github.com/mattn/go-isatty v0.0.18
## explicit; go 1.15
github.com/mattn/go-isatty
# github.com/matttproud/golang_protobuf_extensions v1.0.4
@@ -329,15 +329,15 @@ github.com/openzipkin/zipkin-go/reporter/http
# github.com/pkg/errors v0.9.1
## explicit
github.com/pkg/errors
-# github.com/prometheus/client_golang v1.14.0
+# github.com/prometheus/client_golang v1.15.1
## explicit; go 1.17
github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/internal
github.com/prometheus/client_golang/prometheus/promhttp
-# github.com/prometheus/client_model v0.3.0
-## explicit; go 1.9
+# github.com/prometheus/client_model v0.4.0
+## explicit; go 1.18
github.com/prometheus/client_model/go
-# github.com/prometheus/common v0.42.0
+# github.com/prometheus/common v0.43.0
## explicit; go 1.18
github.com/prometheus/common/expfmt
github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
@@ -358,16 +358,16 @@ github.com/rickb777/date/period
# github.com/rickb777/plural v1.4.1
## explicit; go 1.17
github.com/rickb777/plural
-# github.com/spf13/cobra v1.6.1
+# github.com/spf13/cobra v1.7.0
## explicit; go 1.15
github.com/spf13/cobra
# github.com/spf13/pflag v1.0.5
## explicit; go 1.12
github.com/spf13/pflag
-# github.com/stoewer/go-strcase v1.2.1
+# github.com/stoewer/go-strcase v1.3.0
## explicit; go 1.11
github.com/stoewer/go-strcase
-# github.com/tektoncd/pipeline v0.46.0
+# github.com/tektoncd/pipeline v0.47.0
## explicit; go 1.19
github.com/tektoncd/pipeline/pkg/apis/config
github.com/tektoncd/pipeline/pkg/apis/pipeline
@@ -375,6 +375,7 @@ github.com/tektoncd/pipeline/pkg/apis/pipeline/pod
github.com/tektoncd/pipeline/pkg/apis/pipeline/v1
github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1
github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1
+github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1
github.com/tektoncd/pipeline/pkg/apis/run/v1alpha1
github.com/tektoncd/pipeline/pkg/apis/run/v1beta1
github.com/tektoncd/pipeline/pkg/apis/validate
@@ -407,9 +408,10 @@ github.com/tektoncd/pipeline/pkg/client/listers/pipeline/v1beta1
github.com/tektoncd/pipeline/pkg/list
github.com/tektoncd/pipeline/pkg/names
github.com/tektoncd/pipeline/pkg/reconciler/pipeline/dag
+github.com/tektoncd/pipeline/pkg/result
github.com/tektoncd/pipeline/pkg/spire/config
github.com/tektoncd/pipeline/pkg/substitution
-# github.com/xanzy/go-gitlab v0.81.0
+# github.com/xanzy/go-gitlab v0.83.0
## explicit; go 1.18
github.com/xanzy/go-gitlab
# github.com/xlzd/gotp v0.1.0
@@ -436,7 +438,7 @@ go.opencensus.io/trace
go.opencensus.io/trace/internal
go.opencensus.io/trace/propagation
go.opencensus.io/trace/tracestate
-# go.uber.org/atomic v1.10.0
+# go.uber.org/atomic v1.11.0
## explicit; go 1.18
go.uber.org/atomic
# go.uber.org/automaxprocs v1.5.2
@@ -444,8 +446,8 @@ go.uber.org/atomic
go.uber.org/automaxprocs/internal/cgroups
go.uber.org/automaxprocs/internal/runtime
go.uber.org/automaxprocs/maxprocs
-# go.uber.org/multierr v1.8.0
-## explicit; go 1.14
+# go.uber.org/multierr v1.11.0
+## explicit; go 1.19
go.uber.org/multierr
# go.uber.org/zap v1.24.0
## explicit; go 1.19
@@ -459,17 +461,19 @@ go.uber.org/zap/internal/ztest
go.uber.org/zap/zapcore
go.uber.org/zap/zaptest
go.uber.org/zap/zaptest/observer
-# golang.org/x/crypto v0.7.0
+# golang.org/x/crypto v0.9.0
## explicit; go 1.17
golang.org/x/crypto/argon2
golang.org/x/crypto/blake2b
golang.org/x/crypto/cast5
golang.org/x/crypto/hkdf
golang.org/x/crypto/sha3
-# golang.org/x/exp v0.0.0-20230321023759-10a507213a29
-## explicit; go 1.18
+# golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53
+## explicit; go 1.20
+golang.org/x/exp/constraints
golang.org/x/exp/maps
-# golang.org/x/net v0.8.0
+golang.org/x/exp/slices
+# golang.org/x/net v0.10.0
## explicit; go 1.17
golang.org/x/net/context
golang.org/x/net/html
@@ -482,27 +486,27 @@ golang.org/x/net/idna
golang.org/x/net/internal/timeseries
golang.org/x/net/publicsuffix
golang.org/x/net/trace
-# golang.org/x/oauth2 v0.6.0
+# golang.org/x/oauth2 v0.8.0
## explicit; go 1.17
golang.org/x/oauth2
golang.org/x/oauth2/bitbucket
golang.org/x/oauth2/clientcredentials
golang.org/x/oauth2/internal
-# golang.org/x/sync v0.1.0
+# golang.org/x/sync v0.2.0
## explicit
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
-# golang.org/x/sys v0.6.0
+# golang.org/x/sys v0.8.0
## explicit; go 1.17
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
-# golang.org/x/term v0.6.0
+# golang.org/x/term v0.8.0
## explicit; go 1.17
golang.org/x/term
-# golang.org/x/text v0.8.0
+# golang.org/x/text v0.9.0
## explicit; go 1.17
golang.org/x/text/cases
golang.org/x/text/internal
@@ -521,7 +525,7 @@ golang.org/x/time/rate
# gomodules.xyz/jsonpatch/v2 v2.2.0
## explicit; go 1.12
gomodules.xyz/jsonpatch/v2
-# google.golang.org/api v0.114.0
+# google.golang.org/api v0.122.0
## explicit; go 1.19
google.golang.org/api/support/bundler
# google.golang.org/appengine v1.6.7
@@ -533,13 +537,13 @@ google.golang.org/appengine/internal/log
google.golang.org/appengine/internal/remote_api
google.golang.org/appengine/internal/urlfetch
google.golang.org/appengine/urlfetch
-# google.golang.org/genproto v0.0.0-20230320184635-7606e756e683
+# google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1
## explicit; go 1.19
google.golang.org/genproto/googleapis/api/expr/v1alpha1
google.golang.org/genproto/googleapis/api/httpbody
google.golang.org/genproto/googleapis/rpc/status
google.golang.org/genproto/protobuf/field_mask
-# google.golang.org/grpc v1.53.0
+# google.golang.org/grpc v1.55.0
## explicit; go 1.17
google.golang.org/grpc
google.golang.org/grpc/attributes
@@ -650,7 +654,7 @@ gotest.tools/v3/internal/cleanup
gotest.tools/v3/internal/difflib
gotest.tools/v3/internal/format
gotest.tools/v3/internal/source
-# k8s.io/api v0.26.3
+# k8s.io/api v0.27.1 => k8s.io/api v0.26.3
## explicit; go 1.19
k8s.io/api/admission/v1
k8s.io/api/admissionregistration/v1
@@ -699,12 +703,12 @@ k8s.io/api/scheduling/v1beta1
k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
-# k8s.io/apiextensions-apiserver v0.26.3
-## explicit; go 1.19
+# k8s.io/apiextensions-apiserver v0.27.1
+## explicit; go 1.20
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
-# k8s.io/apimachinery v0.26.3
-## explicit; go 1.19
+# k8s.io/apimachinery v0.27.1
+## explicit; go 1.20
k8s.io/apimachinery/pkg/api/equality
k8s.io/apimachinery/pkg/api/errors
k8s.io/apimachinery/pkg/api/meta
@@ -736,6 +740,7 @@ k8s.io/apimachinery/pkg/util/framer
k8s.io/apimachinery/pkg/util/intstr
k8s.io/apimachinery/pkg/util/json
k8s.io/apimachinery/pkg/util/managedfields
+k8s.io/apimachinery/pkg/util/managedfields/internal
k8s.io/apimachinery/pkg/util/mergepatch
k8s.io/apimachinery/pkg/util/naming
k8s.io/apimachinery/pkg/util/net
@@ -1035,7 +1040,7 @@ k8s.io/client-go/util/jsonpath
k8s.io/client-go/util/keyutil
k8s.io/client-go/util/retry
k8s.io/client-go/util/workqueue
-# k8s.io/klog/v2 v2.90.1
+# k8s.io/klog/v2 v2.100.1
## explicit; go 1.13
k8s.io/klog/v2
k8s.io/klog/v2/internal/buffer
@@ -1043,13 +1048,13 @@ k8s.io/klog/v2/internal/clock
k8s.io/klog/v2/internal/dbg
k8s.io/klog/v2/internal/serialize
k8s.io/klog/v2/internal/severity
-# k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280
-## explicit; go 1.18
+# k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f
+## explicit; go 1.19
k8s.io/kube-openapi/pkg/builder3/util
+k8s.io/kube-openapi/pkg/cached
k8s.io/kube-openapi/pkg/common
k8s.io/kube-openapi/pkg/handler3
k8s.io/kube-openapi/pkg/internal
-k8s.io/kube-openapi/pkg/internal/handler
k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json
k8s.io/kube-openapi/pkg/openapiconv
k8s.io/kube-openapi/pkg/schemaconv
@@ -1057,7 +1062,7 @@ k8s.io/kube-openapi/pkg/schemamutation
k8s.io/kube-openapi/pkg/spec3
k8s.io/kube-openapi/pkg/util/proto
k8s.io/kube-openapi/pkg/validation/spec
-# k8s.io/utils v0.0.0-20230313181309-38a27ef9d749
+# k8s.io/utils v0.0.0-20230505201702-9f6742963106
## explicit; go 1.18
k8s.io/utils/buffer
k8s.io/utils/clock
@@ -1068,18 +1073,19 @@ k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/strings/slices
k8s.io/utils/trace
-# knative.dev/eventing v0.36.7
-## explicit; go 1.18
+# knative.dev/eventing v0.37.0
+## explicit; go 1.19
knative.dev/eventing/pkg/adapter/v2
knative.dev/eventing/pkg/adapter/v2/util/crstatusevent
knative.dev/eventing/pkg/apis/duck/v1
knative.dev/eventing/pkg/apis/feature
+knative.dev/eventing/pkg/eventingtls
knative.dev/eventing/pkg/kncloudevents
knative.dev/eventing/pkg/metrics
knative.dev/eventing/pkg/metrics/source
knative.dev/eventing/pkg/observability
knative.dev/eventing/pkg/observability/client
-# knative.dev/pkg v0.0.0-20230320014357-4c84b1b51ee8
+# knative.dev/pkg v0.0.0-20230502134655-db8a35330281
## explicit; go 1.18
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
@@ -1135,6 +1141,7 @@ sigs.k8s.io/json/internal/golang/encoding/json
# sigs.k8s.io/structured-merge-diff/v4 v4.2.3
## explicit; go 1.13
sigs.k8s.io/structured-merge-diff/v4/fieldpath
+sigs.k8s.io/structured-merge-diff/v4/merge
sigs.k8s.io/structured-merge-diff/v4/schema
sigs.k8s.io/structured-merge-diff/v4/typed
sigs.k8s.io/structured-merge-diff/v4/value
@@ -1142,3 +1149,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
## explicit; go 1.12
sigs.k8s.io/yaml
# k8s.io/client-go => k8s.io/client-go v0.25.4
+# k8s.io/api => k8s.io/api v0.26.3
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/conflict.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/conflict.go
new file mode 100644
index 000000000..75a492d8e
--- /dev/null
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/conflict.go
@@ -0,0 +1,121 @@
+/*
+Copyright 2018 The Kubernetes 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 merge
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+)
+
+// Conflict is a conflict on a specific field with the current manager of
+// that field. It does implement the error interface so that it can be
+// used as an error.
+type Conflict struct {
+ Manager string
+ Path fieldpath.Path
+}
+
+// Conflict is an error.
+var _ error = Conflict{}
+
+// Error formats the conflict as an error.
+func (c Conflict) Error() string {
+ return fmt.Sprintf("conflict with %q: %v", c.Manager, c.Path)
+}
+
+// Equals returns true if c == c2
+func (c Conflict) Equals(c2 Conflict) bool {
+ if c.Manager != c2.Manager {
+ return false
+ }
+ return c.Path.Equals(c2.Path)
+}
+
+// Conflicts accumulates multiple conflicts and aggregates them by managers.
+type Conflicts []Conflict
+
+var _ error = Conflicts{}
+
+// Error prints the list of conflicts, grouped by sorted managers.
+func (conflicts Conflicts) Error() string {
+ if len(conflicts) == 1 {
+ return conflicts[0].Error()
+ }
+
+ m := map[string][]fieldpath.Path{}
+ for _, conflict := range conflicts {
+ m[conflict.Manager] = append(m[conflict.Manager], conflict.Path)
+ }
+
+ managers := []string{}
+ for manager := range m {
+ managers = append(managers, manager)
+ }
+
+ // Print conflicts by sorted managers.
+ sort.Strings(managers)
+
+ messages := []string{}
+ for _, manager := range managers {
+ messages = append(messages, fmt.Sprintf("conflicts with %q:", manager))
+ for _, path := range m[manager] {
+ messages = append(messages, fmt.Sprintf("- %v", path))
+ }
+ }
+ return strings.Join(messages, "\n")
+}
+
+// Equals returns true if the lists of conflicts are the same.
+func (c Conflicts) Equals(c2 Conflicts) bool {
+ if len(c) != len(c2) {
+ return false
+ }
+ for i := range c {
+ if !c[i].Equals(c2[i]) {
+ return false
+ }
+ }
+ return true
+}
+
+// ToSet aggregates conflicts for all managers into a single Set.
+func (c Conflicts) ToSet() *fieldpath.Set {
+ set := fieldpath.NewSet()
+ for _, conflict := range []Conflict(c) {
+ set.Insert(conflict.Path)
+ }
+ return set
+}
+
+// ConflictsFromManagers creates a list of conflicts given Managers sets.
+func ConflictsFromManagers(sets fieldpath.ManagedFields) Conflicts {
+ conflicts := []Conflict{}
+
+ for manager, set := range sets {
+ set.Set().Iterate(func(p fieldpath.Path) {
+ conflicts = append(conflicts, Conflict{
+ Manager: manager,
+ Path: p,
+ })
+ })
+ }
+
+ return conflicts
+}
diff --git a/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/update.go b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/update.go
new file mode 100644
index 000000000..1b23dcbd5
--- /dev/null
+++ b/vendor/sigs.k8s.io/structured-merge-diff/v4/merge/update.go
@@ -0,0 +1,356 @@
+/*
+Copyright 2018 The Kubernetes 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 merge
+
+import (
+ "fmt"
+
+ "sigs.k8s.io/structured-merge-diff/v4/fieldpath"
+ "sigs.k8s.io/structured-merge-diff/v4/typed"
+)
+
+// Converter is an interface to the conversion logic. The converter
+// needs to be able to convert objects from one version to another.
+type Converter interface {
+ Convert(object *typed.TypedValue, version fieldpath.APIVersion) (*typed.TypedValue, error)
+ IsMissingVersionError(error) bool
+}
+
+// Updater is the object used to compute updated FieldSets and also
+// merge the object on Apply.
+type Updater struct {
+ Converter Converter
+ IgnoredFields map[fieldpath.APIVersion]*fieldpath.Set
+
+ enableUnions bool
+}
+
+// EnableUnionFeature turns on union handling. It is disabled by default until the
+// feature is complete.
+func (s *Updater) EnableUnionFeature() {
+ s.enableUnions = true
+}
+
+func (s *Updater) update(oldObject, newObject *typed.TypedValue, version fieldpath.APIVersion, managers fieldpath.ManagedFields, workflow string, force bool) (fieldpath.ManagedFields, *typed.Comparison, error) {
+ conflicts := fieldpath.ManagedFields{}
+ removed := fieldpath.ManagedFields{}
+ compare, err := oldObject.Compare(newObject)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to compare objects: %v", err)
+ }
+
+ versions := map[fieldpath.APIVersion]*typed.Comparison{
+ version: compare.ExcludeFields(s.IgnoredFields[version]),
+ }
+
+ for manager, managerSet := range managers {
+ if manager == workflow {
+ continue
+ }
+ compare, ok := versions[managerSet.APIVersion()]
+ if !ok {
+ var err error
+ versionedOldObject, err := s.Converter.Convert(oldObject, managerSet.APIVersion())
+ if err != nil {
+ if s.Converter.IsMissingVersionError(err) {
+ delete(managers, manager)
+ continue
+ }
+ return nil, nil, fmt.Errorf("failed to convert old object: %v", err)
+ }
+ versionedNewObject, err := s.Converter.Convert(newObject, managerSet.APIVersion())
+ if err != nil {
+ if s.Converter.IsMissingVersionError(err) {
+ delete(managers, manager)
+ continue
+ }
+ return nil, nil, fmt.Errorf("failed to convert new object: %v", err)
+ }
+ compare, err = versionedOldObject.Compare(versionedNewObject)
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to compare objects: %v", err)
+ }
+ versions[managerSet.APIVersion()] = compare.ExcludeFields(s.IgnoredFields[managerSet.APIVersion()])
+ }
+
+ conflictSet := managerSet.Set().Intersection(compare.Modified.Union(compare.Added))
+ if !conflictSet.Empty() {
+ conflicts[manager] = fieldpath.NewVersionedSet(conflictSet, managerSet.APIVersion(), false)
+ }
+
+ if !compare.Removed.Empty() {
+ removed[manager] = fieldpath.NewVersionedSet(compare.Removed, managerSet.APIVersion(), false)
+ }
+ }
+
+ if !force && len(conflicts) != 0 {
+ return nil, nil, ConflictsFromManagers(conflicts)
+ }
+
+ for manager, conflictSet := range conflicts {
+ managers[manager] = fieldpath.NewVersionedSet(managers[manager].Set().Difference(conflictSet.Set()), managers[manager].APIVersion(), managers[manager].Applied())
+ }
+
+ for manager, removedSet := range removed {
+ managers[manager] = fieldpath.NewVersionedSet(managers[manager].Set().Difference(removedSet.Set()), managers[manager].APIVersion(), managers[manager].Applied())
+ }
+
+ for manager := range managers {
+ if managers[manager].Set().Empty() {
+ delete(managers, manager)
+ }
+ }
+
+ return managers, compare, nil
+}
+
+// Update is the method you should call once you've merged your final
+// object on CREATE/UPDATE/PATCH verbs. newObject must be the object
+// that you intend to persist (after applying the patch if this is for a
+// PATCH call), and liveObject must be the original object (empty if
+// this is a CREATE call).
+func (s *Updater) Update(liveObject, newObject *typed.TypedValue, version fieldpath.APIVersion, managers fieldpath.ManagedFields, manager string) (*typed.TypedValue, fieldpath.ManagedFields, error) {
+ var err error
+ managers, err = s.reconcileManagedFieldsWithSchemaChanges(liveObject, managers)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, err
+ }
+ if s.enableUnions {
+ newObject, err = liveObject.NormalizeUnions(newObject)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, err
+ }
+ }
+ managers, compare, err := s.update(liveObject, newObject, version, managers, manager, true)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, err
+ }
+ if _, ok := managers[manager]; !ok {
+ managers[manager] = fieldpath.NewVersionedSet(fieldpath.NewSet(), version, false)
+ }
+
+ ignored := s.IgnoredFields[version]
+ if ignored == nil {
+ ignored = fieldpath.NewSet()
+ }
+ managers[manager] = fieldpath.NewVersionedSet(
+ managers[manager].Set().Union(compare.Modified).Union(compare.Added).Difference(compare.Removed).RecursiveDifference(ignored),
+ version,
+ false,
+ )
+ if managers[manager].Set().Empty() {
+ delete(managers, manager)
+ }
+ return newObject, managers, nil
+}
+
+// Apply should be called when Apply is run, given the current object as
+// well as the configuration that is applied. This will merge the object
+// and return it. If the object hasn't changed, nil is returned (the
+// managers can still have changed though).
+func (s *Updater) Apply(liveObject, configObject *typed.TypedValue, version fieldpath.APIVersion, managers fieldpath.ManagedFields, manager string, force bool) (*typed.TypedValue, fieldpath.ManagedFields, error) {
+ var err error
+ managers, err = s.reconcileManagedFieldsWithSchemaChanges(liveObject, managers)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, err
+ }
+ if s.enableUnions {
+ configObject, err = configObject.NormalizeUnionsApply(configObject)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, err
+ }
+ }
+ newObject, err := liveObject.Merge(configObject)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, fmt.Errorf("failed to merge config: %v", err)
+ }
+ if s.enableUnions {
+ newObject, err = configObject.NormalizeUnionsApply(newObject)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, err
+ }
+ }
+ lastSet := managers[manager]
+ set, err := configObject.ToFieldSet()
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, fmt.Errorf("failed to get field set: %v", err)
+ }
+
+ ignored := s.IgnoredFields[version]
+ if ignored != nil {
+ set = set.RecursiveDifference(ignored)
+ // TODO: is this correct. If we don't remove from lastSet pruning might remove the fields?
+ if lastSet != nil {
+ lastSet.Set().RecursiveDifference(ignored)
+ }
+ }
+ managers[manager] = fieldpath.NewVersionedSet(set, version, true)
+ newObject, err = s.prune(newObject, managers, manager, lastSet)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, fmt.Errorf("failed to prune fields: %v", err)
+ }
+ managers, compare, err := s.update(liveObject, newObject, version, managers, manager, force)
+ if err != nil {
+ return nil, fieldpath.ManagedFields{}, err
+ }
+ if compare.IsSame() {
+ newObject = nil
+ }
+ return newObject, managers, nil
+}
+
+// prune will remove a field, list or map item, iff:
+// * applyingManager applied it last time
+// * applyingManager didn't apply it this time
+// * no other applier claims to manage it
+func (s *Updater) prune(merged *typed.TypedValue, managers fieldpath.ManagedFields, applyingManager string, lastSet fieldpath.VersionedSet) (*typed.TypedValue, error) {
+ if lastSet == nil || lastSet.Set().Empty() {
+ return merged, nil
+ }
+ convertedMerged, err := s.Converter.Convert(merged, lastSet.APIVersion())
+ if err != nil {
+ if s.Converter.IsMissingVersionError(err) {
+ return merged, nil
+ }
+ return nil, fmt.Errorf("failed to convert merged object to last applied version: %v", err)
+ }
+
+ sc, tr := convertedMerged.Schema(), convertedMerged.TypeRef()
+ pruned := convertedMerged.RemoveItems(lastSet.Set().EnsureNamedFieldsAreMembers(sc, tr))
+ pruned, err = s.addBackOwnedItems(convertedMerged, pruned, managers, applyingManager)
+ if err != nil {
+ return nil, fmt.Errorf("failed add back owned items: %v", err)
+ }
+ pruned, err = s.addBackDanglingItems(convertedMerged, pruned, lastSet)
+ if err != nil {
+ return nil, fmt.Errorf("failed add back dangling items: %v", err)
+ }
+ return s.Converter.Convert(pruned, managers[applyingManager].APIVersion())
+}
+
+// addBackOwnedItems adds back any fields, list and map items that were removed by prune,
+// but other appliers or updaters (or the current applier's new config) claim to own.
+func (s *Updater) addBackOwnedItems(merged, pruned *typed.TypedValue, managedFields fieldpath.ManagedFields, applyingManager string) (*typed.TypedValue, error) {
+ var err error
+ managedAtVersion := map[fieldpath.APIVersion]*fieldpath.Set{}
+ for _, managerSet := range managedFields {
+ if _, ok := managedAtVersion[managerSet.APIVersion()]; !ok {
+ managedAtVersion[managerSet.APIVersion()] = fieldpath.NewSet()
+ }
+ managedAtVersion[managerSet.APIVersion()] = managedAtVersion[managerSet.APIVersion()].Union(managerSet.Set())
+ }
+ // Add back owned items at pruned version first to avoid conversion failure
+ // caused by pruned fields which are required for conversion.
+ prunedVersion := fieldpath.APIVersion(*pruned.TypeRef().NamedType)
+ if managed, ok := managedAtVersion[prunedVersion]; ok {
+ merged, pruned, err = s.addBackOwnedItemsForVersion(merged, pruned, prunedVersion, managed)
+ if err != nil {
+ return nil, err
+ }
+ delete(managedAtVersion, prunedVersion)
+ }
+ for version, managed := range managedAtVersion {
+ merged, pruned, err = s.addBackOwnedItemsForVersion(merged, pruned, version, managed)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return pruned, nil
+}
+
+// addBackOwnedItemsForVersion adds back any fields, list and map items that were removed by prune with specific managed field path at a version.
+// It is an extracted sub-function from addBackOwnedItems for code reuse.
+func (s *Updater) addBackOwnedItemsForVersion(merged, pruned *typed.TypedValue, version fieldpath.APIVersion, managed *fieldpath.Set) (*typed.TypedValue, *typed.TypedValue, error) {
+ var err error
+ merged, err = s.Converter.Convert(merged, version)
+ if err != nil {
+ if s.Converter.IsMissingVersionError(err) {
+ return merged, pruned, nil
+ }
+ return nil, nil, fmt.Errorf("failed to convert merged object at version %v: %v", version, err)
+ }
+ pruned, err = s.Converter.Convert(pruned, version)
+ if err != nil {
+ if s.Converter.IsMissingVersionError(err) {
+ return merged, pruned, nil
+ }
+ return nil, nil, fmt.Errorf("failed to convert pruned object at version %v: %v", version, err)
+ }
+ mergedSet, err := merged.ToFieldSet()
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to create field set from merged object at version %v: %v", version, err)
+ }
+ prunedSet, err := pruned.ToFieldSet()
+ if err != nil {
+ return nil, nil, fmt.Errorf("failed to create field set from pruned object at version %v: %v", version, err)
+ }
+ sc, tr := merged.Schema(), merged.TypeRef()
+ pruned = merged.RemoveItems(mergedSet.EnsureNamedFieldsAreMembers(sc, tr).Difference(prunedSet.EnsureNamedFieldsAreMembers(sc, tr).Union(managed.EnsureNamedFieldsAreMembers(sc, tr))))
+ return merged, pruned, nil
+}
+
+// addBackDanglingItems makes sure that the fields list and map items removed by prune were
+// previously owned by the currently applying manager. This will add back fields list and map items
+// that are unowned or that are owned by Updaters and shouldn't be removed.
+func (s *Updater) addBackDanglingItems(merged, pruned *typed.TypedValue, lastSet fieldpath.VersionedSet) (*typed.TypedValue, error) {
+ convertedPruned, err := s.Converter.Convert(pruned, lastSet.APIVersion())
+ if err != nil {
+ if s.Converter.IsMissingVersionError(err) {
+ return merged, nil
+ }
+ return nil, fmt.Errorf("failed to convert pruned object to last applied version: %v", err)
+ }
+ prunedSet, err := convertedPruned.ToFieldSet()
+ if err != nil {
+ return nil, fmt.Errorf("failed to create field set from pruned object in last applied version: %v", err)
+ }
+ mergedSet, err := merged.ToFieldSet()
+ if err != nil {
+ return nil, fmt.Errorf("failed to create field set from merged object in last applied version: %v", err)
+ }
+ sc, tr := merged.Schema(), merged.TypeRef()
+ prunedSet = prunedSet.EnsureNamedFieldsAreMembers(sc, tr)
+ mergedSet = mergedSet.EnsureNamedFieldsAreMembers(sc, tr)
+ last := lastSet.Set().EnsureNamedFieldsAreMembers(sc, tr)
+ return merged.RemoveItems(mergedSet.Difference(prunedSet).Intersection(last)), nil
+}
+
+// reconcileManagedFieldsWithSchemaChanges reconciles the managed fields with any changes to the
+// object's schema since the managed fields were written.
+//
+// Supports:
+// - changing types from atomic to granular
+// - changing types from granular to atomic
+func (s *Updater) reconcileManagedFieldsWithSchemaChanges(liveObject *typed.TypedValue, managers fieldpath.ManagedFields) (fieldpath.ManagedFields, error) {
+ result := fieldpath.ManagedFields{}
+ for manager, versionedSet := range managers {
+ tv, err := s.Converter.Convert(liveObject, versionedSet.APIVersion())
+ if s.Converter.IsMissingVersionError(err) { // okay to skip, obsolete versions will be deleted automatically anyway
+ continue
+ }
+ if err != nil {
+ return nil, err
+ }
+ reconciled, err := typed.ReconcileFieldSetWithSchema(versionedSet.Set(), tv)
+ if err != nil {
+ return nil, err
+ }
+ if reconciled != nil {
+ result[manager] = fieldpath.NewVersionedSet(reconciled, versionedSet.APIVersion(), versionedSet.Applied())
+ } else {
+ result[manager] = versionedSet
+ }
+ }
+ return result, nil
+}